DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Want to create a cheat sheet action class.
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2008
Location: Karjat Ahmednagar
Thumbs down 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);
}
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Your favorite Eclipse cheat sheet? weiling Eclipse 1 01-28-2009 06:10 PM
I want to create action class to generate server wizard. prashantpathak@hsbc.co.in Eclipse 0 11-19-2008 08:43 AM
issues with Action RoryCarson Eclipse 0 10-22-2008 04:03 PM
how to disable an action on some other action sandeepp Eclipse 0 08-28-2008 07:29 AM
cheat sheet: dependency between tasks has no effect japolo Eclipse 0 06-20-2008 01:02 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com