1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
public class ImportFileActionSet implements IWorkbenchWindowActionDelegate {
public void dispose() {
// TODO Auto-generated method stub
}
public void init(IWorkbenchWindow window) {
// TODO Auto-generated method stub
}
public void run(IAction action) {
// TODO Auto-generated method stub
Display d = new Display();
Shell s = new Shell(d);
s.setSize(400, 400);
s.setText("A MessageBox Example");
FileDialog fd = new FileDialog(s, SWT.SAVE);
fd.setText("Save");
fd.setFilterPath("C:/");
String[] filterExt = { "*.txt", "*.doc", ".rtf", "*.*" };
fd.setFilterExtensions(filterExt);
String selected = fd.open();
System.out.println(selected);*/
}
public void selectionChanged(IAction action, ISelection selection) {
// TODO Auto-generated method stub
}
} |
Partager