You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2009/05/31 21:28:13 UTC

svn commit: r780497 - in /geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins: org.apache.geronimo.st.core/META-INF/ org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ org.apache.geronimo.st.v21.core/src/main/java/org/apache/ger...

Author: mcconne
Date: Sun May 31 19:28:12 2009
New Revision: 780497

URL: http://svn.apache.org/viewvc?rev=780497&view=rev
Log:
GEROINIMODEVTOOLS-575 Ensure that the Eclipse Error Log view is displayed when there is an error in the GEP

Removed:
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerConsoleHelper.java
Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoUtils.java
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF?rev=780497&r1=780496&r2=780497&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF Sun May 31 19:28:12 2009
@@ -6,8 +6,7 @@
 Bundle-Activator: org.apache.geronimo.st.core.Activator
 Bundle-Vendor: Apache.org
 Bundle-Localization: plugin
-Require-Bundle: org.apache.geronimo.runtime.common,
- org.apache.geronimo.runtime.v21,
+Require-Bundle: org.apache.geronimo.runtime.v21,
  org.apache.geronimo.jee.v21.jaxbmodel,
  org.eclipse.core.runtime,
  org.eclipse.wst.server.core,
@@ -17,24 +16,19 @@
  org.eclipse.jst.j2ee.jca,
  org.eclipse.core.runtime,
  org.eclipse.wst.common.frameworks;visibility:=reexport,
- org.eclipse.core.commands;visibility:=reexport,
  org.eclipse.wst.server.core,
+ org.eclipse.wst.web,
+ org.eclipse.jem.util,
+ org.eclipse.emf.ecore, 
  org.eclipse.jst.server.core;visibility:=reexport,
  org.eclipse.jdt.launching;visibility:=reexport,
  org.eclipse.wst.common.project.facet.core,
+ org.eclipse.core.commands;visibility:=reexport,
  org.eclipse.jdt.core,
  org.eclipse.debug.core,
- org.eclipse.wst.web,
- org.eclipse.jem.util,
  org.eclipse.jst.j2ee.core,
- org.eclipse.emf.ecore,
- org.eclipse.ui.console;bundle-version="3.3.1",
- org.eclipse.ui.forms;bundle-version="3.3.103",
- org.eclipse.ui.ide;bundle-version="3.4.2",
- org.eclipse.ui.editors;bundle-version="3.4.0",
- org.eclipse.ui.views;bundle-version="3.3.1",
- org.eclipse.ui.workbench;bundle-version="3.4.2",
- org.eclipse.swt;bundle-version="3.4.2"
+ org.eclipse.ui.workbench,
+ org.eclipse.jface
 Bundle-ActivationPolicy: lazy
 Export-Package: org.apache.geronimo.st.core,
  org.apache.geronimo.st.core.commands,

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java?rev=780497&r1=780496&r2=780497&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java Sun May 31 19:28:12 2009
@@ -409,10 +409,10 @@
                 throw new IllegalArgumentException();
             }
         } catch (CoreException e) {
-            GeronimoServerConsoleHelper.write("[ERROR] CoreException in GeronimoServerBehaviourDelegate.invokeCommand():", e);
+            GeronimoUtils.displayEclipseErrorLog();
             throw e;
         } catch (Exception e) {
-            GeronimoServerConsoleHelper.write("[ERROR] Exception in GeronimoServerBehaviourDelegate.invokeCommand():", e);
+            GeronimoUtils.displayEclipseErrorLog();
             e.printStackTrace();
         } finally {
             Thread.currentThread().setContextClassLoader(old);
@@ -542,7 +542,7 @@
     protected void doFail(IStatus status, String message) throws CoreException {
         MultiStatus ms = new MultiStatus(Activator.PLUGIN_ID, 0, message, null);
         ms.addAll(status);
-        GeronimoServerConsoleHelper.write("[ERROR] Error in GeronimoServerBehaviourDelegate.doFail():", ms.toString());
+        GeronimoUtils.displayEclipseErrorLog();
         throw new CoreException(ms);
     }
 
@@ -769,7 +769,6 @@
                 }
                 MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
                 Trace.trace(Trace.INFO, "Connected to kernel. " + url);
