Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Initialize toggle to true
Initialize toggle to true [message #40739] Sat, 17 January 2009 23:30 Go to next message
Craig Foote is currently offline Craig FooteFriend
Messages: 217
Registered: July 2009
Senior Member
I have a couple MenuContributions for a command whose handler implements
IElementUpdater to synchronize their isChecked state. I'm using the state
attribute of the command, specifying:

<state id="STYLE" class="org.eclipse.jface.commands.ToggleState" />

I understand ToggleSate is initialized to "false" but I need it
initialized to 'true', i.e. menu checked and button depressed. I found
the following indicating ":true" can be appended to the class name but it
doesn't work for me:

<state id="STYLE" class="org.eclipse.jface.commands.ToggleState:true" />

I'm using Eclipse3.4 fully updated. Can anyone shed some light on this
for me please?

Can a declared command of style "toggle" be declared "true"?

Craig
Re: Initialize toggle to true [message #40841 is a reply to message #40739] Mon, 19 January 2009 06:58 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
FYI : https://bugs.eclipse.org/bugs/show_bug.cgi?id=221980

- Prakash
--

http://blog.eclipse-tips.com

"Craig Foote" <CraigFoote@gmail.com> wrote in message
news:gktpn4$s7p$1@build.eclipse.org...
>I have a couple MenuContributions for a command whose handler implements
> IElementUpdater to synchronize their isChecked state. I'm using the state
> attribute of the command, specifying:
>
> <state id="STYLE" class="org.eclipse.jface.commands.ToggleState" />
>
> I understand ToggleSate is initialized to "false" but I need it
> initialized to 'true', i.e. menu checked and button depressed. I found
> the following indicating ":true" can be appended to the class name but it
> doesn't work for me:
>
> <state id="STYLE" class="org.eclipse.jface.commands.ToggleState:true" />
>
> I'm using Eclipse3.4 fully updated. Can anyone shed some light on this
> for me please?
>
> Can a declared command of style "toggle" be declared "true"?
>
> Craig
Re: Initialize toggle to true [message #483880 is a reply to message #40739] Thu, 03 September 2009 13:09 Go to previous message
Eric Geordi is currently offline Eric GeordiFriend
Messages: 7
Registered: July 2009
Junior Member
I too would be interested in hearing if there have been developments on
this. Anyone have any thoughts ? Maybe subclassing
org.eclipse.jface.commands.ToggleState and overriding setValue() ? Havent
tried this yet... Would prefer to do this declaratively if possible.
Re: Initialize toggle to true [message #588379 is a reply to message #40739] Mon, 19 January 2009 06:58 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
FYI : https://bugs.eclipse.org/bugs/show_bug.cgi?id=221980

- Prakash
--

http://blog.eclipse-tips.com

"Craig Foote" <CraigFoote@gmail.com> wrote in message
news:gktpn4$s7p$1@build.eclipse.org...
>I have a couple MenuContributions for a command whose handler implements
> IElementUpdater to synchronize their isChecked state. I'm using the state
> attribute of the command, specifying:
>
> <state id="STYLE" class="org.eclipse.jface.commands.ToggleState" />
>
> I understand ToggleSate is initialized to "false" but I need it
> initialized to 'true', i.e. menu checked and button depressed. I found
> the following indicating ":true" can be appended to the class name but it
> doesn't work for me:
>
> <state id="STYLE" class="org.eclipse.jface.commands.ToggleState:true" />
>
> I'm using Eclipse3.4 fully updated. Can anyone shed some light on this
> for me please?
>
> Can a declared command of style "toggle" be declared "true"?
>
> Craig
Re: Initialize toggle to true [message #601152 is a reply to message #40739] Thu, 03 September 2009 13:09 Go to previous message
Eric Geordi is currently offline Eric GeordiFriend
Messages: 7
Registered: July 2009
Junior Member
I too would be interested in hearing if there have been developments on
this. Anyone have any thoughts ? Maybe subclassing
org.eclipse.jface.commands.ToggleState and overriding setValue() ? Havent
tried this yet... Would prefer to do this declaratively if possible.
Previous Topic:Double-Click Text Selections
Next Topic:Errors with Local Update site from Network drive
Goto Forum:
  


Current Time: Thu Dec 26 12:36:08 GMT 2024

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

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

Back to the top