JBoss Tools SVN: r41244 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-22 07:16:09 -0400 (Tue, 22 May 2012)
New Revision: 41244
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
Log:
changed to different overload WizardUtils#runInWizard(job, container) (was: WizardUtils#runInWizard(job, null, container)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-05-22 10:36:15 UTC (rev 41243)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-05-22 11:16:09 UTC (rev 41244)
@@ -23,7 +23,6 @@
import org.jboss.ide.eclipse.as.ui.editor.DeploymentTypeUIUtil.ICompletable;
import org.jboss.ide.eclipse.as.ui.editor.DeploymentTypeUIUtil.NewServerWizardBehaviourCallback;
import org.jboss.tools.common.ui.WizardUtils;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
public class ExpressWizardFragment extends WizardFragment implements ICompletable {
private ExpressDetailsComposite composite;
@@ -51,7 +50,7 @@
// depends on COMMON, DAMN
IWizardContainer container = ((WizardPage)handle).getWizard().getContainer();
try {
- WizardUtils.runInWizard(j, null, container);
+ WizardUtils.runInWizard(j, container);
} catch(Exception e) {
// TODO clean
}
12 years, 7 months
JBoss Tools SVN: r41243 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 06:36:15 -0400 (Tue, 22 May 2012)
New Revision: 41243
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
ArchivesView added into IDELabel
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-05-22 10:24:17 UTC (rev 41242)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-05-22 10:36:15 UTC (rev 41243)
@@ -548,6 +548,12 @@
}
+ public static class ArchivesView {
+
+ public static final String BUTTON_BUILD_ARCHIVE_NODE = "Build Archive Node";
+
+ }
+
public static class DroolsEditor {
public static final String TEXT_EDITOR_TAB = "Text Editor";
12 years, 7 months
JBoss Tools SVN: r41241 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 06:13:46 -0400 (Tue, 22 May 2012)
New Revision: 41241
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java
Log:
Example test included in suite
Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java 2012-05-22 10:13:16 UTC (rev 41240)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesAllBotTests.java 2012-05-22 10:13:46 UTC (rev 41241)
@@ -20,7 +20,7 @@
*/
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
-
+ ExampleTest.class
})
public class ArchivesAllBotTests {
12 years, 7 months
JBoss Tools SVN: r41240 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 06:13:16 -0400 (Tue, 22 May 2012)
New Revision: 41240
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ExampleTest.java
Log:
Example test to try hudson job
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ExampleTest.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ExampleTest.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ExampleTest.java 2012-05-22 10:13:16 UTC (rev 41240)
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test;
+
+import java.util.List;
+
+import org.jboss.tools.archives.ui.bot.test.dialog.ArchivePublishSettingsDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.EditArchiveDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.NewJarDialog;
+import org.jboss.tools.archives.ui.bot.test.view.ProjectArchivesView;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+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.entity.JavaProjectEntity;
+import org.junit.Test;
+
+@Require(perspective = "Java",
+ server = @Server(state = ServerState.NotRunning))
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class ExampleTest extends SWTTestExt {
+
+ @Test
+ public void testDefault() {
+
+// String projectName = "project";
+// String archiveNodeText = projectName + ".jar" + " [/" + projectName + "]";
+//
+// /* create new java project */
+// JavaProjectEntity projectEntity = new JavaProjectEntity();
+// projectEntity.setProjectName(projectName);
+// eclipse.createJavaProject(projectEntity);
+//
+// /* open archive view */
+// ProjectArchivesView view = new ProjectArchivesView();
+// view.show();
+// projectExplorer.selectProject(projectName);
+//
+// /* create jar archive with default values */
+// NewJarDialog dialog = view.createNewJarArchive(projectName);
+// dialog.finish();
+//
+// /* build the project with Project Archives view */
+// view.buildProjectFull(projectName);
+//
+// /* build the archive with Project Archives view */
+// view.buildArchiveFull(projectName, archiveNodeText);
+//
+// /* edit the archive with no change */
+// EditArchiveDialog dialog2 = view.editArchive(projectName, archiveNodeText);
+// dialog2.cancel();
+//
+// /* open publish dialog */
+// ArchivePublishSettingsDialog publishDialog =
+// view.publishToServer(projectName, archiveNodeText);
+//
+// /* try some actions in dialog */
+// publishDialog.checkAlwaysPublish();
+// publishDialog.checkAutoDeploy();
+// publishDialog.uncheckAutoDeploy();
+// publishDialog.uncheckAlwaysPublish();
+//
+// List<String> servers = publishDialog.getAllServersInDialog();
+//
+// assertTrue(servers.size() == 1);
+// assertTrue(servers.get(0).equals(configuredState.getServer().name));
+//
+// String[] strArray = new String[servers.size()];
+// servers.toArray(servers.toArray(strArray));
+// publishDialog.selectServers(strArray);
+// publishDialog.unselectServers(strArray);
+// publishDialog.cancel();
+//
+// /* delete the archive */
+// view.deleteArchive(projectName, archiveNodeText);
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r41239 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 05:24:03 -0400 (Tue, 22 May 2012)
New Revision: 41239
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchivePublishSettingsDialog.java
Log:
Class to work with Publish dialog for Project Archive
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchivePublishSettingsDialog.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchivePublishSettingsDialog.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchivePublishSettingsDialog.java 2012-05-22 09:24:03 UTC (rev 41239)
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.dialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class ArchivePublishSettingsDialog {
+
+ private SWTBotShell shell = null;
+ private SWTBot bot = null;
+ private final String DIALOG_TITLE = "Archive Publish Settings";
+
+
+ public ArchivePublishSettingsDialog() {
+ shell = SWTBotFactory.getBot().shell(getDialogTitle());
+ bot = shell.bot();
+ }
+
+ private String getDialogTitle() {
+ return DIALOG_TITLE;
+ }
+
+ public List<String> getAllServersInDialog() {
+ List<String> serversInDialog = new ArrayList<String>();
+ for (int i = 0; i < table().rowCount(); i++) {
+ serversInDialog.add(table().getTableItem(i).getText());
+ }
+ return serversInDialog;
+ }
+
+ public List<String> getAllSelectedServersInDialog() {
+ /* TODO */
+ List<String> selectedServers = new ArrayList<String>();
+ return selectedServers;
+ }
+
+ public ArchivePublishSettingsDialog selectServers(String... serversToSelect) {
+ table().select(serversToSelect);
+ return this;
+ }
+
+ public ArchivePublishSettingsDialog unselectServers(String... serversToUnselect) {
+ /* get all selected servers - for future use */
+ List<String> selectedServers = getAllSelectedServersInDialog();
+
+ /* unselect all servers */
+ table().unselect();
+
+ /* from all selected servers remove the ones that should be unselected */
+ for (int i = 0; i < serversToUnselect.length; i++) {
+ selectedServers.remove(serversToUnselect[i]);
+ }
+
+ /* select rest of the servers in selectedServers */
+ String[] strArray = new String[selectedServers.size()];
+ selectedServers.toArray(strArray);
+ table().select(strArray);
+
+ return this;
+ }
+
+ public ArchivePublishSettingsDialog checkAlwaysPublish() {
+ this.bot.checkBox(0).select();
+ return this;
+ }
+
+ public ArchivePublishSettingsDialog uncheckAlwaysPublish() {
+ this.bot.checkBox(0).deselect();
+ return this;
+ }
+
+ public ArchivePublishSettingsDialog checkAutoDeploy() {
+ this.bot.checkBox(1).select();
+ return this;
+ }
+
+ public ArchivePublishSettingsDialog uncheckAutoDeploy() {
+ this.bot.checkBox(1).deselect();
+ return this;
+ }
+
+ private SWTBotTable table() {
+ return this.bot.table();
+ }
+
+ public void cancel() {
+ bot.button("Cancel").click();
+ }
+
+ public void finish() {
+ bot.button("Finish").click();
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r41238 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-22 05:16:42 -0400 (Tue, 22 May 2012)
New Revision: 41238
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
Log:
JBIDE-9893
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java 2012-05-22 09:14:10 UTC (rev 41237)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java 2012-05-22 09:16:42 UTC (rev 41238)
@@ -77,7 +77,7 @@
if( SERVER_EAP_43.equals(typeId) || EAP_43.equals(typeId))
return new JBossExtendedProperties(adaptable);
if( SERVER_EAP_50.equals(typeId) || EAP_50.equals(typeId))
- return new JBossExtendedProperties(adaptable);
+ return new JBossAS6ExtendedProperties(adaptable);
if( SERVER_AS_70.equals(typeId) || AS_70.equals(typeId))
return new JBossAS7ExtendedProperties(adaptable);
12 years, 7 months
JBoss Tools SVN: r41237 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 05:14:10 -0400 (Tue, 22 May 2012)
New Revision: 41237
Modified:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml
Log:
Archives bot test are now mavenized
Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml 2012-05-22 09:13:50 UTC (rev 41236)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/pom.xml 2012-05-22 09:14:10 UTC (rev 41237)
@@ -13,15 +13,65 @@
<properties>
<coverage.filter>org.jboss.ide.eclipse.archives.ui*</coverage.filter>
<emma.instrument.bundles>org.jboss.ide.eclipse.archives.ui</emma.instrument.bundles>
+ <additionalSystemProperties></additionalSystemProperties>
+ <systemProperties>${additionalSystemProperties} -Dswtbot.test.properties.file=${project.basedir}/properties/swtbot.properties</systemProperties>
</properties>
+ <profiles>
+ <profile>
+ <id>debug</id>
+ <properties>
+ <additionalSystemProperties>-Xdebug
+ -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y</additionalSystemProperties>
+ </properties>
+ </profile>
+ </profiles>
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-dist</artifactId>
+ <version>7.1.1.Final</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/requirements</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
+ <testSuite>org.jboss.tools.archives.ui.bot.test</testSuite>
+ <testClass>org.jboss.tools.archives.ui.bot.test.ArchivesAllBotTests</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.archives.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
</configuration>
</plugin>
</plugins>
12 years, 7 months
JBoss Tools SVN: r41236 - in trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test: view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 05:13:50 -0400 (Tue, 22 May 2012)
New Revision: 41236
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java
Log:
Class for work with Project Archives view
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java 2012-05-22 09:13:50 UTC (rev 41236)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.view;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.archives.ui.bot.test.context.ArchiveContextMenu;
+import org.jboss.tools.archives.ui.bot.test.dialog.ArchivePublishSettingsDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.EditArchiveDialog;
+import org.jboss.tools.archives.ui.bot.test.dialog.NewJarDialog;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.JBossToolsProjectarchives;
+import org.jboss.tools.ui.bot.ext.helper.TreeHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.ViewBase;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class ProjectArchivesView extends ViewBase {
+
+ private ArchiveContextMenu contextTool = null;
+
+ public ProjectArchivesView() {
+ super();
+ viewObject = JBossToolsProjectarchives.LABEL;
+ contextTool = new ArchiveContextMenu();
+ }
+
+ public void buildArchiveNode(String... path) {
+ open.selectTreeNode(this.bot(), path);
+ show().toolbarButton(IDELabel.ArchivesView.BUTTON_BUILD_ARCHIVE_NODE).click();
+ }
+
+ public NewJarDialog createNewJarArchive(String project) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = tree.getTreeItem(project);
+ return contextTool.createNewJarArchive(tree, treeItem);
+ }
+
+ public void buildProjectFull(String project) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = tree.getTreeItem(project);
+ contextTool.buildProjectFull(tree, treeItem);
+ }
+
+ public void buildArchiveFull(String... pathToArchive) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = TreeHelper.expandNode(this.bot(), pathToArchive);
+ contextTool.buildArchiveFull(tree, treeItem);
+ }
+
+ public EditArchiveDialog editArchive(String... pathToArchive) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = TreeHelper.expandNode(this.bot(), pathToArchive);
+ return contextTool.editArchive(tree, treeItem);
+ }
+
+ public void deleteArchive(String... pathToArchive) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = TreeHelper.expandNode(this.bot(), pathToArchive);
+ contextTool.deleteArchive(tree, treeItem);
+ }
+
+ public ArchivePublishSettingsDialog publishToServer(String... pathToArchive) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = TreeHelper.expandNode(this.bot(), pathToArchive);
+ return contextTool.publishToServer(tree, treeItem);
+ }
+
+ public ArchivePublishSettingsDialog editPublishSettings(String... pathToArchive) {
+ SWTBotTree tree = this.bot().tree();
+ SWTBotTreeItem treeItem = TreeHelper.expandNode(this.bot(), pathToArchive);
+ return contextTool.editPublishSettings(tree, treeItem);
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r41235 - trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 05:13:22 -0400 (Tue, 22 May 2012)
New Revision: 41235
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/EditArchiveDialog.java
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/NewJarDialog.java
Log:
Two main dialogs for Project Archives
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/EditArchiveDialog.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/EditArchiveDialog.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/EditArchiveDialog.java 2012-05-22 09:13:22 UTC (rev 41235)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.dialog;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class EditArchiveDialog extends ArchiveCreationDialogBase {
+
+ public EditArchiveDialog() {
+ super();
+ }
+
+ @Override
+ public String getDialogTitle() {
+ return "Edit Archive";
+ }
+
+}
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/NewJarDialog.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/NewJarDialog.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/NewJarDialog.java 2012-05-22 09:13:22 UTC (rev 41235)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.dialog;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public class NewJarDialog extends ArchiveCreationDialogBase {
+
+ public NewJarDialog() {
+ super();
+ }
+
+ @Override
+ public String getDialogTitle() {
+ return "New JAR";
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r41234 - in trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test: dialog and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-22 05:12:49 -0400 (Tue, 22 May 2012)
New Revision: 41234
Added:
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/
trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchiveCreationDialogBase.java
Log:
Base for EditArchiveDialog and NewJarDialog - only change is in Shell name
Added: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchiveCreationDialogBase.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchiveCreationDialogBase.java (rev 0)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/dialog/ArchiveCreationDialogBase.java 2012-05-22 09:12:49 UTC (rev 41234)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.archives.ui.bot.test.dialog;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+/**
+ *
+ * @author jjankovi
+ *
+ */
+public abstract class ArchiveCreationDialogBase {
+
+ private SWTBotShell shell = null;
+ private SWTBot bot = null;
+
+ public ArchiveCreationDialogBase() {
+ shell = SWTBotFactory.getBot().shell(getDialogTitle());
+ bot = shell.bot();
+ }
+
+ public ArchiveCreationDialogBase setArchiveName(String archiveName) {
+ String newArchiveName = archiveName.contains(".jar")?
+ archiveName:archiveName + ".jar";
+ bot.textWithLabel("Archive name:").setText(newArchiveName);
+ return this;
+ }
+
+ public ArchiveCreationDialogBase setDestination(String location) {
+ bot.textWithLabel("Destination:").setText(location);
+ return this;
+ }
+
+ public ArchiveCreationDialogBase setFileSystemRelative() {
+ bot.radio(0).click();
+ return this;
+ }
+
+ public ArchiveCreationDialogBase setWorkspaceRelative() {
+ bot.radio(1).click();
+ return this;
+ }
+
+ public ArchiveCreationDialogBase setZipStandardArchiveType() {
+ bot.radio(2).click();
+ return this;
+ }
+
+ public ArchiveCreationDialogBase setNoCompressionArchiveType() {
+ bot.radio(3).click();
+ return this;
+ }
+
+ public void cancel() {
+ bot.button("Cancel").click();
+ }
+
+ public void finish() {
+ bot.button("Finish").click();
+ }
+
+ public abstract String getDialogTitle();
+
+}
12 years, 7 months