Author: vrubezhny
Date: 2007-09-11 13:11:25 -0400 (Tue, 11 Sep 2007)
New Revision: 3566
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddPageTemplateSupport.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/FileTLDRecognizer.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.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/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -85,7 +85,7 @@
// in menu now it throws exception Invalid Artifact Edit access
ms = ServerUtil.getModule(p);
} catch (Exception e) {
- // ignore
+ WebModelPlugin.getPluginLog().logError(e);
}
// WebResource wr = (ms == null || ms.length == 0) ? null : new WebResource(ms[0], new
Path(""));
WebResource wr = (ms == null) ? null : new WebResource(ms, new Path(""));
//$NON-NLS-1$
@@ -128,7 +128,7 @@
try {
server.getModules();
} catch (Exception e) {
- //ignore
+ WebModelPlugin.getPluginLog().logError(e);
}
String launchMode = ILaunchManager.DEBUG_MODE.equals(server.getMode()) ?
ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE;
try {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -80,7 +80,7 @@
defaultPageTemplate = obj.getAttributeValue("Page Template");
}
} catch (Exception x) {
- //ignore
+ WebModelPlugin.getPluginLog().logError(x);
}
return defaultPageTemplate;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddPageTemplateSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddPageTemplateSupport.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddPageTemplateSupport.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -25,6 +25,7 @@
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
import org.jboss.tools.jst.web.project.helpers.AbstractWebProjectTemplate;
@@ -126,7 +127,9 @@
this.pagePath = pagePath;
try {
selectedFile = ModelPlugin.getWorkspace().getRoot().getFile(new Path(pagePath));
- } catch (Exception e) {}
+ } catch (Exception e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
return selectedFile;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/AddProjectTemplateResourcesStep.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -103,7 +103,7 @@
try {
set.add(f.getCanonicalPath());
} catch (Exception e) {
- //ignore
+ WebModelPlugin.getPluginLog().logError(e);
}
}
}
@@ -118,7 +118,7 @@
try {
path = pathname.getCanonicalPath();
} catch (Exception e) {
- //ignore
+ WebModelPlugin.getPluginLog().logError(e);
}
return path != null && !set.contains(path);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/FileTLDRecognizer.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/FileTLDRecognizer.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/FileTLDRecognizer.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -12,13 +12,16 @@
import org.jboss.tools.common.model.loaders.*;
import org.jboss.tools.common.xml.XMLEntityResolver;
+import org.jboss.tools.jst.web.WebModelPlugin;
public class FileTLDRecognizer implements EntityRecognizer, TLDConstants {
static {
try {
XMLEntityResolver.registerPublicEntity(TLD_DOC_PUBLICID_1_1,
FileTLDRecognizer.class, "/meta/web-jsptaglibrary_1_1.dtd");
XMLEntityResolver.registerPublicEntity(TLD_DOC_PUBLICID_1_2,
FileTLDRecognizer.class, "/meta/web-jsptaglibrary_1_2.dtd");
- } catch (Exception e) {}
+ } catch (Exception e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
}
static String VERSION_2_0 = "version=\"2.0\"";
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/ImportTLDToPaletteSupport.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -22,6 +22,7 @@
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
import org.jboss.tools.jst.web.model.tree.AllTldsTree;
import org.jboss.tools.jst.web.tld.URIConstants;
@@ -108,7 +109,9 @@
this.path = path;
try {
selectedFile = tree.find(path);
- } catch (Exception e) {}
+ } catch (Exception e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
return selectedFile;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java 2007-09-11
17:10:59 UTC (rev 3565)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/model/handlers/JSPAdopt.java 2007-09-11
17:11:25 UTC (rev 3566)
@@ -69,7 +69,11 @@
public void adoptAttribute(XModelObject target, XModelObject object, Properties p) {
if(p == null) return;
int c = -1;
- try { c = Integer.parseInt(p.getProperty("pos")); } catch (Exception e)
{}
+ try {
+ c = Integer.parseInt(p.getProperty("pos"));
+ } catch (Exception e) {
+ // Ignore
+ }
if(c < 0) return;
String text = p.getProperty("text");
String pref = (c == 0 || Character.isWhitespace(text.charAt(c - 1))) ?
"" : " ";