JBoss Tools SVN: r9348 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: criteriaeditor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-07-28 07:47:01 -0400 (Mon, 28 Jul 2008)
New Revision: 9348
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/QueryEditorInput.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2561
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/AbstractQueryEditor.java 2008-07-28 11:47:01 UTC (rev 9348)
@@ -1,13 +1,27 @@
package org.hibernate.eclipse.console;
+import java.io.File;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.ControlContribution;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -19,12 +33,22 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IShowEditorInput;
+import org.eclipse.ui.IURIEditorInput;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.dialogs.SaveAsDialog;
import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.editors.text.EditorsPlugin;
+import org.eclipse.ui.internal.editors.text.NLSUtility;
+import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
@@ -110,11 +134,32 @@
final public void doSave(IProgressMonitor progressMonitor) {
// super.doSave(progressMonitor);
- if(getEditorInput() instanceof QueryEditorInput) {
- QueryEditorInput hei = (QueryEditorInput) getEditorInput();
+ IDocumentProvider p= getDocumentProvider();
+ if (p == null)
+ return;
+
+ QueryEditorInput hei = null;
+ if (getEditorInput() instanceof QueryEditorInput) {
+ hei = (QueryEditorInput) getEditorInput();
hei.setQuery( getQueryString() );
}
- performSave( false, progressMonitor );
+
+ if (p.isDeleted(getEditorInput()) || (hei != null && hei.getStorage() instanceof QueryEditorStorage)) {
+ if (isSaveAsAllowed()) {
+ // 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors.
+ // Changed Behavior to make sure that if called inside a regular save (because
+ // of deletion of input element) there is a way to report back to the caller.
+ performSaveAs(progressMonitor);
+
+ } else {
+ Shell shell = getSite().getShell();
+ String title = HibernateConsoleMessages.AbstractQueryEditor_cannot_save;
+ String msg = HibernateConsoleMessages.AbstractQueryEditor_the_file_has_been_deleted_or_is_not_accessible;
+ MessageDialog.openError(shell, title, msg);
+ }
+ } else {
+ performSave( false, progressMonitor );
+ }
}
protected void doSetInput(IEditorInput input) throws CoreException {
@@ -262,4 +307,150 @@
}
protected abstract String getConnectedImageFilePath();
+
+ /**
+ * returns file extension for "Save As" dialog
+ */
+ protected abstract String getSaveAsFileExtension();
+
+ /**
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#performSaveAs(IProgressMonitor)
+ * the same method except line: "dialog.setOriginalName(getSaveAsFileExtension());"
+ */
+ protected void performSaveAs(IProgressMonitor progressMonitor) {
+ Shell shell= getSite().getShell();
+ final IEditorInput input= getEditorInput();
+
+ IDocumentProvider provider= getDocumentProvider();
+ final IEditorInput newInput;
+
+ if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
+ FileDialog dialog= new FileDialog(shell, SWT.SAVE);
+ IPath oldPath= URIUtil.toPath(((IURIEditorInput)input).getURI());
+ if (oldPath != null) {
+ dialog.setFileName(oldPath.lastSegment());
+ dialog.setFilterPath(oldPath.toOSString());
+ }
+
+ String path= dialog.open();
+ if (path == null) {
+ if (progressMonitor != null)
+ progressMonitor.setCanceled(true);
+ return;
+ }
+
+ // Check whether file exists and if so, confirm overwrite
+ final File localFile= new File(path);
+ if (localFile.exists()) {
+ MessageDialog overwriteDialog= new MessageDialog(
+ shell,
+ HibernateConsoleMessages.AbstractQueryEditor_save_as,
+ null,
+ NLSUtility.format(HibernateConsoleMessages.AbstractQueryEditor_already_exists_do_you_want_to_replace_it, path),
+ MessageDialog.WARNING,
+ new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL },
+ 1); // 'No' is the default
+ if (overwriteDialog.open() != Window.OK) {
+ if (progressMonitor != null) {
+ progressMonitor.setCanceled(true);
+ return;
+ }
+ }
+ }
+
+ IFileStore fileStore;
+ try {
+ fileStore= EFS.getStore(localFile.toURI());
+ } catch (CoreException ex) {
+ EditorsPlugin.log(ex.getStatus());
+ String title= HibernateConsoleMessages.AbstractQueryEditor_problems_during_save_as;
+ String msg= NLSUtility.format(HibernateConsoleMessages.AbstractQueryEditor_save_could_not_be_completed, ex.getMessage());
+ MessageDialog.openError(shell, title, msg);
+ return;
+ }
+
+ IFile file= getWorkspaceFile(fileStore);
+ if (file != null)
+ newInput= new FileEditorInput(file);
+ else
+ newInput= new FileStoreEditorInput(fileStore);
+
+ } else {
+ SaveAsDialog dialog= new SaveAsDialog(shell);
+
+ IFile original= (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null;
+ if (original != null) {
+ dialog.setOriginalFile(original);
+ }
+ else {
+ dialog.setOriginalName(getSaveAsFileExtension());
+ }
+
+ dialog.create();
+
+ if (provider.isDeleted(input) && original != null) {
+ String message= NLSUtility.format(HibernateConsoleMessages.AbstractQueryEditor_the_original_file_has_been_deleted_or_is_not_accessible, original.getName());
+ dialog.setErrorMessage(null);
+ dialog.setMessage(message, IMessageProvider.WARNING);
+ }
+
+ if (dialog.open() == Window.CANCEL) {
+ if (progressMonitor != null)
+ progressMonitor.setCanceled(true);
+ return;
+ }
+
+ IPath filePath= dialog.getResult();
+ if (filePath == null) {
+ if (progressMonitor != null)
+ progressMonitor.setCanceled(true);
+ return;
+ }
+
+ IWorkspace workspace= ResourcesPlugin.getWorkspace();
+ IFile file= workspace.getRoot().getFile(filePath);
+ newInput= new FileEditorInput(file);
+
+ }
+
+ if (provider == null) {
+ // editor has programmatically been closed while the dialog was open
+ return;
+ }
+
+ boolean success= false;
+ try {
+
+ provider.aboutToChange(newInput);
+ provider.saveDocument(progressMonitor, newInput, provider.getDocument(input), true);
+ success= true;
+
+ } catch (CoreException x) {
+ final IStatus status= x.getStatus();
+ if (status == null || status.getSeverity() != IStatus.CANCEL) {
+ String title= HibernateConsoleMessages.AbstractQueryEditor_problems_during_save_as;
+ String msg= NLSUtility.format(HibernateConsoleMessages.AbstractQueryEditor_save_could_not_be_completed, x.getMessage());
+ MessageDialog.openError(shell, title, msg);
+ }
+ } finally {
+ provider.changed(newInput);
+ if (success)
+ setInput(newInput);
+ }
+
+ if (progressMonitor != null)
+ progressMonitor.setCanceled(!success);
+ }
+
+ /**
+ * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#getWorkspaceFile(IFileStore)
+ * the same PROTECTED method instead of PRIVATE
+ */
+ protected IFile getWorkspaceFile(IFileStore fileStore) {
+ IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
+ IFile[] files= workspaceRoot.findFilesForLocation(URIUtil.toPath(fileStore.toURI()));
+ if (files != null && files.length == 1)
+ return files[0];
+ return null;
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-07-28 11:47:01 UTC (rev 9348)
@@ -18,6 +18,13 @@
public static String AbstractQueryEditor_do_you_want_open_session_factory;
public static String AbstractQueryEditor_max_results;
public static String AbstractQueryEditor_open_session_factory;
+ public static String AbstractQueryEditor_cannot_save;
+ public static String AbstractQueryEditor_the_file_has_been_deleted_or_is_not_accessible;
+ public static String AbstractQueryEditor_save_as;
+ public static String AbstractQueryEditor_already_exists_do_you_want_to_replace_it;
+ public static String AbstractQueryEditor_problems_during_save_as;
+ public static String AbstractQueryEditor_save_could_not_be_completed;
+ public static String AbstractQueryEditor_the_original_file_has_been_deleted_or_is_not_accessible;
public static String EclipseConsoleConfigurationPreferences_could_not_compute_def_classpath;
public static String EclipseConsoleConfigurationPreferences_could_not_resolve_to_file;
public static String EclipseConsoleConfigurationPreferences_could_not_resolve_classpaths;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-07-28 11:47:01 UTC (rev 9348)
@@ -9,6 +9,13 @@
AbstractQueryEditor_do_you_want_open_session_factory=Do you want to open the session factory for {0} ?
AbstractQueryEditor_max_results=Max results:
AbstractQueryEditor_open_session_factory=Open Session factory
+AbstractQueryEditor_cannot_save=Cannot Save
+AbstractQueryEditor_the_file_has_been_deleted_or_is_not_accessible=The file has been deleted or is not accessible.
+AbstractQueryEditor_save_as=Save As
+AbstractQueryEditor_already_exists_do_you_want_to_replace_it={0} already exists.\nDo you want to replace it?
+AbstractQueryEditor_problems_during_save_as=Problems During Save As...
+AbstractQueryEditor_save_could_not_be_completed=Save could not be completed. {0}
+AbstractQueryEditor_the_original_file_has_been_deleted_or_is_not_accessible=The original file ''{0}'' has been deleted or is not accessible.
EclipseConsoleConfigurationPreferences_could_not_compute_def_classpath=Could not compute default classpath from project
EclipseConsoleConfigurationPreferences_could_not_resolve_to_file=Could not resolve {0} to a file
EclipseConsoleConfigurationPreferences_could_not_resolve_classpaths=Could not resolve classpaths
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/QueryEditorInput.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/QueryEditorInput.java 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/QueryEditorInput.java 2008-07-28 11:47:01 UTC (rev 9348)
@@ -15,7 +15,7 @@
/**
* Constructs an instance of this class with the given <code>IStorage</code>
* object as the editor input source.
- *
+ *
* @param storage the storage object for this editor input
*/
public QueryEditorInput( IStorage storage ) {
@@ -24,17 +24,17 @@
}
setStorage( storage );
setName( storage.getName() );
- }
+ }
/**
* Gets whether the editor input exists.
- *
+ *
* @see org.eclipse.ui.IEditorInput#exists()
*/
public boolean exists() {
if (storage != null)
return true;
-
+
return false;
}
@@ -54,11 +54,11 @@
return storage;
}
- public String getToolTipText() {
- return getName();
+ public String getToolTipText() {
+ return getName();
}
-
+
public void setName( String name ) {
this.name = name;
}
@@ -71,22 +71,24 @@
return this;
}
-
+
public boolean equals(Object obj) { // used to identify if HQL editor is the same
/*if(obj instanceof HQLEditorInput) {
-
+
return ((HQLEditorInput)obj).getConsoleConfigurationName().equals(getConsoleConfigurationName());
}*/
return super.equals(obj);
}
-
+
public int hashCode() {
return name==null?0:name.hashCode();
}
public void setQuery(String query) {
- ((QueryEditorStorage)getStorage()).setContents(query);
+ if (getStorage() instanceof QueryEditorStorage) {
+ ((QueryEditorStorage)getStorage()).setContents(query);
+ }
}
public String getConsoleConfigurationName() {
@@ -94,7 +96,7 @@
}
public void setConsoleConfigurationName(String name2) {
- ((QueryEditorStorage)getStorage()).setConfigurationName(name2);
+ ((QueryEditorStorage)getStorage()).setConfigurationName(name2);
}
abstract public void resetName();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2008-07-28 11:47:01 UTC (rev 9348)
@@ -211,4 +211,9 @@
protected String getConnectedImageFilePath() {
return "icons/images/criteria_editor_connect.gif"; //$NON-NLS-1$
}
+
+ @Override
+ protected String getSaveAsFileExtension() {
+ return "*.crit"; //$NON-NLS-1$
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2008-07-28 10:40:53 UTC (rev 9347)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2008-07-28 11:47:01 UTC (rev 9348)
@@ -411,4 +411,9 @@
return "icons/images/hql_editor_connect.gif"; //$NON-NLS-1$
}
+
+ @Override
+ protected String getSaveAsFileExtension() {
+ return "*.hql"; //$NON-NLS-1$
+ }
}
16 years, 5 months
JBoss Tools SVN: r9347 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-28 06:40:53 -0400 (Mon, 28 Jul 2008)
New Revision: 9347
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Fix bugs https://jira.jboss.org/jira/browse/JBIDE-2430
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-07-28 10:39:26 UTC (rev 9346)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-07-28 10:40:53 UTC (rev 9347)
@@ -182,7 +182,7 @@
final Element source = (Element) sourceNode;
prepareData(source);
- final nsIDOMElement rootDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ // final nsIDOMElement rootDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
final nsIDOMElement secondDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
secondDiv.setAttribute("align", this.sourceAlign);
secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv"));
@@ -247,7 +247,7 @@
+ calculateWithForDiv(this.sourceWidth, 10));
forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts"));
- rootDiv.appendChild(secondDiv);
+ // rootDiv.appendChild(secondDiv);
secondDiv.appendChild(thirdDiv);
if (isToggle) {
@@ -258,9 +258,9 @@
thirdDiv.appendChild(thirdInput);
thirdDiv.appendChild(forthEmptyDiv);
- final VpeCreationData creationData = new VpeCreationData(rootDiv);
-// final DOMTreeDumper dumper = new DOMTreeDumper();
-// dumper.dumpToStream(System.err, rootDiv);
+ final VpeCreationData creationData = new VpeCreationData(secondDiv);
+ final DOMTreeDumper dumper = new DOMTreeDumper();
+ dumper.dumpToStream(System.err, secondDiv);
return creationData;
}
16 years, 5 months
JBoss Tools SVN: r9346 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: templates and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-28 06:39:26 -0400 (Mon, 28 Jul 2008)
New Revision: 9346
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Fix bugs https://jira.jboss.org/jira/browse/JBIDE-2430
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-07-28 10:39:18 UTC (rev 9345)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-07-28 10:39:26 UTC (rev 9346)
@@ -26,7 +26,6 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMText;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -496,7 +495,7 @@
if(defaultButtonImages.containsValue(cancelControlIconImg)){
ComponentUtil.setImg(cancelButtonImg,cancelControlIconImg);
}else{
- ComponentUtil.setImgFromResources(pageContext, cancelButtonImg, saveControlIconImg, "");
+ ComponentUtil.setImgFromResources(pageContext, cancelButtonImg, cancelControlIconImg, "");
}
cancelButtonImg.setAttribute(HTML.ATTR_TYPE, "image");
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-07-28 10:39:18 UTC (rev 9345)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-07-28 10:39:26 UTC (rev 9346)
@@ -121,9 +121,9 @@
<vpe:tag name="rich:comboBox" case-sensitive="yes">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesComboBoxTemplate">
- <!--vpe:resize>
- <vpe:width width-attr="style.width" />
- </vpe:resize-->
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no">
16 years, 5 months
JBoss Tools SVN: r9345 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-28 06:39:18 -0400 (Mon, 28 Jul 2008)
New Revision: 9345
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
Log:
Fix bugs https://jira.jboss.org/jira/browse/JBIDE-2430
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-07-26 00:53:49 UTC (rev 9344)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-07-28 10:39:18 UTC (rev 9345)
@@ -35,7 +35,7 @@
private static final String _150PX = "150px";
/** The Constant _250PX. */
- private static final String _250PX = "250px";
+ private static final String _250PX = "150px";
/** The Constant _255PX. */
private static final String _255PX = "255px";
@@ -145,7 +145,7 @@
* @throws PartInitException the part init exception
*/
public void testComboBoxWithAttributes2() throws PartInitException, Throwable {
- final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2, _255PX);
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2, _250PX);
checkValueInInput(rst, EL_VALUE);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-07-26 00:53:49 UTC (rev 9344)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-07-28 10:39:18 UTC (rev 9345)
@@ -82,9 +82,19 @@
assertEquals("Count of items should be 1", 1, elements.size());
final nsIDOMElement element = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ String first = "null";
+ String second = "null";
+
+ if(value!=null){
+ first = value;
+ }
+
+ if(element.getFirstChild().getNodeValue()!=null){
+ second = element.getFirstChild().getNodeValue();
+ }
+ assertEquals("Text value should be equals 'null'", first, second);
- assertEquals("Text value should be equals 'null'", value, element.getFirstChild().getNodeValue());
-
assertTrue("Style class should be equals " + styleClass, element.getAttribute(HTML.ATTR_CLASS).contains(styleClass));
}
16 years, 5 months
JBoss Tools SVN: r9344 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core: scanner/lib and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-07-25 20:53:49 -0400 (Fri, 25 Jul 2008)
New Revision: 9344
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamResourceVisitor.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-351
Cleanup Seam GUI code:
1. Unnecessary catch(Exception ex) blocks were removed;
2. Catch(Exception ex) blocks were converted to catch particular exception(s) where it was possible
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -116,11 +116,7 @@
String[] cs = v.split(";");
List<BijectedAttributeType> list = new ArrayList<BijectedAttributeType>();
for (int i = 0; i < cs.length; i++) {
- try {
- list.add(BijectedAttributeType.valueOf(cs[i]));
- } catch (Exception e) {
- //ignore
- }
+ list.add(BijectedAttributeType.valueOf(cs[i]));
}
types = list.toArray(new BijectedAttributeType[0]);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -143,11 +143,7 @@
if(v != null && v.length() > 0) {
String[] cs = v.split(";");
for (int i = 0; i < cs.length; i++) {
- try {
- types.add(SeamComponentMethodType.valueOf(cs[i]));
- } catch (Exception e) {
- //ignore
- }
+ types.add(SeamComponentMethodType.valueOf(cs[i]));
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -18,6 +18,7 @@
import java.util.Properties;
import java.util.Set;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
@@ -452,7 +453,7 @@
}
try {
JavaUI.openInEditor(type);
- } catch (Exception e) {
+ } catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
@@ -556,7 +557,7 @@
BeanType t = null;
try {
t = BeanType.valueOf(name);
- } catch (Exception e) {
+ } catch (IllegalArgumentException e) {
continue;
}
if(t == null) continue;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamResourceVisitor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamResourceVisitor.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamResourceVisitor.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -15,12 +15,14 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
+import org.jboss.tools.seam.internal.core.scanner.ScannerException;
import org.jboss.tools.seam.internal.core.scanner.java.JavaScanner;
import org.jboss.tools.seam.internal.core.scanner.xml.PropertiesScanner;
import org.jboss.tools.seam.internal.core.scanner.xml.XMLScanner;
@@ -64,7 +66,7 @@
LoadedDeclarations c = null;
try {
c = scanner.parse(f);
- } catch (Exception e) {
+ } catch (ScannerException e) {
SeamCorePlugin.getDefault().logError(e);
}
if(c != null) componentsLoaded(c, f);
@@ -97,7 +99,7 @@
if(!project.hasNature(JavaCore.NATURE_ID)) return null;
IJavaProject javaProject = JavaCore.create(project);
return output = javaProject.getOutputLocation();
- } catch (Exception e) {
+ } catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
return null;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.internal.core.scanner.lib;
import java.io.File;
+import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
@@ -99,9 +100,11 @@
newPaths = EclipseResourceUtil.getClassPath(project.getProject());
List<String> jre = EclipseResourceUtil.getJREClassPath(project.getProject());
if(jre != null) newPaths.removeAll(jre);
- } catch (Exception e) {
+ } catch (CoreException e) {
//TODO
SeamCorePlugin.getDefault().logError(e);
+ } catch(IOException e) {
+ SeamCorePlugin.getDefault().logError(e);
}
if(paths == null && newPaths == null) return false;
if((newPaths == null || paths == null) || (paths.size() != newPaths.size())) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -206,6 +206,7 @@
try {
ds1 = CLASS_SCANNER.parse(type, cls, sourcePath);
} catch (Exception e) {
+ // FIXME parse method should throw particular exception or catch block should be removed
SeamCorePlugin.getPluginLog().logError(e);
}
if(ds1 != null) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -410,22 +410,14 @@
if(name == null || name.trim().length() == 0) continue;
String path = linkedResources[i].getAttribute("path"); //$NON-NLS-1$
if(path == null || path.trim().length() == 0) continue;
- try {
- IPath pathObject = new Path(path);
- addLinkedResource(name, pathObject);
- } catch (Exception e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
+ IPath pathObject = new Path(path);
+ addLinkedResource(name, pathObject);
}
Element[] unnamedPathElement = XMLUtilities.getChildren(root, "unnamed-path"); //$NON-NLS-1$
if(unnamedPathElement != null) for (int i = 0; i < unnamedPathElement.length; i++) {
String path = unnamedPathElement[i].getAttribute("path"); //$NON-NLS-1$
- try {
- IPath pathObject = new Path(path);
- addUnnamedResource(pathObject);
- } catch (Exception e) {
- SeamCorePlugin.getPluginLog().logError(e);
- }
+ IPath pathObject = new Path(path);
+ addUnnamedResource(pathObject);
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java 2008-07-26 00:41:21 UTC (rev 9343)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java 2008-07-26 00:53:49 UTC (rev 9344)
@@ -46,11 +46,7 @@
*/
public ISeamProject getSeamProject() {
ISeamProject project = null;
- try {
- project = SeamCorePlugin.getSeamProject(getProject(), true);
- } catch (Exception e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT, e);
- }
+ project = SeamCorePlugin.getSeamProject(getProject(), true);
return project;
}
16 years, 5 months
JBoss Tools SVN: r9343 - in trunk/common/plugins: org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl and 32 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-07-25 20:41:21 -0400 (Fri, 25 Jul 2008)
New Revision: 9343
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/DeadLock.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/MatchingStrategyImpl.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ErrorMode.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/OpenEditorWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/FormPlace.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XMenuInvoker.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectActionFilter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/AbstractShowUrlActionDelegate.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/AdapterFactory.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/CheckListAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/ColoredFontData.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/EclipseClassChooserAdapter.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCueLabelProvider.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTASync.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTSync.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/java/generation/JavaBeanGenerator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/DefaultWizardDataValidator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/constraint/impl/XAttributeConstraintProperties.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelMetaDataImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/DocumentGenerator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/MetaValidator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/adapter/ModelObjectAdapterExtensionPoint.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/engines/impl/XProcess.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/ExtensionChange.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/EngineIcon.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/GifIcon.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/MainIcon.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/bundle/CountriesHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/java/handlers/OpenJavaSourceHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/RootLoaderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/URLRootLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/ResourceMarkers.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/WatcherLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/refactoring/RenameModelObjectChange.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XProtectedTransaction.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XUndoManager.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/AccessibleJava.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelFeatureFactory.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/SafeDocumentBuilderFactory.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-351
Cleanup JSF code:
1. Unnecessary catch(Exception ex) blocks were removed;
2. Catch(Exception ex) blocks were converted to catch particular exception(s) where it was possible
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/java/generation/JavaBeanGenerator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/java/generation/JavaBeanGenerator.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/java/generation/JavaBeanGenerator.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -32,6 +32,7 @@
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.formatter.CodeFormatter;
import org.eclipse.jdt.ui.CodeGeneration;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.text.edits.TextEdit;
@@ -181,7 +182,7 @@
try {
edit.apply(doc, 0);
return doc.get();
- } catch (Exception e) {
+ } catch (BadLocationException e) {
return sourceString;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/DefaultWizardDataValidator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/DefaultWizardDataValidator.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/DefaultWizardDataValidator.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -13,6 +13,7 @@
import java.util.*;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.CreateFileHandler;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -82,12 +83,8 @@
if(entity == null || support.getTarget().getModel().getMetaData().getEntity(entity) == null)
entity = ds[step].getModelEntity().getName();
}
- try {
- XModelObject o = support.getTarget().getModel().createModelObject(entity, data);
- if(o != null) message = DefaultCreateHandler.getContainsMessage(support.getTarget(), o);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("DefaultWizardDataValidator:validateAddFile:" + e.getMessage());
- }
+ XModelObject o = support.getTarget().getModel().createModelObject(entity, data);
+ if(o != null) message = DefaultCreateHandler.getContainsMessage(support.getTarget(), o);
}
public String getErrorMessage() {
@@ -106,14 +103,10 @@
}
protected boolean checkChild(XModelObject parent, String entity, Properties data) {
- try {
- XModelObject o = support.getTarget().getModel().createModelObject(entity, data);
- if(o.getModelEntity().getAttribute(XModelObjectLoaderUtil.ATTR_ID_NAME) != null) return true;
- if(o != null && parent == support.getTarget().getParent() && o.getPathPart().equals(support.getTarget().getPathPart())) return true;
- if(o != null) message = DefaultCreateHandler.getContainsMessage(parent, o);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("DefaultWizardDataValidator:checkChild:" + e.getMessage());
- }
+ XModelObject o = support.getTarget().getModel().createModelObject(entity, data);
+ if(o.getModelEntity().getAttribute(XModelObjectLoaderUtil.ATTR_ID_NAME) != null) return true;
+ if(o != null && parent == support.getTarget().getParent() && o.getPathPart().equals(support.getTarget().getPathPart())) return true;
+ if(o != null) message = DefaultCreateHandler.getContainsMessage(parent, o);
return message == null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -197,11 +197,7 @@
public final void stopThread(boolean force) {
if(thread == null) return;
if(thread.isAlive() && force) {
- try {
thread.stop();
- } catch (Exception e) {
- //ignore
- }
}
thread = null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XActionImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -148,6 +148,11 @@
return help = a;
}
+
+ /**
+ * TODO move to XModelTestPlugin
+ * @deprecated
+ */
public String testHandler() {
if(handlerClassName == null || handlerClassName.trim().length() == 0) {
return null; //"handler is not set";
@@ -166,9 +171,11 @@
} catch (NoClassDefFoundError nc) {
//just wrong class path in test plugin
return null;
- } catch (Exception e) {
- return "cannot create handler " + cn;
- }
+ } catch (InstantiationException e) {
+ return "cannot create handler " + cn;
+ } catch (IllegalAccessException e) {
+ return "cannot create handler " + cn;
+ }
if(!(h instanceof XActionHandler)) {
return "cannot reduce handler to XActionHandler";
}
@@ -181,9 +188,11 @@
Object so = null;
try {
so = scls.newInstance();
- } catch (Exception e) {
+ } catch (IllegalAccessException e) {
return "cannot create support " + scn;
- }
+ } catch (InstantiationException e) {
+ return "cannot create support " + scn;
+ }
if(!(so instanceof SpecialWizardSupport)) {
return "cannot reduce support " + scn + " to SpecialWizardSupport";
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithExternalHandler.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,9 +11,11 @@
package org.jboss.tools.common.meta.action.impl.handlers;
import java.io.*;
+import java.net.MalformedURLException;
import java.util.*;
import org.jboss.tools.common.meta.action.impl.*;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
import org.jboss.tools.common.model.engines.impl.XProcess;
import org.jboss.tools.common.model.filesystems.XFileObject;
@@ -114,8 +116,8 @@
try {
java.net.URL u = new File(file).toURL();
file = u.getProtocol() + "://" + u.getFile();
- } catch (Exception e) {
- //ignore
+ } catch (MalformedURLException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
}
l.add(file);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithHelper.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/handlers/OpenWithHelper.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -101,16 +101,11 @@
}
static String[] getEnvironmentPaths() {
- try {
-// String jlp = System.getProperties().getProperty("java.library.path");
- String jlp = OSHelper.getProperty("PATH", "");
- StringTokenizer st = new StringTokenizer(jlp, File.pathSeparator);
- String[] ps = new String[st.countTokens()];
- for (int i = 0; i < ps.length; i++) ps[i] = st.nextToken();
- return ps;
- } catch (Exception t) {
- return null;
- }
+ String jlp = OSHelper.getProperty("PATH", "");
+ StringTokenizer st = new StringTokenizer(jlp, File.pathSeparator);
+ String[] ps = new String[st.countTokens()];
+ for (int i = 0; i < ps.length; i++) ps[i] = st.nextToken();
+ return ps;
}
public static String getLogicalExtension(XModelObject object, XAction action) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/constraint/impl/XAttributeConstraintProperties.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/constraint/impl/XAttributeConstraintProperties.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/constraint/impl/XAttributeConstraintProperties.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -49,12 +49,7 @@
public boolean getBoolean(String name, boolean def) {
String v = p.getProperty(name);
if(v == null || v.length() == 0) return def;
- try {
- return Boolean.getBoolean(v);
- } catch (Exception e) {
- //ignore
- return def;
- }
+ return Boolean.getBoolean(v);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/help/HelpUtil.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -81,7 +81,7 @@
} else {
try {
HelpUtil.callHelp(model, key);
- } catch (Exception e) {
+ } catch (XModelException e) {
d.showDialog("Warning", e.getMessage(), new String[]{"Close"}, null, ServiceDialog.WARNING);
}
}
@@ -136,7 +136,7 @@
ZipEntry entry = (ZipEntry)en.nextElement();
set.add("/" + entry.getName());
}
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
}
return set;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -217,11 +217,7 @@
public XAdapter getAdapter() {
if(adapter != null) return adapter;
- try {
doGetAdapter();
- } catch (Exception t) {
- ModelPlugin.getPluginLog().logError("Error while obtaining adapter", t);
- }
if(adapter == null) adapter = new XAdapter();
return adapter;
}
@@ -245,11 +241,7 @@
}
if(adapter == null) adapter = new XAdapter();
if(adapter != null) {
- try {
- adapter.reload(element);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadAdapter:" + e.getMessage());
- }
+ adapter.reload(element);
adapter.setConstraint(attribute.getConstraint());
}
@@ -275,11 +267,7 @@
public XAttributeConstraint getConstraint() {
if(constraint == null) {
- try {
doGetConstraint();
- } catch (Exception t) {
- ModelPlugin.getPluginLog().logError("Error while obtaining constraint", t);
- }
if(constraint == null) constraint = new XAttributeConstraintImpl();
}
return constraint;
@@ -299,11 +287,9 @@
ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + e.getMessage(), e);
}
if(constraint == null) constraint = new XAttributeConstraintImpl();
- if(element != null) try {
+
+ if(element != null)
((XAttributeConstraintImpl)constraint).load(element);
- } catch (Exception t) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + t.getMessage(), t);
- }
loader = null;
element = null;
this.constraint = constraint;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataLoader.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XMetaDataLoader.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.impl;
+import java.io.IOException;
import java.util.*;
import org.w3c.dom.*;
import org.jboss.tools.common.meta.XMetaElement;
@@ -25,10 +26,12 @@
private static XMetaElement getDefaultMetaElementInstance(Class defImpl) {
try {
return (XMetaElementImpl)defImpl.newInstance();
- } catch (Exception e) {
+ } catch (InstantiationException e) {
ModelPlugin.getPluginLog().logError("Error in getDefaultMetaElementInstance");
- return null;
- }
+ } catch (IllegalAccessException e) {
+ ModelPlugin.getPluginLog().logError("Error in getDefaultMetaElementInstance");
+ }
+ return null;
}
private static XMetaElement getMetaElementInstance(Element element, Class defImpl, boolean isRequired) {
if(element == null) {
@@ -39,10 +42,14 @@
if(loader == null || loader.length() == 0) return null;
try {
return (XMetaElementImpl)ClassLoaderUtil.getClassLoader().loadClass(loader).newInstance();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("Error in getMetaElementInstance " + loader);
- return null;
- }
+ } catch (InstantiationException e) {
+ ModelPlugin.getPluginLog().logError("Error in getMetaElementInstance " + loader, e);
+ } catch (IllegalAccessException e) {
+ ModelPlugin.getPluginLog().logError("Error in getMetaElementInstance " + loader, e);
+ } catch (ClassNotFoundException e) {
+ ModelPlugin.getPluginLog().logError("Error in getMetaElementInstance " + loader, e);
+ }
+ return null;
}
public static XMetaElement loadMetaElement(Element parent, String nodeName, Class defImpl, boolean isRequired){
@@ -88,7 +95,7 @@
public static int getInt(Element el, String attName, int def){
try {
return Integer.parseInt(el.getAttribute(attName));
- } catch(Exception ex){
+ } catch(NumberFormatException ex){
return def;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.impl;
+import java.io.IOException;
import java.util.*;
import org.w3c.dom.Element;
@@ -310,11 +311,7 @@
private void merge(XModelEntityExtensionImpl ext) {
children.merge(ext.getChildren());
- try {
- actions.merge((XActionListImpl)ext.getActionList());
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("XModelEntityImpl:merge:" + e.getMessage());
- }
+ actions.merge((XActionListImpl)ext.getActionList());
}
//optimization
@@ -384,6 +381,10 @@
return (requiredchildren == null) ? null : (HashSet<String>)requiredchildren.clone();
}
+
+ /**
+ * FIXME Move to ModelTest plugin
+ */
public String testImplementation() {
if(implementationClassName == null || implementationClassName.length() == 0) {
return null;
@@ -401,12 +402,18 @@
if(!(h instanceof XModelObject)) {
return "cannot reduce implementation to XModelObject";
}
- } catch (Exception e) {
+ } catch (InstantiationException e) {
return "cannot create implementation object";
- }
+ } catch (IllegalAccessException e) {
+ return "cannot create implementation object";
+ }
return null;
}
+
+ /**
+ * FIXME Move to ModelTest plugin
+ */
public String testLoader() {
if(loaderClassName == null || loaderClassName.length() == 0) {
return null;
@@ -424,9 +431,11 @@
if(!(h instanceof XObjectLoader)) {
return "cannot reduce loader to XObjectLoader";
}
- } catch (Exception e) {
+ } catch (InstantiationException e) {
return "cannot create loader object";
- }
+ } catch (IllegalAccessException e) {
+ return "cannot create loader object";
+ }
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelMetaDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelMetaDataImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelMetaDataImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -46,7 +46,6 @@
private XModelMetaDataImpl() {
long t = System.currentTimeMillis();
- try {
XMetaDataLoader.loadMetaModel(this);
instance = this;
@@ -60,10 +59,6 @@
XModelEntity[] es = this.entities.values().toArray(new XModelEntity[0]);
for (int i = 0; i < es.length; i++) ((XModelEntityImpl)es[i]).validate();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- throw new RuntimeException("Cannot create metamodel: " + e.getMessage());
- }
if(reportLoadingTime) {
long dt = - t + (t = System.currentTimeMillis());
ModelPlugin.getPluginLog().logInfo("Meta model loaded in " + dt + " ms");
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/DocumentGenerator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/DocumentGenerator.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/DocumentGenerator.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -38,7 +38,7 @@
try {
XModelObjectLoaderUtil.serialize(g, filename);
replace();
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
}
@@ -268,7 +268,7 @@
while((i = br.read(b, 0, 256)) > 0) {
sb.append(b, 0, i);
}
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
int i = 0;
@@ -281,7 +281,7 @@
bw.print(sb.toString());
bw.flush();
bw.close();
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/MetaValidator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/MetaValidator.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/documentation/MetaValidator.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -81,9 +81,13 @@
} else {
try {
Class.forName(prefix + classname).newInstance();
- } catch (Exception e) {
- message(pref + " class '" + classname + "' not found.");
- }
+ } catch (ClassNotFoundException e) {
+ message(pref + " class '" + classname + "' not found.");
+ } catch (InstantiationException e) {
+ message(pref + " class '" + classname + "' not found.");
+ } catch (IllegalAccessException e) {
+ message(pref + " class '" + classname + "' not found.");
+ }
}
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XJob.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -111,29 +111,12 @@
if(list.size() == 0) break;
r = list.remove(0);
}
- try {
- monitor.subTask(r.getId());
- int state = 0;
- try {
- Bundle b = Platform.getBundle("org.jboss.tools.common.model");
- state = b.getState();
- } catch (Exception e2) {
- //ignore, bundle is not active
- }
- if(state == Bundle.ACTIVE) {
- r.run();
- }
- } catch (Exception e) {
- int state = 0;
- try {
- Bundle b = Platform.getBundle("org.jboss.tools.common.model");
- state = b.getState();
- } catch (Exception e2) {
- //ignore, bundle is not active
- }
- if(state == Bundle.ACTIVE) {
- ModelPlugin.getPluginLog().logError(e);
- }
+ monitor.subTask(r.getId());
+ int state = 0;
+ Bundle b = Platform.getBundle("org.jboss.tools.common.model");
+ state = b==null ? -1 : b.getState();
+ if(state == Bundle.ACTIVE) {
+ r.run();
}
synchronized (this) {
ids.remove(r.getId());
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/adapter/ModelObjectAdapterExtensionPoint.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/adapter/ModelObjectAdapterExtensionPoint.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/adapter/ModelObjectAdapterExtensionPoint.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -44,7 +44,7 @@
Class cls = null;
try {
cls = bundle.loadClass(classname);
- } catch (Exception e) {
+ } catch (ClassNotFoundException e) {
ModelPlugin.getPluginLog().logError("Cannot load editor class " + classname + " from " + es[i].getNamespaceIdentifier());
continue;
}
@@ -61,8 +61,10 @@
Class cls = (Class)adapters.get(iclassname);
try {
if(cls != null) return (IModelObjectAdapter)cls.newInstance();
- } catch (Exception e) {
+ } catch (InstantiationException e) {
ModelPlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/engines/impl/XProcess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/engines/impl/XProcess.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/engines/impl/XProcess.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -42,7 +42,7 @@
process = Runtime.getRuntime().exec(command_line, null, new File(getRoot()));
err = new ProcessOut(process, true, w);
out = new ProcessOut(process, false, w);
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
new HookMonitor();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -113,13 +113,7 @@
Runnable r = new Runnable() {
public void run() {
getResourceMarkers().clear();
- try {
- constraintChecker.check();
- } catch (Exception e) {
- if(ModelPlugin.isDebugEnabled()) {
- ModelPlugin.getPluginLog().logError(e);
- }
- }
+ constraintChecker.check();
}
};
Display.getDefault().asyncExec(r);
@@ -192,11 +186,7 @@
mergeAll(f, update);
set("actualBodyTimeStamp", "" + getTimeStamp());
if(errors1) m.fireStructureChanged(this);
- try {
- if(!isOverlapped) constraintChecker.check();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
+ if(!isOverlapped) constraintChecker.check();
} else {
//old edit by replace
p.removeChild_0(this);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/ExtensionChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/ExtensionChange.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/ExtensionChange.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -16,6 +16,7 @@
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
import org.jboss.tools.common.meta.action.impl.handlers.DefaultRemoveHandler;
import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.loaders.XObjectLoader;
import org.jboss.tools.common.model.undo.XTransactionUndo;
@@ -65,7 +66,7 @@
XModelObject p = file.getParent();
DefaultRemoveHandler.removeFromParent(file);
DefaultCreateHandler.addCreatedObject(p, o, FindObjectHelper.IN_NAVIGATOR_ONLY);
- } catch (Exception e) {
+ } catch (XModelException e) {
undo.rollbackTransactionInProgress();
return false;
} finally {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.model.filesystems.impl;
import java.io.File;
+import java.io.IOException;
import java.util.*;
import org.eclipse.core.internal.resources.ResourceException;
@@ -19,6 +20,7 @@
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.markers.ResourceMarkers;
@@ -251,25 +253,29 @@
ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()", re);
} else {
//ignore we cannot prevent this when project is removed externally
- }
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()",e);
+ }
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
} finally {
fsi.unlockUpdate();
}
- if(resource != null && resource.exists()) try {
- IResource[] rs = resource.members();
- for (int i = 0; i < rs.length; i++) {
- if(rs[i].isLinked()) {
- File f = rs[i].getLocation().toFile();
- String p = FilePathHelper.toPathPath(f.getName());
- mf.put(p, f);
- linked.put(p, f);
- linkedResources.put(p, rs[i]);
- }
- }
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
+
+
+ try {
+ if(resource != null && resource.exists()) {
+ IResource[] rs = resource.members();
+ for (int i = 0; i < rs.length; i++) {
+ if(rs[i].isLinked()) {
+ File f = rs[i].getLocation().toFile();
+ String p = FilePathHelper.toPathPath(f.getName());
+ mf.put(p, f);
+ linked.put(p, f);
+ linkedResources.put(p, rs[i]);
+ }
+ }
+ }
+ } catch (CoreException ex) {
+ ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
}
File[] fs = getFiles();
@@ -318,7 +324,7 @@
} catch (NoClassDefFoundError error) {
//Most probably Eclipse is shutting down.
return true;
- } catch (Exception t) {
+ } catch (XModelException t) {
ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
} finally {
updateLock--;
@@ -385,16 +391,16 @@
if(ef != null && !ef.isSynchronized(0)) {
try {
ef.refreshLocal(0, null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
}
}
ef = getChildFile(r.getName());
if(ef != null && !ef.isSynchronized(0)) {
try {
ef.refreshLocal(0, null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()");
}
}
@@ -405,7 +411,7 @@
if(ef != null && !ef.isSynchronized(0)) {
try {
ef.refreshLocal(0, null);
- } catch (Exception e) {
+ } catch (CoreException e) {
//ignore
}
}
@@ -489,14 +495,10 @@
private int question(File f) {
if(Display.getCurrent() == null) return -100;
- try {
- return getModel().getService().showDialog("Update",
- "File " + f.getAbsolutePath() + " is externally modified.\n" +
- "Do you want to reload it?", new String[]{"Yes", "No"}, null,
- ServiceDialog.QUESTION);
- } catch (Exception t) {
- return 0;
- }
+ return getModel().getService().showDialog("Update",
+ "File " + f.getAbsolutePath() + " is externally modified.\n" +
+ "Do you want to reload it?", new String[]{"Yes", "No"}, null,
+ ServiceDialog.QUESTION);
}
public void updateChildFile(XModelObject o, File f) throws XModelException {
@@ -618,8 +620,8 @@
File temp = null;
try {
temp = File.createTempFile("efs_", rf.getName());
- } catch (Exception e) {
- //ignore
+ } catch (IOException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
if(temp != null) {
FileUtil.copyFile(rf, temp);
@@ -633,8 +635,8 @@
if(r.exists()) {
try {
r.delete(true, null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
} else {
rf.delete();
@@ -645,14 +647,10 @@
private static int question(XModelObject o) {
String t = "File" + " " + o.getModelEntity().getRenderer().getTitle(o);
- try {
return o.getModel().getService().showDialog("Update",
t + " is removed from the disk.\n " +
"Do you want to save your changes?", new String[]{"Yes", "No"}, null,
ServiceDialog.QUESTION);
- } catch (Exception e) {
- return 0;
- }
}
private boolean fire = false;
@@ -686,8 +684,8 @@
IFolder ef = (IFolder)c;
try {
ef.create(true, ef.getParent().isLocal(0), null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
}
if(!f.exists()) f.mkdirs();
@@ -891,12 +889,8 @@
private void initEditability() {
if(editability > -1) return;
- try {
editability = (null != getModelEntity().getActionList().getItem("DeleteActions").getItem("Delete"))
? 1 : 0;
- } catch (Exception e) {
- editability = 0;
- }
}
public boolean isObjectEditable() {
@@ -955,7 +949,8 @@
if(!isActive()) return null;
IContainer c = getResource();
return (c != null) ? c.members() : new IResource[0];
- } catch (Exception e) {
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
return new IResource[0];
}
}
@@ -1006,12 +1001,7 @@
}
public String get() {
- try {
return XModelObjectLoaderUtil.readFile(f);
-/// return FileUtil.readStream(ef.getContents());
- } catch (Exception e) {
- return "";
- }
}
public boolean write(Object object) {
@@ -1032,8 +1022,8 @@
((FolderImpl)p).getFileSystem().getPeer().register(f);
}
ef.refreshLocal(IFile.DEPTH_INFINITE, null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
return true;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -77,14 +77,13 @@
templocation = f.getCanonicalPath();
} else {
File nf = new File(location);
-// FileUtil.copyFile(nf, f, true);
templocation = nf.getCanonicalPath();
timeStamp = nf.lastModified();
size = nf.length();
}
init();
exists = true;
- } catch (Exception e) {
+ } catch (IOException e) {
timeStamp = -1;
size = -1;
exists = false;
@@ -94,7 +93,7 @@
}
}
- private void init() throws Exception {
+ private void init() throws IOException {
ZipFile jar = getZipFile();
map.clear();
fileEntries.clear();
@@ -103,16 +102,12 @@
if(jar == null) return;
Enumeration<?> en = jar.entries();
while(en.hasMoreElements()) {
- try {
ZipEntry entry = (ZipEntry)en.nextElement();
String name = entry.getName();
if(name != null && !name.endsWith("/") && entry.getSize() > 0) {
fileEntries.put(name, Long.valueOf(entry.getSize()));
}
register(name);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
}
} finally {
unlockJar();
@@ -190,7 +185,7 @@
ZipFile jar = null;
try {
jar = getZipFile();
- } catch (Exception e) {
+ } catch (IOException e) {
unlockJar();
return "";
}
@@ -207,7 +202,7 @@
sb.append(new String(b, 0, length));
}
return sb.toString();
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
return "";
} finally {
@@ -240,14 +235,11 @@
}
public boolean isModified() {
- if (timeStamp == -1)
+ if (timeStamp == -1) {
return true;
- try {
- File f = new File(location);
- return (timeStamp != f.lastModified() || size != f.length());
- } catch (Exception e) {
- return true;
}
+ File f = new File(location);
+ return (timeStamp != f.lastModified() || size != f.length());
}
public void invalidate() {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -65,7 +65,7 @@
try {
path = new File(path).getCanonicalPath().replace('\\', '/');
return FilePathHelper.toPathPath(path);
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/EngineIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/EngineIcon.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/EngineIcon.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -24,14 +24,9 @@
public Image getImage(XModelObject obj) {
- try {
boolean b = true;
String s = (b) ? "engine.running" : "engine.stopped";
return obj.getModelEntity().getMetaModel().getIconList().getImage(s, "default.unknown");
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- return null;
- }
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/GifIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/GifIcon.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/GifIcon.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -27,17 +27,13 @@
}
public ImageIcon getIcon(XModelObject obj) {
- try {
- String p = XModelObjectLoaderUtil.getResourcePath(obj);
- if(p == null) return null;
- p = p.substring(1);
- if(true) return null;
- java.net.URL url = null; //obj.getModel().getModelClassLoader().getResource(p);
- ImageIcon icon = new ImageIcon(url);
- return (icon.getIconWidth() > 20) ? null : icon;
- } catch (Exception e) {
- return null;
- }
+ String p = XModelObjectLoaderUtil.getResourcePath(obj);
+ if(p == null) return null;
+ p = p.substring(1);
+ if(true) return null;
+ java.net.URL url = null; //obj.getModel().getModelClassLoader().getResource(p);
+ ImageIcon icon = new ImageIcon(url);
+ return (icon.getIconWidth() > 20) ? null : icon;
}
public Image getImage(XModelObject obj) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/MainIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/MainIcon.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/MainIcon.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -22,12 +22,8 @@
}
public Image getImage(XModelObject obj) {
- try {
- String s = obj.getMainIconName();
- return obj.getModelEntity().getMetaModel().getIconList().getImage(s);
- } catch (Exception e) {
- return null;
- }
+ String s = obj.getMainIconName();
+ return obj.getModelEntity().getMetaModel().getIconList().getImage(s);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/icons/impl/XModelObjectIcon.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -66,11 +66,7 @@
}
public int getIconHash() {
- try {
- return getIconHash(object.getModelEntity().getRenderer().getIconNames());
- } catch (Exception e) {
- return 0;
- }
+ return getIconHash(object.getModelEntity().getRenderer().getIconNames());
}
private int getIconHash(String[] types) {
@@ -83,11 +79,7 @@
}
public Image getEclipseImage() {
- try {
- return getEclipseImage0(object.getModelEntity().getRenderer().getIconNames());
- } catch (Exception e) {
- return null;
- }
+ return getEclipseImage0(object.getModelEntity().getRenderer().getIconNames());
}
public Image getEclipseImage0(String[] types) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -247,24 +247,20 @@
creationFailed(entity, "CREATION_ENTITY_FAILURE");
return null;
}
- try {
- me.setModel(this);
- me.setEntityName_0(entity);
- XAttribute[] an = ent.getAttributes();
- for (int i = 0; i < an.length; i++) {
- String n = an[i].getName();
- String v = an[i].getDefaultValue();
- me.set_0(n, v);
- if(properties != null) {
- v = properties.getProperty(n);
- if(v != null) me.set_0(n, v);
- }
+
+ me.setModel(this);
+ me.setEntityName_0(entity);
+ XAttribute[] an = ent.getAttributes();
+ for (int i = 0; i < an.length; i++) {
+ String n = an[i].getName();
+ String v = an[i].getDefaultValue();
+ me.set_0(n, v);
+ if(properties != null) {
+ v = properties.getProperty(n);
+ if(v != null) me.set_0(n, v);
}
- return me;
- } catch (Exception e) {
- creationFailed(entity, "CREATION_ENTITY_FAILURE");
}
- return null;
+ return me;
}
public void editObjectAttribute(XModelObject object, String attributeName, String value) throws XModelException {
@@ -406,12 +402,9 @@
if(d.lastIndexOf(':') >= 2)
return (n != null) ? n : d.substring(d.lastIndexOf('/') + 1);
File f = null;
- try {
- f = new File(d);
- f.mkdirs();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("XModelImpl:getProjectName:" + e.getMessage());
- }
+ f = new File(d);
+ f.mkdirs();
+
return (f == null || !f.isDirectory()) ? null : (n != null) ? n : f.getName();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/bundle/CountriesHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/bundle/CountriesHelper.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/bundle/CountriesHelper.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.impl.bundle;
+import java.io.IOException;
import java.net.URL;
import java.util.Map;
import java.util.StringTokenizer;
@@ -51,12 +52,8 @@
}
private static void loadAttribute(Map<String,String> map, XModelEntity entity, String attr) {
- try {
XAttributeConstraintAList acl = (XAttributeConstraintAList)entity.getAttribute(attr).getConstraint();
acl.setValues((String[])map.keySet().toArray(new String[0]));
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("CountiesHelper:loadAttribute:" + e.getMessage());
- }
}
private static void loadMap(Map<String,String> map, String resource) {
@@ -71,7 +68,7 @@
String code = t.substring(0, i), name = t.substring(j + 1);
map.put(code, name);
}
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError("CountiesHelper:loadMap:" + e.getMessage());
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/trees/AllResourcesTree.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -12,6 +12,7 @@
import java.util.*;
import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.meta.constraint.XAttributeConstraintT;
@@ -112,7 +113,7 @@
if(!ps[i].isOpen()) continue;
try {
if(nature != null && !ps[i].hasNature(nature)) continue;
- } catch (Exception e) {
+ } catch (CoreException e) {
if(ModelPlugin.isDebugEnabled()){
ModelPlugin.getPluginLog().logInfo("AllResourcesTree:" + e.getMessage());
}
@@ -145,23 +146,7 @@
return (tree == null) ? null : tree.getRoot().getModel().getByPath(value.substring(value.indexOf("//") + 1));
}
if(value.indexOf("/", 1) < 0) return null;
- IResource r = null;
- try {
- r = ModelPlugin.getWorkspace().getRoot().getFolder(new Path(value));
- } catch (Exception e) {
- if(ModelPlugin.isDebugEnabled()){
- ModelPlugin.getPluginLog().logInfo("AllResourcesTree:" + e.getMessage());
- }
- }
- if(r == null || !r.exists()) {
- try {
- r = ModelPlugin.getWorkspace().getRoot().getFile(new Path(value));
- } catch (Exception e) {
- if(ModelPlugin.isDebugEnabled()){
- ModelPlugin.getPluginLog().logInfo("AllResourcesTree:" + e.getMessage());
- }
- }
- }
+ IResource r = ModelPlugin.getWorkspace().getRoot().getFolder(new Path(value));
if(r == null || !r.exists()) return null;
return EclipseResourceUtil.getObjectByResource(r);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/java/handlers/OpenJavaSourceHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/java/handlers/OpenJavaSourceHandler.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/java/handlers/OpenJavaSourceHandler.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -103,7 +103,7 @@
IJavaElement[] cs = null;
try {
cs = ((IParent)javaElement).getChildren();
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
if(cs != null) for (int i = 0; i < cs.length; i++) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/PropertiesLoader.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -12,6 +12,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.util.*;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.loaders.*;
@@ -39,7 +40,7 @@
String sn = convertName(nm);
mapping.put(sn, nm);
}
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
}
@@ -133,13 +134,9 @@
public boolean save(XModelObject object) {
if(!object.isModified()) return true;
- try {
- XModelObjectLoaderUtil.setTempBody(object, generateBody(object, defaultLineSeparator));
- object.setModified(true);
- return true;
- } catch (Exception exc) {
- return false;
- }
+ XModelObjectLoaderUtil.setTempBody(object, generateBody(object, defaultLineSeparator));
+ object.setModified(true);
+ return true;
}
private void appendComments(StringBuffer sb, String comments, String commentSeparator, String lineSeparator) {
@@ -283,7 +280,7 @@
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
p.store(os, null);
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
String q = os.toString();
@@ -300,7 +297,7 @@
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
p.store(os, null);
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError(e);
}
String q = os.toString();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/RootLoaderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/RootLoaderImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/RootLoaderImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -23,16 +23,15 @@
XChild[] cs = object.getModelEntity().getChildren();
for (int i = 0; i < cs.length; i++) {
if(!cs[i].isRequired() || cs[i].getMaxCount() != 1) continue;
- try {
- object.addChild(object.getModel().createModelObject(cs[i].getName(), new java.util.Properties()));
- } catch (Exception e) {
- //ignore
- }
+ object.addChild(object.getModel().createModelObject(cs[i].getName(), new java.util.Properties()));
}
+
XModelObject[] children = object.getChildren();
for (int i = 0; i < children.length; i++) {
XObjectLoader rl = XModelObjectLoaderUtil.getObjectLoader(children[i]);
- if(rl != null) rl.load(children[i]);
+ if(rl != null) {
+ rl.load(children[i]);
+ }
}
}
@@ -53,7 +52,7 @@
XObjectLoader rl = XModelObjectLoaderUtil.getObjectLoader(children[i]);
if(rl != null && !rl.save(children[i])) b = false;
}
- if(b) object.setModified(false);
+ object.setModified(!b);
return b;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/URLRootLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/URLRootLoader.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/URLRootLoader.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.loaders.impl;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
@@ -29,12 +30,8 @@
if(isFilePath(getPath(object))) {
super.load(object);
} else {
- try {
- Element element = XMLUtil.getElement(getInputStream(object));
- if(element != null) util().load(element, object);
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
+ Element element = XMLUtil.getElement(getInputStream(object));
+ if(element != null) util().load(element, object);
}
}
@@ -57,7 +54,7 @@
public InputStream getInputStream(XModelObject object) {
try {
return new URL(getPath(object)).openConnection().getInputStream();
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
return null;
}
@@ -66,7 +63,7 @@
public OutputStream getOutputStream(XModelObject object) {
try {
return new URL(getPath(object)).openConnection().getOutputStream();
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/ResourceMarkers.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/ResourceMarkers.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/markers/ResourceMarkers.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -254,7 +254,7 @@
h.update();
ResourceMarkers.updateLocation(ms[i], h.getLine(), h.getStart(), h.getEnd());
}
- } catch (Exception e) {
+ } catch (CoreException e) {
//ignore
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -21,7 +21,6 @@
public static XModel preferenceModel;
static {
- try {
String f = ModelPlugin.getDefault().getStateLocation().toString();
Properties p = new Properties();
p.setProperty(XModelConstants.WORKSPACE, f);
@@ -31,20 +30,10 @@
d.setModel(preferenceModel);
preferenceModel.setService(d);
}
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
}
private static ServiceDialog createServiceDialog() {
- try {
- return (ServiceDialog)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl");
- } catch (Exception e) {
- if(ModelPlugin.isDebugEnabled()) {
- ModelPlugin.getPluginLog().logInfo("Cannot create service dialog.");
- }
- }
- return null;
+ return (ServiceDialog)ModelFeatureFactory.getInstance().createFeatureInstance("org.jboss.tools.common.model.ui.wizards.one.ServiceDialogImpl");
}
}
@@ -54,14 +43,9 @@
}
public static XModel createPreferenceModel(Properties p) {
- try {
- p.putAll(System.getProperties());
- p.setProperty("rootEntity", "OptionRoot");
- return XModelFactory.getModel(p);
- } catch (Exception t) {
- ModelPlugin.getPluginLog().logError("Error in creating preference model", t);
- }
- return null;
+ p.putAll(System.getProperties());
+ p.setProperty("rootEntity", "OptionRoot");
+ return XModelFactory.getModel(p);
}
public static void initPreferenceValue(XModel initialModel, Preference preference)
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelPlugin.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,11 +11,13 @@
package org.jboss.tools.common.model.plugin;
import java.io.File;
+import java.io.IOException;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.swt.widgets.Display;
@@ -97,7 +99,7 @@
String n = fs[i].getName();
if(n.startsWith("efs_")) fs[i].delete();
}
- } catch (Exception e) {
+ } catch (IOException e) {
getPluginLog().logError("ModelPlugin:cleanTempFiles:" + e.getMessage());
}
}
@@ -107,7 +109,7 @@
public void windowClosed(IWorkbenchWindow window) {
try {
save.saving(null);
- } catch (Exception e) {
+ } catch (CoreException e) {
getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ModelNature.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -46,11 +46,7 @@
public void setProject(IProject project) {
if(this.project == project) return;
this.project = project;
- try {
- createProject();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError("ModelNature:createProject()", e);
- }
+ createProject();
}
public Object getAdapter(Class adapter) {
@@ -127,11 +123,7 @@
}
models.put(project, model);
ModelPlugin.getDefault().getSaveParticipant().addModel(model);
- try {
- updateProjectVersion();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
+ updateProjectVersion();
updateListener();
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -103,14 +103,11 @@
public static IPath getFirstWebContentPath(IProject project) {
IPath modulePath = null;
- try {
- IVirtualComponent vc = ComponentCore.createComponent(project);
- if (vc == null || vc.getRootFolder() == null)
- return null;
- if (ModuleCoreNature.isFlexibleProject(project)) {
- modulePath = vc.getRootFolder().getWorkspaceRelativePath();
- }
- } catch (Exception ex) {
+ IVirtualComponent vc = ComponentCore.createComponent(project);
+ if (vc == null || vc.getRootFolder() == null)
+ return null;
+ if (ModuleCoreNature.isFlexibleProject(project)) {
+ modulePath = vc.getRootFolder().getWorkspaceRelativePath();
}
return modulePath;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/WatcherLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/WatcherLoader.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/WatcherLoader.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.model.project;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.jboss.tools.common.model.loaders.*;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
@@ -38,7 +39,7 @@
if(p == null) return false;
try {
return "true".equals(p.getSessionProperty(LOCK));
- } catch(Exception e) {
+ } catch(CoreException e) {
//ignore
return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/refactoring/RenameModelObjectChange.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/refactoring/RenameModelObjectChange.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/refactoring/RenameModelObjectChange.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -85,17 +85,15 @@
}
public Change perform(IProgressMonitor pm) throws CoreException {
+ Change result = null;
if(ok) {
- return super.perform(pm);
- }
- try {
+ result = super.perform(pm);
+ } else {
for (int i = 0; i < objects.length; i++) {
objects[i].getModel().changeObjectAttribute(objects[i], attributeName, newName);
}
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
- return null;
+ }
+ return result;
}
public Object getModifiedElement() {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XProtectedTransaction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XProtectedTransaction.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XProtectedTransaction.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -32,7 +32,7 @@
EndTransactionUndo ue = new EndTransactionUndo(listener);
ue.fire();
undo.addUndoable(ue);
- } catch (Exception e) {
+ } catch (XModelException e) {
undo.rollbackTransactionInProgress();
throw new XModelException(e);
} finally {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XUndoManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XUndoManager.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/undo/XUndoManager.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -136,15 +136,10 @@
}
public void rollbackTransactionInProgress() {
- if(current.next() != null) return;
- if(!(current instanceof XTransactionUndo)) return;
+ if(current.next() != null || !(current instanceof XTransactionUndo)) return;
XTransactionUndo t = (XTransactionUndo)current;
if(!t.isInProgress()) return;
- try {
- if(t.canUndo()) t.undo();
- } catch (Exception e) {
- ModelPlugin.getPluginLog().logError(e);
- }
+ if(t.canUndo()) t.undo();
current = t.prev();
current.setNext(null);
fire();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/AccessibleJava.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/AccessibleJava.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/AccessibleJava.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -73,7 +73,7 @@
String t = st.nextToken().trim();
try {
addJar(new JarFile(t));
- } catch (Exception e) {
+ } catch (IOException e) {
ModelPlugin.getPluginLog().logError("addJars:" + e.getClass().getName());
}
}
@@ -96,7 +96,7 @@
}
try {
jar.close();
- } catch (Exception exc) {
+ } catch (IOException exc) {
ModelPlugin.getPluginLog().logError("AccessibleJava:Cannot close jar.");
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -50,7 +50,7 @@
}
return true;
}
- } catch (Exception e) {
+ } catch (XModelException e) {
ModelPlugin.getPluginLog().logError("BrowserHelper:" + e.getMessage());
}
int i = d.showDialog("Run", "Enter valid path for " + o.getPresentationString(),
@@ -60,16 +60,11 @@
}
static String[] getEnvironmentPaths() {
- try {
String jlp = OSHelper.getProperty("PATH", "");
StringTokenizer st = new StringTokenizer(jlp, File.pathSeparator);
String[] ps = new String[st.countTokens()];
for (int i = 0; i < ps.length; i++) ps[i] = st.nextToken();
return ps;
- } catch (Exception t) {
- ModelPlugin.getPluginLog().logError("BrowserHelper:" + t.getMessage());
- return null;
- }
}
static boolean fileExists(String filename, String[] paths) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/IconUtil.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -112,7 +112,7 @@
PixelGrabber pg = new PixelGrabber(im.getImage(), 0, 0, w, h, px, 0, w);
try {
pg.grabPixels();
- } catch (Exception e) {
+ } catch (InterruptedException e) {
//ignore
}
return px;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelFeatureFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelFeatureFactory.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelFeatureFactory.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -25,6 +25,13 @@
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.osgi.framework.Bundle;
+
+/**
+ * TODO use IExecutableExtension and IExecutableExtensionFactory
+ *
+ * @author Slava kabanovich
+ *
+ */
public class ModelFeatureFactory {
public static final String POINT = "org.jboss.tools.common.model.classes";
private static final Object mutex = new Object();
@@ -62,15 +69,11 @@
}
private boolean isActive() {
- int state = 0;
- try {
- Bundle b = Platform.getBundle("org.jboss.tools.common.model");
- state = b.getState();
- } catch (Exception e2) {
- return false;
- }
+ Bundle b = Platform.getBundle("org.jboss.tools.common.model");
+ int state = b == null ? -1 : b.getState() ;
return state == Bundle.ACTIVE;
}
+
public Object createFeatureInstance(String id) {
if(instanceFailures.contains(id)) return null;
IConfigurationElement c = elements.get(id);
@@ -84,11 +87,9 @@
return c.createExecutableExtension("class");
} catch (CoreException e) {
instanceFailures.add(id);
- if(!isActive()) return null;
ModelPlugin.getPluginLog().logError("Cannot create model feature instance " + id + ".", e);
} catch (InvalidRegistryObjectException e) {
instanceFailures.add(id);
- if(!isActive()) return null;
ModelPlugin.getPluginLog().logError("Cannot create model feature instance " + id + ".", e);
}
return null;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -25,12 +25,7 @@
private static ModelImages instance;
static {
- try {
- instance = new ModelImages(ModelPlugin.getDefault().getBundle().getEntry("/"));
- } catch (Exception e) {
- // do nothing
- ModelPlugin.getPluginLog().logError(e);
- }
+ instance = new ModelImages(ModelPlugin.getDefault().getBundle().getEntry("/"));
}
public static Image getImage(String key) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/SafeDocumentBuilderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/SafeDocumentBuilderFactory.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/SafeDocumentBuilderFactory.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -12,6 +12,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -19,7 +20,7 @@
DocumentBuilder d = null;
boolean validate = false;
- private SafeDocumentBuilderFactory(boolean validate) throws Exception {
+ private SafeDocumentBuilderFactory(boolean validate) throws InterruptedException {
this.validate = validate;
setContextClassLoader(getClass().getClassLoader());
start();
@@ -31,7 +32,7 @@
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
if(validate) f.setValidating(validate);
d = f.newDocumentBuilder();
- } catch (Exception e) {
+ } catch (ParserConfigurationException e) {
ModelPlugin.getPluginLog().logError(e);
}
}
@@ -42,7 +43,7 @@
*/
try {
return new SafeDocumentBuilderFactory(validating).d;
- } catch (Exception e) {
+ } catch (InterruptedException e) {
ModelPlugin.getPluginLog().logError(e);
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XBundle.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -14,6 +14,7 @@
import java.text.*;
import org.jboss.tools.common.meta.key.WizardKeys;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
public class XBundle {
private static XBundle bundle = new XBundle();
@@ -29,11 +30,7 @@
}
private String findTemplate(String resourceid, String templateid) {
- try {
- return WizardKeys.getString(templateid);
- } catch (Exception e) {
- return MessageFormat.format(messages.getString(XBundle.ERR_TEMPLATE_NOT_FOUND),new Object[]{templateid,resourceid});
- }
+ return WizardKeys.getString(templateid);
}
public String getMessage(String resourceid, String templateid) {
@@ -45,7 +42,8 @@
if(args == null) return t;
try {
return MessageFormat.format(t, args);
- } catch (Exception e) {
+ } catch (IllegalArgumentException e) {
+ ModelPlugin.getPluginLog().logError(e);
return MessageFormat.format(messages.getString(XBundle.ERR_GET_MESSAGE),new Object[]{resourceid,templateid,t});
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -45,7 +45,7 @@
for (int i = 0; i < s.length; i++) {
try {
result[i] = Integer.parseInt(s[i]);
- } catch (Exception e) {
+ } catch (NumberFormatException e) {
result[i] = 0;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/MatchingStrategyImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/MatchingStrategyImpl.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/MatchingStrategyImpl.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -13,6 +13,7 @@
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorMatchingStrategy;
import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.PartInitException;
public class MatchingStrategyImpl implements IEditorMatchingStrategy {
@@ -21,7 +22,7 @@
IEditorInput editorInput = null;
try {
editorInput = editorRef.getEditorInput();
- } catch(Exception t) {
+ } catch(PartInitException t) {
return false;
}
if(editorInput == null) return false;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/core/resources/XModelObjectEditorInput.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -16,6 +16,7 @@
import java.net.URL;
import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -154,17 +155,17 @@
Field field = FileEditorInput.class.getDeclaredField("file");
field.setAccessible(true);
field.set(this, f);
- } catch (Exception e) {
+ } catch (NoSuchFieldException e) {
ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalArgumentException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
}
private static IFile getFileByObject(XModelObject object) {
- try {
- return (IFile)EclipseResourceUtil.getResource(object);
- } catch (Exception e) {
- return null;
- }
+ return (IFile)EclipseResourceUtil.getResource(object);
}
public static IEditorInput checkInput(IEditorInput input) {
@@ -176,12 +177,8 @@
URI uri = ((IURIEditorInput)input).getURI();
String f = uri.getPath();
XModelObject o = null;
- try {
- o = EclipseResourceUtil.createObjectForLocation(f);
- if(o != null && o.getFileType() != XModelObject.FILE) o = null;
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ o = EclipseResourceUtil.createObjectForLocation(f);
+ if(o != null && o.getFileType() != XModelObject.FILE) o = null;
return (o == null) ? (IEditorInput)input : new ModelObjectLocationEditorInput(getMainObject(o), new Path(f));
}
return input;
@@ -193,30 +190,22 @@
if(f != null && !f.isSynchronized(IResource.DEPTH_INFINITE)) {
try {
f.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception e) {
+ } catch (CoreException e) {
//ignore
}
}
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
if(o == null) {
- try {
- o = EclipseResourceUtil.createObjectForResource(f);
- if(o != null && o.getFileType() != XModelObject.FILE) o = null;
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ o = EclipseResourceUtil.createObjectForResource(f);
+ if(o != null && o.getFileType() != XModelObject.FILE) o = null;
}
return (o == null) ? input : new XModelObjectEditorInput(getMainObject(o));
}
private static IEditorInput convertExternalInput(ILocationProvider input) {
XModelObject o = null;
- try {
- o = EclipseResourceUtil.createObjectForLocation(input.getPath(input).toString());
- if(o != null && o.getFileType() != XModelObject.FILE) o = null;
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ o = EclipseResourceUtil.createObjectForLocation(input.getPath(input).toString());
+ if(o != null && o.getFileType() != XModelObject.FILE) o = null;
return (o == null) ? (IEditorInput)input : new ModelObjectLocationEditorInput(getMainObject(o), input.getPath(input));
}
@@ -233,7 +222,7 @@
IStorage storage = null;
try {
storage = input.getStorage();
- } catch (Exception e) {
+ } catch (CoreException e) {
// ignore
}
return storage == null ? null : parseJarEntryFile(storage);
@@ -280,8 +269,12 @@
Field field = FileEditorInput.class.getDeclaredField("file");
field.setAccessible(true);
field.set(this, f);
- } catch (Exception e) {
+ } catch (NoSuchFieldException e) {
ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalArgumentException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -59,11 +59,7 @@
l.marginHeight = 0;
l.marginWidth = 0;
guiControl.setLayout(l);
- try {
- wrapper.setWeights(new int[]{10, 30});
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ wrapper.setWeights(new int[]{10, 30});
return wrapper;
}
@@ -79,14 +75,10 @@
protected abstract void updateGui();
protected void disposeGui() {
- if(control != null) {
- try {
- if(!control.isDisposed()) control.dispose();
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
- control = null;
+ if(control != null && !control.isDisposed()) {
+ control.dispose();
}
+ control = null;
}
private void createErr() {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ErrorMode.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ErrorMode.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ErrorMode.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -56,11 +56,7 @@
public void dispose() {
if(errors != null) {
- try {
- if(!errors.isDisposed()) errors.dispose();
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ if(!errors.isDisposed()) errors.dispose();
errors = null;
labels.clear();
es = "";
@@ -251,11 +247,7 @@
}
public int getLineHeight() {
- try {
- return getFont().getFontData()[0].getHeight() + 2;
- } catch (Exception e) {
- return 20;
- }
+ return getFont().getFontData()[0].getHeight() + 2;
}
public void paintControl(PaintEvent ev) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -66,7 +66,6 @@
import org.jboss.tools.common.text.ext.IMultiPageEditor;
public class ObjectMultiPageEditor extends MultiPageEditorPart implements XModelTreeListener, IGotoMarker, IMultiPageEditor {
- static String COMPANY_NAME = "Red Hat";
protected AbstractSectionEditor treeEditor;
protected TreeFormPage treeFormPage;
protected ObjectTextEditor textEditor;
@@ -235,12 +234,8 @@
doCreatePages();
model.addModelTreeListener(syncListener);
loadSelectedTab();
- try {
- setActivePage(selectedPageIndex);
- updateSelectionProvider();
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ setActivePage(selectedPageIndex);
+ updateSelectionProvider();
new ResourceChangeListener(this, getContainer());
}
@@ -251,24 +246,14 @@
if(name.equals(h)) {
if(selectedPageIndex == i) return;
selectedPageIndex = i;
- try {
- switchToPage(i);
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ switchToPage(i);
}
}
}
protected void createUnloadedPage() {
- try {
- createTextPage();
- } catch (Exception e) {
- Label label = new Label(getContainer(), SWT.NONE);
- label.setText(COMPANY_NAME + " object has not been found");
- addPage(label);
- }
+ createTextPage();
}
protected void doCreatePages() {
@@ -286,7 +271,7 @@
textEditor.setObject(object);
textEditor.addFocusListener(new TextFocusListener());
outline.addSelectionChangedListener(new OutlineSelectionListener());
- } catch (Exception ex) {
+ } catch (PartInitException ex) {
ModelUIPlugin.getPluginLog().logError(ex);
}
}
@@ -381,6 +366,11 @@
f.updateRegistration(o);
}
+
+ /**
+ * FIXME remove Java reflection calls
+ * @param monitor
+ */
void saveX(IProgressMonitor monitor) {
if(!(textEditor instanceof AbstractTextEditor)) return;
try {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/OpenEditorWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/OpenEditorWizard.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/OpenEditorWizard.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -15,11 +15,13 @@
import org.eclipse.ui.ide.IDE;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.model.ServiceDialog;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.core.resources.*;
public class OpenEditorWizard implements SpecialWizard {
@@ -43,14 +45,14 @@
if(!b) id = null;
}
IModelObjectEditorInput input = XModelObjectEditorInput.createInstance(object);
- if(input == null) throw new Exception("Cannot find resource for object " + object.getPresentationString());
+ if(input == null) throw new IllegalStateException("Cannot find resource for object " + object.getPresentationString());
if(input instanceof IFileEditorInput) {
IFileEditorInput fei = (IFileEditorInput)input;
IFile f = fei.getFile();
if(f != null && !f.isSynchronized(IResource.DEPTH_INFINITE)) {
try {
f.getParent().refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (Exception e) {
+ } catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
@@ -80,9 +82,12 @@
ObjectMultiPageEditor m = (ObjectMultiPageEditor)editor;
m.activateErrorTab();
}
- } catch (Exception e) {
+ } catch (XModelException e) {
p.put("exception", e);
return 1;
+ } catch (PartInitException e) {
+ p.put("exception", e);
+ return 1;
}
return 0;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/TreeFormPage.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.editor;
import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -212,15 +213,7 @@
}
}
}
- try {
- //bug JSFSTUD-445
- rightFormContainer.clear();
- } catch (Exception e) {
- if(ModelUIPlugin.isDebugEnabled()) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
- }
-
+ rightFormContainer.clear();
if(form != null) {
form.initialize(xmo);
// load form from memento
@@ -236,7 +229,7 @@
private IFormFactory getFormFactory(XModelObject selected) {
if(selected == null) return null;
- XModelObjectFormFactory formFactory;
+ XModelObjectFormFactory formFactory = null;
String formFactoryClassName = selected.getModelEntity().getProperty("formFactory");
if(formFactoryClassName != null) {
@@ -248,10 +241,20 @@
try {
Constructor c = cls.getConstructor(new Class[]{XModelObject.class});
formFactory = (XModelObjectFormFactory)c.newInstance(new Object[]{selected});
- } catch (Exception e) {
+ } catch (InstantiationException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (SecurityException e) {
ModelUIPlugin.getPluginLog().logError(e);
- return new FormFactory(selected);
+ } catch (NoSuchMethodException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalArgumentException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ } catch (InvocationTargetException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
}
+ return formFactory == null ? new FormFactory(selected) : formFactory;
} else {
formFactory = new DefaultFormFactory(selected);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/FormPlace.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/FormPlace.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/FormPlace.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -58,9 +58,12 @@
private void installForm(Class cls) {
try {
form = (IForm)cls.newInstance();
- } catch (Exception e) {
+ } catch (InstantiationException e) {
ModelUIPlugin.getPluginLog().logError(e);
return;
+ } catch (IllegalAccessException e) {
+ ModelUIPlugin.getPluginLog().logError(e);
+ return;
}
form.setInput(selected);
if(composite != null && !composite.isDisposed()) {
@@ -75,11 +78,7 @@
if(form != null) form.dispose();
form = null;
if(composite != null) {
- try {
- if(!composite.isDisposed()) composite.dispose();
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ if(!composite.isDisposed()) composite.dispose();
composite = null;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -52,14 +52,9 @@
setText(displayName);
- try {
- String iconKey = action.getIconKey();
- Image image = action.getMetaModel().getIconList().getImage(iconKey);
- setImageDescriptor(new XImageDescriptor(image));
- } catch (Exception e) {
- Image image = action.getMetaModel().getIconList().getImage("action.empty");
- setImageDescriptor(new XImageDescriptor(image));
- }
+ String iconKey = action.getIconKey();
+ Image image = action.getMetaModel().getIconList().getImage(iconKey);
+ setImageDescriptor(new XImageDescriptor(image));
setEnabled(enabled);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/SaveModelActionDelegate.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -107,11 +107,9 @@
//ignore
}
if(stopped) return;
- if(action != null) try {
+ if(action != null) {
boolean enabled = model != null && model.getRoot().isModified();
if(action.isEnabled() != enabled) action.setEnabled(enabled);
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
}
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XMenuInvoker.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XMenuInvoker.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XMenuInvoker.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -115,15 +115,11 @@
if(object == null) return;
XModelObject[] objects = getSelectedModelObjects();
if(DnDUtil.getEnabledAction(object, objects, actionPath) == null) return;
- try {
if(objects == null) {
XActionInvoker.invoke(actionPath, object, getRunningProperties());
} else {
XActionInvoker.invoke(actionPath, object, objects, getRunningProperties());
}
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -25,6 +25,7 @@
import org.jboss.tools.common.meta.action.XAction;
import org.jboss.tools.common.meta.action.XActionItem;
import org.jboss.tools.common.meta.action.XRedirect;
+import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.ActionDeclinedException;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
@@ -103,7 +104,7 @@
}
} catch (ActionDeclinedException de) {
//ignore
- } catch(Exception e) {
+ } catch(XModelException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectActionFilter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectActionFilter.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectActionFilter.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -24,13 +24,19 @@
this.object = object;
}
+ /**
+ * FIXME move to XModel Test Plugin
+ */
public boolean testAttribute(Object target, String name, String value) {
try {
IModelObjectActionFilter f = (IModelObjectActionFilter)getClass().getClassLoader().loadClass(name).newInstance();
return f.isEnabled(object, value);
- } catch (Exception e) {
- //debug
+ } catch (ClassNotFoundException e) {
return false;
+ } catch (InstantiationException e) {
+ return false;
+ } catch (IllegalAccessException e) {
+ return false;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/file/ModelResourceActionDelegate.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -12,6 +12,7 @@
import java.util.*;
import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.*;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.*;
@@ -145,7 +146,7 @@
if(isSupportingImplementation(IFile.class)) {
try {
resource = ((IClassFile)object).getCorrespondingResource();
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
} else if(isWindowAction && isSupportingImplementation(IJavaProject.class)) {
@@ -192,7 +193,7 @@
for (int i = 0; i < s.length; i++) {
try {
if(project.hasNature(s[i])) return true;
- } catch (Exception e) {
+ } catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/AbstractShowUrlActionDelegate.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/AbstractShowUrlActionDelegate.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/global/AbstractShowUrlActionDelegate.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -16,6 +16,7 @@
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
@@ -31,11 +32,7 @@
}
public void run(IAction action) {
- try {
runURL(getUrl());
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
}
protected abstract String getUrl();
@@ -54,7 +51,7 @@
} catch (MalformedURLException mue) {
ServiceDialog d = PreferenceModelUtilities.getPreferenceModel().getService();
d.showDialog("Error", "Incorrect URL: " + mue.getMessage() + ".", new String[]{"OK"}, null, ServiceDialog.ERROR);
- } catch (Exception e) {
+ } catch (PartInitException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/AdapterFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/AdapterFactory.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/AdapterFactory.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -13,6 +13,7 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.util.Assert;
import org.jboss.tools.common.meta.XAttribute;
@@ -62,7 +63,7 @@
if(c != null) return c;
try {
c = ExtensionPointUtil.findClassByElementId(ATTRIBUTE_ADAPTER_EXT_POINT, id).getClass();
- } catch (Exception e) {
+ } catch (CoreException e) {
if(ModelUIPlugin.getDefault().isDebugging()) {
ModelUIPlugin.getPluginLog().logInfo("Default adapter for " + id);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/CheckListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/CheckListAdapter.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/CheckListAdapter.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -121,11 +121,7 @@
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
this.viewer = viewer;
- try {
- if(viewer != null) viewer.refresh();
- } catch (Exception e) {
- ignore();
- }
+ if(viewer != null) viewer.refresh();
}
void ignore() {}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/XChildrenTableStructuredAdapter.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -538,18 +538,10 @@
int index = getIndex(list, this.xmo);
int targetIndex = getTargetIndex(index);
if(index == targetIndex || targetIndex < 0 || targetIndex >= list.length) return;
- try {
- XActionInvoker.invoke(COPY_XACTION_PATH, this.xmo, null, new Properties());
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ XActionInvoker.invoke(COPY_XACTION_PATH, this.xmo, null, new Properties());
XModelObject prev = list[targetIndex];
- try {
- XActionInvoker.invoke(MOVE_XACTION_PATH, prev, null, new Properties());
- if(table != null && !table.isDisposed()) table.setSelection(targetIndex);
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ XActionInvoker.invoke(MOVE_XACTION_PATH, prev, null, new Properties());
+ if(table != null && !table.isDisposed()) table.setSelection(targetIndex);
fireStructureChange();
}
protected int getTargetIndex(int index) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/ColoredFontData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/ColoredFontData.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/ColoredFontData.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -12,6 +12,7 @@
import java.util.*;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
@@ -23,7 +24,8 @@
try {
DEFAULT.data = Display.getDefault().getSystemFont().getFontData()[0];
DEFAULT.color = Display.getDefault().getSystemColor(SWT.COLOR_BLACK).getRGB();
- } catch (Exception e) {
+ } catch (SWTException e) {
+ // FIXME See How to handle thos exception in PreferenceConverter Class
ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/EclipseClassChooserAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/EclipseClassChooserAdapter.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/adapter/custom/EclipseClassChooserAdapter.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.search.*;
import org.eclipse.jdt.ui.*;
import org.eclipse.jface.operation.*;
@@ -52,7 +53,7 @@
IType type = (IType)os[i];
return type.getFullyQualifiedName();
}
- } catch (Exception e) {
+ } catch (JavaModelException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
return null;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaChoicerFieldEditor.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -174,11 +174,7 @@
gd = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(gd);
text.setText(valueProvider.getStringValue(true));
- try {
- text.setSelection(valueProvider.getStringValue(true).length());
- } catch (Exception e) {
- //ignore
- }
+ text.setSelection(valueProvider.getStringValue(true).length());
text.addModifyListener(this);
text.setFocus();
return composite;
@@ -224,11 +220,7 @@
text.removeModifyListener(this);
if ((text.getText()!=null)&&(!text.getText().equals(newValue))) {
text.setText(newValue);
- try {
- text.setSelection(newValue.length());
- } catch (Exception e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ text.setSelection(newValue.length());
}
PropertyChangeEvent event = new PropertyChangeEvent(this, IPropertyEditor.VALUE, oldValue, newValue);
valueChangeListener.valueChange(event);
@@ -442,11 +434,7 @@
newValue = stringValue;
if(newValue == null) newValue = "";
text.setText(newValue);
- try {
- text.setSelection(newValue.length());
- } catch(Exception exc) {
- //ignore
- }
+ text.setSelection(newValue.length());
}
} else {
valueChanged(newValue.trim());
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCueLabelProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCueLabelProvider.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkCueLabelProvider.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -23,11 +23,7 @@
}
static Image createClassImage() {
- try {
- return ModelUIImages.getImage("java/wizard.gif");
- } catch (Exception e) {
- return null;
- }
+ return ModelUIImages.getImage("java/wizard.gif");
}
public static JavaHyperlinkCueLabelProvider INSTANCE = new JavaHyperlinkCueLabelProvider();
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaHyperlinkLineFieldEditor.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -165,7 +166,7 @@
} else {
try {
JavaUI.openInEditor(javaElement);
- } catch (Exception e) {
+ } catch (CoreException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/NoteFieldEditor.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -21,6 +21,7 @@
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusAdapter;
@@ -206,12 +207,13 @@
data.setName(s);
try {
font = new Font(null, data);
- } catch (Exception e) {
+ textField.setFont(font);
+ } catch (SWTException e) {
ModelUIPlugin.getPluginLog().logError(e);
}
}
}
- textField.setFont(font);
+
textField.setBackground(bg);
textField.setForeground(fg);
//textField = new Text(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/DeadLock.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/DeadLock.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/DeadLock.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -0,0 +1,34 @@
+package org.jboss.tools.common.model.util;
+
+public class DeadLock {
+ static class Friend {
+ private final String name;
+ public Friend(String name) {
+ this.name = name;
+ }
+ public String getName() {
+ return this.name;
+ }
+ public synchronized void bow(Friend bower) {
+ System.out.format("%s: %s has bowed to me!%n",
+ this.name, bower.getName());
+
+ bower.bowBack(this);
+ }
+ public synchronized void bowBack(Friend bower) {
+ System.out.format("%s: %s has bowed back to me!%n",
+ this.name, bower.getName());
+ }
+ }
+
+ public static void main(String[] args) {
+ final Friend alphonse = new Friend("Alphonse");
+ final Friend gaston = new Friend("Gaston");
+ new Thread(new Runnable() {
+ public void run() { alphonse.bow(gaston); }
+ }).start();
+ new Thread(new Runnable() {
+ public void run() { gaston.bow(alphonse); }
+ }).start();
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/DeadLock.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTASync.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTASync.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTASync.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -11,6 +11,8 @@
package org.jboss.tools.common.model.util;
import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.*;
@@ -19,9 +21,11 @@
public class XModelTreeListenerSWTASync implements XModelTreeListener {
private XModelTreeListener listener;
- private Item head = null;
- private Item tail = null;
+
+ Queue<XModelTreeEvent> queue = new ConcurrentLinkedQueue<XModelTreeEvent>();
+
private Set<XModelObject> nodes = new HashSet<XModelObject>();
+
Runnable runnable = null;
private synchronized void add(XModelTreeEvent event) {
@@ -29,33 +33,11 @@
if(nodes.contains(event.getModelObject())) {
return;
}
- nodes.add(event.getModelObject());
+ queue.add(event);
}
- Item item = new Item();
- item.event = event;
- if(head == null) {
- head = item;
- tail = item;
- } else {
- tail.next = item;
- tail = item;
- }
+
}
- private synchronized XModelTreeEvent get() {
- if(head == null) {
- runnable = null;
- return null;
- }
- XModelTreeEvent event = head.event;
- head = head.next;
- if(head == null) tail = null;
- if(event.kind() == XModelTreeEvent.NODE_CHANGED) {
- nodes.remove(event.getModelObject());
- }
- return event;
- }
-
private void run(XModelTreeEvent event) {
add(event);
synchronized(this) {
@@ -69,8 +51,6 @@
this.listener = listener;
}
- static int count = 0;
-
public void nodeChanged(final XModelTreeEvent event) {
run(event);
}
@@ -79,32 +59,25 @@
run(event);
}
- public void dispose() {
+ public synchronized void dispose() {
listener = null;
+ queue.clear();
}
- class Item {
- XModelTreeEvent event;
- Item next;
+ public synchronized XModelTreeListener getListener() {
+ return listener;
}
-
class R implements Runnable {
public void run() {
- ++count;
- XModelTreeListener l = listener;
- if (listener == null) {
- ModelUIPlugin.getPluginLog().logInfo("ModelListener is disposed, but cannot removed from model!!!!");
- head = null;
- tail = null;
- return;
- }
- XModelTreeEvent event = null;
- while((event = get()) != null) {
- if(event.kind() == XModelTreeEvent.NODE_CHANGED) {
- l.nodeChanged(event);
- } else {
- l.structureChanged(event);
+ XModelTreeListener listener = getListener();
+ if (listener != null) {
+ for (XModelTreeEvent event : queue) {
+ if(event.kind() == XModelTreeEvent.NODE_CHANGED) {
+ listener.nodeChanged(event);
+ } else {
+ listener.structureChanged(event);
+ }
}
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTSync.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTSync.java 2008-07-25 22:59:17 UTC (rev 9342)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/util/XModelTreeListenerSWTSync.java 2008-07-26 00:41:21 UTC (rev 9343)
@@ -33,11 +33,11 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
+ XModelTreeListener listener = getListener();
+ // forward nodeChange event if listener is not disposed
if(listener != null) {
listener.nodeChanged(event);
- } else {
- ModelUIPlugin.getPluginLog().logInfo("ModelListener is disposed, but not removed from model!!!!");
- }
+ }
}
}
);
@@ -47,17 +47,21 @@
Display.getDefault().syncExec(
new Runnable() {
public void run() {
+ XModelTreeListener listener = getListener();
+ // structureChanged nodeChange event if listener is not disposed
if(listener != null) {
listener.structureChanged(event);
- } else {
- ModelUIPlugin.getPluginLog().logInfo("ModelListener is disposed, but not removed from model!!!!");
}
}
}
);
}
- public void dispose() {
+ public synchronized void dispose() {
listener = null;
}
+
+ public synchronized XModelTreeListener getListener() {
+ return listener;
+ }
}
16 years, 5 months
JBoss Tools SVN: r9342 - tags.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-25 18:59:17 -0400 (Fri, 25 Jul 2008)
New Revision: 9342
Removed:
tags/-jbosstools-3.0.0.Alpah1/
Log:
incorrect tag
16 years, 5 months
JBoss Tools SVN: r9341 - tags.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-25 18:58:53 -0400 (Fri, 25 Jul 2008)
New Revision: 9341
Removed:
tags/3.0.0.Alpha1/
Log:
wrong tag
16 years, 5 months
JBoss Tools SVN: r9340 - tags.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-25 18:37:10 -0400 (Fri, 25 Jul 2008)
New Revision: 9340
Added:
tags/3.0.0.Alpha1/
Log:
tagging portlet and added portlet to script
Copied: tags/3.0.0.Alpha1 (from rev 9339, trunk/portlet)
16 years, 5 months
JBoss Tools SVN: r9339 - tags/jbosstools-3.0.0.Alpha1.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-07-25 17:25:55 -0400 (Fri, 25 Jul 2008)
New Revision: 9339
Added:
tags/jbosstools-3.0.0.Alpha1/portlet/
Log:
tagging portlet component to fix build error
Copied: tags/jbosstools-3.0.0.Alpha1/portlet (from rev 9338, trunk/portlet)
16 years, 5 months