-                GeronimoServerConsoleHelper.write("[INFO]", "Eclipse WTP has connected to Geronimo kernel: " + url);
                 return connection;
             } catch (MalformedURLException e) {
                 e.printStackTrace();
@@ -809,7 +808,7 @@
         try {
             op.execute(monitor, null);
         } catch (ExecutionException e) {
-            GeronimoServerConsoleHelper.write("[ERROR] ExecutionException in GeronimoServerBehaviourDelegate.updateSharedLib():", e);
+            GeronimoUtils.displayEclipseErrorLog();
             return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, e.getMessage(), e.getCause());
         }
         return Status.OK_STATUS;

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoUtils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoUtils.java?rev=780497&r1=780496&r2=780497&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoUtils.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoUtils.java Sun May 31 19:28:12 2009
@@ -23,9 +23,15 @@
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
 import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
 import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.wst.common.componentcore.ArtifactEdit;
 import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
@@ -37,181 +43,177 @@
  */
 public class GeronimoUtils {
 
-	public static final String WEB_PLAN_NAME = "geronimo-web.xml";
+    public static final String WEB_PLAN_NAME = "geronimo-web.xml";
 
-	public static final String OPENEJB_PLAN_NAME = "openejb-jar.xml";
+    public static final String OPENEJB_PLAN_NAME = "openejb-jar.xml";
 
-	public static final String APP_PLAN_NAME = "geronimo-application.xml";
+    public static final String APP_PLAN_NAME = "geronimo-application.xml";
 
-	public static final String APP_CLIENT_PLAN_NAME = "geronimo-application-client.xml";
+    public static final String APP_CLIENT_PLAN_NAME = "geronimo-application-client.xml";
 
-	public static final String CONNECTOR_PLAN_NAME = "geronimo-ra.xml";
-
-	public static boolean isWebModule(IModule module) {
-		return "jst.web".equals(module.getModuleType().getId());
-	}
-
-	public static boolean isEjbJarModule(IModule module) {
-		return "jst.ejb".equals(module.getModuleType().getId());
-	}
-
-	public static boolean isEarModule(IModule module) {
-		return "jst.ear".equals(module.getModuleType().getId());
-	}
-
-	public static boolean isAppClientModule(IModule module) {
-		return "jst.appclient".equals(module.getModuleType().getId());
-	}
-
-	public static boolean isRARModule(IModule module) {
-		return "jst.connector".equals(module.getModuleType().getId());
-	}
-	
-	public static ModuleType getJSR88ModuleType(IModule module) {
-		if (isWebModule(module)) {
-			return ModuleType.WAR;
-		} else if (isEjbJarModule(module)) {
-			return ModuleType.EJB;
-		} else if (isEarModule(module)) {
-			return ModuleType.EAR;
-		} else if (isRARModule(module)) {
-			return ModuleType.RAR;
-		} else {
-			Trace.trace(Trace.SEVERE, "getJSR88ModuleType = null");
-			return null;
-		}
-	}
-	
-	public static IFile getDeploymentPlanFile(IModule module) {
-		IProject project = module.getProject();
-		IVirtualComponent comp = ComponentCore.createComponent(project);
-		String type = J2EEProjectUtilities.getJ2EEProjectType(project);
-		if (IModuleConstants.JST_WEB_MODULE.equals(type)) {
-			return getWebDeploymentPlanFile(comp);
-		} else if (IModuleConstants.JST_EJB_MODULE.equals(type)) {
-			return getOpenEjbDeploymentPlanFile(comp);
-		} else if (IModuleConstants.JST_EAR_MODULE.equals(type)) {
-			return getApplicationDeploymentPlanFile(comp);
-		} else if (IModuleConstants.JST_APPCLIENT_MODULE.equals(type)) {
-			return getApplicationClientDeploymentPlanFile(comp);
-		} else if (IModuleConstants.JST_CONNECTOR_MODULE.equals(type)) {
-			return getConnectorDeploymentPlanFile(comp);
-		}
-		return null;
-	}
-	
-	public static String getQualifiedConfigID(String groupId, String artifactId, String version, String type) {
-		return groupId + "/" + artifactId + "/" + version + "/" + type;
-	}
-
-	public static IFile getWebDeploymentPlanFile(IVirtualComponent comp) {
-		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("WEB-INF").append(WEB_PLAN_NAME);
-		return comp.getProject().getFile(deployPlanPath);
-	}
-
-	public static IFile getOpenEjbDeploymentPlanFile(IVirtualComponent comp) {
-		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(OPENEJB_PLAN_NAME);
-		return comp.getProject().getFile(deployPlanPath);
-	}
-
-	public static IFile getApplicationDeploymentPlanFile(IVirtualComponent comp) {
-		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(APP_PLAN_NAME);
-		return comp.getProject().getFile(deployPlanPath);
-	}
-
-	public static IFile getApplicationClientDeploymentPlanFile(IVirtualComponent comp) {
-		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(APP_CLIENT_PLAN_NAME);
-		return comp.getProject().getFile(deployPlanPath);
-	}
-
-	public static IFile getConnectorDeploymentPlanFile(IVirtualComponent comp) {
-		IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(CONNECTOR_PLAN_NAME);
-		return comp.getProject().getFile(deployPlanPath);
-	}
-
-	public static IVirtualComponent getVirtualComponent(IModule module) {
-		return ComponentCore.createComponent(module.getProject());
-	}
-
-	public static String getContextRoot(IModule module) {
-		String contextRoot = null;
-
-		J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
-		contextRoot = ((IWebModule) j2eeModule).getContextRoot();
-
-		if (contextRoot == null)
-			contextRoot = getId(module);
-
-		return contextRoot;
-	}
-
-	public static String getId(IModule module) {
-		// use the module ID
-		String moduleId = module.getId();
-
-		J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
-		if (j2eeModule != null) {
-			// j2eeFlex
-			ArtifactEdit edit = null;
-			try {
-				edit = ArtifactEdit.getArtifactEditForRead(j2eeModule.getProject());
-				//TODO JAXB Refactoring - Can below two lines be removed without harm?
-				//XMIResource res = (XMIResource) edit.getContentModelRoot().eResource();
-				//moduleId = res.getID(edit.getContentModelRoot());
-			} finally {
-				if (edit != null)
-					edit.dispose();
-			}
-		}
-
-		if (moduleId != null && moduleId.length() > 0)
-			return moduleId;
-
-		// ...but if there is no defined module ID, pick the best alternative
-
-		IPath moduleLocation = new Path(j2eeModule.getURI(module));
-		if (moduleLocation != null) {
-			moduleId = moduleLocation.removeFileExtension().lastSegment();
-		}
-
-		if (j2eeModule instanceof IWebModule) {
-			// A better choice is to use the context root
-			// For wars most appservers use the module name
-			// as the context root
-			String contextRoot = ((IWebModule) j2eeModule).getContextRoot();
-			if (contextRoot.charAt(0) == '/')
-				moduleId = contextRoot.substring(1);
-		}
-
-		return moduleId;
-	}
-
-/*
-//TODO JAXB Refactoring - Can this function be removed without harm?
-	public static Resource load(IFile dpFile, ResourceSet resourceSet) {
-		try {
-
-			URI uri = URI.createPlatformResourceURI(dpFile.getFullPath().toString(), false);
-
-			Resource resource = resourceSet.createResource(uri);
-			if (!resource.isLoaded()) {
-				resource.load(null);
-			}
-			return resource;
-		} catch (MalformedURLException e) {
-			e.printStackTrace();
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-*/	
-/*
-//TODO JAXB Refactoring - Can this function be removed without harm?
-	public static void register(ResourceSet resourceSet,
-			Resource.Factory factory, EPackage pkg, String nsUri) {
-		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, factory);
-		resourceSet.getPackageRegistry().put(nsUri, pkg);
-	}
-*/
+    public static final String CONNECTOR_PLAN_NAME = "geronimo-ra.xml";
+
+    public static boolean isWebModule(IModule module) {
+        return "jst.web".equals(module.getModuleType().getId());
+    }
+
+    public static boolean isEjbJarModule(IModule module) {
+        return "jst.ejb".equals(module.getModuleType().getId());
+    }
+
+    public static boolean isEarModule(IModule module) {
+        return "jst.ear".equals(module.getModuleType().getId());
+    }
+
+    public static boolean isAppClientModule(IModule module) {
+        return "jst.appclient".equals(module.getModuleType().getId());
+    }
+
+    public static boolean isRARModule(IModule module) {
+        return "jst.connector".equals(module.getModuleType().getId());
+    }
+    
+    public static ModuleType getJSR88ModuleType(IModule module) {
+        if (isWebModule(module)) {
+            return ModuleType.WAR;
+        } else if (isEjbJarModule(module)) {
+            return ModuleType.EJB;
+        } else if (isEarModule(module)) {
+            return ModuleType.EAR;
+        } else if (isRARModule(module)) {
+            return ModuleType.RAR;
+        } else {
+            Trace.trace(Trace.SEVERE, "getJSR88ModuleType = null");
+            return null;
+        }
+    }
+    
+    public static IFile getDeploymentPlanFile(IModule module) {
+        IProject project = module.getProject();
+        IVirtualComponent comp = ComponentCore.createComponent(project);
+        String type = J2EEProjectUtilities.getJ2EEProjectType(project);
+        if (IModuleConstants.JST_WEB_MODULE.equals(type)) {
+            return getWebDeploymentPlanFile(comp);
+        } else if (IModuleConstants.JST_EJB_MODULE.equals(type)) {
+            return getOpenEjbDeploymentPlanFile(comp);
+        } else if (IModuleConstants.JST_EAR_MODULE.equals(type)) {
+            return getApplicationDeploymentPlanFile(comp);
+        } else if (IModuleConstants.JST_APPCLIENT_MODULE.equals(type)) {
+            return getApplicationClientDeploymentPlanFile(comp);
+        } else if (IModuleConstants.JST_CONNECTOR_MODULE.equals(type)) {
+            return getConnectorDeploymentPlanFile(comp);
+        }
+        return null;
+    }
+    
+    public static String getQualifiedConfigID(String groupId, String artifactId, String version, String type) {
+        return groupId + "/" + artifactId + "/" + version + "/" + type;
+    }
+
+    public static IFile getWebDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("WEB-INF").append(WEB_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+    }
+
+    public static IFile getOpenEjbDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(OPENEJB_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+    }
+
+    public static IFile getApplicationDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(APP_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+    }
+
+    public static IFile getApplicationClientDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(APP_CLIENT_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+    }
+
+    public static IFile getConnectorDeploymentPlanFile(IVirtualComponent comp) {
+        IPath deployPlanPath = comp.getRootFolder().getUnderlyingFolder().getProjectRelativePath().append("META-INF").append(CONNECTOR_PLAN_NAME);
+        return comp.getProject().getFile(deployPlanPath);
+    }
+
+    public static IVirtualComponent getVirtualComponent(IModule module) {
+        return ComponentCore.createComponent(module.getProject());
+    }
+
+    public static String getContextRoot(IModule module) {
+        String contextRoot = null;
+
+        J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
+        contextRoot = ((IWebModule) j2eeModule).getContextRoot();
+
+        if (contextRoot == null)
+            contextRoot = getId(module);
+
+        return contextRoot;
+    }
+
+    public static String getId(IModule module) {
+        // use the module ID
+        String moduleId = module.getId();
+
+        J2EEFlexProjDeployable j2eeModule = (J2EEFlexProjDeployable) module.loadAdapter(J2EEFlexProjDeployable.class, null);
+        if (j2eeModule != null) {
+            // j2eeFlex
+            ArtifactEdit edit = null;
+            try {
+                edit = ArtifactEdit.getArtifactEditForRead(j2eeModule.getProject());
+                //TODO JAXB Refactoring - Can below two lines be removed without harm?
+                //XMIResource res = (XMIResource) edit.getContentModelRoot().eResource();
+                //moduleId = res.getID(edit.getContentModelRoot());
+            } finally {
+                if (edit != null)
+                    edit.dispose();
+            }
+        }
+
+        if (moduleId != null && moduleId.length() > 0)
+            return moduleId;
+
+        // ...but if there is no defined module ID, pick the best alternative
+
+        IPath moduleLocation = new Path(j2eeModule.getURI(module));
+        if (moduleLocation != null) {
+            moduleId = moduleLocation.removeFileExtension().lastSegment();
+        }
+
+        if (j2eeModule instanceof IWebModule) {
+            // A better choice is to use the context root
+            // For wars most appservers use the module name
+            // as the context root
+            String contextRoot = ((IWebModule) j2eeModule).getContextRoot();
+            if (contextRoot.charAt(0) == '/')
+                moduleId = contextRoot.substring(1);
+        }
+
+        return moduleId;
+    }
+
+
+    /**
+     * Display the Eclipse Error log. Anything done to the UI in Eclipse must be performed 
+     * in a UI thread. Since the GEP is not always in a UI thread we need to use the
+     * asynchExec(Runnable) method to asynchronously start a UI thread.
+     */
+    public static void displayEclipseErrorLog() {
+        final IWorkbenchPage activePage[] = new IWorkbenchPage[]{null};
+        final IWorkbench workbench = PlatformUI.getWorkbench();
+        workbench.getDisplay().asyncExec(new Runnable() {
+             public void run() {
+                 IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+                 if (window != null) {
+                     activePage[0] = window.getActivePage();
+                     try {
+                         activePage[0].showView("org.eclipse.pde.runtime.LogView");
+                     }
+                     catch (PartInitException e) {
+                         e.printStackTrace();
+                     }
+                 }
+             }
+         });
+    }
 }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java?rev=780497&r1=780496&r2=780497&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java Sun May 31 19:28:12 2009
