Author: jsdelfino
Date: Mon Mar 31 14:30:04 2008
New Revision: 643158
URL: http://svn.apache.org/viewvc?rev=643158&view=rev
Log:
Fix for TUSCANY-2175. Added log calls and release progress monitor in a finally
block. Also fix the size of the launcher icon.
Modified:
incubator/tuscany/java/sca/tools/eclipse/plugins/core/icons/t.gif
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
Modified: incubator/tuscany/java/sca/tools/eclipse/plugins/core/icons/t.gif
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/eclipse/plugins/core/icons/t.gif?rev=643158&r1=643157&r2=643158&view=diff
==============================================================================
Binary files - no diff available.
Modified:
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java?rev=643158&r1=643157&r2=643158&view=diff
==============================================================================
---
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
(original)
+++
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
Mon Mar 31 14:30:04 2008
@@ -35,8 +35,11 @@
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.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfigurationType;
@@ -84,18 +87,18 @@
PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true,
true, new IRunnableWithProgress() {
public void run(IProgressMonitor progressMonitor) throws
InvocationTargetException, InterruptedException {
- progressMonitor.beginTask("Starting SCA Composite", 100);
-
- // Get our launch configuration type
- ILaunchManager launchManager =
DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType
=launchManager.getLaunchConfigurationType(
-
"org.apache.tuscany.sca.core.launch.configurationtype");
- progressMonitor.worked(10);
- if (progressMonitor.isCanceled()) {
- return;
- }
-
try {
+ progressMonitor.beginTask("Starting SCA Composite",
100);
+
+ // Get our launch configuration type
+ ILaunchManager launchManager =
DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType launchConfigurationType
=launchManager.getLaunchConfigurationType(
+
"org.apache.tuscany.sca.core.launch.configurationtype");
+ progressMonitor.worked(10);
+ if (progressMonitor.isCanceled()) {
+ return;
+ }
+
// If the SCA domain controller is not running yet,
launch it
if (!isDomainManagerRunning()) {
launchDomainManager(mode, file, launchManager,
launchConfigurationType, progressMonitor);
@@ -115,15 +118,19 @@
launchNode(mode, file, launchManager,
launchConfigurationType, progressMonitor);
progressMonitor.done();
-
+
} catch (Exception e) {
throw new InvocationTargetException(e);
+ } finally {
+ progressMonitor.done();
}
}
});
} catch (Exception e) {
- e.printStackTrace();
+ Platform.getLog(
+ Platform.getBundle("org.apache.tuscany.sca.core")).log(
+ new Status(IStatus.ERROR, "org.apache.tuscany.sca.core",
"Could not launch SCA composite", e));
}
}
Modified:
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java?rev=643158&r1=643157&r2=643158&view=diff
==============================================================================
---
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
(original)
+++
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
Mon Mar 31 14:30:04 2008
@@ -26,7 +26,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.ImageLoader;
@@ -57,7 +59,9 @@
String location =
FileLocator.toFileURL(Platform.getBundle("org.apache.tuscany.sca.core").getEntry("/")).getFile().toString();
setImageDescriptor(ImageDescriptor.createFromImageData((new
ImageLoader()).load(location + "/icons/tuscany.gif")[0]));
} catch (Exception e) {
- System.err.println(e.getMessage());
+ Platform.getLog(
+
Platform.getBundle("org.apache.tuscany.sca.core")).log(
+ new Status(IStatus.ERROR,
"org.apache.tuscany.sca.core", "Could not create wizard", e));
}
setFileExtension("componentType");
@@ -73,7 +77,9 @@
IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
IDE.openEditor(workbenchPage, file, true);
} catch (Exception e) {
- System.err.println(e.getMessage());
+ Platform.getLog(
+
Platform.getBundle("org.apache.tuscany.sca.core")).log(
+ new Status(IStatus.ERROR,
"org.apache.tuscany.sca.core", "Could not open editor", e));
return false;
}
return true;
Modified:
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java?rev=643158&r1=643157&r2=643158&view=diff
==============================================================================
---
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
(original)
+++
incubator/tuscany/java/sca/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
Mon Mar 31 14:30:04 2008
@@ -27,8 +27,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.ImageLoader;
@@ -59,7 +61,9 @@
String location =
FileLocator.toFileURL(Platform.getBundle("org.apache.tuscany.sca.core").getEntry("/")).getFile().toString();
setImageDescriptor(ImageDescriptor.createFromImageData((new
ImageLoader()).load(location + "/icons/tuscany.gif")[0]));
} catch (Exception e) {
- System.err.println(e.getMessage());
+ Platform.getLog(
+
Platform.getBundle("org.apache.tuscany.sca.core")).log(
+ new Status(IStatus.ERROR,
"org.apache.tuscany.sca.core", "Could not create wizard", e));
}
setFileExtension("composite");
@@ -75,7 +79,9 @@
IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
IDE.openEditor(workbenchPage, file, true);
} catch (Exception e) {
- System.err.println(e.getMessage());
+ Platform.getLog(
+
Platform.getBundle("org.apache.tuscany.sca.core")).log(
+ new Status(IStatus.ERROR,
"org.apache.tuscany.sca.core", "Could not open editor", e));
return false;
}
return true;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]