|
Want to create a cheat sheet action class. -
11-19-2008, 08:33 AM
Hello,
I want to create a cheat sheet action class that will open File-- Import wizard page. Ultimately I want to bring user to "Import Existing projects into workspace" option.
I am trying it in my way like given below. But can not get the import wizards in 'General' category' as it is showing me wizards in 'Others' category.
Thanks !
My code is as follows:
public class ImportProjectWizard extends Action implements ICheatSheetAction {
/**
* @param params Contains all the parameters required to perform the action.
* params set on the contents file are
* param0 ,preference page id.
* @param manager cheatsheet manager.
*/
public void run(String[] params, ICheatSheetManager manager) {
IWorkbench workbench = CheatSheetUtility.getWorkbench();
Shell shell = CheatSheetUtility.getShell();
ImportWizard wizard = new ImportWizard();
wizard.init(workbench, new StructuredSelection());
wizard.setForcePreviousAndNextButtons(true);
wizard.addPages();
WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.create();
dialog.open();
this.notifyResult(true);
}
}
|