Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » command "org.eclipse.ui.views.showView" is always disabled
command "org.eclipse.ui.views.showView" is always disabled [message #503694] Tue, 15 December 2009 11:36 Go to next message
Rafael Messias Martins is currently offline Rafael Messias MartinsFriend
Messages: 3
Registered: September 2009
Junior Member
Hello everyone, I'm trying to get the "Show View" dialog to appear by using the following code:

<extension
         point="org.eclipse.ui.menus">
      <menuContribution
            locationURI="menu:org.eclipse.ui.main.menu">
         <menu
               label="Window">
            <command
                  commandId="org.eclipse.ui.views.showView"
                  style="push">
            </command>
         </menu>
      </menuContribution>
   </extension>


But it's always disabled. The same code with the command "org.eclipse.ui.perspectives.showPerspective" works fine (shows the perspective dialog).

What's wrong?

Thanks in advance!
Re: command "org.eclipse.ui.views.showView" is always disabled [message #503695 is a reply to message #503694] Tue, 15 December 2009 06:43 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
You have to add a "parameter" to the command with the name of the view which should be shown:

name:
org.eclipse.ui.views.showView.viewId

value:
my.view.id

<command
commandId="org.eclipse.ui.views.showView"
style="push">
<parameter
name="org.eclipse.ui.views.showView.viewId"
value="my.view.id">
</parameter>
</command>

Greetz

[Updated on: Tue, 15 December 2009 11:46]

Report message to a moderator

Re: command "org.eclipse.ui.views.showView" is always disabled [message #503701 is a reply to message #503695] Tue, 15 December 2009 12:08 Go to previous messageGo to next message
Rafael Messias Martins is currently offline Rafael Messias MartinsFriend
Messages: 3
Registered: September 2009
Junior Member
I figured it out; I was trying to show views without having set a perspective first. The command works just fine without parameters, but it only shows views who are in your current perspective.

Thanks!
Re: command "org.eclipse.ui.views.showView" is always disabled [message #505135 is a reply to message #503694] Sun, 27 December 2009 15:15 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi rmmartins,

Try this in your ApplicationAcationBarAdvisor class

showViewAction = ActionFactory.SHOW_VIEW_MENU.create(window);
register(showViewAction);

--

Best Regards,
Wim Jongman
-- I think my eyes are getting better. Instead of a big dark blur, I see a
big light blur.
HAN SOLO, Star Wars Episode VI: Return of the Jedi

> Hello everyone, I'm trying to get the "Show View" dialog to appear by using
the following code:
>
> <extension
> point="org.eclipse.ui.menus">
> <menuContribution
> locationURI="menu:org.eclipse.ui.main.menu">
> <menu
> label="Window">
> <command
> commandId="org.eclipse.ui.views.showView"
> style="push">
> </command>
> </menu>
> </menuContribution>
> </extension>
>
> But it's always disabled. The same code with the command
"org.eclipse.ui.perspectives.showPerspective" works fine (shows the
perspective dialog).
>
> What's wrong?
>
> Thanks in advance!
Previous Topic:RCP and MAC
Next Topic:Always meet bundle missing problem while exporting RCP
Goto Forum:
  


Current Time: Thu Apr 25 11:00:58 GMT 2024

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

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

Back to the top