Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-debug-dev] Using/Evaluating Expressions (Debug Platform)"HowTo/Example"?

Hi Ken,

thanks for your reply. Please find comments below ...

Ken Dyck wrote:
Unfortunately I could not find any source of information on this topic - in particular on how to invoke an implementation of I(Watch)Expression?

Take a look at the org.eclipse.debug.core.watchExpressionDelegates
extension point description.
Right now I have an extension point in the form of ...

<extension point="org.eclipse.debug.core.watchExpressionDelegates">
    <watchExpressionDelegate
       debugModel="action.debugModel"
        delegateClass="action.debug.WatchExpressionDelegate"/>
  </extension>

But what exactly refers the debugModel entry to? As far as I understood to the ID of the debug model ... thus I search the example code and found something ...

** core **
<extension
        point="org.eclipse.debug.core.logicalStructureTypes">
     <logicalStructureType
class="org.eclipse.debug.examples.core.pda.model.WordStructureDelegate"
           description="Words"
           id="pda.wordStructure"
           modelIdentifier="pda.debugModel"/>
  </extension>

And added (in my plugin.xml) :

<extension
        point="org.eclipse.debug.core.logicalStructureTypes">
     <logicalStructureType
           class="action.LaunchDelegate"
           description="No Description"
           id="action.iDontKnow"
           modelIdentifier="action.debugModel"/>
  </extension>

But I still get "(Watch expressions not supported)" in the expressions view. I implemented the IWatchExpressionDelegate (as testcase as follows):

public class WatchExpressionDelegate implements IWatchExpressionDelegate {

   @Override
   public void evaluateExpression(String expression, IDebugElement context,
           IWatchExpressionListener listener) {
       System.out.println("Called with expression: " + expression);
}

}


Greetings,

   Ralf

BTW: The rest (of the debug platform) works great! :)
Basically, you'll need to provide implementions of
IWatchExpressionDelegate and IWatchExpressionResult. The
IWatchExpressionDelegate is responsible for evaluating an expression
string, reporting an IWatchExpressionResult object to the
IWatchExpressionListener when it completes.

-Ken
_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev



Back to the top