Hi Marc,
> Is there an easy way to debug this stuff?
You can download and install the yari eclipse plugin
(http://sourceforge.net/projects/yari/).
Yari will not allow you to intercept the running system but the
"expression evaluator" dialog (in the yari main menu) offers you a way for
the runtime evaluation of eclipse expressions.
Paste the following snippet in the "Enter an expression and..." text field
and evaluate the expression:
<with variable="selection">
<instanceof
value="org.eclipse.jface.text.ITextSelection">
</instanceof>
</with>
This should evaluate to "true" for text selections, otherwise to
"false"...
In the "Evalute ISource constant" tab you can also inspect the current
value of the selection: switch to the tab, select
"ACTIVE_CURRENT_SELECTION_NAME" and open the object pushing the "inspect
result".
hth,
Remo
Marc Esher wrote:
Sweet. Thanks Paul.
Is there an easy way to debug this stuff? For example, at runtime, can I
intercept at the point where the menu is going to be evaluated and see
what the "selection" object actually is?