Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to debug Command Core Expressions
How to debug Command Core Expressions [message #547862] Mon, 19 July 2010 17:24 Go to next message
Eclipse UserFriend
Ever so often I'm stuck with e.g. an expression that doesn't seem to work (so e.g. a handler that is supposed to be enabled isn't).

No matter how much I mess up the expressions, there are never any errors or warnings logged.

There must be a way to see what's going on, but I don't see anything mentioned at http://wiki.eclipse.org/Command_Core_Expressions.
Re: How to debug Command Core Expressions [message #548007 is a reply to message #547862] Tue, 20 July 2010 08:06 Go to previous messageGo to next message
Eclipse UserFriend
Because it's generic code, it's probably not good enough to put a
breakpoint in one of the Expression implementations (that's like adding
a breakpoint in "for" or "if").

I would put a conditional breakpoint in
org.eclipse.ui.internal.handlers.HandlerProxy.setEnabled(Obj ect), since
that's where enabledWhen is calculated.

You basically need to find your handler and then make the breakpoin in
setEnabled(*) an "Instance breakpoint". That will allow you to walk the
core expressions while they are being evaluated.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: How to debug Command Core Expressions [message #548121 is a reply to message #548007] Tue, 20 July 2010 13:24 Go to previous messageGo to next message
Eclipse UserFriend
Thanks. Before resorting to digging around in the code to set instance breakpoints I was hoping that setting some tracing options such as

org.eclipse.core.expressions/debug/TypeExtensionManager
org.eclipse.core.expressions/trace/tracePropertyResolving

would be sufficient. Neither of these two options seem to be all that useful, but perhaps there are other tracing options that might help?
Re: How to debug Command Core Expressions [message #548701 is a reply to message #548121] Thu, 22 July 2010 13:04 Go to previous message
Eclipse UserFriend
You might have some luck with org.eclipse.ui's trace options. In particular:

  • trace/commands
  • trace/handlers
  • trace/handlers.verbose
  • trace/handlers.verbose.commandId (keeps the spam down?)

To be frank, I haven't had much luck on this front either. Getting up the initial core expression learning curve was rough, even with the link in Paul's signature (thank you, by the way... I'd have been Up A Creek without it).
Previous Topic:Plug-ins installed but not available
Next Topic:Struggling with IEditorInput
Goto Forum:
  


Current Time: Wed Jul 23 01:00:31 EDT 2025

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

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

Back to the top