HardCoded the import path in eclipse plugins development
Hi In eclipse when we open:-
File->Import->General->Existing Project into workspace then it prompt a import windowwhere We have to select a Root project Directory(Browse). At this place, i want to hardcode the Browse path. By default it goes to workspace directory but i want a fix path like C:\Tmp.
Can anyone help me with this? i have tried setfilterpath() but it is not supported in wizard case. my code looks like this:
public class OpenImportWizardAction extends Action {
public void run() {
IWorkbench workbench = PlatformUI.getWorkbench();
Shell shell = workbench.getActiveWorkbenchWindow().getShell();
ExternalProjectImportWizard wizard= new ExternalProjectImportWizard();
wizard.init(workbench,new StructuredSele开发者_如何学Pythonction());
WizardDialog dialog= new WizardDialog(shell, wizard);
dialog.create();
dialog.open();
}
}
Open a bug report against Eclipse (https://bugs.eclipse.org/bugs/) and ask for the import project wizard to remember the last directory.
If you want to hack the code yourself, try the other constructor: public ExternalProjectImportWizard(String initialPath)
精彩评论