Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] a more general eclipse question.

Hi all,

in _javascript_ we have a few toggle commands contributed to various views

like: global method entry and exit breaks (i added also exception break, will commit that later) in the Breakpoints View
but also show xxx variables in the _javascript_ menu of the Variables view.

The big problem is that those are toggle that can be true when i shutdown eclipse
and we store that property in the plugin store/settings.

But i cant get eclipse so far that it reads that state in that i tell him tooo

I used the class ToggleState class as a state entry for the command
and then have that attached to STYLE id.
http://help.eclipse.org/help33/ntopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/commands/ToggleState.html

als see: http://wiki.eclipse.org/Menu_Contributions that has an example:

<extension point="org.eclipse.ui.commands">
<command categoryId="org.eclipse.jdt.ui.category.source"
description="%jdt.ui.ToggleMarkOccurrences.description"
id="org.eclipse.jdt.ui.edit.text.java.toggleMarkOccurrences"
name="%jdt.ui.ToggleMarkOccurrences.name">
<state id="NAME" class="org.eclipse.jface.menus.TextState" />
<state id="STYLE" class="org.eclipse.jface.commands.ToggleState:true" />
</command>
</extension>


but whatever i do the state is not correct.
If i place a breakpoint in the ToggleState class (load method)
then that load method is only triggered when i shutdown eclipse! Not when the command is initialized.

I have to do something wrong that is very obvious or something...

johan




Back to the top