Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Initialize toggle to true
Initialize toggle to true [message #40739] Sat, 17 January 2009 18:30 Go to next message
Eclipse UserFriend
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 01:58 Go to previous messageGo to next message
Eclipse UserFriend
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 09:09 Go to previous message
Eclipse UserFriend
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 01:58 Go to previous message
Eclipse UserFriend
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 09:09 Go to previous message
Eclipse UserFriend
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 May 08 16:14:55 EDT 2025

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

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

Back to the top