JBoss Tools SVN: r36899 - trunk/common/plugins/org.jboss.tools.common.ui/icons.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-02 14:08:07 -0500 (Fri, 02 Dec 2011)
New Revision: 36899
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.png
Log:
Updated JBoss Icon
Modified: trunk/common/plugins/org.jboss.tools.common.ui/icons/jboss16.png
===================================================================
(Binary files differ)
13 years, 1 month
JBoss Tools SVN: r36898 - trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-12-02 14:02:12 -0500 (Fri, 02 Dec 2011)
New Revision: 36898
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9539 : Browsersim app for testing mobile/desktop web apps
- minor: potential bugs in test classes and refactoring
Modified: trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java 2011-12-02 18:58:34 UTC (rev 36897)
+++ trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java 2011-12-02 19:02:12 UTC (rev 36898)
@@ -38,32 +38,41 @@
shell.setLayout(new FillLayout());
final AbstractWebKitBrowser webKitBrowser = WebKitBrowserFactory.createWebKitBrowser(shell, SWT.NONE);
assertNotNull(webKitBrowser);
- ExpressionExecutor expressionEvaluator = new ExpressionExecutor(webKitBrowser);
+ ExpressionsEvaluator expressionsEvaluator = new ExpressionsEvaluator(webKitBrowser);
- String initialUserAgent = (String) expressionEvaluator.evaluate("navigator.userAgent");
+ String initialUserAgent = (String) expressionsEvaluator.evaluate("navigator.userAgent");
webKitBrowser.setDefaultUserAgent(CUSTOM_USER_AGENT);
- String customUserAgent = (String) expressionEvaluator.evaluate("navigator.userAgent");
+ String customUserAgent = (String) expressionsEvaluator.evaluate("navigator.userAgent");
assertEquals(CUSTOM_USER_AGENT, customUserAgent);
webKitBrowser.setDefaultUserAgent(null);
- String finalUserAgent = (String) expressionEvaluator.evaluate("navigator.userAgent");
+ String finalUserAgent = (String) expressionsEvaluator.evaluate("navigator.userAgent");
assertEquals(initialUserAgent, finalUserAgent);
- expressionEvaluator.dispose();
+ expressionsEvaluator.dispose();
display.dispose();
}
}
/**
+ * Evaluator of JavaScript expressions. Typical usage:
+ * <pre>
+ * ExpressionsEvaluator expressionsEvaluator = new ExpressionsEvaluator(browser);
+ * String userAgent = (String) expressionsEvaluator.evaluate("navigator.userAgent");
+ * expressionsEvaluator.dispose();
+ * </pre>
+ *
* @author Yahor Radtsevich (yradtsevich)
*/
-class ExpressionExecutor {
- private static final String EXPRESSION_EXECUTOR_RESULT_EXTRACTOR_FUNCTION_NAME = "expressionExecutorResultExtractor";
+class ExpressionsEvaluator {
+ private static long expressionExecutorFunctionId = 0;
+
+ private final String EXPRESSION_EXECUTOR_RESULT_EXTRACTOR_FUNCTION_NAME = "__resultExtractor" + expressionExecutorFunctionId++;
private Browser browser;
private ResultExtractorFunction resultExtractorFunction;
- public ExpressionExecutor(Browser browser) {
+ public ExpressionsEvaluator(Browser browser) {
this.browser = browser;
resultExtractorFunction = new ResultExtractorFunction(browser, EXPRESSION_EXECUTOR_RESULT_EXTRACTOR_FUNCTION_NAME);
}
13 years, 1 month
JBoss Tools SVN: r36897 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim: resources/icons and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-12-02 13:58:34 -0500 (Fri, 02 Dec 2011)
New Revision: 36897
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DeviceOrientation.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_clockwise.png
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_counterclockwise.png
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-10280 : BrowserSim: simulate orientation change
- added buttons for rotating of browser
- added simulation of javascript orientationchange event
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DeviceOrientation.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DeviceOrientation.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DeviceOrientation.java 2011-12-02 18:58:34 UTC (rev 36897)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.browsersim.model;
+
+import java.util.Observable;
+
+/**
+ * Holds device orientation and can be turned.
+ */
+public class DeviceOrientation extends Observable {
+ public static final int PORTRAIT = 0;
+ public static final int LANDSCAPE = 90;
+ public static final int PORTRAIT_INVERTED = 180;
+ public static final int LANDSCAPE_INVERTED = -90;
+
+ private int orientationAngle;
+
+ public DeviceOrientation(int orientationAngle) {
+ this.orientationAngle = orientationAngle;
+ }
+
+ public void turnDevice(boolean counterclockwise) {
+ if (counterclockwise) {
+ orientationAngle+= 90;
+ } else {
+ orientationAngle-= 90;
+ }
+
+ // normalize angle to be in [-90; 180]
+ orientationAngle = ((orientationAngle - 180) % 360) + 180;
+ orientationAngle = ((orientationAngle + 90) % 360) - 90;
+
+ this.setChanged();
+ }
+
+ public int getOrientationAngle() {
+ return orientationAngle;
+ }
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_clockwise.png
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_clockwise.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_counterclockwise.png
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/icons/rotate_counterclockwise.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2011-12-02 18:50:35 UTC (rev 36896)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2011-12-02 18:58:34 UTC (rev 36897)
@@ -47,6 +47,7 @@
import org.jboss.tools.vpe.browsersim.browser.AbstractWebKitBrowser;
import org.jboss.tools.vpe.browsersim.browser.WebKitBrowserFactory;
import org.jboss.tools.vpe.browsersim.model.Device;
+import org.jboss.tools.vpe.browsersim.model.DeviceOrientation;
import org.jboss.tools.vpe.browsersim.model.DevicesList;
import org.jboss.tools.vpe.browsersim.model.DevicesListHolder;
import org.jboss.tools.vpe.browsersim.model.DevicesListStorage;
@@ -66,6 +67,7 @@
private String initialUrl;
private Menu devicesMenu;
private DevicesListHolder devicesListHolder;
+ private DeviceOrientation deviceOrientation;
public static void main(String[] args) {
String initialUrl;
@@ -175,7 +177,10 @@
});
browser.addLocationListener(new LocationListener() {
public void changed(LocationEvent event) {
- if (event.top) locationText.setText(event.location);
+ if (event.top) {
+ locationText.setText(event.location);
+ }
+ initOrientation(deviceOrientation.getOrientationAngle());
}
public void changing(LocationEvent event) {
}
@@ -247,17 +252,38 @@
}
});
+ ToolItem itemRotateCounterclockwise = new ToolItem(toolbar, SWT.PUSH);
+// itemGo.setText("Rotate Counterclockwise");
+ itemRotateCounterclockwise.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ rotateDevice(true);
+ }
+ });
+
+ ToolItem itemRotateClockwise = new ToolItem(toolbar, SWT.PUSH);
+// itemGo.setText("Rotate Clockwise");
+ itemRotateClockwise.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ rotateDevice(false);
+ }
+ });
+
final Image imageBack = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_backward.gif")); //$NON-NLS-1$
final Image imageForward = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_forward.gif")); //$NON-NLS-1$
final Image imageStop = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_stop.gif")); //$NON-NLS-1$
final Image imageRefresh = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_refresh.gif")); //$NON-NLS-1$
final Image imageGo = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/nav_go.gif")); //$NON-NLS-1$
+ final Image imageRotateClockwise = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/rotate_clockwise.png")); //$NON-NLS-1$
+ final Image imageRotateCounterclockwise = new Image(display, ResourcesUtil.getResourceAsStream("/org/jboss/tools/vpe/browsersim/resources/icons/rotate_counterclockwise.png")); //$NON-NLS-1$
itemBack.setImage(imageBack);
itemForward.setImage(imageForward);
itemStop.setImage(imageStop);
itemRefresh.setImage(imageRefresh);
itemGo.setImage(imageGo);
+ itemRotateClockwise.setImage(imageRotateClockwise);
+ itemRotateCounterclockwise.setImage(imageRotateCounterclockwise);
+
shell.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
imageBack.dispose();
@@ -265,12 +291,11 @@
imageStop.dispose();
imageRefresh.dispose();
imageGo.dispose();
+ imageRotateClockwise.dispose();
+ imageRotateCounterclockwise.dispose();
}
});
-
- itemForward.setImage(imageForward);
-
return toolbar;
}
@@ -369,20 +394,46 @@
menuItem.setSelection(menuItem.getData() == device);
}
}
+
+ setBrowserSize(device.getWidth(), device.getHeight());
+ deviceOrientation = new DeviceOrientation(device.getWidth() < device.getHeight()
+ ? DeviceOrientation.PORTRAIT
+ : DeviceOrientation.LANDSCAPE);
+ deviceOrientation.addObserver(new Observer() {
+ public void update(Observable o, Object arg) {
+ int orientationAngle = ((DeviceOrientation) o).getOrientationAngle();
+
+ int minSize = Math.min(device.getWidth(), device.getHeight());
+ int maxSize = Math.max(device.getWidth(), device.getHeight());
+
+ if (orientationAngle == DeviceOrientation.LANDSCAPE
+ || orientationAngle == DeviceOrientation.LANDSCAPE_INVERTED) {
+ setBrowserSize(maxSize, minSize);
+ } else {
+ setBrowserSize(minSize, maxSize);
+ }
+
+ fireOrientationChangeEvent(orientationAngle);
+ }
+ });
browser.setDefaultUserAgent(device.getUserAgent());
+ browser.refresh();
+ }
+
+ private void setBrowserSize(int width, int height) {
GridData data = (GridData) browser.getLayoutData();
Rectangle clientArea = display.getClientArea();
int shellWidthHint = SWT.DEFAULT;
- if (device.getWidth() != Device.DEFAULT_SIZE) {
- data.widthHint = device.getWidth();
+ if (width != Device.DEFAULT_SIZE) {
+ data.widthHint = width;
} else if (data.widthHint == SWT.DEFAULT) {
shellWidthHint = clientArea.width;
}
int shellHeightHint = SWT.DEFAULT;
- if (device.getHeight() != Device.DEFAULT_SIZE) {
- data.heightHint = device.getHeight();
+ if (height != Device.DEFAULT_SIZE) {
+ data.heightHint = height;
} else if (data.heightHint == SWT.DEFAULT) {
shellHeightHint = clientArea.height;
}
@@ -411,6 +462,28 @@
}
shell.setBounds(shellBounds);
- browser.refresh();
}
+
+ private void initOrientation(int orientation) {
+ browser.execute("window.onorientationchange = null;"
+ + "window.orientation = " + orientation + ";");
+ }
+
+ private void fireOrientationChangeEvent(int orientation) {
+ browser.execute("window.orientation = " + orientation + ";"
+ + "(function(){"
+ + "var event = document.createEvent('Event');"
+ + "event.initEvent('orientationchange', false, false);" // http://jsbin.com/azefow/6 https://developer.mozilla.org/en/DOM/document.createEvent
+ + "window.dispatchEvent(event);"
+ + "if (typeof window.onorientationchange === 'function') {"
+ + "window.onorientationchange(event);"
+ + "}"
+ + "})();"
+ );
+ }
+
+ protected void rotateDevice(boolean counterclockwise) {
+ deviceOrientation.turnDevice(counterclockwise);
+ deviceOrientation.notifyObservers();
+ }
}
13 years, 1 month
JBoss Tools SVN: r36896 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2011-12-02 13:50:35 -0500 (Fri, 02 Dec 2011)
New Revision: 36896
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
Log:
Fix the ID of the Openshift Express wizard
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-12-02 18:44:56 UTC (rev 36895)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java 2011-12-02 18:50:35 UTC (rev 36896)
@@ -69,7 +69,7 @@
//wizardIds.add("org.jboss.tools.seam.ui.wizards.SeamProjectWizard");
//wizardIds.add("org.eclipse.m2e.core.wizards.Maven2ProjectWizard");
//wizardIds.add(JBossCentralActivator.NEW_PROJECT_EXAMPLES_WIZARD_ID);
- wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.NewServerAdapter");
+ wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.ImportProjectNewWizard");
return wizardIds;
}
13 years, 1 month
JBoss Tools SVN: r36895 - trunk/forge/tests/org.jboss.tools.forge.core.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-02 13:44:56 -0500 (Fri, 02 Dec 2011)
New Revision: 36895
Modified:
trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml
Log:
marked back as eclipse-plugin instead of eclipse-test-plugin, because it is not ready to run on hudson
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml 2011-12-02 18:43:32 UTC (rev 36894)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml 2011-12-02 18:44:56 UTC (rev 36895)
@@ -9,7 +9,7 @@
<groupId>org.jboss.tools.forge.tests</groupId>
<artifactId>org.jboss.tools.forge.core.test</artifactId>
- <packaging>eclipse-test-plugin</packaging>
+ <packaging>eclipse-plugin</packaging>
<properties>
<emma.filter>org.jboss.tools.forge.core*</emma.filter>
13 years, 1 month
JBoss Tools SVN: r36894 - trunk/forge/tests/org.jboss.tools.forge.core.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-12-02 13:43:32 -0500 (Fri, 02 Dec 2011)
New Revision: 36894
Modified:
trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml
Log:
added configuration for code coverage
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml 2011-12-02 18:16:10 UTC (rev 36893)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/pom.xml 2011-12-02 18:43:32 UTC (rev 36894)
@@ -9,5 +9,25 @@
<groupId>org.jboss.tools.forge.tests</groupId>
<artifactId>org.jboss.tools.forge.core.test</artifactId>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.forge.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.forge.core</emma.instrument.bundles>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <includes>
+ <include>**/*Test.class</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
13 years, 1 month
JBoss Tools SVN: r36893 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: icons and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-02 13:16:10 -0500 (Fri, 02 Dec 2011)
New Revision: 36893
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.png
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10296 change the default icon for the "Server" controls we have to be a Server icon instead of a JBoss icon.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
===================================================================
(Binary files differ)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-12-02 18:14:36 UTC (rev 36892)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-12-02 18:16:10 UTC (rev 36893)
@@ -9,20 +9,20 @@
<extension
point="org.eclipse.wst.server.ui.serverImages">
<image
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
typeIds="%AllJBossServerTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
typeIds="%AllJBossRuntimeTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
typeIds="org.jboss.ide.eclipse.as.systemCopyServer"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
typeIds="org.jboss.ide.eclipse.as.runtime.stripped"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
</extension>
@@ -197,7 +197,7 @@
point="org.eclipse.debug.ui.launchConfigurationTypeImages">
<launchConfigurationTypeImage
configTypeID="org.jboss.ide.eclipse.as.core.server.launchConfiguration"
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
id="org.jboss.ide.eclipse.as.ui.launchConfigurationImage1"/>
</extension>
@@ -461,7 +461,7 @@
<extension
point="org.jboss.tools.jmx.ui.providerUI">
<providerUI
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
id="org.jboss.ide.eclipse.as.core.extensions.jmx.JBossServerConnectionProvider"
name="JBoss Server">
</providerUI>
@@ -470,7 +470,7 @@
point="org.eclipse.debug.ui.launchConfigurationTypeImages">
<launchConfigurationTypeImage
configTypeID="org.jboss.ide.eclipse.as.core.server.startupConfiguration"
- icon="$nl$/icons/jboss.gif"
+ icon="$nl$/icons/jboss.png"
id="org.jboss.ide.eclipse.as.ui.launchConfigurationTypeImage1">
</launchConfigurationTypeImage>
</extension>
13 years, 1 month
JBoss Tools SVN: r36892 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-12-02 13:14:36 -0500 (Fri, 02 Dec 2011)
New Revision: 36892
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java
Log:
OPEN - issue JBIDE-10152: enable console for openshift server rhc-tailfiles
https://issues.jboss.org/browse/JBIDE-10152
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java 2011-12-02 18:12:06 UTC (rev 36891)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/TailServerLog.java 2011-12-02 18:14:36 UTC (rev 36892)
@@ -1,156 +0,0 @@
-package org.jboss.tools.openshift.express.internal.core.console;
-
-/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-
-import org.apache.commons.io.IOUtils;
-import org.eclipse.jgit.util.Base64;
-
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.JSch;
-import com.jcraft.jsch.JSchException;
-import com.jcraft.jsch.Logger;
-import com.jcraft.jsch.Session;
-import com.jcraft.jsch.UserInfo;
-
-public class TailServerLog {
-
- public static void main(String[] args) {
- TailServerLog tailer = new TailServerLog();
- if(args.length != 3) {
- System.out.println("Usage: TailServerLog <appId> <host> <file>");
- }
- String user = args[0]; // eg: "c883f7e5f7824c49bff4682731ec6e56"
- String host = args[1]; // eg: "jee-xcoulon.rhcloud.com";
- String filePath = args[2]; // eg: "jee/logs/server.log";
- String options = "-f -n 100"; // well, you change it here ;-)
- try {
- tailer.tail(user, host, filePath, options, System.out);
- } catch (JSchException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- public void tail(final String user, final String host, final String filePath, final String options,
- final OutputStream out) throws JSchException, IOException {
-
- JSch.setLogger(new MyLogger());
- final JSch jsch = new JSch();
- final String libraRSAPrivateKeyPath = System.getProperty("user.home") + "/.ssh/libra_id_rsa";
- jsch.addIdentity(libraRSAPrivateKeyPath);
- final Session session = jsch.getSession(user, host, 22);
-
- // username and password will be given via UserInfo interface.
- session.setUserInfo(new MyUserInfo());
- session.connect();
-
- // the rhc-tail-files command template
- // ssh_cmd =
- // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
- final String command = buildCommand(filePath, options);
- final Channel channel = session.openChannel("exec");
- ((ChannelExec) channel).setCommand(command);
-
- // get I/O streams for remote tail
- final InputStream in = channel.getInputStream();
- try {channel.connect();
- out.write("...\n".getBytes());
- IOUtils.copy(in, out);
- } catch(Throwable e) {
- e.printStackTrace();
- }
- finally {
- session.disconnect();
- }
-
- }
-
- private String buildCommand(final String filePath, final String options) {
- StringBuilder commandBuilder = new StringBuilder("tail ");
- if (options != null && !options.isEmpty()) {
- final String opts = Base64.encodeBytes(options.getBytes());
- commandBuilder.append("--opts ").append(opts).append(" ");
- }
- commandBuilder.append(filePath);
- final String command = commandBuilder.toString();
- System.out.println("cmd= '" + command + "'");
- return command;
- }
-
-
- public static class MyUserInfo implements UserInfo {
-
- private String passphrase = null;
-
- public String getPassword() {
- return null;
- }
-
- public boolean promptYesNo(String str) {
- // always accept
- System.out.println("Answering yes to: " + str);
- return true;
- }
-
- public String getPassphrase() {
- return passphrase;
- }
-
- public boolean promptPassphrase(String message) {
- // prompt the user to enter their name
- System.out.print("Enter your passphrase for : ");
- // open up standard input
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- // read the username from the command-line; need to use try/catch
- // with the
- // readLine() method
- try {
- passphrase = br.readLine();
- } catch (IOException ioe) {
- System.out.println("IO error trying to read your passphrase!");
- System.exit(1);
- }
- return true;
- }
-
- public boolean promptPassword(String message) {
- return true;
- }
-
- public void showMessage(String message) {
- System.out.println(message);
- }
-
- }
-
- static class MyLogger implements Logger {
-
- static java.util.Hashtable<Integer, String> name = new java.util.Hashtable<Integer, String>();
- static {
- name.put(new Integer(DEBUG), "DEBUG: ");
- name.put(new Integer(INFO), "INFO: ");
- name.put(new Integer(WARN), "WARN: ");
- name.put(new Integer(ERROR), "ERROR: ");
- name.put(new Integer(FATAL), "FATAL: ");
- }
-
- public boolean isEnabled(int level) {
- return true;
- }
-
- public void log(int level, String message) {
- System.err.print(name.get(new Integer(level)));
- System.err.println(message);
- }
-
- }
-}
13 years, 1 month
JBoss Tools SVN: r36891 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-12-02 13:12:06 -0500 (Fri, 02 Dec 2011)
New Revision: 36891
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
Log:
OPEN - issue JBIDE-10152: enable console for openshift server rhc-tailfiles
https://issues.jboss.org/browse/JBIDE-10152
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-12-02 18:11:38 UTC (rev 36890)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2011-12-02 18:12:06 UTC (rev 36891)
@@ -32,7 +32,8 @@
org.eclipse.debug.ui;bundle-version="3.7.0",
com.jcraft.jsch.source;bundle-version="0.1.44";resolution:=optional,
org.eclipse.ui.navigator;bundle-version="3.5.100",
- org.apache.commons.io;bundle-version="1.4.0"
+ org.eclipse.ui.console;bundle-version="3.5.100",
+ org.eclipse.core.expressions;bundle-version="3.4.300"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
13 years, 1 month
JBoss Tools SVN: r36890 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui: src/org/jboss/tools/openshift/express/internal/core/behaviour and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2011-12-02 13:11:38 -0500 (Fri, 02 Dec 2011)
New Revision: 36890
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ServerTypePropertyTester.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
Log:
OPEN - issue JBIDE-10152: enable console for openshift server rhc-tailfiles
https://issues.jboss.org/browse/JBIDE-10152
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2011-12-02 18:11:38 UTC (rev 36890)
@@ -143,4 +143,48 @@
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
sourcePathComputerId="org.eclipse.jst.server.generic.core.sourcePathComputer"/>
</extension>
+
+ <!-- Extensions to Server View to provide 'tail' of the remote server.log file -->
+
+ <!-- disabled for now
+ <extension point="org.eclipse.ui.navigator.navigatorContent">
+ <actionProvider
+ class="org.jboss.tools.openshift.express.internal.ui.console.TailServerLogActionProvider"
+ id="org.jboss.tools.openshift.express.ui.internal.ui.console.tailServerLogActionProvider">
+ <enablement>
+ <and>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.jboss.tools.openshift.express.isOpenShiftServer">
+ </test>
+ </and>
+ </enablement>
+ </actionProvider>
+ </extension>
+
+ <extension point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding viewerId="org.eclipse.wst.server.ui.ServersView">
+ </viewerContentBinding>
+ <viewerActionBinding viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <actionExtension
+ pattern="org.jboss.tools.openshift.express.ui.internal.ui.console.tailServerLogActionProvider"/>
+ </includes>
+ </viewerActionBinding>
+ </extension>
+
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.jboss.tools.openshift.express.internal.ui.console.ServerTypePropertyTester"
+ id="org.jboss.tools.openshift.express.ui.serverTypePropertyTester"
+ namespace="org.jboss.tools.openshift.express"
+ properties="isOpenShiftServer"
+ type="org.eclipse.wst.server.core.IServer">
+ </propertyTester>
+ </extension>
+ -->
</plugin>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -23,6 +23,7 @@
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
import org.jboss.ide.eclipse.as.core.util.ServerCreationUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
/**
* This class holds the attribute names whose values will be
@@ -35,11 +36,15 @@
public static final String ATTRIBUTE_EXPRESS_MODE = "org.jboss.tools.openshift.express.internal.core.behaviour.ExpressMode";
public static final String EXPRESS_BINARY_MODE = "org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBinaryMode";
public static final String EXPRESS_SOURCE_MODE = "org.jboss.tools.openshift.express.internal.core.behaviour.ExpressSourceMode";
- public static final String ATTRIBUTE_APPLICATION = "org.jboss.tools.openshift.express.internal.core.behaviour.Application";
+ public static final String ATTRIBUTE_APPLICATION_NAME = "org.jboss.tools.openshift.express.internal.core.behaviour.ApplicationName";
+ public static final String ATTRIBUTE_APPLICATION_ID = "org.jboss.tools.openshift.express.internal.core.behaviour.ApplicationId";
public static final String ATTRIBUTE_DOMAIN = "org.jboss.tools.openshift.express.internal.core.behaviour.Domain";
public static final String ATTRIBUTE_USERNAME = "org.jboss.tools.openshift.express.internal.core.behaviour.Username";
public static final String ATTRIBUTE_PASSWORD = "org.jboss.tools.openshift.express.internal.core.behaviour.Password";
+ /** the OpensHift Server Type as defined in the plugin.xml.*/
+ public static final String OPENSHIFT_SERVER_TYPE = "org.jboss.tools.openshift.express.openshift.server.type";
+
public static String getExpressMode(IServerAttributes attributes ) {
return attributes.getAttribute(ATTRIBUTE_EXPRESS_MODE, EXPRESS_SOURCE_MODE);
}
@@ -57,13 +62,17 @@
return wc.save(false, new NullProgressMonitor());
}
- public static String getExpressApplication(IServerAttributes attributes ) {
- return attributes.getAttribute(ATTRIBUTE_APPLICATION, (String)null);
+ public static String getExpressApplicationName(IServerAttributes attributes ) {
+ return attributes.getAttribute(ATTRIBUTE_APPLICATION_NAME, (String)null);
}
+ public static String getExpressApplicationId(IServerAttributes attributes ) {
+ return attributes.getAttribute(ATTRIBUTE_APPLICATION_ID, (String)null);
+ }
+
public static IServer setExpressApplication(IServer server, String val) throws CoreException {
IServerWorkingCopy wc = server.createWorkingCopy();
- wc.setAttribute(ATTRIBUTE_APPLICATION, val);
+ wc.setAttribute(ATTRIBUTE_APPLICATION_NAME, val);
return wc.save(false, new NullProgressMonitor());
}
@@ -108,7 +117,7 @@
* @param username
* @param password
* @param domain
- * @param app
+ * @param appName
* @param sourceOrBinary
* @param localRuntimeHomeDir
* @return
@@ -116,13 +125,13 @@
*/
public static IServer createAS7OpenShiftServer(
String host, String username, String password,
- String domain, String app,
+ String domain, String appName, String appId,
String sourceOrBinary,
String localRuntimeHomeDir) throws CoreException {
IServer server = createServerAndRuntime(IJBossToolingConstants.AS_70,
IJBossToolingConstants.SERVER_AS_70,
localRuntimeHomeDir, /* irrelevant */ "default");
- return fillServerWithOpenShiftDetails(server, host, username, password, domain, app, sourceOrBinary);
+ return fillServerWithOpenShiftDetails(server, host, username, password, domain, appName, appId, sourceOrBinary);
}
/**
@@ -133,7 +142,7 @@
* @param username
* @param password
* @param domain
- * @param app
+ * @param appName
* @param sourceOrBinary
* @param runtime
* @return
@@ -141,10 +150,10 @@
*/
public static IServer createAS7OpenShiftServer(
String host, String username, String password,
- String domain, String app, String sourceOrBinary,
+ String domain, String appName, String appId, String sourceOrBinary,
IRuntime runtime) throws CoreException {
IServer server = createServer(runtime, IJBossToolingConstants.SERVER_AS_70);
- return fillServerWithOpenShiftDetails(server, host, username, password, domain, app, sourceOrBinary);
+ return fillServerWithOpenShiftDetails(server, host, username, password, domain, appName, appId, sourceOrBinary);
}
/**
@@ -155,13 +164,14 @@
* @param username
* @param password
* @param domain
- * @param app
+ * @param appName
* @param sourceOrBinary
* @return
* @throws CoreException
*/
+ @SuppressWarnings("restriction")
public static IServer fillServerWithOpenShiftDetails(IServer server,
- String host, String username, String password, String domain, String app,
+ String host, String username, String password, String domain, String appName, String appId,
String mode) throws CoreException {
if( host.indexOf("://") != -1)
host = host.substring(host.indexOf("://") + 3);
@@ -173,7 +183,8 @@
wc.setAttribute(ATTRIBUTE_USERNAME, username);
wc.setAttribute(ATTRIBUTE_PASSWORD, password);
wc.setAttribute(ATTRIBUTE_DOMAIN, domain);
- wc.setAttribute(ATTRIBUTE_APPLICATION, app);
+ wc.setAttribute(ATTRIBUTE_APPLICATION_NAME, appName);
+ wc.setAttribute(ATTRIBUTE_APPLICATION_ID, appId);
wc.setAttribute(ATTRIBUTE_EXPRESS_MODE, mode);
wc.setAutoPublishSetting(Server.AUTO_PUBLISH_DISABLE);
wc.setAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, "true");
@@ -196,5 +207,15 @@
public static IServer createServer(IRuntime runtime, IServerType serverType, String serverName) throws CoreException {
return ServerCreationUtils.createServer2(runtime, serverType, serverName, "openshift");
}
+
+ /**
+ * Returns true if the given server is an OpenShift one, false otherwise.
+ * @param server the server to check
+ * @return true or false
+ */
+ public static boolean isOpenShiftRuntime(IServer server) {
+ final String serverTypeId = server.getServerType().getId();
+ return (OPENSHIFT_SERVER_TYPE.equals(serverTypeId));
+ }
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/OpenShiftDeployUI.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -60,7 +60,7 @@
Label domainLabel = new Label(composite, SWT.NONE);
domainLabel.setText("Domain: " + ExpressServerUtils.getExpressDomain(callback.getServer()));
Label appLabel = new Label(composite, SWT.NONE);
- appLabel.setText("App: " + ExpressServerUtils.getExpressApplication(callback.getServer()));
+ appLabel.setText("App: " + ExpressServerUtils.getExpressApplicationName(callback.getServer()));
Label modeLabel = new Label(composite, SWT.NONE);
modeLabel.setText("Mode: " + ExpressServerUtils.getExpressModeAsString(callback.getServer()));
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.tools.openshift.express.internal.ui.console;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IConsoleView;
+import org.eclipse.ui.console.MessageConsole;
+import org.jboss.tools.openshift.express.internal.utils.Logger;
+
+public class ConsoleUtils {
+
+
+ public static MessageConsole findMessageConsole(String name) {
+ ConsolePlugin plugin = ConsolePlugin.getDefault();
+ IConsoleManager consoleManager = plugin.getConsoleManager();
+ IConsole[] existing = consoleManager.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 console = new MessageConsole(name, null);
+ consoleManager.addConsoles(new IConsole[] { console });
+ return console;
+ }
+
+ public static void displayConsoleView(IConsole console) {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ IWorkbenchPart part = page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
+ if (part == null) {
+ try {
+ part = page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
+ } catch (PartInitException e) {
+ Logger.warn("Could not open console view", e);
+ }
+ }
+ if (part != null) {
+ page.activate(part);
+ IConsoleView view = (IConsoleView) part.getAdapter(IConsoleView.class);
+ if (view != null) {
+ view.setFocus();
+ view.display(console);
+ }
+ }
+ }
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ServerTypePropertyTester.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ServerTypePropertyTester.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ServerTypePropertyTester.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,25 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+
+/**
+ * Property tester used to compare the given Server's serverTypeId with a given value.
+ * This property tester is configured in the plugin.xml file and used to display extra menus item only when the server is on OpenShift one.
+ *
+ * @author Xavier Coulon
+ *
+ */
+public class ServerTypePropertyTester extends PropertyTester {
+
+ @Override
+ public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
+ if(receiver instanceof IServer) {
+ return ExpressServerUtils.isOpenShiftRuntime((IServer) receiver);
+ }
+
+ return false;
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ServerTypePropertyTester.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,167 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jgit.transport.RemoteSession;
+import org.eclipse.jgit.transport.SshSessionFactory;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jsch.core.IJSchService;
+import org.eclipse.jsch.internal.core.JSchLocation;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.views.IViewDescriptor;
+import org.eclipse.ui.views.IViewRegistry;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.IServerModule;
+import org.jboss.tools.openshift.express.internal.client.utils.Base64Encoder;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.console.TailServerLogWorker.MyLogger;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
+import org.jboss.tools.openshift.express.internal.utils.Logger;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+
+public class TailServerLogAction extends Action implements ISelectionChangedListener {
+
+ /** The current selection in the view. */
+ private ISelection selection = null;
+
+ /** The threads that provide the 'log tail' in the console view. */
+ private Map<String, TailServerLogWorker> tailRunners = new HashMap<String, TailServerLogWorker>();
+
+ /**
+ * Constructor
+ */
+ public TailServerLogAction() {
+ super(OpenShiftExpressUIMessages.TAIL_SERVER_LOG_ACTION);
+ IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry();
+ IViewDescriptor desc = reg.find(IConsoleConstants.ID_CONSOLE_VIEW);
+ setImageDescriptor(desc.getImageDescriptor());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ final IServer server = getServer();
+ if (ExpressServerUtils.isOpenShiftRuntime(server)) {
+ // start a new thread to which we delegate the remote shell
+ // connection + tail command
+ final String serverId = server.getId();
+ MessageConsole console = ConsoleUtils.findMessageConsole(server.getId());
+ if (!tailRunners.containsKey(serverId)) {
+ TailServerLogWorker tailServerLogRunner;
+ try {
+ final Channel channel = initSshChannel(server);
+ tailServerLogRunner = new TailServerLogWorker(server, console, channel);
+ tailRunners.put(serverId, tailServerLogRunner);
+ Thread thread = new Thread(tailServerLogRunner);
+ thread.start();
+ } catch (Exception e) {
+ Logger.error("Failed to retrieve remote server logs", e);
+ }
+ }
+ ConsoleUtils.displayConsoleView(console);
+ }
+ }
+
+ private Channel initSshChannel(IServer server) throws JSchException, IOException {
+ final String host = server.getHost();
+ final String appId = ExpressServerUtils.getExpressApplicationId(server);
+ final String appName = ExpressServerUtils.getExpressApplicationName(server);
+ final String logFilePath = appName + "/logs/server.log";
+ final String options = new String(Base64Encoder.encode("-f -n 100".getBytes("UTF-8")), "UTF-8");
+
+
+ JSch.setLogger(new MyLogger());
+ final SshSessionFactory sshSessionFactory = SshSessionFactory.getInstance();
+ final URIish uri = new URIish();
+ uri.setHost(host);
+ uri.setUser(appId);
+ final FS local = FS.detect();
+ final RemoteSession remoteSession = sshSessionFactory.getSession(uri, null, local, 100000);
+
+ //BundleContext context = OpenShiftUIActivator.getDefault().getBundle().getBundleContext();
+ //final ServiceReference<IJSchService> ssh = context.getServiceReference(IJSchService.class);
+ //final IJSchService jschService = context.getService(ssh);
+ // when the createSession method below take a null UserInfo param, it creates a new one that can't be initialized here (not a public class)
+ //final Session session = jschService.createSession(new JSchLocation(appId, host), null);
+ //jschService.connect(session, 0, new NullProgressMonitor());
+
+ // the rhc-tail-files command template
+ // ssh_cmd =
+ // "ssh -t #{app_uuid}(a)#{app}-#{namespace}.#{rhc_domain} 'tail#{opt['opts'] ? ' --opts ' + Base64::encode64(opt['opts']).chomp : ''} #{file_glob}'"
+ final String command = buildCommand(logFilePath, options);
+ Process process = remoteSession.exec(command, 0);
+ //final Channel channel = session.openChannel("exec");
+ //((ChannelExec) channel).setCommand(command);
+ //channel.connect();
+ //return channel;
+ return null;
+ }
+
+ private String buildCommand(final String filePath, final String options) throws UnsupportedEncodingException {
+ StringBuilder commandBuilder = new StringBuilder("tail ");
+ if (options != null && !options.isEmpty()) {
+ final String opts = new String(Base64Encoder.encode(options.getBytes("UTF-8")), "UTF-8");
+ commandBuilder.append("--opts ").append(opts).append(" ");
+ }
+ commandBuilder.append(filePath);
+ final String command = commandBuilder.toString();
+ System.out.println("cmd= '" + command + "'");
+ return command;
+ }
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ Object source = event.getSource();
+ if (source instanceof CommonViewer) {
+ this.selection = ((CommonViewer) source).getSelection();
+ }
+ }
+
+ public void setSelection(ISelection selection) {
+ this.selection = selection;
+
+ }
+
+ public IServer getServer() {
+ if (selection instanceof IStructuredSelection) {
+ final Object selectedItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectedItem instanceof IServer) {
+ return ((IServer) selectedItem);
+ }
+ if (selectedItem instanceof IServerModule) {
+ return ((IServerModule) selectedItem).getServer();
+ }
+ }
+ return null;
+ }
+
+ public IServerModule getServerModule() {
+ if (selection instanceof IServerModule)
+ return ((IServerModule) selection);
+ return null;
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,47 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.jboss.ide.eclipse.as.ui.views.server.extensions.CommonActionProviderUtils;
+
+public class TailServerLogActionProvider extends CommonActionProvider {
+
+ private TailServerLogAction action;
+
+ private ICommonActionExtensionSite actionExtensionSite;
+
+ public void init(ICommonActionExtensionSite actionExtensionSite) {
+ super.init(actionExtensionSite);
+ this.actionExtensionSite = actionExtensionSite;
+ ICommonViewerSite site = actionExtensionSite.getViewSite();
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ action = new TailServerLogAction();
+ action.setSelection(actionExtensionSite.getStructuredViewer().getSelection());
+ actionExtensionSite.getStructuredViewer().addSelectionChangedListener(action);
+ }
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ if (action != null && action.isEnabled()) {
+ //menu.insertBefore(ServerActionProvider.CONTROL_SERVER_SECTION_END_SEPARATOR, action);
+ CommonActionProviderUtils.addToShowInQuickSubMenu(action, menu, actionExtensionSite);
+
+ }
+ }
+
+ protected Object getSelection() {
+ ICommonViewerSite site = actionExtensionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
+ Object first = selection.getFirstElement();
+ return first;
+ }
+ return null;
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,92 @@
+package org.jboss.tools.openshift.express.internal.ui.console;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.tools.openshift.express.internal.client.utils.Base64Encoder;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Logger;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.UserInfo;
+
+public class TailServerLogWorker implements Runnable {
+
+ private final IServer server;
+
+ private final Session session;
+
+ private final Channel channel;
+
+ private final MessageConsole console;
+
+ public TailServerLogWorker(final IServer server, final MessageConsole console, final Channel channel) throws UnsupportedEncodingException,
+ JSchException {
+ this.server = server;
+ this.console = console;
+ this.channel = channel;
+ this.session = channel.getSession();
+ }
+
+ @Override
+ public void run() {
+ try {
+ // get I/O streams for remote tail
+ final InputStream in = channel.getInputStream();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+ String line;
+ // Read File Line By Line
+ while ((line = reader.readLine()) != null) {
+ console.newMessageStream().println(line);
+ }
+ if (!session.isConnected()) {
+ org.jboss.tools.openshift.express.internal.utils.Logger.warn("Session closed");
+
+ }
+ if (channel.isClosed()) {
+ org.jboss.tools.openshift.express.internal.utils.Logger.warn("Channel closed with exit status "
+ + channel.getExitStatus());
+ }
+ } catch (Throwable e) {
+ org.jboss.tools.openshift.express.internal.utils.Logger.error(
+ "Error while receiving the remote server log", e);
+ } finally {
+ org.jboss.tools.openshift.express.internal.utils.Logger.warn("Disconnecting from the remote server log");
+ session.disconnect();
+
+ }
+ }
+
+
+
+ static class MyLogger implements Logger {
+
+ static java.util.Hashtable<Integer, String> name = new java.util.Hashtable<Integer, String>();
+ static {
+ name.put(new Integer(DEBUG), "DEBUG: ");
+ name.put(new Integer(INFO), "INFO: ");
+ name.put(new Integer(WARN), "WARN: ");
+ name.put(new Integer(ERROR), "ERROR: ");
+ name.put(new Integer(FATAL), "FATAL: ");
+ }
+
+ public boolean isEnabled(int level) {
+ return true;
+ }
+
+ public void log(int level, String message) {
+ System.err.print(name.get(new Integer(level)));
+ System.err.println(message);
+ }
+
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/TailServerLogWorker.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,21 @@
+package org.jboss.tools.openshift.express.internal.ui.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class OpenShiftExpressUIMessages extends NLS {
+
+ private static final String BUNDLE_NAME = OpenShiftExpressUIMessages.class.getName();
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, OpenShiftExpressUIMessages.class);
+ }
+
+ private OpenShiftExpressUIMessages() {
+ // Do not instantiate
+ }
+
+ public static String HOSTNAME_NOT_ANSWERING;
+
+ public static String TAIL_SERVER_LOG_ACTION;
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2011-12-02 18:11:38 UTC (rev 36890)
@@ -0,0 +1,2 @@
+HOSTNAME_NOT_ANSWERING=We weren''t able to lookup your hostname ({0}) in a reasonable amount of time. This can happen periodically and will just take an extra minute or two to propagate depending on where you are in the world.\nOnce you are able to access your application in a browser, you can then clone your git repository.\nIf you can''t get your application running in the browser, you can also try destroying and recreating the application as well using this Wizard.\n\nIf this doesn''t work for you, let us know in the forums or in IRC and we''ll make sure to get you up and running.\n\nForums\: https\://www.redhat.com/openshift/forums/express\n\nIRC\: \#openshift (on Freenode)
+TAIL_SERVER_LOG_ACTION=Remote console
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationWizardModel.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -10,13 +10,14 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
-import java.net.MalformedURLException;
-
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.client.IApplication;
import org.jboss.tools.openshift.express.client.ICartridge;
import org.jboss.tools.openshift.express.client.IUser;
+import org.jboss.tools.openshift.express.client.OpenShiftApplicationNotAvailableException;
import org.jboss.tools.openshift.express.client.OpenShiftException;
+import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
/**
* @author André Dietisheim
@@ -67,8 +68,9 @@
if (isApplicationAvailable) {
setApplication(application);
} else {
- throw new OpenShiftException("The URL {0} did not respond within {1}s after the application creation.",
- application.getApplicationUrl(), APP_CREATION_TIMEOUT);
+ throw new OpenShiftApplicationNotAvailableException(NLS.bind(
+ OpenShiftExpressUIMessages.HOSTNAME_NOT_ANSWERING,
+ application.getApplicationUrl()));
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -271,7 +271,7 @@
IServer server = ExpressServerUtils.createServer(rt, type, serverName);
ExpressServerUtils.fillServerWithOpenShiftDetails(server, getApplication().getApplicationUrl(),
getUser().getRhlogin(), getUser().getPassword(),
- getUser().getDomain().getNamespace(), getApplication().getName(), mode);
+ getUser().getDomain().getNamespace(), getApplication().getName(), getApplication().getUUID(), mode);
return server;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-12-02 18:10:47 UTC (rev 36889)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewApplicationWizardPage.java 2011-12-02 18:11:38 UTC (rev 36890)
@@ -38,6 +38,7 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.ui.WizardUtils;
import org.jboss.tools.openshift.express.client.ICartridge;
+import org.jboss.tools.openshift.express.client.OpenShiftApplicationNotAvailableException;
import org.jboss.tools.openshift.express.client.OpenShiftException;
import org.jboss.tools.openshift.express.internal.client.Cartridge;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
@@ -172,6 +173,10 @@
wizardModel.createApplication();
applicationCreated.offer(true);
return Status.OK_STATUS;
+ } catch (OpenShiftApplicationNotAvailableException e) {
+ applicationCreated.offer(false);
+ return OpenShiftUIActivator.createErrorStatus(e.getMessage(), e,
+ wizardModel.getName());
} catch (OpenShiftException e) {
applicationCreated.offer(false);
return OpenShiftUIActivator.createErrorStatus("Could not create application \"{0}\"", (Throwable)e,
13 years, 1 month