Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ViewPart Menu(How to change a Viewpart tab context menu)
ViewPart Menu [message #756567] Mon, 14 November 2011 06:18 Go to next message
Eclipse UserFriend
Hi guys,

I am developing a RCP applications, and I have been unable to find how can I change Viewpart's tab menu (the one that have Detached, Move, Close... actions). Could anyone help me?

On the other hand, I want to know if there is a way to translate all these commands, I have tried to override org.eclipse.ui.window.maximizePart without success...

Thank you in advance
Re: ViewPart Menu [message #756617 is a reply to message #756567] Mon, 14 November 2011 09:21 Go to previous messageGo to next message
Eclipse UserFriend
The pane menu (called the system menu in eclipse) is provided by the presentation (generally the 3.x presentation that provides a presentation factory and follows the presentation API). AFAIK it is not extensible.

PW
Re: ViewPart Menu [message #756719 is a reply to message #756617] Mon, 14 November 2011 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Here is a code that will allow you to hide that menu; but to change it as Paul is said it is not possible.
BTW, what is your use case for changing that menu?

Display display = PlatformUI.createDisplay();
    display.addFilter(SWT.MenuDetect, new Listener() {
      @Override
      public void handleEvent(Event aEvent) {
        if (aEvent.widget != null) {
          if (aEvent.widget.getClass() == CTabFolder.class) {
            aEvent.type = SWT.None;
          }
        }
      }
    });
Re: ViewPart Menu [message #757090 is a reply to message #756719] Wed, 16 November 2011 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi again and thanxs for your responses,

the thing is our application is wrotten in Spanish, so I wanted to have this menu translated in that language.

However I think it is not a bad option to hide, so I will put all needed options in the viewpart menu.

Thanks for your help!
Re: ViewPart Menu [message #757158 is a reply to message #757090] Wed, 16 November 2011 15:07 Go to previous messageGo to next message
Eclipse UserFriend
If it was only the case of translating those entries to spanish then a language fragment will solve your problem.
Please read this article: http://www.eclipse.org/articles/Article-Speak-The-Local-Language/article.html. Then download the appropriate language pack from http://eclipse.org/babel/ and integrate it into your build if necessary. For that menu you have pointed to the 'responsible' plugin containing the properties file is: org.eclipse.ui.workbench.

Note that in my case it was decided by the client to remove those menu entries.
Re: ViewPart Menu [message #788277 is a reply to message #756567] Wed, 01 February 2012 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Thanks Catalin,

I finally chose to hide that menu, I think it is better this way. Thank's for your help.

Cheers
Re: ViewPart Menu [message #789069 is a reply to message #788277] Thu, 02 February 2012 10:17 Go to previous message
Eclipse UserFriend
Just a note. That won't work reliable in eclipse 4.2, as the presentation has changed.

PW
Previous Topic:Webstart: jredesc in component ignored: null
Next Topic:View with multiple relative views in perspective extension
Goto Forum:
  


Current Time: Wed Jul 23 19:31:31 EDT 2025

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

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

Back to the top