Author: rob.stryker(a)jboss.com
Date: 2011-11-25 02:08:41 -0500 (Fri, 25 Nov 2011)
New Revision: 36650
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/JBASConsoleWriter.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
Allowing delegates to participate in stopping even if ignore start / stop is checked.
investigating the rse console writer
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java 2011-11-25
07:05:52 UTC (rev 36649)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/JBASConsoleWriter.java 2011-11-25
07:08:41 UTC (rev 36650)
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.ide.eclipse.as.rse.ui;
-
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleManager;
-import org.eclipse.ui.console.MessageConsole;
-import org.eclipse.ui.console.MessageConsoleStream;
-import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel.IJBASHostShellListener;
-
-public class JBASConsoleWriter implements IJBASHostShellListener {
- public void writeToShell(String serverId, String[] lines) {
- MessageConsole myConsole = findConsole(serverId);
- MessageConsoleStream out = myConsole.newMessageStream();
- for( int i = 0; i < lines.length; i++ )
- out.println(lines[i]);
- }
-
- private MessageConsole findConsole(String name) {
- ConsolePlugin plugin = ConsolePlugin.getDefault();
- IConsoleManager conMan = plugin.getConsoleManager();
- IConsole[] existing = conMan.getConsoles();
- for (int i = 0; i < existing.length; i++)
- if (name.equals(existing[i].getName()))
- return (MessageConsole) existing[i];
- //no console found, so create a new one
- MessageConsole myConsole = new MessageConsole(name, null);
- conMan.addConsoles(new IConsole[]{myConsole});
- return myConsole;
- }
-
-}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2011-11-25
07:05:52 UTC (rev 36649)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2011-11-25
07:08:41 UTC (rev 36650)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.rse.ui;
import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel;
@@ -2,2 +13,3 @@
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
+import org.jboss.ide.eclipse.as.ui.console.JBASConsoleWriter;
import org.jboss.ide.eclipse.as.ui.editor.DeploymentModuleOptionCompositeAssistant;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2011-11-25 07:05:52
UTC (rev 36649)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2011-11-25 07:08:41
UTC (rev 36650)
@@ -58,6 +58,7 @@
org.eclipse.wst.common.emfworkbench.integration;bundle-version="1.2.100"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
+ org.jboss.ide.eclipse.as.ui.console,
org.jboss.ide.eclipse.as.ui.dialogs,
org.jboss.ide.eclipse.as.ui.editor,
org.jboss.ide.eclipse.as.ui.launch,
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/JBASConsoleWriter.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/JBASConsoleWriter.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/JBASConsoleWriter.java 2011-11-25
07:08:41 UTC (rev 36650)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.console;
+
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.jboss.ide.eclipse.as.core.server.IJBASHostShellListener;
+
+public class JBASConsoleWriter implements IJBASHostShellListener {
+ public void writeToShell(String serverId, String[] lines) {
+ MessageConsole myConsole = findConsole(serverId);
+ MessageConsoleStream out = myConsole.newMessageStream();
+ for( int i = 0; i < lines.length; i++ )
+ out.println(lines[i]);
+ }
+
+ private MessageConsole findConsole(String name) {
+ ConsolePlugin plugin = ConsolePlugin.getDefault();
+ IConsoleManager conMan = plugin.getConsoleManager();
+ IConsole[] existing = conMan.getConsoles();
+ for (int i = 0; i < existing.length; i++)
+ if (name.equals(existing[i].getName()))
+ return (MessageConsole) existing[i];
+ //no console found, so create a new one
+ MessageConsole myConsole = new MessageConsole(name, null);
+ conMan.addConsoles(new IConsole[]{myConsole});
+ return myConsole;
+ }
+
+}