Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » toggle state
toggle state [message #549942] Wed, 28 July 2010 14:18 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 100
Registered: March 2010
Senior Member
Hello.

I have made a command, it's represents for toggle button in the main toolbar, but it has a state (true or false, select or not select).

But I have a problem I don't want remember the state between sesions of eclipse, what do I make???

My command:

 <command
            category="Favorites"
            categoryId="com.quaityeclipse.favorites.commands.category"
            description="Open tha Favorites view if it is not already visible"
            id="com.quaityeclipse.favorites.commands.openView"
            name="Open Favorites View">
                 
        <state
                   class="org.eclipse.ui.handlers.RegistryToggleState:false"
                   id="org.eclipse.ui.commands.toggleState">
        </state>
</command>


I want the toggle false when the sesion begins.

Thanks a lot
Jose
Re: toggle state [message #551035 is a reply to message #549942] Wed, 04 August 2010 22:26 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Jose,

What does the handler code say?

--

Best Regards,
Wim Jongman

Eclipse Twitter
-- Too much coding lately, I find myself ending sentences with a semicolon
Ian Bull


> Hello.
>
> I have made a command, it's represents for toggle button in the main
toolbar, but it has a state (true or false, select or not select).
>
> But I have a problem I don't want remember the state between sesions of
eclipse, what do I make???
>
> My command:
>
>
> <command
> category="Favorites"
> categoryId="com.quaityeclipse.favorites.commands.category"
> description="Open tha Favorites view if it is not already visible"
> id="com.quaityeclipse.favorites.commands.openView"
> name="Open Favorites View">
>
> <state
> class="org.eclipse.ui.handlers.RegistryToggleState:false"
> id="org.eclipse.ui.commands.toggleState">
> </state>
> </command>
>
>
> I want the toggle false when the sesion begins.
>
> Thanks a lot
> Jose
Re: toggle state [message #551346 is a reply to message #549942] Fri, 06 August 2010 05:06 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 28/07/10 7:48 PM, Jose wrote:

> I have made a command, it's represents for toggle button in the main
> toolbar, but it has a state (true or false, select or not select).
>
> But I have a problem I don't want remember the state between sesions of
> eclipse, what do I make???

Add this parameter to the command's state:

<parameter
name="persisted"
value="false">
</parameter>

See: http://bit.ly/CommandsTutorial for more details

--
- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: toggle state [message #551712 is a reply to message #551346] Mon, 09 August 2010 09:57 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 100
Registered: March 2010
Senior Member
Hello.

Thanks for your answer.

I have made this:

 <command
            category="Favorites"
            categoryId="com.quaityeclipse.favorites.commands.category"
            description="Open tha Favorites view if it is not already visible"
            id="com.quaityeclipse.favorites.commands.openView"
            name="Open Favorites View">
            <state
            class="org.eclipse.ui.handlers.RegistryToggleState:false"
            id="org.eclipse.ui.commands.toggleState">
            <parameter
			name="persisted"
			value="false">
	    </parameter>
            </state>
      </command>


But the state is remember still.

Is my code wrong?

Thanks a lot
Jose
Previous Topic:toolbar command enablement
Next Topic:Problem closing a view unless it is active
Goto Forum:
  


Current Time: Wed Apr 24 23:08:06 GMT 2024

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

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

Back to the top