Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards? [message #331634] |
Mon, 15 September 2008 06:57  |
Eclipse User |
|
|
|
Hi.
I trying to create my RCP application and use the "New wizard"
functionality (extension org.eclipse.ui.newWizards) and new Eclipse
Command Framework (pre-defined command org.eclipse.ui.file.newQuickMenu)
for this purposes.
But my New menuitem and toolbar button is always disabled. What's wrong?
There is my steps for menubar:
-create new RCP application using the New Plug-In Wizard using Hello RCP
template
-add new extension org.eclipse.ui.newWizards (for test we can use the
"New File Wizard" template, although if you will create it from scratch
it will be the same problem)
-add extension org.eclipse.ui.menus
-add new menuContribution on the org.eclipse.ui.menus extension the item
menu:org.eclipse.ui.main.menu to add main menu to the application
-add new menu (let's name it "File")
-then add on it the predefined command with id
org.eclipse.ui.file.newQuickMenu
Now run the application and you will see that your \File\New sub-item
always is disable.
What I did missed?
How can I use org.eclipse.ui.file.newQuickMenu command?
P.S. I did use the org.eclipse.ui.file.import that way and everything
works fine for me.
Thank you.
|
|
|
|
Re: Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards [message #331675 is a reply to message #331640] |
Tue, 16 September 2008 09:07   |
Eclipse User |
|
|
|
Thank you, Paul for the answer.
Paul Webster wrote:
> AFAIK, org.eclipse.ui.file.newQuickMenu still depends on some of the
> action code (the command id is used to execute a QuickMenuAction).
Does it mean that I have to do this manually?Is it no way to use
declarative approach using the extensions definitions in the plugin.xml?
>
> Check out
> org.eclipse.ui.internal.ide.WorkbenchActionBuilder.makeActio ns(IWorkbenchWindow)
> and the createFileMenu(*) function to see how it still has to be set up.
I did check makeActions and createFileMenu but I see the "import" action
is created similarly to "new" action in the makeActions.
In the createFileMenu I see some differences but not yet understand it.
Looking to that code I guess that if org.eclipse.ui.file.newQuickMenu
still depends on some of the action code and this is the reason why I
can't use new command approach then Import/Export commands must not work
too. Because it looks like they still depends on some of the action code
too?
May be my problem is some not set context variable which makes New
button active?
|
|
|
Re: Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards [message #331677 is a reply to message #331634] |
Tue, 16 September 2008 09:40   |
Eclipse User |
|
|
|
I did try org.eclipse.ui.newWizard instead of
org.eclipse.ui.file.newQuickMenu and now I can see the new wizards.
But there is couple of questions:
1)Why all File menu related command ids prefixed by org.eclipse.ui.file.
and "new" one is just org.eclipse.ui. ?
2)What does really command org.eclipse.ui.file.newQuickMenu mean? How
can I use it?
3)Is there some help with pre-defined command id descriptions?
4)If my RCP application is not intended to create new
projects/files/folders. How can I filter out default "new wizards" from
the New dialog? May be there is some parameter for
org.eclipse.ui.newWizard command?
Thank you.
Alexander Ilyin wrote:
> Hi.
> I trying to create my RCP application and use the "New wizard"
> functionality (extension org.eclipse.ui.newWizards) and new Eclipse
> Command Framework (pre-defined command org.eclipse.ui.file.newQuickMenu)
> for this purposes.
> But my New menuitem and toolbar button is always disabled. What's wrong?
>
> There is my steps for menubar:
>
> -create new RCP application using the New Plug-In Wizard using Hello RCP
> template
> -add new extension org.eclipse.ui.newWizards (for test we can use the
> "New File Wizard" template, although if you will create it from scratch
> it will be the same problem)
> -add extension org.eclipse.ui.menus
> -add new menuContribution on the org.eclipse.ui.menus extension the item
> menu:org.eclipse.ui.main.menu to add main menu to the application
> -add new menu (let's name it "File")
> -then add on it the predefined command with id
> org.eclipse.ui.file.newQuickMenu
>
> Now run the application and you will see that your \File\New sub-item
> always is disable.
>
> What I did missed?
> How can I use org.eclipse.ui.file.newQuickMenu command?
>
>
> P.S. I did use the org.eclipse.ui.file.import that way and everything
> works fine for me.
>
> Thank you.
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03060 seconds