You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/04/01 00:58:15 UTC
svn commit: r643198 - in
/incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core: icons/
org/apache/tuscany/sca/core/launch/ org/apache/tuscany/sca/core/newwizards/
Author: jsdelfino
Date: Mon Mar 31 15:58:08 2008
New Revision: 643198
URL: http://svn.apache.org/viewvc?rev=643198&view=rev
Log:
Fix for TUSCANY-2175. Merged changes from trunk.
Modified:
incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/icons/t.gif
incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
Modified: incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/icons/t.gif
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/icons/t.gif?rev=643198&r1=643197&r2=643198&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java?rev=643198&r1=643197&r2=643198&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java (original)
+++ incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/launch/TuscanyLaunchShortcut.java Mon Mar 31 15:58:08 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/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java?rev=643198&r1=643197&r2=643198&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java (original)
+++ incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewComponentTypeWizardPage.java Mon Mar 31 15:58:08 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/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java?rev=643198&r1=643197&r2=643198&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java (original)
+++ incubator/tuscany/branches/sca-java-1.2/tools/eclipse/plugins/core/org/apache/tuscany/sca/core/newwizards/NewCompositeWizardPage.java Mon Mar 31 15:58:08 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: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org