开发者

HardCoded the import path in eclipse plugins development

开发者 https://www.devze.com 2022-12-23 00:18 出处:网络
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 ha

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号