[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] JFace Tracing On?

I assume it's OK to post JFace questions here?  If not please direct
me to the correct group.

I am playing with JFace and I get an error which suggests that some
kind of runtime tracing is on.  But there are not associated classes
for tracing in JFace (or are there?).

I'm using "ApplicationWindow" and the JFace "Actions" in my code. (In
fact I am playing with code I got from here: 

http://www.eclipsetotale.com/articles/swt/premierProjetJFace/index.html

My code creates a window, adds a menu, and creates a couple of menu
items with actions associated.  Everything works fine until I select
one of the actions.  

The I get: 

java.lang.NoClassDefFoundError: org/eclipse/core/internal/boot/DelegatingURLClassLoader
	at org.eclipse.core.runtime.Platform.getDebugOption(Platform.java:272)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:452)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
	at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1842)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1549)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at TestJFace.main(TestJFace.java:28)


The code at
o.e.j.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java
(line 452) suggests that it is looking for some tracing libraries in
JFAce, and not finding them.  

if (action.isEnabled()) {
	boolean trace = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface/trace/actions")); //$NON-NLS-1$ //$NON-NLS-2$
	long ms = System.currentTimeMillis();
	if(trace)
	    System.out.println("Running action: " + action.getText()); //$NON-NLS-1$
	    action.runWithEvent(e);
	if(trace)
	   System.out.println((System.currentTimeMillis() - ms) + " ms
	   to run action: "  + action.getText()); //$NON-NLS-1$
	}

Does anyone know what the problem is?  There is no such class
"org.eclipse.jface.trace.actions" that I can see.

I'm not using a runtime workbench, or explicitly enabling tracing.

Thanks.

-- 
Ned Ludd