Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards?
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 Go to next message
Alexander Ilyin is currently offline Alexander IlyinFriend
Messages: 34
Registered: July 2009
Member
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 #331640 is a reply to message #331634] Mon, 15 September 2008 12:07 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

AFAIK, org.eclipse.ui.file.newQuickMenu still depends on some of the
action code (the command id is used to execute a QuickMenuAction).

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.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


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 Go to previous messageGo to next message
Alexander Ilyin is currently offline Alexander IlyinFriend
Messages: 34
Registered: July 2009
Member
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 Go to previous messageGo to next message
Alexander Ilyin is currently offline Alexander IlyinFriend
Messages: 34
Registered: July 2009
Member
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.
>
>
Re: Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards [message #331684 is a reply to message #331677] Tue, 16 September 2008 11:45 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Alexander Ilyin wrote:
> 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. ?

Dunno, that just happened.


> 2)What does really command org.eclipse.ui.file.newQuickMenu mean? How
> can I use it?

That binds CTRL+N to pop up a floating menu that contains the same
contents as File>New

>
> 3)Is there some help with pre-defined command id descriptions?

Unfortunately, no:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=5001
https://bugs.eclipse.org/bugs/show_bug.cgi?id=54581

>
> 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?

you can use activities/capabilities to filter out some of the wizards
(by contributing plugin/id).

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench_advext_activities.htm

Later,
PW



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Why org.eclipse.ui.file.newQuickMenu always is disabled? How can I use org.eclipse.ui.newWizards [message #331692 is a reply to message #331684] Tue, 16 September 2008 16:10 Go to previous message
Alexander Ilyin is currently offline Alexander IlyinFriend
Messages: 34
Registered: July 2009
Member
Thank you for your helping.

Regards,
Alexander

Paul Webster wrote:
> Alexander Ilyin wrote:
>> 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. ?
>
> Dunno, that just happened.
>
>
>> 2)What does really command org.eclipse.ui.file.newQuickMenu mean? How
>> can I use it?
>
> That binds CTRL+N to pop up a floating menu that contains the same
> contents as File>New
>
>>
>> 3)Is there some help with pre-defined command id descriptions?
>
> Unfortunately, no:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=5001
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=54581
>
>>
>> 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?
>
> you can use activities/capabilities to filter out some of the wizards
> (by contributing plugin/id).
>
> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench_advext_activities.htm
>
>
> Later,
> PW
>
>
>
Previous Topic:instantiate a class from the workspace of the running plugin
Next Topic:Replacing Editor Icons at workbench startup
Goto Forum:
  


Current Time: Thu Dec 26 20:12:50 GMT 2024

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

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

Back to the top