JBoss Tools SVN: r36900 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-12-02 14:09:24 -0500 (Fri, 02 Dec 2011)
New Revision: 36900
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.png
Log:
Updated JBoss Server Icon
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.png
===================================================================
(Binary files differ)
14 years
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)
14 years
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);
}
14 years
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();
+ }
}
14 years
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;
}
14 years
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>
14 years
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>
14 years
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>
14 years
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);
- }
-
- }
-}
14 years
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,
14 years