@@ -34,7 +34,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.st.core.Activator;
 import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
-import org.apache.geronimo.st.core.GeronimoServerConsoleHelper;
+import org.apache.geronimo.st.core.GeronimoUtils;
 import org.apache.geronimo.st.v21.core.internal.Trace;
 import org.apache.geronimo.system.jmx.KernelDelegate;
 import org.eclipse.core.runtime.IPath;
@@ -94,14 +94,14 @@
             return getKernel() != null && kernel.isRunning();
         } catch (SecurityException e) {
             Activator.log(Status.ERROR, "Invalid username and/or password.", e);
-            GeronimoServerConsoleHelper.write("[ERROR] SecurityException in GeronimoServerBehaviour.isKernelAlive():", "Invalid username and/or password.", e);
+            GeronimoUtils.displayEclipseErrorLog();
             pingThread.interrupt();
             if (getServer().getServerState() != IServer.STATE_STOPPED) {
                 stop(true);
             }
         } catch (Exception e) {
             Activator.log(Status.WARNING, "Geronimo Server may have been terminated manually outside of workspace.", e);
-            GeronimoServerConsoleHelper.write("[WARNING] Exception in GeronimoServerBehaviour.isKernelAlive():", "Geronimo Server may have been terminated manually outside of workspace.", e);
+            GeronimoUtils.displayEclipseErrorLog();
             kernel = null;
         }
         return false;