Author: dgolovin
Date: 2007-07-27 17:02:09 -0400 (Fri, 27 Jul 2007)
New Revision: 2711
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ResourceContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
Cleanup catch(Exception e) stuff
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -74,14 +74,10 @@
public void dispose() {
super.dispose();
- try {
if(control != null && !control.isDisposed()) {
control.dispose();
control = null;
}
- } catch (Exception e) {
- WebUiPlugin.getPluginLog().logError(e);
- }
}
public void validate() {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
@@ -312,7 +313,7 @@
project.refreshLocal(IProject.DEPTH_INFINITE, null);
hasJavaNature = project.exists() && project.hasNature(JavaCore.NATURE_ID);
hasNature = project.exists() && project.hasNature(context.getNatureID());
- } catch (Exception e) {
+ } catch (CoreException e) {
hasNature = project.exists();
}
if(project.exists() && (!hasNature) && hasJavaNature) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -73,7 +73,7 @@
Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e);
ProblemReportingHelper.reportProblem(status);
result = false;
- } catch (Exception e) {
+ } catch (InterruptedException e) {
String message =
WizardKeys.getString(CANNOT_CREATE_LOCATION+".ErrorMessage")+":
"+context.getLocationPath();
Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e);
ProblemReportingHelper.reportProblem(status);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ResourceContentProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ResourceContentProvider.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ResourceContentProvider.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -68,11 +68,7 @@
if(root != null && !root.equals(newRoot)) {
root = newRoot;
if(viewer.getControl() != null && !viewer.getControl().isDisposed()) {
- try {
- viewer.refresh();
- } catch(Exception e) {
- //ignore
- }
+ viewer.refresh();
}
} else {
root = newRoot;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -291,7 +291,7 @@
IMethod[] ms = null;
try {
ms = type.getMethods();
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
String name = m.getName().getIdentifier();
@@ -313,11 +313,13 @@
if(f == null || getFieldName(f) == null) return null;
IType type = (IType)component.getSourceMember();
IField[] fs = null;
+
try {
fs = type.getFields();
- } catch (Exception e) {
- //ignore
+ } catch (JavaModelException e1) {
+ // ignore
}
+
String name = getFieldName(f);
if(fs != null) for (int i = 0; i < fs.length; i++) {
if(!name.equals(fs[i].getElementName())) continue;
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -19,6 +19,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.ASTRequestor;
@@ -119,7 +120,7 @@
if(ts != null && ts.length > 0) {
visitor.type = ts[0];
}
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
ast.accept(visitor);
@@ -136,14 +137,17 @@
}
static String getResolvedType(IType type, String n) {
+
+ String[][] rs;
try {
- String[][] rs = type.resolveType(n);
+ rs = type.resolveType(n);
if(rs != null && rs.length > 0) {
return (rs[0][0].length() == 0) ? rs[0][1] : rs[0][0] + "." + rs[0][1];
}
- } catch (Exception e) {
- //ignore
+ } catch (JavaModelException e) {
+ // ignore
}
+
return n;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/components/model/SeamComponentsEntityRecognizer.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.seam.xml.components.model;
-import org.jboss.tools.common.model.loaders.*;
+import java.io.IOException;
+
+import org.jboss.tools.common.model.loaders.EntityRecognizer;
import org.jboss.tools.common.xml.XMLEntityResolver;
import org.jboss.tools.seam.xml.SeamXMLPlugin;
@@ -20,7 +22,7 @@
try {
Class<?> c = SeamComponentsEntityRecognizer.class;
XMLEntityResolver.registerPublicEntity(PUBLIC_ID_11, c,
"/meta/components-1.1.dtd");
- } catch (Exception e) {
+ } catch (IOException e) {
SeamXMLPlugin.log(e);
}
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-07-27
20:21:34 UTC (rev 2710)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-07-27
21:02:09 UTC (rev 2711)
@@ -13,6 +13,7 @@
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.compare.Splitter;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -163,7 +164,7 @@
Rectangle rect = null;
try {
rect = composite.getBounds();
- } catch (Exception e) {
+ } catch (SWTException e) {
VpePlugin.getPluginLog().logError(e);
}
Show replies by date