Author: vrubezhny
Date: 2007-09-11 10:26:32 -0400 (Tue, 11 Sep 2007)
New Revision: 3558
Added:
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.csv
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.html
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.txt
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.vb.html
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.xml
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/StrutsDebugPlugin.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionExceptionCheckElement.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionFormCheckElement.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionForwardCheckElement.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalExceptionCheckElement.java
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalForwardCheckElement.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-891 Clean out struts component
Code clean up is performed
Added: trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.csv
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.csv
(rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.csv 2007-09-11
14:26:32 UTC (rev 3558)
@@ -0,0 +1 @@
+"Problem","Package","File","Priority","Line","Description","Rule
set","Rule"
Added: trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.html
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.html
(rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.html 2007-09-11
14:26:32 UTC (rev 3558)
@@ -0,0 +1,4 @@
+<html><head><title>PMD</title></head><body>
+<center><h3>PMD
report</h3></center><center><h3>Problems
found</h3></center><table align="center"
cellspacing="0" cellpadding="3"><tr>
+<th>#</th><th>File</th><th>Line</th><th>Problem</th></tr>
+</table></body></html>
\ No newline at end of file
Property changes on:
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.txt
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.txt
(rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.txt 2007-09-11
14:26:32 UTC (rev 3558)
@@ -0,0 +1 @@
+No problems found!
\ No newline at end of file
Property changes on:
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.vb.html
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.vb.html
(rev 0)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.vb.html 2007-09-11
14:26:32 UTC (rev 3558)
@@ -0,0 +1,8 @@
+<html><head><title>PMD</title></head><style
type="text/css"><!--
+body { background-color: white; font-family:verdana, arial, helvetica, geneva; font-size:
16px; font-style: italic; color: black; }
+.title { font-family: verdana, arial, helvetica,geneva; font-size: 12px;
font-weight:bold; color: white; }
+.body { font-family: verdana, arial, helvetica, geneva; font-size: 12px;
font-weight:plain; color: black; }
+#TableHeader { background-color: #003366; }
+#RowColor1 { background-color: #eeeeee; }
+#RowColor2 { background-color: white; }
+--></style><body><center><br></center></body></html>
\ No newline at end of file
Property changes on:
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.vb.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.xml
(rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.xml 2007-09-11
14:26:32 UTC (rev 3558)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pmd version="4.0rc1" timestamp="2007-09-10T16:39:27.578"
elapsedTime="0s">
+</pmd>
\ No newline at end of file
Property changes on:
trunk/struts/plugins/org.jboss.tools.struts.debug/reports/pmd-report.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionBreakpoint.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionBreakpoint.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionBreakpoint.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -17,8 +17,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.ISourceLocator;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.jdt.debug.core.IJavaStackFrame;
import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint;
@@ -28,7 +26,6 @@
import org.jboss.tools.jst.web.debug.WebDebugPlugin;
import org.jboss.tools.jst.web.debug.xpl.DebugSupport;
import org.jboss.tools.jst.web.launching.sourcelookup.IBreakpointSourceFinder;
-import org.jboss.tools.jst.web.launching.sourcelookup.xpl.WebSourceLocator;
import com.sun.jdi.event.Event;
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/ActionConditionBreakpoint.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -28,7 +28,6 @@
import org.eclipse.jdt.debug.eval.ICompiledExpression;
import org.eclipse.jdt.debug.eval.IEvaluationListener;
import org.eclipse.jdt.debug.eval.IEvaluationResult;
-import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget;
import org.eclipse.jdt.internal.debug.core.model.JDIStackFrame;
import org.eclipse.jdt.internal.debug.core.model.JDIThread;
@@ -112,7 +111,7 @@
return handleConditionalBreakpointEvent(event, thread, target);
} catch (CoreException e) {
- JDIDebugPlugin.log(e);
+ StrutsDebugPlugin.log(e);
}
return true;
}
@@ -239,7 +238,7 @@
}
return;
} catch (DebugException e) {
- JDIDebugPlugin.log(e);
+ StrutsDebugPlugin.log(e);
}
suspendForEvent(event, thread);
}
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/StrutsDebugPlugin.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/StrutsDebugPlugin.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/StrutsDebugPlugin.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -10,15 +10,13 @@
******************************************************************************/
package org.jboss.tools.struts.debug.internal;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.log.BaseUIPlugin;
-public class StrutsDebugPlugin extends AbstractUIPlugin {
+public class StrutsDebugPlugin extends BaseUIPlugin {
public static final String PLUGIN_ID = "org.jboss.tools.struts.debug";
@@ -27,18 +25,19 @@
StrutsDebugModel.init();
}
- public void startup( ) throws CoreException {
- super.startup();
- }
-
public static void printStackTrace(Throwable throwable) {
- if (isDebugEnabled() && throwable != null) throwable.printStackTrace();
+ if (isDebugEnabled() && throwable != null) {
+ throwable.printStackTrace();
+ }
}
public static void println(String str) {
if (isDebugEnabled()) {
- if (str != null) System.out.println(str);
- else System.out.println();
+ if (str != null) {
+ System.out.println(str);
+ } else {
+ System.out.println();
+ }
}
}
@@ -59,11 +58,15 @@
}
public static void log(String msg) {
- if(isDebugEnabled()) PluginHolder.INSTANCE.getLog().log(new Status(Status.INFO,
PLUGIN_ID, Status.OK, msg, null));
+ if(isDebugEnabled()) {
+ PluginHolder.INSTANCE.getLog().log(new Status(Status.INFO, PLUGIN_ID, Status.OK, msg,
null));
+ }
}
public static void log(IStatus status) {
- if(isDebugEnabled() || !status.isOK()) PluginHolder.INSTANCE.getLog().log(status);
+ if(isDebugEnabled() || !status.isOK()) {
+ PluginHolder.INSTANCE.getLog().log(status);
+ }
}
public static void log(String message, Throwable exception) {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionExceptionCheckElement.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionExceptionCheckElement.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionExceptionCheckElement.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -25,11 +25,8 @@
String exceptionTypeName = getAttributeValue(xObject, StrutsConstants.ATT_TYPE);
- try {
- condition = new ActionExceptionCondition(actionTypeName, exceptionTypeName);
- } catch(Exception e) {
- StrutsDebugPlugin.log(e);
- }
+ condition = new ActionExceptionCondition(actionTypeName, exceptionTypeName);
+
StrutsDebugPlugin.log("ActionExceptionCheckElement(" + actionTypeName +
", " + exceptionTypeName + ")");
}
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionFormCheckElement.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionFormCheckElement.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionFormCheckElement.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -29,11 +29,7 @@
public ActionFormCheckElement(XModelObject xObject) {
super(xObject);
String actionMappingPath = getAttributeValue(xObject, StrutsConstants.ATT_PATH);
- try {
- condition = new ActionFormCondition(actionMappingPath);
- } catch(Exception e) {
- StrutsDebugPlugin.log(e);
- }
+ condition = new ActionFormCondition(actionMappingPath);
}
public ICondition getCondition() {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionForwardCheckElement.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionForwardCheckElement.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/ActionForwardCheckElement.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -23,11 +23,7 @@
public ActionForwardCheckElement(XModelObject xObject, String actionTypeName) {
super(xObject);
String forwardName = getAttributeValue(xObject, StrutsConstants.ATT_NAME);
- try {
- condition = new ActionForwardCondition(actionTypeName, forwardName);
- } catch(Exception e) {
- StrutsDebugPlugin.log(e);
- }
+ condition = new ActionForwardCondition(actionTypeName, forwardName);
}
public ICondition getCondition() {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalExceptionCheckElement.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalExceptionCheckElement.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalExceptionCheckElement.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -30,12 +30,7 @@
super(xObject);
String exceptionTypeName = getAttributeValue(xObject, StrutsConstants.ATT_TYPE);
-
- try {
- condition = new GlobalExceptionCondition(exceptionTypeName);
- } catch(Exception e) {
- StrutsDebugPlugin.log(e);
- }
+ condition = new GlobalExceptionCondition(exceptionTypeName);
}
public ICondition getCondition() {
Modified:
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalForwardCheckElement.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalForwardCheckElement.java 2007-09-11
14:26:02 UTC (rev 3557)
+++
trunk/struts/plugins/org.jboss.tools.struts.debug/src/org/jboss/tools/struts/debug/internal/step/GlobalForwardCheckElement.java 2007-09-11
14:26:32 UTC (rev 3558)
@@ -29,11 +29,7 @@
public GlobalForwardCheckElement(XModelObject xObject) {
super(xObject);
String forwardName = getAttributeValue(xObject, StrutsConstants.ATT_NAME);
- try {
- condition = new GlobalForwardCondition(forwardName);
- } catch(Exception e) {
- StrutsDebugPlugin.log(e);
- }
+ condition = new GlobalForwardCondition(forwardName);
}
public ICondition getCondition() {