Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Opening a Wizard using Action.
Opening a Wizard using Action. [message #158993] Thu, 08 November 2007 14:41 Go to next message
Eclipse UserFriend
Originally posted by: biju_gopinathan.rediffmail.com

Hi All,


In have three types of generated editors, which I cteate using
wizards. Now I create it by Selecting the wizard from , wizard choosing
dialog poped up on New-->Other menu. Instead of this, I would like to
show all my three Wizard Titles under the New menu itself, other than
choosing it from the wizard choosing dialog, like given below.

New--> "Template" Wizard
--> "Map" Wizard
--> "Planning" Wizard


Any Ideas.. Thanks, Biju
Re: Opening a Wizard using Action. [message #159188 is a reply to message #158993] Fri, 09 November 2007 10:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

biju schrieb:
> Any Ideas.. Thanks, Biju

Jap :-).
You could make your own perspective and add new wizard shortcuts with
the addNewWizardShortcut() Method.

Here a small code snippet from my perspective:

public class GenloopGlpPerspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {

[..]

// Add "show views".
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

[..]

layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file ");
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder ");
layout.addNewWizardShortcut("<Your-Wizard-Ids-Here>");
}
}

Hope that helps
Jens
Re: Opening a Wizard using Action. [message #159204 is a reply to message #159188] Fri, 09 November 2007 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: biju_gopinathan.rediffmail.com

HI Jens,

I tried it as you said, which is as follows, but I am not able
to view my wizard short cuts in the Menu.

layout.addNewWizardShortcut("NewTemplate");
layout.addNewWizardShortcut("NewRouteMap");

Is this enough, or should I do something more..? How can I bring the
Wizard Short cut under New menu Item. That is like
New-->Template
-->RouteMap

Thanks for your help ;) Biju





Jens Krause wrote:
> biju schrieb:
>> Any Ideas.. Thanks, Biju
>
> Jap :-).
> You could make your own perspective and add new wizard shortcuts with
> the addNewWizardShortcut() Method.
>
> Here a small code snippet from my perspective:
>
> public class GenloopGlpPerspective implements IPerspectiveFactory {
> public void createInitialLayout(IPageLayout layout) {
>
> [..]
>
> // Add "show views".
> layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
> layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
> layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
> layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
> layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
>
> [..]
>
> layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file ");
> layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder ");
> layout.addNewWizardShortcut("<Your-Wizard-Ids-Here>");
> }
> }
>
> Hope that helps
> Jens
Re: Opening a Wizard using Action. [message #159212 is a reply to message #159204] Fri, 09 November 2007 11:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

biju schrieb:
> HI Jens,
>
> I tried it as you said, which is as follows, but I am not able
> to view my wizard short cuts in the Menu.

Have you activate your perspective?

> layout.addNewWizardShortcut("NewTemplate");
> layout.addNewWizardShortcut("NewRouteMap");
> Is this enough, or should I do something more..?

If "NewTemplate" is the ID of your wizard, yes. But it seems quite short
for a full class name. For example, my wizard ID is
"ControlLayer.diagram.part.GenloopCreationWizard".
So if you have a GMF generated NewWizard the full classname (=ID) could
not be so short.

> How can I bring the
> Wizard Short cut under New menu Item. That is like
> New-->Template
> -->RouteMap

If everything is ok, it should appear exactly there. I have the
following entries in the New menu:

Project
---------separator---
File
Folder
Genloop Diagram <-- as in my perspective declared.
---------separator---
....



jens
Re: Opening a Wizard using Action. [message #159548 is a reply to message #159212] Mon, 12 November 2007 07:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: biju_gopinathan.rediffmail.com

Hi Jens,

Thanks for your reply,

> Have you activate your perspective?

Yes I have made the changes to my default perspective which is
"Template" and it is active on application run.

> If "NewTemplate" is the ID of your wizard,

Yes, Its the ID given by me in the wizard extension point and its not a
generated wizard.

And now I tried to bring my generated wizard in the 'New' menu using its
ID, which is also not working.

Any Idea, on what I might have missed to do..


Thanks for the help, Biju




Jens Krause wrote:
> biju schrieb:
>> HI Jens,
>>
>> I tried it as you said, which is as follows, but I am not able
>> to view my wizard short cuts in the Menu.
>
> Have you activate your perspective?
>
>> layout.addNewWizardShortcut("NewTemplate");
>> layout.addNewWizardShortcut("NewRouteMap");
>> Is this enough, or should I do something more..?
>
> If "NewTemplate" is the ID of your wizard, yes. But it seems quite short
> for a full class name. For example, my wizard ID is
> "ControlLayer.diagram.part.GenloopCreationWizard".
> So if you have a GMF generated NewWizard the full classname (=ID) could
> not be so short.
>
>> How can I bring the
>> Wizard Short cut under New menu Item. That is like
>> New-->Template
>> -->RouteMap
>
> If everything is ok, it should appear exactly there. I have the
> following entries in the New menu:
>
> Project
> ---------separator---
> File
> Folder
> Genloop Diagram <-- as in my perspective declared.
> ---------separator---
> ...
>
>
>
> jens
Re: Opening a Wizard using Action. [message #159882 is a reply to message #159548] Tue, 13 November 2007 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

biju schrieb:
> Any Idea, on what I might have missed to do..

You have to enter the full qualified class name in the
addNewWizardShortcut method.
It will not work with only "NewTemplate" there. That is the ID of your
wizard, but not the class name. Sorry for the confusing explanation at
first, but it is the class name you need, not the id.

hth
jens
Re: Opening a Wizard using Action. [message #160142 is a reply to message #159882] Wed, 14 November 2007 05:47 Go to previous message
Eclipse UserFriend
Originally posted by: biju_gopinathan.rediffmail.com

Hi Jens,

Thanks for your help,

Its not working for me, I think I need to create my own action now.

Thanks;), Biju
Jens Krause wrote:
> biju schrieb:
>> Any Idea, on what I might have missed to do..
>
> You have to enter the full qualified class name in the
> addNewWizardShortcut method.
> It will not work with only "NewTemplate" there. That is the ID of your
> wizard, but not the class name. Sorry for the confusing explanation at
> first, but it is the class name you need, not the id.
>
> hth
> jens
>
>
Previous Topic:data binding dialog
Next Topic:Relationship between Resourceset and EditingDomain
Goto Forum:
  


Current Time: Sat Apr 27 01:17:40 GMT 2024

Powered by FUDForum. Page generated in 0.03500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top