JBoss Tools SVN: r21984 - in trunk/jst/tests: org.jboss.tools.ui.bot.ext.test and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-05-10 06:44:17 -0400 (Mon, 10 May 2010)
New Revision: 21984
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.classpath
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.project
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.eclipse.jdt.core.prefs
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.jboss.ide.eclipse.as.core.prefs
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/META-INF/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/bin/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/build.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/resources/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/log4j.xml
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
Log:
added test plugin for swtbot extensions
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.classpath
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.classpath (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.classpath 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.project (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.project 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.ui.bot.ext.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.eclipse.jdt.core.prefs 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,8 @@
+#Mon Aug 31 15:12:26 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.jboss.ide.eclipse.as.core.prefs
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.jboss.ide.eclipse.as.core.prefs (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/.settings/org.jboss.ide.eclipse.as.core.prefs 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,3 @@
+#Fri May 07 11:17:03 CEST 2010
+eclipse.preferences.version=1
+org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/META-INF/MANIFEST.MF 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WebService SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.ws.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.ui.bot.ext.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.log4j;bundle-version="1.2.13",
+ org.jboss.tools.ui.bot.ext,
+ org.eclipse.jdt.ui,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.eclipse.ui.ide;bundle-version="3.5.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.junit4;bundle-version="4.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Eclipse-RegisterBuddy: org.apache.log4j
+Bundle-ClassPath: .
+Export-Package: org.jboss.tools.ui.bot.ext.test
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/build.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/build.properties (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/build.properties 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,5 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/log4j.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/log4j.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/log4j.xml 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <!--
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ -->
+ <param name="ConversionPattern"
+ value="(%C{1}.java:%L) - %m%n" />
+
+ </layout>
+ </appender>
+
+ <appender name="fileAppender" class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) - %m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender" class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/Activator.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 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.ui.bot.ext.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ui.bot.ext.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDefaultServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,55 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class AnnotatedDefaultServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ @Test
+ public void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedDisabledServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,39 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+
+@SWTBotTestRequires(server=(a)Server(state=ServerState.Disabled))
+public class AnnotatedDisabledServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(!configuredState.getServer().isRunning);
+ assertTrue(!configuredState.getServer().isConfigured);
+ assertNull(configuredState.getServer().version);
+ assertNull(configuredState.getServer().type);
+ assertNull(configuredState.getServer().name);
+ assertNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverDoesNotExist() {
+ assertTrue(!servers.show().bot().tree().hasItems());
+ }
+
+ @Test
+ public void runtimeDoesNotExist() {
+ SWTBot wiz = open
+ .preferenceOpen(ActionItem.Preference.ServerRuntimeEnvironments.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ assertTrue(tbRuntimeEnvironments.rowCount()==0);
+ open.closeCancel(wiz);
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedEPPServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,56 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.EPP),perspective="Java EE")
+public class AnnotatedEPPServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ @Test
+ public void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedJbossASServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,56 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=(a)Server(type=ServerType.JbossAS),perspective="Java EE")
+public class AnnotatedJbossASServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ @Test
+ public void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedNotRunningServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,58 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=(a)Server(state=ServerState.NotRunning),perspective="Java EE")
+public class AnnotatedNotRunningServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(!configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ @Test
+ public void serverNotRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertFalse(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.START, false)).isEnabled());
+ }
+ }
+
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithESB.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,44 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+
+@SWTBotTestRequires(esb=@ESB(),perspective="Java EE")
+public class AnnotatedWithESB extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getEsb().isConfiured);
+ assertNotNull(configuredState.getEsb().version);
+ assertNotNull(configuredState.getEsb().name);
+
+ }
+
+ @Test
+ public void runtimeExists() {
+ boolean found=false;
+ SWTBot bot = open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ configuredState.getEsb().name)) {
+ found = true;
+ break;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ assertTrue(found);
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnnotatedWithSeam.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,42 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.junit.Test;
+
+@SWTBotTestRequires(seam=@Seam(),perspective="Java EE")
+public class AnnotatedWithSeam extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getSeam().isConfiured);
+ assertNotNull(configuredState.getSeam().version);
+ assertNotNull(configuredState.getSeam().name);
+
+ }
+
+ @Test
+ public void runtimeExists() {
+ boolean found=false;
+ SWTBot bot = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0) {
+ int currentRow = 0;
+ while (currentRow < numRows) {
+ if (tbRuntimeEnvironments.cell(currentRow, 1).equalsIgnoreCase(
+ configuredState.getSeam().name)) {
+ found = true;
+ break;
+ } else {
+ currentRow++;
+ }
+ }
+ }
+ assertTrue(found);
+ }
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/AnonatedRunningServer.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,56 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=(a)Server(state=ServerState.Running),perspective="Java EE")
+public class AnonatedRunningServer extends SWTTestExt {
+
+ @Test
+ public void configuredState() {
+ assertTrue(configuredState.getServer().isRunning);
+ assertTrue(configuredState.getServer().isConfigured);
+ assertNotNull(configuredState.getServer().version);
+ assertNotNull(configuredState.getServer().type);
+ assertNotNull(configuredState.getServer().name);
+ assertNotNull(configuredState.getServer().withJavaVersion);
+ }
+
+ @Test
+ public void serverExists() {
+ boolean found=false;
+ for (SWTBotTreeItem item : servers.show().bot().tree().getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue(found);
+ }
+
+ @Test
+ public void serverRunning() {
+ SWTBotTreeItem server =null;
+ SWTBotTree tree = servers.show().bot().tree();
+ for (SWTBotTreeItem item : tree.getAllItems()) {
+ if (item.getText().startsWith(configuredState.getServer().name)) {
+ server = item;
+ break;
+ }
+ }
+ if (server!=null) {
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, server);
+ assertTrue(new SWTBotMenu(ContextMenuHelper.getContextMenu(tree, IDELabel.Menu.STOP, false)).isEnabled());
+ }
+ }
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/ClassWithoutTests.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,8 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+
+@SWTBotTestRequires()
+public class ClassWithoutTests {
+
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/NotAnnotated.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,11 @@
+package org.jboss.tools.ui.bot.ext.test.config;
+
+import org.junit.Test;
+
+public class NotAnnotated {
+
+ @Test
+ public void testMustRun() {
+
+ }
+}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext.test/src/org/jboss/tools/ui/bot/ext/test/config/Suite.java 2010-05-10 10:44:17 UTC (rev 21984)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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.ui.bot.ext.test.config;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses( {
+ NotAnnotated.class,
+ //ClassWithoutTests.class,
+ AnnotatedDefaultServer.class,
+ AnnotatedEPPServer.class,
+ AnnotatedJbossASServer.class,
+ AnnotatedNotRunningServer.class,
+ AnnotatedDefaultServer.class,
+ AnnotatedWithESB.class,
+ AnnotatedDisabledServer.class,
+ AnonatedRunningServer.class,
+ AnnotatedWithSeam.class,
+})
+(a)RunWith(RequirementAwareSuite.class)
+public class Suite {
+
+}
15 years, 11 months
JBoss Tools SVN: r21983 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-05-10 06:28:46 -0400 (Mon, 10 May 2010)
New Revision: 21983
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
Log:
SWTbot extensions :config debug info minifix
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-10 10:16:54 UTC (rev 21982)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-10 10:28:46 UTC (rev 21983)
@@ -101,7 +101,7 @@
private static void printConfig(String propName, Object bean) {
if (bean == null) {
log.info("Property " + propName
- + " not found, server not configured");
+ + " not found, "+propName+" not configured");
} else {
log.info("Configured " + bean.toString());
}
15 years, 11 months
JBoss Tools SVN: r21982 - in trunk/jst/tests/org.jboss.tools.ui.bot.ext: src/org/jboss/tools/ui/bot/ext and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-05-10 06:16:54 -0400 (Mon, 10 May 2010)
New Revision: 21982
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/JavaBean.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
Log:
SWTbot extensions : support EPP, print configuration debug info, all config props are optional now, major changes of JAVA config property
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-05-10 10:16:54 UTC (rev 21982)
@@ -1,9 +1,10 @@
# SWTBotTest properties
-# all defined paths should exist
-JAVA_HOME_15=/usr/java/jdk-1.5.0_12/jre
-JAVA_HOME_16=/opt/sun-jdk-1.6.0.19/jre
-# EAP|JBOSS_AS,<server version>,<jre version to run with>|default,<server home>
+# all properties are optional, all defined paths should exist
+# <java version>,<jre/jdk home>
+JAVA=1.6,/opt/sun-jdk-1.6.0.19/jre
+#EAP|JBOSS_AS|EPP,<server version>,<jre version to run with>|default,<server home>
SERVER=EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as
#<seam version>,<seam runtime home>
SEAM=2.2,/data/jboss/jboss-eap-5.0/seam
+#<esb versoin>,<esb runtime home>
ESB=4.7,/data/jboss/esb-4.7
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -87,13 +87,11 @@
+ "' - incorrect configuration");
return null;
}
- log.info("Returning runner for test class "
- + klass.getCanonicalName());
- // ensure creating runner instance
- Runner runner = new ReqAwareClassRunner(klass, reqs);
+ log.info("Returning runner for class '"
+ + klass.getCanonicalName()+"'");
// increment number of tests planned to run by 1 (class contains at least 1 test method)
cleanUp.incrPlanned();
- return runner;
+ return new ReqAwareClassRunner(klass, reqs);
}
log.info("Skipping class '" + klass.getCanonicalName()
+ "' - annotations do not met configuration");
@@ -136,6 +134,7 @@
@Override
public void testFinished(Description description) throws Exception {
incrFinished();
+ log.info("Finished test : "+description.getDisplayName());
log.info("Finished tests : "+getFinished()+"/"+getPlanned());
if (getFinished() >= getPlanned()) {
log.info("All tests finished, performing cleanup requirements ");
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -162,6 +162,10 @@
*/
JbossAS,
/**
+ * EAP with portal
+ */
+ EPP,
+ /**
* all server types acceptable
*/
ALL
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -6,6 +6,9 @@
public static ESBBean fromString(String propValue) throws Exception{
try {
+ if (propValue==null) {
+ return null;
+ }
String[] esbParams = propValue.split(",");
ESBBean bean = new ESBBean();
bean.esbHome=esbParams[1];
@@ -16,4 +19,9 @@
throw new Exception("Cannot parse ESB property line",ex);
}
}
+ @Override
+ public String toString() {
+ return String.format("ESB runtime version=%s, home=%s",
+ this.version, this.esbHome);
+ }
}
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/JavaBean.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/JavaBean.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/JavaBean.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -0,0 +1,27 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+public class JavaBean {
+ public String version;
+ public String javaHome;
+
+ public static JavaBean fromString(String propValue) throws Exception{
+ try {
+ if (propValue==null) {
+ return null;
+ }
+ String[] esbParams = propValue.split(",");
+ JavaBean bean = new JavaBean();
+ bean.javaHome=esbParams[1];
+ bean.version=esbParams[0];
+ return bean;
+ }
+ catch (Exception ex) {
+ throw new Exception("Cannot parse JAVA property line",ex);
+ }
+ }
+ @Override
+ public String toString() {
+ return String.format("JAVA runtime version=%s, home=%s",
+ this.version, this.javaHome);
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/JavaBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/SeamBean.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -1,21 +1,28 @@
package org.jboss.tools.ui.bot.ext.config;
-
public class SeamBean {
public String version;
public String seamHome;
-
- public static SeamBean fromString(String propValue) throws Exception{
+
+ public static SeamBean fromString(String propValue) throws Exception {
try {
+ if (propValue == null) {
+ return null;
+ }
String[] seamParams = propValue.split(",");
SeamBean bean = new SeamBean();
- bean.seamHome=seamParams[1];
- bean.version=seamParams[0];
+ bean.seamHome = seamParams[1];
+ bean.version = seamParams[0];
return bean;
- }
- catch (Exception ex) {
- throw new Exception("Cannot parse SEAM property line",ex);
- }
+ } catch (Exception ex) {
+ throw new Exception("Cannot parse SEAM property line", ex);
+ }
}
+
+ @Override
+ public String toString() {
+ return String.format("Seam runtime version=%s, home=%s",
+ this.version, this.seamHome);
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ServerBean.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -10,12 +10,8 @@
public String version;
public String runtimeHome;
public String withJavaVersion;
- public ServerType type;
+ public String type;
- public enum ServerType {
- EAP,
- JBOSS_AS
- }
/**
* creates bean instance from property string
* @param propValue property value
@@ -24,17 +20,24 @@
*/
public static ServerBean fromString(String propValue) throws Exception {
try {
+ if (propValue==null) {
+ return null;
+ }
String[] serverParams = propValue.split(",");
ServerBean bean = new ServerBean();
bean.withJavaVersion = serverParams[2];
bean.runtimeHome=serverParams[3];
bean.version=serverParams[1];
- bean.type = Enum.valueOf(ServerType.class, serverParams[0]);
+ bean.type = serverParams[0];
return bean;
}
catch (Exception ex) {
throw new Exception("Cannot parse SERVER property line",ex);
}
}
+ @Override
+ public String toString() {
+ return String.format("Server type=%s,version=%s,home=%s,withJava=%s", this.type,this.version,this.runtimeHome,this.withJavaVersion);
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -22,17 +22,17 @@
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
public class TestConfigurator {
- private static final Logger log = Logger
- .getLogger(TestConfigurator.class);
+ private static final Logger log = Logger.getLogger(TestConfigurator.class);
+
public class Keys {
public static final String SERVER = "SERVER";
public static final String SEAM = "SEAM";
- public static final String JAVA_HOME_15 = "JAVA_HOME_15";
- public static final String JAVA_HOME_16 = "JAVA_HOME_16";
+ public static final String JAVA = "JAVA";
public static final String ESB = "ESB";
}
public class Values {
+ public static final String SERVER_TYPE_EPP = "EPP";
public static final String SERVER_TYPE_EAP = "EAP";
public static final String SERVER_TYPE_JBOSSAS = "JBOSS_AS";
public static final String SERVER_WITH_DEFAULT_JAVA = "default";
@@ -43,6 +43,7 @@
public static ServerBean server;
public static SeamBean seam;
public static ESBBean esb;
+ public static JavaBean java;
static {
try {
// try to load from file first
@@ -51,10 +52,13 @@
if (propFile != null) {
try {
if (new File(propFile).exists()) {
- log.info("Loading exeternaly provided configuration file '"+propFile+"'");
- swtTestProperties.load(new FileInputStream(propFile));
+ log
+ .info("Loading exeternaly provided configuration file '"
+ + propFile + "'");
+ swtTestProperties.load(new FileInputStream(propFile));
} else {
- throw new IOException(SWTBOT_TEST_PROPERTIES_FILE+" "+propFile+" does not exist!");
+ throw new IOException(SWTBOT_TEST_PROPERTIES_FILE + " "
+ + propFile + " does not exist!");
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
@@ -65,7 +69,7 @@
}
} else {
try {
- log.info("Loading default configuration");
+ log.info("Loading default configuration, override by pointing java system property '"+SWTBOT_TEST_PROPERTIES_FILE+"' to your custom property file");
swtTestProperties.load(new FileInputStream(SWTTestExt.util
.getResourceFile(Activator.PLUGIN_ID,
"/SWTBotTest-default.properties")));
@@ -80,38 +84,69 @@
// properties got loaded
try {
+ java = JavaBean.fromString(getProperty(Keys.JAVA));
+ printConfig(Keys.JAVA, java);
server = ServerBean.fromString(getProperty(Keys.SERVER));
+ printConfig(Keys.SERVER, server);
seam = SeamBean.fromString(getProperty(Keys.SEAM));
+ printConfig(Keys.SEAM, seam);
esb = ESBBean.fromString(getProperty(Keys.ESB));
+ printConfig(Keys.ESB, esb);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
-/**
- * check config values if they seem to be valid (existing dirs)
- * @throws FileNotFoundException
- */
- public static boolean checkConfig() {
+
+ private static void printConfig(String propName, Object bean) {
+ if (bean == null) {
+ log.info("Property " + propName
+ + " not found, server not configured");
+ } else {
+ log.info("Configured " + bean.toString());
+ }
+ }
+
+ /**
+ * check config values if they seem to be valid (existing dirs)
+ *
+ * @throws FileNotFoundException
+ */
+ public static boolean checkConfig() {
try {
- checkDirExists(getProperty(Keys.JAVA_HOME_15));
- checkDirExists(getProperty(Keys.JAVA_HOME_16));
- checkDirExists(seam.seamHome);
- checkDirExists(server.runtimeHome);
- checkDirExists(esb.esbHome);
- return true;
- }
- catch (Exception ex) {
- log.error("'"+ex.getMessage()+ "' - incorrect configuration, set your custom properties file via '"+SWTBOT_TEST_PROPERTIES_FILE+"' java property");
+ if (java != null)
+ checkDirExists(java.javaHome);
+ if (seam != null)
+ checkDirExists(seam.seamHome);
+ if (server != null)
+ checkDirExists(server.runtimeHome);
+ if (esb != null)
+ checkDirExists(esb.esbHome);
+ // special checks capturing dependency of server on java
+ if (java==null && server!=null && !server.withJavaVersion.equals(Values.SERVER_WITH_DEFAULT_JAVA)) {
+ throw new Exception("Server is configured to run with java version="+server.withJavaVersion+" but no JAVA is configured");
+ }
+ if (java!=null && !java.version.equals(server.withJavaVersion)) {
+ throw new Exception("Server is configured to run with java version="+server.withJavaVersion+" but JAVA is configured with "+java.version);
+ }
+ return true;
+ } catch (Exception ex) {
+ log
+ .error("'"
+ + ex.getMessage()
+ + "' - incorrect configuration, update your configuraton");
return false;
}
-
+
}
+
private static void checkDirExists(String dir) throws FileNotFoundException {
if (!new File(dir).exists() || !new File(dir).isDirectory()) {
- throw new FileNotFoundException("File '"+dir+"' does not exist or is not directory");
+ throw new FileNotFoundException("File '" + dir
+ + "' does not exist or is not directory");
}
}
+
/**
* returns null when given Server annotation does not match global test
* configuration (e.g. Test wants Server type EAP but we are running on
@@ -122,18 +157,26 @@
* @return StartServer requirement otherwise
*/
private static RequirementBase getServerRequirement(Server s) {
- if (!s.required()) {
+ // tests omitting server must run even when server not configured
+ if (ServerState.Disabled.equals(s.state()) && server == null) {
+ return RequirementBase.createRemoveServer();
+ }
+ if (!s.required() || server == null) {
return null;
- }
+ }
if (!s.type().equals(ServerType.ALL)) {
if (s.type().equals(ServerType.EAP)
- && !server.type.equals(ServerBean.ServerType.EAP)) {
+ && !server.type.equals(Values.SERVER_TYPE_EAP)) {
return null;
}
if (s.type().equals(ServerType.JbossAS)
- && !server.type.equals(ServerBean.ServerType.JBOSS_AS)) {
+ && !server.type.equals(Values.SERVER_TYPE_JBOSSAS)) {
return null;
}
+ if (s.type().equals(ServerType.EPP)
+ && !server.type.equals(Values.SERVER_TYPE_EPP)) {
+ return null;
+ }
}
if (!matches(server.version, s.operator(), s.version())) {
return null;
@@ -160,7 +203,7 @@
* @return AddSeam requirement otherwise
*/
private static RequirementBase getSeamRequirement(Seam s) {
- if (!s.required()) {
+ if (!s.required() || seam == null) {
return null;
}
if (!matches(seam.version, s.operator(), s.version())) {
@@ -168,8 +211,9 @@
}
return RequirementBase.createAddSeam();
}
+
private static RequirementBase getESBRequirement(ESB e) {
- if (!e.required()) {
+ if (!e.required() || esb == null) {
return null;
}
if (!matches(esb.version, e.operator(), e.version())) {
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -1,6 +1,5 @@
package org.jboss.tools.ui.bot.ext.config.requirement;
-import static org.junit.Assert.fail;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
/**
@@ -10,13 +9,11 @@
*/
public class AddJava extends RequirementBase {
- private final String version;
/**
- * requirement for adding JRE
+ * requirement for adding JRE/JDK
* @param version to add
*/
- public AddJava(String version) {
- this.version = version;
+ public AddJava() {
}
@Override
public boolean checkFulfilled() {
@@ -29,20 +26,10 @@
SWTTestExt.configuredState.getJreList().add(getAddedAsName());
}
public String getAddedAsName() {
- return "JRE-"+version;
+ return "JRE-"+TestConfigurator.java.version;
}
private String getJavaHome() {
- if ("1.5".equals(version)) {
- return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_15);
- }
- if ("1.6".equals(version)) {
- return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_16);
- }
- failParsing();
- return null;
+ return TestConfigurator.java.javaHome;
}
- private void failParsing() {
- fail("Unable to add JRE runtime, unsupported verson :"+version);
- }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -17,7 +17,7 @@
import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime;
/**
- * adds server (version and type depends on {@link TestConfigurator#server}
+ * adds server (version and type depends on {@link TestConfigurator#server})
* @author lzoubek
*
*/
@@ -26,8 +26,8 @@
private String javaName=null;
public AddServer() {
String javaVer = getNeededJavaVersion(TestConfigurator.server.withJavaVersion);
- if (javaVer!=null) {
- AddJava addJava = createAddJRE(javaVer);
+ if (javaVer!=null && TestConfigurator.java!=null &&javaVer.equals(TestConfigurator.java.version)) {
+ AddJava addJava = createAddJava();
getDependsOn().add(addJava);
javaName=addJava.getAddedAsName();
}
@@ -36,16 +36,16 @@
@Override
public void handle() {
- ServerInfo serverInfo = getRuntime(TestConfigurator.server.type.toString(),TestConfigurator.server.version);
+ ServerInfo serverInfo = getRuntime(TestConfigurator.server.type,TestConfigurator.server.version);
String runtimeHome=TestConfigurator.server.runtimeHome;
- String runtimeName=TestConfigurator.server.type.toString()+"-"+TestConfigurator.server.version;
+ String runtimeName=TestConfigurator.server.type+"-"+TestConfigurator.server.version;
SWTTestExt.eclipse.addJbossServerRuntime(serverInfo.runtime,
runtimeHome, runtimeName, javaName);
SWTTestExt.eclipse.addServer(serverInfo.server, runtimeName);
SWTTestExt.configuredState.getServer().isConfigured=true;
SWTTestExt.configuredState.getServer().name=runtimeName;
SWTTestExt.configuredState.getServer().version=TestConfigurator.server.version;
- SWTTestExt.configuredState.getServer().type=TestConfigurator.server.type.toString();
+ SWTTestExt.configuredState.getServer().type=TestConfigurator.server.type;
SWTTestExt.configuredState.getServer().withJavaVersion = TestConfigurator.server.withJavaVersion;
}
@@ -77,7 +77,19 @@
JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
}
- } else if (TestConfigurator.Values.SERVER_TYPE_JBOSSAS.equals(serverType)) {
+ }if (TestConfigurator.Values.SERVER_TYPE_EPP.equals(serverType)) {
+ if ("4.3".equals(version)) {
+ return new ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43.LABEL
+ );
+ }
+ if ("5.0".equals(version)) {
+ return new ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
+ }
+
+ }
+ else if (TestConfigurator.Values.SERVER_TYPE_JBOSSAS.equals(serverType)) {
if ("4.2".equals(version)) {
return new ServerInfo(JBossCommunityJBoss42Runtime.LABEL,JBossCommunityJBossAS42.LABEL);
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-05-09 17:22:54 UTC (rev 21981)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-05-10 10:16:54 UTC (rev 21982)
@@ -120,8 +120,8 @@
return req;
}
- public static AddJava createAddJRE(String version) {
- AddJava req = new AddJava(version);
+ public static AddJava createAddJava() {
+ AddJava req = new AddJava();
return req;
}
15 years, 11 months
JBoss Tools SVN: r21981 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-05-09 13:22:54 -0400 (Sun, 09 May 2010)
New Revision: 21981
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/SplitToolBar.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6262: Bottom border of comboboxes in the text editing toolbar is not visible under Windows Vista and Windows 7.
- a workaround is used
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/SplitToolBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/SplitToolBar.java 2010-05-08 19:16:01 UTC (rev 21980)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/SplitToolBar.java 2010-05-09 17:22:54 UTC (rev 21981)
@@ -48,8 +48,12 @@
*/
public abstract class SplitToolBar implements IVpeToolBar {
+ // The height of toolbar is computed wrong in some cases. See JBIDE-6262.
+ // It is SWT bug. To work around it, manually computed height is used.
+ private int maxItemHeight = 0;
+
protected CoolBar coolBar;
- public abstract void createItems(ToolBar bar);
+ protected abstract void createItems(ToolBar bar);
public void createToolBarControl(Composite parent) {
Composite comp = new Composite(parent, SWT.NONE);
@@ -62,10 +66,12 @@
createItems(toolBar);
final CoolItem coolItem = new CoolItem(coolBar, SWT.DROP_DOWN);
coolItem.setControl(toolBar);
+
Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point coolSize = coolItem.computeSize(size.x, size.y);
+ Point coolSize = coolItem.computeSize(size.x, getMaxItemHeight());
coolItem.setSize(coolSize);
+
coolItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
if (event.detail == SWT.ARROW) {
@@ -235,7 +241,8 @@
item = new ToolItem(bar, style);
item.setImage(image);
item.setToolTipText(toolTipText);
-
+ updateMaxItemHeight(item.getBounds().height);
+
return item;
}
@@ -249,6 +256,7 @@
toolTipText, comboItems, selectionIndex);
ToolItem sep = new ToolItem(bar, SWT.SEPARATOR);
sep.setWidth(combo.getSize().x);
+ updateMaxItemHeight(combo.getSize().y);
sep.setControl(combo);
return combo;
@@ -398,4 +406,12 @@
}
return i;
}
+
+ private void updateMaxItemHeight(int oneOfHeights) {
+ maxItemHeight = Math.max(maxItemHeight, oneOfHeights);
+ }
+
+ private int getMaxItemHeight() {
+ return maxItemHeight;
+ }
}
15 years, 11 months
JBoss Tools SVN: r21980 - trunk/jmx/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-05-08 15:16:01 -0400 (Sat, 08 May 2010)
New Revision: 21980
Modified:
trunk/jmx/docs/reference/en-US/tasks.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-49
Managing JBoss AS
Managing JBoss AS Remotely
Establishing Connection
Modified: trunk/jmx/docs/reference/en-US/tasks.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-08 18:26:19 UTC (rev 21979)
+++ trunk/jmx/docs/reference/en-US/tasks.xml 2010-05-08 19:16:01 UTC (rev 21980)
@@ -36,11 +36,11 @@
<title>Managing Application</title>
-<para>Like it's said in earlier in the guide the JMX technology allows to monitor and manage Java applications. In this section we will show you how to get connected to
-a sample java application and run the <property>sayHello()</property> method remotely from inside the <property>MBean Explorer</property>.</para>
+<para>Like it's said earlier in the guide the JMX technology allows to monitor and manage Java applications. In this section we will show you how to get connected to
+a sample Java application and run the <property>sayHello()</property> method remotely from inside of the <property>MBean Explorer</property>.</para>
<orderedlist>
<listitem><para>Unzip the bundle of sample classes.</para></listitem>
-<listitem><para>Compile the example Java classes from within the where you unpacked the files directory.</para>
+<listitem><para>Compile the example Java classes from within where you unpacked the files directory.</para>
<programlisting role="XML"><![CDATA[
javac com/example/*.java
@@ -76,7 +76,7 @@
bar.</para>
</listitem>
- <listitem><para>In the <property>Create JMX Connection</property> dialog, hit <property>Next</property> and then click on the <property>Advanced</property> tab. </para></listitem>
+ <listitem><para>In the <property>Create JMX Connection</property> dialog, hit <property>Next</property> and then click the <property>Advanced</property> tab. </para></listitem>
<listitem><para>In the <property>JMX URL</property> input field enter the following URL:</para>
@@ -175,8 +175,11 @@
</section>
- <section>
- <title>Managing JBoss Instances</title>
+
+
+
+ <section>
+ <title>Managing JBoss AS</title>
<para>Managing JBoss instances is not supported with the <property>JMX Tools</property>
alone. You must also download and install the <property>AS Tools</property> portion of
@@ -184,7 +187,7 @@
tooling, you cannot create a JBoss JMX connection yourself or through the Connection
Wizard. The first step is to create a JBoss Server. The full instructions for this can
be found in the AS Tools section, however, the short summary is: </para>
- <itemizedlist>
+ <orderedlist>
<listitem>
<para>Open the <property>Servers</property> view</para>
</listitem>
@@ -222,10 +225,54 @@
<para>Note that once the server is started, the JMX connection can be
expanded</para>
</listitem>
- </itemizedlist>
+ </orderedlist>
<para>Now you can explore MBeans exposed by a JBoss instance.</para>
</section>
+
+ <section>
+ <title>Managing JBoss AS Remotely</title>
+
+ <para>JBoss JMX Tool allow you to easily get access and mangane JBoss AS server remotely.
+ In order to get connected to the instance of JBoss AS remotely you need to run the server or make sure the server is lauched.
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property>Window > Open Perspective > Other</property>
+ </emphasis> and select the <property>JMX perspective.</property></para>
+ </listitem>
+ <listitem>
+ <para>Switch to the <property>MBean Explorer</property> by going to <emphasis>
+ <property>Window > Show View > Other</property>
+ </emphasis> and selecting the MBean Explorer.</para>
+ </listitem>
+
+ <listitem>
+ <para>Click the <emphasis>
+ <property>New Connection</property></emphasis> icon
+
+ <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/new_connection_icon.png"/>
+ </imageobject>
+ </inlinemediaobject>
+
+ in the <property>MBean Explorer</property> menu
+ bar.</para>
+ </listitem>
+
+ <listitem>
+ <para>Select the <emphasis>
+ <property>Advanced tab</property></emphasis> and set the JMX URL to: </para>
+ <programlisting role="XML"><![CDATA[
+service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
+ ]]></programlisting>
+
+ <para>Please, note that in this example we connected to the local host. </para>
+ </listitem>
+ </orderedlist>
+ </section>
<section id="extensions" xreflabel="extensions">
<title>Extension Task</title>
<para>This section will outline how to contribute your own Server type with some default
@@ -296,7 +343,7 @@
this server is in the connected state only when the server is started. </para>
- <section><title>The Default Connection</title>
+ <section><title>Establishing Connection</title>
<para> There are two ways to connect to an application with remote management enabled:</para>
@@ -315,14 +362,16 @@
<para>Then to follow the simple one you just need to specify host, port (and optionally user
name and password) and click <emphasis>
<property>OK</property>.</emphasis></para>
+ <para>On the <property>Advanced</property> tab you can set the sever name (it will be displayed in <property>MBean Explorer</property>), a url to the remote server.
+ For example, to connect to JBoss AS you need to set the <property>JMX URL</property> to
+ </para>
+ <programlisting role="XML"><![CDATA[
+service:jmx:rmi://localhost/jndi/rmi://localhost:1090/jmxconnector
+ ]]></programlisting>
+ <para>If it is required you can enter user name and password for the server connection.
+ </para>
+
- <para>The default JMX URL is <emphasis>
- <property>service:jmx:rmi:///jndi/rmi://localhost:3000/jmxrmi</property>.</emphasis></para>
-
- <para>In case you need to connect to an application which has not used the "standard" JMX URL
- (e.g. Eclipse Equinox), you need chose more advance way, where it's necessary to specify
- explicitly a JMX URL in the Advanced tab of the JMX Connection window.</para>
-
<note>
<title>Note</title>
<para>Only JMX URL based on RMI are supported.</para>
15 years, 11 months
JBoss Tools SVN: r21979 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-08 14:26:19 -0400 (Sat, 08 May 2010)
New Revision: 21979
Removed:
branches/modular_build/build/svnClientAdapter.jar
branches/modular_build/build/svnant.README.txt
branches/modular_build/build/svnant.jar
branches/modular_build/build/svnkit.jar
Modified:
branches/modular_build/build/build.xml
Log:
better error reporting; no longer need svnant/svnkit (fallback to mvn scm plugin for svn fetch)
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-08 18:22:50 UTC (rev 21978)
+++ branches/modular_build/build/build.xml 2010-05-08 18:26:19 UTC (rev 21979)
@@ -176,7 +176,7 @@
</exec>
</else>
</if>
-
+
<if>
<available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file" />
<then>
@@ -192,12 +192,23 @@
<delete dir="${java.io.tmpdir}/svnant-1.3.0.zip_" includeemptydirs="true" quiet="true" />
</then>
<elseif>
- <not>
- <available file="${COMMON_TOOLS}/svnant.jar" type="file" />
- </not>
+ <or>
+ <not>
+ <available file="${COMMON_TOOLS}/svnant.jar" type="file" />
+ </not>
+ <not>
+ <available file="${COMMON_TOOLS}/svnkit.jar" type="file" />
+ </not>
+ <not>
+ <available file="${COMMON_TOOLS}/svnClientAdapter.jar" type="file" />
+ </not>
+ </or>
<then>
<fail>Error!
-Build cannot proceed - must install svnant.jar + other jars from ${SVNANT_MIRROR}/svnant-1.3.0.zip into ${COMMON_TOOLS}/.
+Build cannot proceed!
+ Must install svnant.jar, svnkit.jar + svnClientAdapter.jar from
+ ${SVNANT_MIRROR}/svnant-1.3.0.zip
+ into ${COMMON_TOOLS}/.
</fail>
</then>
</elseif>
Deleted: branches/modular_build/build/svnClientAdapter.jar
===================================================================
(Binary files differ)
Deleted: branches/modular_build/build/svnant.README.txt
===================================================================
--- branches/modular_build/build/svnant.README.txt 2010-05-08 18:22:50 UTC (rev 21978)
+++ branches/modular_build/build/svnant.README.txt 2010-05-08 18:26:19 UTC (rev 21979)
@@ -1,2 +0,0 @@
-svnant.jar, svnClientAdapter.jar, and svnkit.jar fetched from http://www.tigris.org/files/documents/906/46267/svnant-1.3.0.zip
-Cannot simply fetch file using <get> because Ant get stuck in infinite redirection loop (200 -> 302 -> 200 -> ...)
Deleted: branches/modular_build/build/svnant.jar
===================================================================
(Binary files differ)
Deleted: branches/modular_build/build/svnkit.jar
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Tools SVN: r21978 - in branches/modular_build: build and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-08 14:22:50 -0400 (Sat, 08 May 2010)
New Revision: 21978
Modified:
branches/modular_build/build/build.xml
branches/modular_build/parent-pom.xml
Log:
better fallback support for source checkout/update when svnant / svnkit unavailable
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-08 16:47:19 UTC (rev 21977)
+++ branches/modular_build/build/build.xml 2010-05-08 18:22:50 UTC (rev 21978)
@@ -163,31 +163,20 @@
<target name="get.svnant" unless="svnant.jar.exists">
<property name="SVNANT_MIRROR" value="http://www.tigris.org/files/documents/906/46267" />
<if>
- <os family="windows" />
+ <not>
+ <os family="windows" />
+ </not>
<then>
- <if>
- <available file="${WORKINGDIR}/svnant.jar" type="file" />
- <then>
- <copy todir="${COMMON_TOOLS}" failonerror="true">
- <fileset dir="${WORKINGDIR}" includes="*.jar" />
- </copy>
- </then>
- <else>
- <!-- ant <get> does not work due to 302/200 redirections -->
- <get src="${SVNANT_MIRROR}/svnant-1.3.0.zip"
- dest="${COMMON_TOOLS}/svnant-1.3.0.zip"
- verbose="true"
- usetimestamp="true"
- />
- </else>
- </if>
+ <property name="svnant.enabled" value="false" />
</then>
<else>
+ <property name="svnant.enabled" value="true" />
<exec executable="wget" dir="${COMMON_TOOLS}">
<arg line="${SVNANT_MIRROR}/svnant-1.3.0.zip --no-clobber" />
</exec>
</else>
</if>
+
<if>
<available file="${COMMON_TOOLS}/svnant-1.3.0.zip" type="file" />
<then>
@@ -208,7 +197,7 @@
</not>
<then>
<fail>Error!
-Cannot proceed - must install svnant.jar from ${SVNANT_MIRROR}/svnant-1.3.0.zip into ${COMMON_TOOLS}/.
+Build cannot proceed - must install svnant.jar + other jars from ${SVNANT_MIRROR}/svnant-1.3.0.zip into ${COMMON_TOOLS}/.
</fail>
</then>
</elseif>
@@ -297,26 +286,63 @@
<equals arg1="@{op}" arg2="up" />
<then>
<now level="info">Update @{COMPONENT}</now>
- <svn javahl="false" svnkit="true" failonerror="false">
- <update recurse="${svn.recurse}" dir="@{component}" />
- </svn>
+ <if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true" failonerror="false">
+ <update recurse="${svn.recurse}" dir="@{component}" />
+ </svn>
+ </then>
+ <else>
+ <antcall target="mvn">
+ <param name="MAVEN_DIR" value="${WORKINGDIR}" />
+ <param name="MAVEN_FLAGS"
+ value="scm:update -e -q -B -fae -Dmaven.test.skip -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ />
+ <param name="noXvfb" value="true" />
+ </antcall>
+ </else>
+ </if>
</then>
<else>
<now level="info">Fetch sources from ${svn.root}/@{component} into ${WORKINGDIR}/@{component}</now>
- <svn javahl="false" svnkit="true" failonerror="true">
- <checkout recurse="${svn.recurse}"
- url="${svn.root}/@{component}"
- destpath="${WORKINGDIR}/@{component}"
- />
- </svn>
+ <if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true" failonerror="true">
+ <checkout recurse="${svn.recurse}"
+ url="${svn.root}/@{component}"
+ destpath="${WORKINGDIR}/@{component}"
+ />
+ </svn>
+
+ </then>
+ <else>
+ <antcall target="mvn">
+ <param name="MAVEN_DIR" value="${WORKINGDIR}" />
+ <param name="MAVEN_FLAGS"
+ value="scm:checkout -e -q -B -fae -Dmaven.test.skip -DskipCheckoutIfExists=true -DcheckoutDirectory=${WORKINGDIR}/@{component} -DworkingDirectory=${WORKINGDIR}/@{component} -DconnectionUrl=scm:svn:${svn.root}/@{component} -DdeveloperConnectionUrl=scm:svn:${svn.root}/@{component}"
+ />
+ <param name="noXvfb" value="true" />
+ </antcall>
+ </else>
+ </if>
</else>
</if>
<!-- Store svn info so we can compare it later and thus not need to update or checkout every time -->
- <svn javahl="false" svnkit="true" failonerror="false">
- <info target="${WORKINGDIR}/@{component}" propprefix="svn.info.@{component}" verbose="false" />
- </svn>
<if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true" failonerror="false">
+ <info target="${WORKINGDIR}/@{component}"
+ propprefix="svn.info.@{component}"
+ verbose="false"
+ />
+ </svn>
+ </then>
+ </if>
+ <if>
<isset property="svn.info.(a){component}.rev" />
<then>
<echo file="${WORKINGDIR}/svn.info-(a){component}.txt">svn.info.(a){component}.rev = ${svn.info.(a){component}.rev}
@@ -371,13 +397,18 @@
<then>
<property file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt" />
<!-- check svn info; if new version found, svn up -->
- <svn javahl="false" svnkit="true" failonerror="false">
- <info target="${WORKINGDIR}/@{COMPONENT}"
- propprefix="svn.info.(a){COMPONENT}.check"
- verbose="false"
- />
- </svn>
<if>
+ <istrue value="svnant.enabled" />
+ <then>
+ <svn javahl="false" svnkit="true" failonerror="false">
+ <info target="${WORKINGDIR}/@{COMPONENT}"
+ propprefix="svn.info.(a){COMPONENT}.check"
+ verbose="false"
+ />
+ </svn>
+ </then>
+ </if>
+ <if>
<or>
<not>
<isset property="svn.info.(a){COMPONENT}.rev" />
Modified: branches/modular_build/parent-pom.xml
===================================================================
--- branches/modular_build/parent-pom.xml 2010-05-08 16:47:19 UTC (rev 21977)
+++ branches/modular_build/parent-pom.xml 2010-05-08 18:22:50 UTC (rev 21978)
@@ -37,9 +37,9 @@
<artifactId>maven-scm-plugin</artifactId>
<version>1.0</version>
<configuration>
- <!-- <goals>install</goals> -->
- <skipCheckoutIfExists>true</skipCheckoutIfExists>
- <checkoutDirectory>sources</checkoutDirectory>
+ <useNonInteractive>true</useNonInteractive>
+ <connectionType>connection</connectionType>
+ <!-- <connectionType>developerConnection</connectionType> -->
</configuration>
</plugin>
@@ -50,11 +50,6 @@
<configuration>
<resolver>p2</resolver>
<environments>
- <!-- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment> -->
<environment>
<os>macosx</os>
<ws>cocoa</ws>
@@ -225,6 +220,17 @@
</activation>
<repositories>
<repository>
+ <id>svnkit13</id>
+ <url>http://eclipse.svnkit.com/1.3.x/</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
<id>subclipse16</id>
<url>http://subclipse.tigris.org/update_1.6.x/</url>
<layout>p2</layout>
15 years, 11 months
JBoss Tools SVN: r21977 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-08 12:47:19 -0400 (Sat, 08 May 2010)
New Revision: 21977
Removed:
branches/modular_build/build/svnant.jar.README.txt
Log:
renamed
Deleted: branches/modular_build/build/svnant.jar.README.txt
===================================================================
--- branches/modular_build/build/svnant.jar.README.txt 2010-05-08 16:45:28 UTC (rev 21976)
+++ branches/modular_build/build/svnant.jar.README.txt 2010-05-08 16:47:19 UTC (rev 21977)
@@ -1,3 +0,0 @@
-Fetched from http://www.tigris.org/files/documents/906/46267/svnant-1.3.0.zip
-Cannot simply fetch file using <get> because Ant get stuck in infinite redirection loop (200 -> 302 -> 200 -> ...)
-
15 years, 11 months
JBoss Tools SVN: r21976 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-08 12:45:28 -0400 (Sat, 08 May 2010)
New Revision: 21976
Modified:
branches/modular_build/build/build.xml
Log:
implement workaround for 302 redirect issues when building on Windows: cache a copy of svnant jars locally
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-05-08 16:32:41 UTC (rev 21975)
+++ branches/modular_build/build/build.xml 2010-05-08 16:45:28 UTC (rev 21976)
@@ -168,7 +168,9 @@
<if>
<available file="${WORKINGDIR}/svnant.jar" type="file" />
<then>
- <copy file="${WORKINGDIR}/svnant.jar" todir="${COMMON_TOOLS}" failonerror="true" />
+ <copy todir="${COMMON_TOOLS}" failonerror="true">
+ <fileset dir="${WORKINGDIR}" includes="*.jar" />
+ </copy>
</then>
<else>
<!-- ant <get> does not work due to 302/200 redirections -->
15 years, 11 months
JBoss Tools SVN: r21975 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-05-08 12:32:41 -0400 (Sat, 08 May 2010)
New Revision: 21975
Added:
branches/modular_build/build/svnClientAdapter.jar
branches/modular_build/build/svnant.README.txt
branches/modular_build/build/svnkit.jar
Log:
implement workaround for 302 redirect issues when building on Windows: cache a copy of svnant jars locally
Added: branches/modular_build/build/svnClientAdapter.jar
===================================================================
(Binary files differ)
Property changes on: branches/modular_build/build/svnClientAdapter.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: branches/modular_build/build/svnant.README.txt (from rev 21974, branches/modular_build/build/svnant.jar.README.txt)
===================================================================
--- branches/modular_build/build/svnant.README.txt (rev 0)
+++ branches/modular_build/build/svnant.README.txt 2010-05-08 16:32:41 UTC (rev 21975)
@@ -0,0 +1,2 @@
+svnant.jar, svnClientAdapter.jar, and svnkit.jar fetched from http://www.tigris.org/files/documents/906/46267/svnant-1.3.0.zip
+Cannot simply fetch file using <get> because Ant get stuck in infinite redirection loop (200 -> 302 -> 200 -> ...)
Property changes on: branches/modular_build/build/svnant.README.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/modular_build/build/svnkit.jar
===================================================================
(Binary files differ)
Property changes on: branches/modular_build/build/svnkit.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months