Author: vrubezhny
Date: 2007-09-11 13:10:59 -0400 (Tue, 11 Sep 2007)
New Revision: 3565
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/WebDebugPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/xpl/EvaluationSupport.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-894 Clean out jst component
Code clean up is performed
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/WebDebugPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/WebDebugPlugin.java 2007-09-11
17:10:45 UTC (rev 3564)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/WebDebugPlugin.java 2007-09-11
17:10:59 UTC (rev 3565)
@@ -13,14 +13,15 @@
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.log.BaseUIPlugin;
-public class WebDebugPlugin extends AbstractUIPlugin {
+public class WebDebugPlugin extends BaseUIPlugin {
static WebDebugPlugin INSTANCE = null;
public static final String PLUGIN_ID = "org.jboss.tools.jst.web.debug";
- public WebDebugPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
+ public WebDebugPlugin() {
+ super();
INSTANCE = this;
}
@@ -28,6 +29,10 @@
return INSTANCE;
}
+ public static WebDebugPlugin getPluginLog() {
+ return WebDebugPlugin.getDefault();
+ }
+
public static boolean isDebugEnabled() {
return getDefault().isDebugging();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/xpl/EvaluationSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/xpl/EvaluationSupport.java 2007-09-11
17:10:45 UTC (rev 3564)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.debug/src/org/jboss/tools/jst/web/debug/xpl/EvaluationSupport.java 2007-09-11
17:10:59 UTC (rev 3565)
@@ -26,6 +26,8 @@
import org.eclipse.jdt.debug.eval.IEvaluationListener;
import org.eclipse.jdt.debug.eval.IEvaluationResult;
import org.eclipse.jdt.internal.debug.core.model.JDIStackFrame;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.debug.WebDebugPlugin;
/**
* @author Jeremy
@@ -49,7 +51,7 @@
ICompiledExpression compiledExpression = engine.getCompiledExpression(expression,
(JDIStackFrame)frame);
engine.evaluateExpression(compiledExpression, (IJavaStackFrame)frame,
evaluationListener, DebugEvent.EVALUATION_IMPLICIT, false);
} catch (Exception x) {
- //ignore
+ WebDebugPlugin.getPluginLog().logError(x);
}
}
@@ -76,7 +78,11 @@
IEvaluationResult result = null;
while (IsWaiting()) {
Thread.yield();
- try {Thread.sleep(100);} catch (Exception x) {}
+ try {
+ Thread.sleep(100);
+ } catch (Exception x) {
+ // Ignore
+ }
}
synchronized (this) {
@@ -113,7 +119,7 @@
DebugEvent.EVALUATION_IMPLICIT, false);
result = evaluationListener.getResult();
} catch (Exception x) {
- //ignore
+ WebDebugPlugin.getPluginLog().logError(x);
}
return result;
}
@@ -146,6 +152,7 @@
}
}
} catch (Exception e) {
+ WebDebugPlugin.getPluginLog().logError(e);
}
return null;
}
@@ -161,6 +168,7 @@
}
}
} catch (Exception e) {
+ WebDebugPlugin.getPluginLog().logError(e);
}
return null;
}