[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Calling a command guru: editor menu enablement

I will check it out. Thanks Remo!

"Remo Loetscher" <remo.loetscher@xxxxxxxxxxxxxx> wrote in message news:4a9fc9ec$1@xxxxxxxxxxxxxxx
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?