Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Modifying the main menu bar on OSX
Modifying the main menu bar on OSX [message #1074777] Sat, 27 July 2013 14:58 Go to next message
Ric Wright is currently offline Ric Wright
Messages: 69
Registered: July 2009
Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1187.39">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px Verdana}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px Verdana; min-height: 17.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 17.0px; font: 14.0px Verdana; color: #0433ff}
span.s1 {text-decoration: underline}
span.s2 {color: #000000}
</style>
</head>
<body>
<p class="p1">(Sorry to cross-post, but I asked this on the newcomer list and got zero response - a little too esoteric I guess)</p>
<p class="p2"><br></p>
<p class="p1">If one creates the simple "Hello RCP" app using the basic wizard in Eclipse, it creates a simple window with "Hello RCP" as the title of the "window" that it creates.<span class="Apple-converted-space">  </span>However, the main menu bar is named "SWT" and has two menu items "Run" and "Search".<span class="Apple-converted-space">  </span>I figured out (through some painful searches and experiments) how to set up my own menus and items, but it isn't clear how to programmatically remove these other menus/items.<span class="Apple-converted-space">  </span>They get set somewhere in the bowels of the RCP setup but it isn't immediately obvious where (and if<span class="Apple-converted-space">  </span>documented I couldn't find it).</p>
<p class="p2"><br></p>
<p class="p1">Moreover, the main menubar title is "SWT".<span class="Apple-converted-space">  </span>Again, it isn't clear how to change it to my own title - changing the value in the product file doesn't work.<span class="Apple-converted-space">  </span>I found one article that proposed dealing with it for standalone SWT apps by renaming the shell</p>
<p class="p2"><br></p>
<p class="p3"><span class="s1"><a href="http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/">http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/</a></span><span class="s2"><span class="Apple-converted-space"> </span></span></p>
<p class="p2"><br></p>
<p class="p1">But he blithely says that it works fine in RCP apps.<span class="Apple-converted-space">  </span>Unfortunately this is not true as checking out innumerable tutorials shows.<span class="Apple-converted-space">  </span>I've even seen some "production" RCP apps that say 'SWT' on the main menu bar.<span class="Apple-converted-space">  </span>I've yet to come across a RCP app that has it's own name on the main menu bar (not the client window, the main menu bar or window).<span class="Apple-converted-space">  </span>I tried getting the runtime shell but that didn't work either.</p>
<p class="p2"><br></p>
<p class="p1">Perhaps it's obvious, but not to me.<span class="Apple-converted-space">  </span>Anyone know how this might be done?<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p1">TIA, RIc</p>
</body>
</html>
Re: Modifying the main menu bar on OSX [message #1075054 is a reply to message #1074777] Sun, 28 July 2013 11:50 Go to previous messageGo to next message
Greg Pugh is currently offline Greg Pugh
Messages: 15
Registered: July 2009
Junior Member
On 2013-07-27 18:58:15 +0000, Ric Wright said:

> (Sorry to cross-post, but I asked this on the newcomer list and got
> zero response - a little too esoteric I guess)
>
> If one creates the simple "Hello RCP" app using the basic wizard in
> Eclipse, it creates a simple window with "Hello RCP" as the title of
> the "window" that it creates. However, the main menu bar is named
> "SWT" and has two menu items "Run" and "Search". I figured out
> (through some painful searches and experiments) how to set up my own
> menus and items, but it isn't clear how to programmatically remove
> these other menus/items. They get set somewhere in the bowels of the
> RCP setup but it isn't immediately obvious where (and if documented I
> couldn't find it).
>
> Moreover, the main menubar title is "SWT". Again, it isn't clear how
> to change it to my own title - changing the value in the product file
> doesn't work. I found one article that proposed dealing with it for
> standalone SWT apps by renaming the shell
>
> http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/
>
>
> But he blithely says that it works fine in RCP apps. Unfortunately
> this is not true as checking out innumerable tutorials shows. I've
> even seen some "production" RCP apps that say 'SWT' on the main menu
> bar. I've yet to come across a RCP app that has it's own name on the
> main menu bar (not the client window, the main menu bar or window). I
> tried getting the runtime shell but that didn't work either.
>
> Perhaps it's obvious, but not to me. Anyone know how this might be done?
>
> TIA, RIc

For a simple SWT app call Display.setAppName("name") (needs to be
called before creating the Display object).
Re: Modifying the main menu bar on OSX [message #1075058 is a reply to message #1075054] Sun, 28 July 2013 12:06 Go to previous messageGo to next message
Ric Wright is currently offline Ric Wright
Messages: 69
Registered: July 2009
Member
On 2013-07-28 15:50:26 +0000, Greg Pugh said:

> On 2013-07-27 18:58:15 +0000, Ric Wright said:
>
>> (Sorry to cross-post, but I asked this on the newcomer list and got
>> zero response - a little too esoteric I guess)
>>
>> If one creates the simple "Hello RCP" app using the basic wizard in
>> Eclipse, it creates a simple window with "Hello RCP" as the title of
>> the "window" that it creates. However, the main menu bar is named
>> "SWT" and has two menu items "Run" and "Search". I figured out
>> (through some painful searches and experiments) how to set up my own
>> menus and items, but it isn't clear how to programmatically remove
>> these other menus/items. They get set somewhere in the bowels of the
>> RCP setup but it isn't immediately obvious where (and if documented I
>> couldn't find it).
>>
>> Moreover, the main menubar title is "SWT". Again, it isn't clear how
>> to change it to my own title - changing the value in the product file
>> doesn't work. I found one article that proposed dealing with it for
>> standalone SWT apps by renaming the shell
>>
>> http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/
>>
>>
>> But he blithely says that it works fine in RCP apps. Unfortunately
>> this is not true as checking out innumerable tutorials shows. I've
>> even seen some "production" RCP apps that say 'SWT' on the main menu
>> bar. I've yet to come across a RCP app that has it's own name on the
>> main menu bar (not the client window, the main menu bar or window). I
>> tried getting the runtime shell but that didn't work either.
>>
>> Perhaps it's obvious, but not to me. Anyone know how this might be done?
>>
>> TIA, RIc
>
> For a simple SWT app call Display.setAppName("name") (needs to be
> called before creating the Display object).

But this ISN'T a simple SWT app. It's an RCP app. I myself do not
create the Display object. I'll investigate this, but not sure it is
feasible to do it that way.

Thanks, Ric
Re: Modifying the main menu bar on OSX [message #1075343 is a reply to message #1075058] Mon, 29 July 2013 05:10 Go to previous messageGo to next message
Greg Pugh is currently offline Greg Pugh
Messages: 15
Registered: July 2009
Junior Member
On 2013-07-28 16:06:00 +0000, Ric Wright said:

> On 2013-07-28 15:50:26 +0000, Greg Pugh said:
>
>> On 2013-07-27 18:58:15 +0000, Ric Wright said:
>>
>>> (Sorry to cross-post, but I asked this on the newcomer list and got
>>> zero response - a little too esoteric I guess)
>>>
>>> If one creates the simple "Hello RCP" app using the basic wizard in
>>> Eclipse, it creates a simple window with "Hello RCP" as the title of
>>> the "window" that it creates. However, the main menu bar is named
>>> "SWT" and has two menu items "Run" and "Search". I figured out
>>> (through some painful searches and experiments) how to set up my own
>>> menus and items, but it isn't clear how to programmatically remove
>>> these other menus/items. They get set somewhere in the bowels of the
>>> RCP setup but it isn't immediately obvious where (and if documented I
>>> couldn't find it).
>>>
>>> Moreover, the main menubar title is "SWT". Again, it isn't clear how
>>> to change it to my own title - changing the value in the product file
>>> doesn't work. I found one article that proposed dealing with it for
>>> standalone SWT apps by renaming the shell
>>>
>>> http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/
>>>
>>>
>>> But he blithely says that it works fine in RCP apps. Unfortunately
>>> this is not true as checking out innumerable tutorials shows. I've
>>> even seen some "production" RCP apps that say 'SWT' on the main menu
>>> bar. I've yet to come across a RCP app that has it's own name on the
>>> main menu bar (not the client window, the main menu bar or window). I
>>> tried getting the runtime shell but that didn't work either.
>>>
>>> Perhaps it's obvious, but not to me. Anyone know how this might be done?
>>>
>>> TIA, RIc
>>
>> For a simple SWT app call Display.setAppName("name") (needs to be
>> called before creating the Display object).
>
> But this ISN'T a simple SWT app. It's an RCP app. I myself do not
> create the Display object. I'll investigate this, but not sure it is
> feasible to do it that way.
>
> Thanks, Ric

For an Eclipse 4 RCP application Display.setAppName is called by
E4Application using the product name in the IProduct interface. This
value comes from the name attribute of the <product> extension point.
For Eclipse 3 I think the "appName" <property> of the product extension
point may be used.
Re: Modifying the main menu bar on OSX [message #1076473 is a reply to message #1075058] Wed, 31 July 2013 08:53 Go to previous message
Greg Pugh is currently offline Greg Pugh
Messages: 15
Registered: July 2009
Junior Member
On 2013-07-28 16:06:00 +0000, Ric Wright said:

> On 2013-07-28 15:50:26 +0000, Greg Pugh said:
>
>> On 2013-07-27 18:58:15 +0000, Ric Wright said:
>>
>>> (Sorry to cross-post, but I asked this on the newcomer list and got
>>> zero response - a little too esoteric I guess)
>>>
>>> If one creates the simple "Hello RCP" app using the basic wizard in
>>> Eclipse, it creates a simple window with "Hello RCP" as the title of
>>> the "window" that it creates. However, the main menu bar is named
>>> "SWT" and has two menu items "Run" and "Search". I figured out
>>> (through some painful searches and experiments) how to set up my own
>>> menus and items, but it isn't clear how to programmatically remove
>>> these other menus/items. They get set somewhere in the bowels of the
>>> RCP setup but it isn't immediately obvious where (and if documented I
>>> couldn't find it).
>>>
>>> Moreover, the main menubar title is "SWT". Again, it isn't clear how
>>> to change it to my own title - changing the value in the product file
>>> doesn't work. I found one article that proposed dealing with it for
>>> standalone SWT apps by renaming the shell
>>>
>>> http://eclipsesource.com/blogs/2012/07/19/configuring-the-os-x-application-menu-for-swt-apps/
>>>
>>>
>>> But he blithely says that it works fine in RCP apps. Unfortunately
>>> this is not true as checking out innumerable tutorials shows. I've
>>> even seen some "production" RCP apps that say 'SWT' on the main menu
>>> bar. I've yet to come across a RCP app that has it's own name on the
>>> main menu bar (not the client window, the main menu bar or window). I
>>> tried getting the runtime shell but that didn't work either.
>>>
>>> Perhaps it's obvious, but not to me. Anyone know how this might be done?
>>>
>>> TIA, RIc
>>
>> For a simple SWT app call Display.setAppName("name") (needs to be
>> called before creating the Display object).
>
> But this ISN'T a simple SWT app. It's an RCP app. I myself do not
> create the Display object. I'll investigate this, but not sure it is
> feasible to do it that way.
>
> Thanks, Ric

For Eclipse 4 RCP Display.setAppName is called with the product name
from the org.eclipse.core.runtime.products <product> extension point.
For Eclipse 3 I think it might be the "appName" property
Previous Topic:Rubberbanding without Tracker
Next Topic:Resolving Import Variable in Java Templates
Goto Forum:
  


Current Time: Mon Jul 28 08:26:03 EDT 2014

Powered by FUDForum. Page generated in 0.05566 seconds