Adding files to Project's directory and getting path of the project [message #520371] |
Fri, 12 March 2010 01:53 |
Eclipse User |
|
|
|
I have an novice user to eclipse PDE. Currently I am developing one plugin. In this pluging I am generating some java classes.
This is done by Wizard.
Wizard asks some question and in the end it executes the command.
So
1) Before executing the wizard i want to check whether the workspace contains any project of not? If no project then Error message.
2) If their are some projects in the workspace then which is the current active project? I mean if instead of clicking on the Project Tree if user directly invokes the Wizard from toolbar then to which project I should add those classes? I mean is their any concept like active project or main project? If yes then how to get the main project?
Can you help me in above 2 scenarios(What hooks and where they should be added)?
This is the code of execute method of command
public Object execute(ExecutionEvent event) throws ExecutionException {
MySupportWizard wizard = new MySupportWizard();
WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
dialog.open();
return null;
}
}
Regards,
sHrik
|
|
|
Powered by
FUDForum. Page generated in 0.03344 seconds