JBoss Tools SVN: r36541 - in trunk/forge/plugins/org.jboss.tools.forge.ui: src/org/jboss/tools/forge/ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-11-22 14:53:40 -0500 (Tue, 22 Nov 2011)
New Revision: 36541
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java
Log:
JBIDE-10203:
- open <file> shows file in editor whether in workspace or not
- open <folder> selects folder in project and/or pacakage explorer if folder is in workspace
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF 2011-11-22 17:42:29 UTC (rev 36540)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/META-INF/MANIFEST.MF 2011-11-22 19:53:40 UTC (rev 36541)
@@ -16,7 +16,8 @@
org.eclipse.jdt.core,
org.eclipse.ui.views,
org.jboss.tools.forge.core;bundle-version="1.0.0",
- org.eclipse.core.filesystem;bundle-version="1.3.100"
+ org.eclipse.core.filesystem;bundle-version="1.3.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.100"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.jboss.tools.forge.ui.ForgeUIPlugin
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java 2011-11-22 17:42:29 UTC (rev 36540)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java 2011-11-22 19:53:40 UTC (rev 36541)
@@ -4,29 +4,33 @@
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.navigator.CommonNavigator;
+import org.eclipse.ui.part.ISetSelectionTarget;
import org.jboss.tools.forge.ui.ForgeUIPlugin;
public class OpenPostProcessor {
public void postProcess(String line, String currentResourcePath) {
- try {
- String resourceToOpen = currentResourcePath + File.separator + line.substring(5).trim();
- IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(resourceToOpen));
- if (fileStore.fetchInfo().isDirectory()) {
- expandDirectoryInExplorer(resourceToOpen);
- } else {
- openFileInEditor(fileStore);
- }
- IWorkbenchPage workbenchPage = ForgeCommandPostProcessorHelper.getActiveWorkbenchPage();
- if (workbenchPage != null) {
- IDE.openEditorOnFileStore(workbenchPage, fileStore);
- }
- } catch (PartInitException e) {
- ForgeUIPlugin.log(e);
+ String resourceToOpen = currentResourcePath + File.separator + line.substring(5).trim();
+ IPath path = new Path(resourceToOpen);
+ IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(resourceToOpen));
+ if (fileStore.fetchInfo().isDirectory()) {
+ expandDirectoryInExplorer(path);
+ } else {
+ openFileInEditor(fileStore);
}
}
@@ -41,8 +45,42 @@
}
}
- private void expandDirectoryInExplorer(String resourceToOpen) {
-
+ private void expandDirectoryInExplorer(IPath path) {
+ IWorkbenchPage workbenchPage = ForgeCommandPostProcessorHelper.getActiveWorkbenchPage();
+ IContainer objectToSelect = ResourcesPlugin.getWorkspace().getRoot().getContainerForLocation(path);
+ if (objectToSelect != null && workbenchPage != null) {
+ IViewPart projectExplorer = workbenchPage.findView("org.eclipse.ui.navigator.ProjectExplorer");
+ if (projectExplorer != null && projectExplorer instanceof CommonNavigator) {
+ expandInProjectExplorer((CommonNavigator)projectExplorer, objectToSelect);
+ }
+ IViewPart packageExplorer = workbenchPage.findView("org.eclipse.jdt.ui.PackageExplorer");
+ if (packageExplorer == null && projectExplorer == null) {
+ try {
+ packageExplorer = workbenchPage.showView("org.eclipse.jdt.ui.PackageExplorer");
+ } catch (PartInitException e) {
+ ForgeUIPlugin.log(e);
+ }
+ }
+ if (packageExplorer != null) {
+ expandInPackageExplorer(packageExplorer, objectToSelect);
+ }
+ }
}
-
+
+ private void expandInProjectExplorer(CommonNavigator projectExplorer, IContainer container) {
+ projectExplorer.selectReveal(new StructuredSelection(container));
+ TreeViewer treeViewer = projectExplorer.getCommonViewer();
+ treeViewer.expandToLevel(container, 1);
+ }
+
+ private void expandInPackageExplorer(IViewPart packageExplorer, IContainer container) {
+ if (packageExplorer instanceof ISetSelectionTarget) {
+ ((ISetSelectionTarget)packageExplorer).selectReveal(new StructuredSelection(container));
+ }
+ Object treeViewer = packageExplorer.getAdapter(ISelectionProvider.class);
+ if (treeViewer != null && treeViewer instanceof TreeViewer) {
+ ((TreeViewer)treeViewer).expandToLevel(JavaCore.create(container), 1);
+ }
+ }
+
}
14 years, 4 months
JBoss Tools SVN: r36540 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-11-22 12:42:29 -0500 (Tue, 22 Nov 2011)
New Revision: 36540
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Fix method isJBDSRun().
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2011-11-22 17:40:40 UTC (rev 36539)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2011-11-22 17:42:29 UTC (rev 36540)
@@ -56,7 +56,7 @@
*/
public static boolean isJBDSRun (){
IProduct prod = Platform.getProduct();
- return prod != null;
+ return ((prod != null) && (prod.getId().startsWith("com.jboss.jbds.")));
}
/*
*
14 years, 4 months
JBoss Tools SVN: r36539 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-11-22 12:40:40 -0500 (Tue, 22 Nov 2011)
New Revision: 36539
Modified:
trunk/build/aggregate/site/site.xml
Log:
fixed Details description for JBoss Tools update site categories. CR and Tabs were removed to make description looks better.
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2011-11-22 17:27:26 UTC (rev 36538)
+++ trunk/build/aggregate/site/site.xml 2011-11-22 17:40:40 UTC (rev 36539)
@@ -181,18 +181,11 @@
</feature>
<category-def name="AbridgedTools" label="Abridged JBoss Tools 3.3">
- <description>Contains most of the JBoss Tools features.
- Excluded are those related to integration with 3rd party
- plugins. Selecting this category will give you all tools
- needed for Web and Seam Development.
- </description>
+ <description>Contains most of the JBoss Tools features. Excluded are those related to integration with 3rd party plugins. Selecting this category will give you all tools needed for Web and Seam Development.</description>
</category-def>
<category-def name="WebTools" label="JBoss Web and Java EE Development">
- <description>Tools to help create web and enterprise applications,
- using JSF, Facelets,
- Seam, Hibernate/JPA, CSS, Webservices and more.
- </description>
+ <description>Tools to help create web and enterprise applications, using JSF, Facelets, Seam, Hibernate/JPA, CSS, Webservices and more.</description>
</category-def>
<category-def name="GeneralTools" label="JBoss Application Development">
@@ -205,17 +198,13 @@
<!-- Only in JBT -->
<category-def name="MavenTools" label="JBoss Maven Support">
- <description>Plugins related to Maven and m2eclipse support. Use these
- to enable use of Maven.</description>
+ <description>Plugins related to Maven and m2eclipse support. Use these to enable use of Maven.</description>
</category-def>
<category-def name="ReportTools" label="JBoss Business Intelligence, Reporting and Charting">
- <description>Business Intelligence, Reporting and Charting. Use these
- if you plan to integrate Hibernate or Seam with Eclipse BIRT.
- </description>
+ <description>Business Intelligence, Reporting and Charting. Use these if you plan to integrate Hibernate or Seam with Eclipse BIRT.</description>
</category-def>
<category-def name="CloudTools" label="JBoss Cloud Development Tools">
- <description>Tools for Cloud Development.
- </description>
+ <description>Tools for Cloud Development.</description>
</category-def>
</site>
14 years, 4 months
JBoss Tools SVN: r36538 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: resources/jsf and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-22 12:27:26 -0500 (Tue, 22 Nov 2011)
New Revision: 36538
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFEnvironment.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFTemplate.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/ELNamedRefactoring.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewJSFProjectWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/JSFWebProjectWizard.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
Log:
Resources + Other needed classes for new CDI test for EL refactoring added
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/ManagedBean.java.cdi 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,16 @@
+package cdi;
+
+import javax.inject.Named;
+
+@Named("bean")
+public class ManagedBean {
+
+ public ManagedBean() {
+
+ }
+
+ public String submit() {
+ return "OK";
+ }
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/jsf/index.xhtml 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<h:head></h:head>
+<body>
+ <h:form>
+ <h:commandButton action="#{bean.submit()}" value="Submit" />
+ </h:form>
+
+</body>
+</html>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -12,6 +12,7 @@
import org.jboss.tools.cdi.bot.test.beansxml.BeansXMLValidationTest;
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
+import org.jboss.tools.cdi.bot.test.jsf.ELNamedRefactoring;
import org.jboss.tools.cdi.bot.test.openon.FindObserverForEventTest;
import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
import org.jboss.tools.cdi.bot.test.quickfix.BeanValidationQuickFixTest;
@@ -48,7 +49,7 @@
* JAVA=1.6,/space/java/sdk/jdk1.6.0_22
*
*
- * Suite duration: aprox. 21min
+ * Suite duration: aprox. 22min
*
* @author Lukas Jungmann
* @author Jaroslav Jankovic
@@ -60,6 +61,7 @@
FacetTest.class,
WizardTest.class,
BeansEditorTest.class,
+ ELNamedRefactoring.class,
BeansXMLValidationTest.class,
// BeansXMLCompletionTest.class,
StereotypeValidationQuickFixTest.class,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -8,14 +8,15 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
+
package org.jboss.tools.cdi.bot.test;
import org.jboss.tools.cdi.bot.test.uiutils.BeansXMLValidationHelper;
import org.jboss.tools.cdi.bot.test.uiutils.CDIProjectHelper;
+import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
import org.jboss.tools.cdi.bot.test.uiutils.LibraryHelper;
import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizard;
import org.junit.After;
import org.junit.Before;
@@ -27,7 +28,7 @@
protected static CDIProjectHelper projectHelper = new CDIProjectHelper();
protected static BeansXMLValidationHelper beansHelper = new BeansXMLValidationHelper();
- protected static CDIWizard wizard = new CDIWizard();
+ protected static CDIWizardHelper wizard = new CDIWizardHelper();
protected static OpenOnHelper openOnUtil = new OpenOnHelper();
protected static LibraryHelper libraryUtil = new LibraryHelper();
protected static EditorResourceHelper editResourceUtil = new EditorResourceHelper();
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFEnvironment.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFEnvironment.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFEnvironment.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,21 @@
+package org.jboss.tools.cdi.bot.test.annotations;
+
+public enum JSFEnvironment {
+
+ JSF_11, JSF_12, JSF_12_FACETS, JSF_20;
+
+ public String getName() {
+ switch (this) {
+ case JSF_11:
+ return "JSF 1.1.02 - Reference Implementation";
+ case JSF_12:
+ return "JSF 1.2";
+ case JSF_12_FACETS:
+ return "JSF 1.2 with Facets";
+ case JSF_20:
+ return "JSF 2.0";
+ default:
+ throw new AssertionError("Unknown type");
+ }
+ }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFTemplate.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFTemplate.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/JSFTemplate.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,18 @@
+package org.jboss.tools.cdi.bot.test.annotations;
+
+public enum JSFTemplate {
+
+ BLANK, KICKSTART;
+
+ public String getName() {
+ switch (this) {
+ case BLANK:
+ return "JSFBlankWithoutLibs";
+ case KICKSTART:
+ return "JSFKickStartWithoutLibs";
+ default:
+ throw new AssertionError("Unknown type");
+ }
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/ELNamedRefactoring.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/ELNamedRefactoring.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/ELNamedRefactoring.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.jsf;
+
+import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+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.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * Test operates on EL named refactoring
+ *
+ * @author Jaroslav Jankovic
+ *
+ */
+
+@Require(clearProjects = true, perspective = "Java EE", server = @Server(state = ServerState.NotRunning, version = "6.0", operator = ">="))
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ CDIAllBotTests.class })
+public class ELNamedRefactoring extends JSFTestBase {
+
+ @Override
+ public String getProjectName() {
+ return "CDIRefactoring";
+ }
+
+ @Test
+ public void testCreateJSFBlankProject() {
+
+ assertTrue(projectHelper.projectExists(getProjectName()));
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.jsf;
+
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.annotations.JSFEnvironment;
+import org.jboss.tools.cdi.bot.test.annotations.JSFTemplate;
+import org.jboss.tools.cdi.bot.test.uiutils.actions.NewJSFProjectWizard;
+import org.junit.Before;
+
+public class JSFTestBase extends CDITestBase {
+
+ private JSFEnvironment env = JSFEnvironment.JSF_11;
+
+ public JSFEnvironment getEnv() {
+ return env;
+ }
+
+ @Before
+ public void checkAndCreateProject() {
+
+ if (!projectHelper.projectExists(getProjectName())) {
+ createJSFProjectWithCDISupport(getProjectName(), getEnv());
+ }
+
+ }
+
+ private void createJSFProjectWithCDISupport(String projectName, JSFEnvironment env) {
+
+ createJSFProject(projectName, env);
+ projectHelper.addCDISupport(projectName);
+
+ }
+
+ private void createJSFProject(String projectName, JSFEnvironment env) {
+ new NewJSFProjectWizard().run().
+ setName(getProjectName()).
+ setEnvironment(env).
+ setJSFTemplate(JSFTemplate.BLANK).finish();
+ util.waitForNonIgnoredJobs();
+ }
+
+}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -14,7 +14,14 @@
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-public class OpenOnBase extends CDITestBase{
+/**
+ * test base for OpenOn-like CDI tests
+ *
+ * @author jjankovi
+ *
+ */
+
+public class OpenOnBase extends CDITestBase {
protected static final String[] events = { "myBean1Q1Event", "myBean1AnyEvent",
"myBean2Q1Event", "myBean2AnyEvent", "myBean1Q2Event",
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -29,8 +29,7 @@
/**
* Method checks if there is validation problem with text
- * specified by parameter validationErrors for entered project
- *
+ * specified by parameter validationErrors for entered project
* @param validationError
* @return
*/
@@ -59,8 +58,7 @@
/**
* Method checks if there is no validation problem when
* creating interceptor component with entered className
- * packageName for project with name projectName
- *
+ * packageName for project with name projectName
* @param projectName
* @param packageName
* @param className
@@ -76,7 +74,6 @@
* Method checks if there is no validation problem when
* creating decorator component with entered className
* packageName for project with name projectName
- *
* @param projectName
* @param packageName
* @param className
@@ -91,8 +88,7 @@
/**
* Method checks if there is no validation problem when
* creating alternative bean component with entered className
- * packageName for project with name projectName
- *
+ * packageName for project with name projectName
* @param projectName
* @param packageName
* @param className
@@ -107,7 +103,6 @@
/**
* Method gets all beans.xml validation errors showed in Problems View
* for entered project
- *
* @return
*/
public SWTBotTreeItem[] getBeansXMLValidationErrors(String projectName) {
@@ -116,8 +111,7 @@
}
/**
- * Methods creates beans.xml with no tags for entered project.
- *
+ * Methods creates beans.xml with no tags for entered project.
* @param projectName
*/
public void createClearBeansXML(String projectName) {
@@ -129,8 +123,7 @@
/**
* Methods creates beans.xml with interceptor tags in it for entered project.
* Package and interceptor component name which should be showed in tag is
- * determined by parameters
- *
+ * determined by parameters
* @param projectName
* @param packageName
* @param className
@@ -147,8 +140,7 @@
/**
* Methods creates beans.xml with decorator tags in it for entered project.
* Package and decorator component name which should be showed in tag is
- * determined by parameters
- *
+ * determined by parameters
* @param projectName
* @param packageName
* @param className
@@ -164,8 +156,7 @@
/**
* Methods creates beans.xml with alternative tags in it for entered project.
* Package and alternative bean component name which should be showed in tag is
- * determined by parameters
- *
+ * determined by parameters
* @param projectName
* @param packageName
* @param className
@@ -181,8 +172,7 @@
/**
* Methods create beans.xml for entered project with content of file
* determined by parameter path. If there is beans.xml in project, its
- * content is simply replaced
- *
+ * content is simply replaced
* @param projectName
* @param path
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -12,12 +12,14 @@
package org.jboss.tools.cdi.bot.test.uiutils;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+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.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.DynamicWebProjectWizard;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
public class CDIProjectHelper extends CDIBase{
@@ -84,7 +86,7 @@
* Method adds CDI support to project with entered name
* @param projectName
*/
- private void addCDISupport(String projectName) {
+ public void addCDISupport(String projectName) {
projectExplorer.selectProject(projectName);
SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem item = tree.getTreeItem(projectName);
@@ -97,4 +99,22 @@
util.waitForNonIgnoredJobs();
}
+ /**
+ * Method checks if entered project has CDI support set
+ * @param projectName
+ * @return
+ */
+ public boolean checkCDISupport(String projectName) {
+ projectExplorer.selectProject(projectName);
+
+ SWTBotTree tree = projectExplorer.bot().tree();
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
+
+ bot.tree().expandNode("CDI (Context and Dependency Injection) Settings").select();
+ boolean isCDISupported = bot.checkBox().isChecked();
+ bot.button("Cancel").click();
+ return isCDISupported;
+ }
+
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIWizardHelper.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.uiutils;
+
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
+
+public class CDIWizardHelper extends CDITestBase{
+
+ private CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
+
+ /**
+ * Method creates Java Annotation with selected name and package
+ * @param name
+ * @param packageName
+ */
+ public void createAnnotation(String name, String packageName) {
+ wizardExt.annotation(open, util, packageName, name);
+ }
+
+ /**
+ * Method creates CDI component with workaround for beans.xml -
+ * if component is beans.xml, editor is not set (there is no active editor by default)
+ * @param component
+ * @param name
+ * @param packageName
+ * @param necessaryParam
+ */
+ public void createCDIComponent(CDIWizardType component, String name,
+ String packageName, String necessaryParam) {
+ createComponent(component, name, packageName, necessaryParam);
+ util.waitForNonIgnoredJobs();
+ /**
+ * if beans.xml is created as first component in project,
+ * it is not opened as default ==> there is no active editor
+ */
+ if (component != CDIWizardType.BEANS_XML) {
+ setEd(bot.activeEditor().toTextEditor());
+ }
+ }
+
+ /**
+ * Method creates larger number("amount") of the same component.
+ * @param component
+ * @param amount
+ * @param baseName
+ * @param packageBaseName
+ * @param necessaryParam
+ * @param differentPackages
+ */
+ public void createCDIComponents(CDIWizardType component, int amount, String baseName,
+ String packageBaseName, String necessaryParam, boolean differentPackages) {
+
+ for (int i = 1; i <= amount; i++) {
+ String packageName = (differentPackages) ? packageBaseName + i : packageBaseName;
+ createCDIComponent(component, baseName + i, packageName, necessaryParam);
+ }
+
+ }
+
+ /**
+ * Method that actually creates CDI component according to parameter
+ * @param component
+ * @param name
+ * @param packageName
+ * @param necessaryParam
+ */
+ private void createComponent(CDIWizardType component, String name,
+ String packageName, String necessaryParam) {
+ switch (component) {
+ case STEREOTYPE:
+ boolean alternative = false;
+ boolean regInBeansXml = false;
+ if (necessaryParam != null) {
+ if (necessaryParam.equals("alternative+beansxml")) {
+ alternative = true;
+ regInBeansXml = true;
+ } else if (necessaryParam.equals("alternative")) {
+ alternative = true;
+ }
+ }
+ wizardExt.stereotype(packageName, name, null, null, false, false, alternative, regInBeansXml,
+ false).finish();
+ break;
+ case QUALIFIER:
+ wizardExt.qualifier(packageName, name, false, false).finish();
+ break;
+ case SCOPE:
+ wizardExt.scope(packageName, name, false, false, true, false).finish();
+ break;
+ case BEAN:
+ alternative = false;
+ regInBeansXml = false;
+ if (necessaryParam != null) {
+ if (necessaryParam.equals("alternative+beansxml")) {
+ alternative = true;
+ regInBeansXml = true;
+ } else if (necessaryParam.equals("alternative")) {
+ alternative = true;
+ }
+ }
+ wizardExt.bean(packageName, name, true, false, false, false, alternative, regInBeansXml, null, null,
+ null, null).finish();
+ break;
+ case INTERCEPTOR:
+ wizardExt.interceptor(packageName, name, null, null, null, false).finish();
+ break;
+ case DECORATOR:
+ wizardExt.decorator(packageName, name, necessaryParam, null, true, false, false, false)
+ .finish();
+ break;
+ case ANNOTATION_LITERAL:
+ wizardExt.annLiteral(packageName, name, true, false, false, false, null).finish();
+ break;
+ case INTERCEPTOR_BINDING:
+ wizardExt.binding(packageName, name, null, true, false).finish();
+ break;
+ case BEANS_XML:
+ wizardExt.beansXML(packageName).finish();
+ break;
+ }
+ }
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewJSFProjectWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewJSFProjectWizard.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewJSFProjectWizard.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,20 @@
+package org.jboss.tools.cdi.bot.test.uiutils.actions;
+
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.JSFWebProjectWizard;
+import org.jboss.tools.cdi.bot.test.uiutils.wizards.Wizard;
+
+public class NewJSFProjectWizard extends NewFileWizardAction {
+
+ public NewJSFProjectWizard() {
+ super();
+ }
+
+ @Override
+ public JSFWebProjectWizard run() {
+ Wizard w = super.run();
+ w.selectTemplate("JBoss Tools Web", "JSF", "JSF Project");
+ w.next();
+ return new JSFWebProjectWizard();
+ }
+
+}
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.cdi.bot.test.uiutils.wizards;
-
-import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-
-public class CDIWizard extends CDITestBase{
-
- private CDIWizardBaseExt wizardExt = new CDIWizardBaseExt();
-
- /**
- * Method creates Java Annotation with selected name and package
- *
- * @param name
- * @param packageName
- */
- public void createAnnotation(String name, String packageName) {
- wizardExt.annotation(open, util, packageName, name);
- }
-
- /**
- * Method creates CDI component with workaround for beans.xml -
- * if component is beans.xml, editor is not set (there is no active editor by default)
- *
- * @param component
- * @param name
- * @param packageName
- * @param necessaryParam
- */
- public void createCDIComponent(CDIWizardType component, String name,
- String packageName, String necessaryParam) {
- createComponent(component, name, packageName, necessaryParam);
- util.waitForNonIgnoredJobs();
- /**
- * if beans.xml is created as first component in project,
- * it is not opened as default ==> there is no active editor
- */
- if (component != CDIWizardType.BEANS_XML) {
- setEd(bot.activeEditor().toTextEditor());
- }
- }
-
- /**
- * Method creates larger number("amount") of the same component.
- *
- * @param component
- * @param amount
- * @param baseName
- * @param packageBaseName
- * @param necessaryParam
- * @param differentPackages
- */
- public void createCDIComponents(CDIWizardType component, int amount, String baseName,
- String packageBaseName, String necessaryParam, boolean differentPackages) {
-
- for (int i = 1; i <= amount; i++) {
- String packageName = (differentPackages) ? packageBaseName + i : packageBaseName;
- createCDIComponent(component, baseName + i, packageName, necessaryParam);
- }
-
- }
-
- /**
- * Method that actually creates CDI component according to parameter
- *
- * @param component
- * @param name
- * @param packageName
- * @param necessaryParam
- */
- private void createComponent(CDIWizardType component, String name,
- String packageName, String necessaryParam) {
- switch (component) {
- case STEREOTYPE:
- boolean alternative = false;
- boolean regInBeansXml = false;
- if (necessaryParam != null) {
- if (necessaryParam.equals("alternative+beansxml")) {
- alternative = true;
- regInBeansXml = true;
- } else if (necessaryParam.equals("alternative")) {
- alternative = true;
- }
- }
- wizardExt.stereotype(packageName, name, null, null, false, false, alternative, regInBeansXml,
- false).finish();
- break;
- case QUALIFIER:
- wizardExt.qualifier(packageName, name, false, false).finish();
- break;
- case SCOPE:
- wizardExt.scope(packageName, name, false, false, true, false).finish();
- break;
- case BEAN:
- alternative = false;
- regInBeansXml = false;
- if (necessaryParam != null) {
- if (necessaryParam.equals("alternative+beansxml")) {
- alternative = true;
- regInBeansXml = true;
- } else if (necessaryParam.equals("alternative")) {
- alternative = true;
- }
- }
- wizardExt.bean(packageName, name, true, false, false, false, alternative, regInBeansXml, null, null,
- null, null).finish();
- break;
- case INTERCEPTOR:
- wizardExt.interceptor(packageName, name, null, null, null, false).finish();
- break;
- case DECORATOR:
- wizardExt.decorator(packageName, name, necessaryParam, null, true, false, false, false)
- .finish();
- break;
- case ANNOTATION_LITERAL:
- wizardExt.annLiteral(packageName, name, true, false, false, false, null).finish();
- break;
- case INTERCEPTOR_BINDING:
- wizardExt.binding(packageName, name, null, true, false).finish();
- break;
- case BEANS_XML:
- wizardExt.beansXML(packageName).finish();
- break;
- }
- }
-
-}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/DynamicWebProjectWizard.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -12,6 +12,9 @@
package org.jboss.tools.cdi.bot.test.uiutils.wizards;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.Timing;
public class DynamicWebProjectWizard extends Wizard {
@@ -24,5 +27,31 @@
setText("Project name:", name);
return this;
}
+
+ public DynamicWebProjectWizard setCDIPreset() {
+ bot().comboBoxInGroup("Configuration", 0).
+ setSelection("Dynamic Web Project with CDI (Context and Dependency Injection)");
+ return this;
+ }
+
+ public DynamicWebProjectWizard setCDIFacet() {
+ clickButton("Modify...");
+ SWTBot bot = bot().shell("Project Facets").bot();
+ setCDIFacetInFacets(bot);
+ bot().sleep(Timing.time1S());
+ return this;
+ }
+
+ private void setCDIFacetInFacets(SWTBot bot) {
+ SWTBotTree tree= bot.tree();
+ for (SWTBotTreeItem ti: tree.getAllItems()) {
+ if (ti.cell(0).contains("CDI (Contexts and Dependency Injection)")) {
+ ti.check();
+ break;
+ }
+ }
+ bot.sleep(Timing.time1S());
+ bot.button("OK").click();
+ }
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/JSFWebProjectWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/JSFWebProjectWizard.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/JSFWebProjectWizard.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.bot.test.uiutils.wizards;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.cdi.bot.test.annotations.JSFEnvironment;
+import org.jboss.tools.cdi.bot.test.annotations.JSFTemplate;
+
+public class JSFWebProjectWizard extends Wizard {
+
+ public JSFWebProjectWizard() {
+ super(new SWTBot().activeShell().widget);
+ assert ("New JSF Project").equals(getText());
+ }
+
+ public JSFWebProjectWizard setName(String name) {
+ setText("Project Name*", name);
+ return this;
+ }
+
+ public JSFWebProjectWizard setEnvironment(JSFEnvironment env) {
+ setTextInCombobox("JSF Environment*", env.getName());
+ return this;
+ }
+
+ public JSFWebProjectWizard setJSFTemplate(JSFTemplate template) {
+ setTextInCombobox("Template*", template.getName());
+ return this;
+ }
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -12,7 +12,6 @@
package org.jboss.tools.cdi.bot.test.uiutils.wizards;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
@@ -62,38 +61,10 @@
public boolean canFinish() {
return canClick("Finish");
}
-
- public Wizard setCDIPreset() {
- bot().comboBoxInGroup("Configuration", 0).
- setSelection("Dynamic Web Project with CDI (Context and Dependency Injection)");
- return this;
- }
-
- public Wizard setCDIFacet() {
- clickButton("Modify...");
- SWTBot bot = bot().shell("Project Facets").bot();
- setCDIFacet(bot);
- bot().sleep(Timing.time1S());
- return this;
- }
-
- private void setCDIFacet(SWTBot bot) {
- SWTBotTree tree= bot.tree();
- for (SWTBotTreeItem ti: tree.getAllItems()) {
- if (ti.cell(0).contains("CDI (Contexts and Dependency Injection)")) {
- ti.check();
- break;
- }
- }
- bot.sleep(Timing.time1S());
- bot.button("OK").click();
- }
-
-
-
+
protected void clickButton(String text) {
bot().button(text).click();
- bot().sleep(500);
+ bot().sleep(Timing.time500MS());
}
protected void setText(String label, String text) {
@@ -105,4 +76,9 @@
protected boolean canClick(String button) {
return bot().button(button).isEnabled();
}
+
+ protected void setTextInCombobox(String combobox, String text) {
+ bot().comboBoxWithLabel(combobox).setSelection(text);
+ bot().sleep(Timing.time500MS());
+ }
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2011-11-22 16:44:21 UTC (rev 36537)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/ConfigurationPresetTest.java 2011-11-22 17:27:26 UTC (rev 36538)
@@ -14,8 +14,6 @@
import java.util.logging.Logger;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
import org.jboss.tools.cdi.bot.test.CDITestBase;
@@ -23,7 +21,6 @@
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.helper.ContextMenuHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -56,21 +53,7 @@
@Test
public void testCDIPreset() {
LOGGER.info("Dynamic Web Project with CDI Configuration Preset created");
- assertTrue(checkCDISupport(getProjectName()));
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
}
- private boolean checkCDISupport(String projectName) {
- projectExplorer.selectProject(projectName);
-
- SWTBotTree tree = projectExplorer.bot().tree();
- ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
-
- bot.tree().expandNode("CDI (Context and Dependency Injection) Settings").select();
- boolean isCDISupported = bot.checkBox().isChecked();
- bot.button("Cancel").click();
- return isCDISupported;
- }
-
-
}
14 years, 4 months
JBoss Tools SVN: r36537 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test: matcher and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-22 11:44:21 -0500 (Tue, 22 Nov 2011)
New Revision: 36537
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/console/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/console/ConsoleOutputMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/DefaultMatchersFactory.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/WorkspaceMatchersFactory.java
Removed:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/problems/ProblemViewMatchersFactory.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/WorkspaceMatchersFactory.java
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
Log:
moved matchers factories to separate package
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java 2011-11-22 16:43:49 UTC (rev 36536)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortlet.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -2,9 +2,9 @@
import static org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject.PROJECT_NAME;
import static org.jboss.tools.portlet.ui.bot.test.entity.EntityFactory.file;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.problems.ProblemViewMatchersFactory.isNumberOfErrors;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.containsNodes;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.exists;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.isNumberOfErrors;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.containsNodes;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.exists;
import org.jboss.tools.portlet.ui.bot.test.entity.XMLNode;
import org.jboss.tools.portlet.ui.bot.test.task.SWTTask;
@@ -39,7 +39,6 @@
doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/default-object.xml"), exists());
doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet-instances.xml"), exists());
doAssertThat(file(PROJECT_NAME, "WebContent/WEB-INF/portlet.xml"), containsNodes(new XMLNode("portlet-app/portlet/portlet-class", FULL_CLASS_NAME)));
- System.out.println("");
}
private SWTTask getCreatePortletTask() {
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-22 16:43:49 UTC (rev 36536)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -1,10 +1,10 @@
package org.jboss.tools.portlet.ui.bot.test.create;
import static org.jboss.tools.portlet.ui.bot.test.entity.EntityFactory.file;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.problems.ProblemViewMatchersFactory.isNumberOfErrors;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.exists;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.hasFacets;
-import static org.jboss.tools.portlet.ui.bot.test.matcher.workspace.WorkspaceMatchersFactory.isExistingProject;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.isNumberOfErrors;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.exists;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.hasFacets;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.WorkspaceMatchersFactory.isExistingProject;
import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
import org.jboss.tools.portlet.ui.bot.test.task.AbstractSWTTask;
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/console/ConsoleOutputMatcher.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/console/ConsoleOutputMatcher.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/console/ConsoleOutputMatcher.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -0,0 +1,27 @@
+package org.jboss.tools.portlet.ui.bot.test.matcher.console;
+
+import org.hamcrest.Description;
+import org.jboss.tools.portlet.ui.bot.test.matcher.AbstractSWTMatcher;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+
+/**
+ * Checks if the console contains specified text.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class ConsoleOutputMatcher extends AbstractSWTMatcher<String> {
+
+ private String consoleText;
+
+ @Override
+ public boolean matchesSafely(String item) {
+ consoleText = SWTBotFactory.getConsole().getConsoleText();
+ return consoleText.contains(item);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("console contains specified text [" + consoleText + "]");
+ }
+}
Copied: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/DefaultMatchersFactory.java (from rev 36504, trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/problems/ProblemViewMatchersFactory.java)
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/DefaultMatchersFactory.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/DefaultMatchersFactory.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -0,0 +1,26 @@
+package org.jboss.tools.portlet.ui.bot.test.matcher.factory;
+
+import org.jboss.tools.portlet.ui.bot.test.matcher.SWTMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.console.ConsoleOutputMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.problems.NumberOfErrorsMatcher;
+
+/**
+ * Factory of matchers for Problems View.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class DefaultMatchersFactory {
+
+ public DefaultMatchersFactory() {
+ // not to be instantiated
+ }
+
+ public static SWTMatcher<Integer> isNumberOfErrors(){
+ return new NumberOfErrorsMatcher();
+ }
+
+ public static SWTMatcher<String> inConsoleOutput(){
+ return new ConsoleOutputMatcher();
+ }
+}
Copied: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/WorkspaceMatchersFactory.java (from rev 36524, trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/WorkspaceMatchersFactory.java)
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/WorkspaceMatchersFactory.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/factory/WorkspaceMatchersFactory.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -0,0 +1,41 @@
+package org.jboss.tools.portlet.ui.bot.test.matcher.factory;
+
+import java.util.Arrays;
+
+import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
+import org.jboss.tools.portlet.ui.bot.test.entity.WorkspaceFile;
+import org.jboss.tools.portlet.ui.bot.test.entity.XMLNode;
+import org.jboss.tools.portlet.ui.bot.test.matcher.SWTMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.ExistingProjectMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.ProjectFacetsMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.file.ExistingFileMatcher;
+import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.file.xml.XMLFileNodeContentMatcher;
+
+/**
+ * Factory for workspace specific matchers (projects, files..)
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class WorkspaceMatchersFactory {
+
+ private WorkspaceMatchersFactory(){
+ // not to be instantiated
+ }
+
+ public static SWTMatcher<String> isExistingProject(){
+ return new ExistingProjectMatcher();
+ }
+
+ public static SWTMatcher<WorkspaceFile> exists(){
+ return new ExistingFileMatcher();
+ }
+
+ public static SWTMatcher<String> hasFacets(FacetDefinition... facets){
+ return new ProjectFacetsMatcher(facets);
+ }
+
+ public static SWTMatcher<WorkspaceFile> containsNodes(XMLNode... nodes){
+ return new XMLFileNodeContentMatcher(Arrays.asList(nodes));
+ }
+}
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/problems/ProblemViewMatchersFactory.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/problems/ProblemViewMatchersFactory.java 2011-11-22 16:43:49 UTC (rev 36536)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/problems/ProblemViewMatchersFactory.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -1,20 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.matcher.problems;
-
-import org.jboss.tools.portlet.ui.bot.test.matcher.SWTMatcher;
-
-/**
- * Factory of matchers for Problems View.
- *
- * @author Lucia Jelinkova
- *
- */
-public class ProblemViewMatchersFactory {
-
- public ProblemViewMatchersFactory() {
- // not to be instantiated
- }
-
- public static SWTMatcher<Integer> isNumberOfErrors(){
- return new NumberOfErrorsMatcher();
- }
-}
Deleted: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/WorkspaceMatchersFactory.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/WorkspaceMatchersFactory.java 2011-11-22 16:43:49 UTC (rev 36536)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/WorkspaceMatchersFactory.java 2011-11-22 16:44:21 UTC (rev 36537)
@@ -1,39 +0,0 @@
-package org.jboss.tools.portlet.ui.bot.test.matcher.workspace;
-
-import java.util.Arrays;
-
-import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
-import org.jboss.tools.portlet.ui.bot.test.entity.WorkspaceFile;
-import org.jboss.tools.portlet.ui.bot.test.entity.XMLNode;
-import org.jboss.tools.portlet.ui.bot.test.matcher.SWTMatcher;
-import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.file.ExistingFileMatcher;
-import org.jboss.tools.portlet.ui.bot.test.matcher.workspace.file.xml.XMLFileNodeContentMatcher;
-
-/**
- * Factory for workspace specific matchers (projects, files..)
- *
- * @author Lucia Jelinkova
- *
- */
-public class WorkspaceMatchersFactory {
-
- private WorkspaceMatchersFactory(){
- // not to be instantiated
- }
-
- public static SWTMatcher<String> isExistingProject(){
- return new ExistingProjectMatcher();
- }
-
- public static SWTMatcher<WorkspaceFile> exists(){
- return new ExistingFileMatcher();
- }
-
- public static SWTMatcher<String> hasFacets(FacetDefinition... facets){
- return new ProjectFacetsMatcher(facets);
- }
-
- public static SWTMatcher<WorkspaceFile> containsNodes(XMLNode... nodes){
- return new XMLFileNodeContentMatcher(Arrays.asList(nodes));
- }
-}
14 years, 4 months
JBoss Tools SVN: r36536 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task: server and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-22 11:43:49 -0500 (Tue, 22 Nov 2011)
New Revision: 36536
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java
Log:
created
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java 2011-11-22 16:43:49 UTC (rev 36536)
@@ -0,0 +1,29 @@
+package org.jboss.tools.portlet.ui.bot.test.task.server;
+
+import org.jboss.tools.portlet.ui.bot.test.task.AbstractSWTTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+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.config.Annotations.ServerType;
+
+/**
+ * Performs Run on Server on the specified project.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class RunninngProjectOnServerTask extends AbstractSWTTask {
+
+ private String project;
+
+ public RunninngProjectOnServerTask(String project) {
+ this.project = project;
+ }
+
+ @Override
+ public void perform() {
+ SWTBotFactory.getPackageexplorer().show();
+ SWTBotFactory.getPackageexplorer().runOnServer(project);
+ }
+}
14 years, 4 months
JBoss Tools SVN: r36535 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task: console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-22 11:43:35 -0500 (Tue, 22 Nov 2011)
New Revision: 36535
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/console/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/console/ConsoleClearingTask.java
Log:
created
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/console/ConsoleClearingTask.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/console/ConsoleClearingTask.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/console/ConsoleClearingTask.java 2011-11-22 16:43:35 UTC (rev 36535)
@@ -0,0 +1,31 @@
+package org.jboss.tools.portlet.ui.bot.test.task.console;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.jboss.tools.portlet.ui.bot.test.task.AbstractSWTTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+
+/**
+ * Clears the console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+public class ConsoleClearingTask extends AbstractSWTTask {
+
+ @Override
+ public void perform() {
+ // does not use the ConsoleView.clear() funtionality because it didn't work for me
+ SWTBotView view = SWTBotFactory.getConsole().show();
+
+ for (SWTBotToolbarButton button : view.getToolbarButtons()){
+ System.out.println(button.getToolTipText());
+ if (IDELabel.ConsoleView.BUTTON_CLEAR_CONSOLE_TOOLTIP.equals(button.getToolTipText())){
+ System.out.println("Before click");
+ button.click();
+ System.out.println("After click");
+ }
+ }
+ }
+}
14 years, 4 months
JBoss Tools SVN: r36534 - in trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test: create and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2011-11-22 11:43:24 -0500 (Tue, 22 Nov 2011)
New Revision: 36534
Added:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
Log:
created new test
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-22 16:25:31 UTC (rev 36533)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/AllTestsSuite.java 2011-11-22 16:43:24 UTC (rev 36534)
@@ -2,13 +2,15 @@
import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortlet;
import org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject;
+import org.jboss.tools.portlet.ui.bot.test.create.RunJavaPortletOnServer;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(RequirementAwareUsageWindowClosingSuite.class)
@Suite.SuiteClasses({
CreateJavaPortletProject.class,
- CreateJavaPortlet.class
+ CreateJavaPortlet.class,
+ RunJavaPortletOnServer.class
})
public class AllTestsSuite {
Added: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java (rev 0)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/RunJavaPortletOnServer.java 2011-11-22 16:43:24 UTC (rev 36534)
@@ -0,0 +1,35 @@
+package org.jboss.tools.portlet.ui.bot.test.create;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.jboss.tools.portlet.ui.bot.test.create.CreateJavaPortletProject.PROJECT_NAME;
+import static org.hamcrest.Matchers.not;
+import static org.jboss.tools.portlet.ui.bot.test.matcher.factory.DefaultMatchersFactory.inConsoleOutput;
+
+import org.jboss.tools.portlet.ui.bot.test.task.console.ConsoleClearingTask;
+import org.jboss.tools.portlet.ui.bot.test.task.server.RunninngProjectOnServerTask;
+import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
+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.config.Annotations.ServerType;
+import org.junit.Test;
+
+/**
+ * Performs Run on Server on the java portlet project and checks if there is no exception in the
+ * console.
+ *
+ * @author Lucia Jelinkova
+ *
+ */
+@Require(clearWorkspace=false, clearProjects=false, server=@Server(required=true, state=ServerState.Running, type=ServerType.EPP))
+public class RunJavaPortletOnServer extends SWTTaskBasedTestCase {
+
+ @Test
+ public void testRunOnServer(){
+ doPerform(new ConsoleClearingTask());
+ doPerform(new RunninngProjectOnServerTask(PROJECT_NAME));
+
+ assertThat("Exception", not(inConsoleOutput()));
+ System.out.println();
+ }
+}
14 years, 4 months
JBoss Tools SVN: r36533 - trunk/download.jboss.org/jbosstools/updates/requirements/springide.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-22 11:25:31 -0500 (Tue, 22 Nov 2011)
New Revision: 36533
Added:
trunk/download.jboss.org/jbosstools/updates/requirements/springide/build-...
trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom-2....
Removed:
trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom.xml
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/springide/build.xml
Log:
fetch latest spingide 2.8; update build scripts
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/springide/build-... (from rev 36532, trunk/download.jboss.org/jbosstools/updates/requirements/springide/build.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/springide/build-... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/springide/build-... 2011-11-22 16:25:31 UTC (rev 36533)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="default">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/springide/build.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/springide/build.xml -Ddestination=/tmp/pmd-repo
+
+ or, run local:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ java -cp ~/eclipse/eclipse370/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner -f build.xml
+ -->
+ <target name="default" depends="init,mirror,apply.patch,regenerate.metadata" />
+ <target name="patch.and.regen" depends="init,apply.patch,regenerate.metadata" />
+
+ <target name="init">
+ <!-- Other URLs:
+ http://dist.springframework.org/release/IDE/
+ http://dist.springframework.org/snapshot/IDE/weekly/
+ http://dist.springsource.com/release/TOOLS/update/e3.6/
+ -->
+ <property name="URL" value="http://dist.springsource.com/release/TOOLS/update/e3.6/" />
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/springide/" />
+ <property name="siteVersion" value="2.6.0.201103160035" />
+ <property name="compress" value="true" />
+ </target>
+
+ <target name="mirror">
+ <p2.mirror>
+ <repository location="file:${destination}/${siteVersion}/" name="springide plugins for Eclipse 3.6 - 3.7" />
+ <source>
+ <repository location="${URL}" />
+ </source>
+
+ <iu id="org.springframework.ide.eclipse.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.aop.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.osgi.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.webflow.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.batch.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.integration.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.security.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.autowire.feature.feature.group" />
+ <iu id="org.springframework.ide.eclipse.mylyn.feature.feature.group" />
+
+ <slicingoptions includefeatures="true" followstrict="true" latestversiononly="false" platformfilter="true" />
+ </p2.mirror>
+ </target>
+
+ <target name="apply.patch">
+ <echo>JBDS-1838 :: Apply patch to disable SpringIDE welcome page</echo>
+ <!-- unzip jar
+ replace about.ini
+ replace MANIFEST.MF
+ delete welcome.xml META-INF/VMWARE.*
+ zip jar -->
+ <copy file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" tofile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE_ORIGINAL.jar" />
+ <unzip src="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" dest="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse" />
+ <echo file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/about.ini">
+aboutText=%title
+featureImage=feature_image.png
+</echo>
+ <echo file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/META-INF/MANIFEST.MF">Manifest-Version: 1.0
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: %providerName
+Bundle-Version: ${siteVersion}-RELEASE
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.springframework.ide.eclipse
+</echo>
+ <delete quiet="true">
+ <fileset dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse" includes="welcome.xml" />
+ <fileset dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/META-INF" includes="eclipse.inf, VMWARE.RSA, VMWARE.SF" />
+ </delete>
+ <zip destfile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" basedir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/" />
+ <delete dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/" quiet="true" />
+ </target>
+
+ <target name="regenerate.metadata">
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/${siteVersion}/" artifactRepository="file:${destination}/${siteVersion}/" publishartifacts="true" source="${destination}/${siteVersion}/" compress="${compress}" />
+ </target>
+
+</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/springide/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/springide/build.xml 2011-11-22 14:16:15 UTC (rev 36532)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/springide/build.xml 2011-11-22 16:25:31 UTC (rev 36533)
@@ -29,17 +29,17 @@
<!-- Other URLs:
http://dist.springframework.org/release/IDE/
http://dist.springframework.org/snapshot/IDE/weekly/
- http://dist.springsource.com/release/TOOLS/update/e3.6/
+ http://dist.springsource.com/release/TOOLS/update/e3.7/
-->
- <property name="URL" value="http://dist.springsource.com/release/TOOLS/update/e3.6/" />
+ <property name="URL" value="http://dist.springsource.com/release/TOOLS/update/e3.7/" />
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/springide/" />
- <property name="siteVersion" value="2.6.0.201103160035" />
+ <property name="siteVersion" value="2.8.0.201110170010-RELEASE" />
<property name="compress" value="true" />
</target>
<target name="mirror">
<p2.mirror>
- <repository location="file:${destination}/${siteVersion}/" name="springide plugins for Eclipse 3.6 - 3.7" />
+ <repository location="file:${destination}/${siteVersion}/" name="springide plugins for Eclipse 3.7" />
<source>
<repository location="${URL}" />
</source>
@@ -65,8 +65,8 @@
replace MANIFEST.MF
delete welcome.xml META-INF/VMWARE.*
zip jar -->
- <copy file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" tofile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE_ORIGINAL.jar" />
- <unzip src="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" dest="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse" />
+ <copy file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}.jar" tofile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}_ORIGINAL.jar" />
+ <unzip src="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}.jar" dest="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse" />
<echo file="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/about.ini">
aboutText=%title
featureImage=feature_image.png
@@ -76,7 +76,7 @@
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
-Bundle-Version: ${siteVersion}-RELEASE
+Bundle-Version: ${siteVersion}
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.springframework.ide.eclipse
</echo>
@@ -84,7 +84,7 @@
<fileset dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse" includes="welcome.xml" />
<fileset dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/META-INF" includes="eclipse.inf, VMWARE.RSA, VMWARE.SF" />
</delete>
- <zip destfile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}-RELEASE.jar" basedir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/" />
+ <zip destfile="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse_${siteVersion}.jar" basedir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/" />
<delete dir="${destination}/${siteVersion}/plugins/org.springframework.ide.eclipse/" quiet="true" />
</target>
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom-2.... (from rev 36532, trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom-2.... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom-2.... 2011-11-22 16:25:31 UTC (rev 36533)
@@ -0,0 +1,120 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.requirements.springide</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <properties>
+ <!-- TODO: when there's enough of these scripts, externalize these to a
+ parent pom in ../ -->
+ <tychoVersion>0.13.0</tychoVersion>
+ <maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
+
+ <!-- TODO: update this every time you use this script against a new target
+ version + resulting folder -->
+ <sourceURL>http://dist.springsource.com/release/TOOLS/update/e3.7</sourceURL>
+ <siteVersion>2.7.2.201109122348</siteVersion>
+ <destination>${project.build.directory}/../${siteVersion}</destination>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <!-- see http://wiki.eclipse.org/Tycho/Additional_Tools -->
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-p2-extras-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>mirror</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <source>
+ <repository>
+ <url>${sourceURL}</url>
+ <layout>p2</layout>
+ </repository>
+ </source>
+
+ <!-- List of IUs to mirror. If omitted, all IUs will be mirrored. -->
+ <!-- Omitted IU version element means latest version of the IU -->
+ <ius>
+ <iu>
+ <id>org.springframework.ide.eclipse.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.aop.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.osgi.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.webflow.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.batch.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.integration.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.security.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.autowire.feature.feature.group</id>
+ </iu>
+ <iu>
+ <id>org.springframework.ide.eclipse.mylyn.feature.feature.group</id>
+ </iu>
+ </ius>
+ <!-- The destination directory to mirror to. -->
+ <destination>${destination}</destination>
+ <!-- Whether only strict dependencies should be followed. -->
+ <!-- "strict" means perfect version match -->
+ <followStrictOnly>true</followStrictOnly>
+ <!-- Whether or not to follow optional requirements. -->
+ <includeOptional>true</includeOptional>
+ <!-- Whether or not to follow non-greedy requirements. -->
+ <includeNonGreedy>true</includeNonGreedy>
+ <!-- filter properties. E.g. filter only one platform -->
+ <!-- <filter> <osgi.os>linux</osgi.os> <osgi.ws>gtk</osgi.ws> <osgi.arch>x86_64</osgi.arch>
+ </filter> -->
+ <latestVersionOnly>true</latestVersionOnly>
+ <mirrorMetadataOnly>false</mirrorMetadataOnly>
+ <compress>true</compress>
+ <append>false</append>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${maven.antrun.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <configuration>
+ <quiet>true</quiet>
+ <tasks>
+ <!-- remove the target/ folder -->
+ <delete dir="${project.build.directory}" quiet="true" />
+ <echo>To apply patch to disable SpringIDE welcome page (JBDS-1838), run build.xml in this folder passing in these parameters:
+ patch.and.regen -DsiteVersion=${siteVersion} -DURL=${sourceURL}
+ </echo>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Deleted: trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom.xml 2011-11-22 14:16:15 UTC (rev 36532)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/springide/pom.xml 2011-11-22 16:25:31 UTC (rev 36533)
@@ -1,120 +0,0 @@
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.requirements.springide</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <properties>
- <!-- TODO: when there's enough of these scripts, externalize these to a
- parent pom in ../ -->
- <tychoVersion>0.13.0</tychoVersion>
- <maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
-
- <!-- TODO: update this every time you use this script against a new target
- version + resulting folder -->
- <sourceURL>http://dist.springsource.com/release/TOOLS/update/e3.7</sourceURL>
- <siteVersion>2.7.2.201109122348</siteVersion>
- <destination>${project.build.directory}/../${siteVersion}</destination>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <!-- see http://wiki.eclipse.org/Tycho/Additional_Tools -->
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-p2-extras-plugin</artifactId>
- <version>${tychoVersion}</version>
- <executions>
- <execution>
- <phase>prepare-package</phase>
- <goals>
- <goal>mirror</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <source>
- <repository>
- <url>${sourceURL}</url>
- <layout>p2</layout>
- </repository>
- </source>
-
- <!-- List of IUs to mirror. If omitted, all IUs will be mirrored. -->
- <!-- Omitted IU version element means latest version of the IU -->
- <ius>
- <iu>
- <id>org.springframework.ide.eclipse.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.aop.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.osgi.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.webflow.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.batch.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.integration.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.security.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.autowire.feature.feature.group</id>
- </iu>
- <iu>
- <id>org.springframework.ide.eclipse.mylyn.feature.feature.group</id>
- </iu>
- </ius>
- <!-- The destination directory to mirror to. -->
- <destination>${destination}</destination>
- <!-- Whether only strict dependencies should be followed. -->
- <!-- "strict" means perfect version match -->
- <followStrictOnly>true</followStrictOnly>
- <!-- Whether or not to follow optional requirements. -->
- <includeOptional>true</includeOptional>
- <!-- Whether or not to follow non-greedy requirements. -->
- <includeNonGreedy>true</includeNonGreedy>
- <!-- filter properties. E.g. filter only one platform -->
- <!-- <filter> <osgi.os>linux</osgi.os> <osgi.ws>gtk</osgi.ws> <osgi.arch>x86_64</osgi.arch>
- </filter> -->
- <latestVersionOnly>true</latestVersionOnly>
- <mirrorMetadataOnly>false</mirrorMetadataOnly>
- <compress>true</compress>
- <append>false</append>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven.antrun.plugin.version}</version>
- <executions>
- <execution>
- <id>install</id>
- <phase>install</phase>
- <configuration>
- <quiet>true</quiet>
- <tasks>
- <!-- remove the target/ folder -->
- <delete dir="${project.build.directory}" quiet="true" />
- <echo>To apply patch to disable SpringIDE welcome page (JBDS-1838), run build.xml in this folder passing in these parameters:
- patch.and.regen -DsiteVersion=${siteVersion} -DURL=${sourceURL}
- </echo>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
14 years, 4 months
JBoss Tools SVN: r36532 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: annotations and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2011-11-22 09:16:15 -0500 (Tue, 22 Nov 2011)
New Revision: 36532
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIWizardType.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/ScopeValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/AbstractValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeanValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/DecoratorValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorBindingValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/QualifierValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ScopeValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/StereotypeValidationProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ValidationErrorProvider.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/NodeContextUtil.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBaseExt.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
Log:
JavaDoc completion
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -44,11 +44,11 @@
util.waitForNonIgnoredJobs();
}
- public String getProjectName() {
+ protected String getProjectName() {
return projectName;
}
- public String getPackageName() {
+ protected String getPackageName() {
return packageName;
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/BeansXMLValidationErrors.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.annotations;
public enum BeansXMLValidationErrors {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIWizardType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIWizardType.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/CDIWizardType.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -9,6 +9,7 @@
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.annotations;
public enum CDIWizardType {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -25,7 +25,8 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on code completion in beans.xml
+ * Test operates on beans validation in config file
+ * beans.xml
*
* @author Jaroslav Jankovic
*
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/FindObserverForEventTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -26,7 +26,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on CDI perspective
+ * Test operates on finding right observer for event and vice versa
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnBase.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -31,7 +31,14 @@
"observeNoQualifierMyBean2", "observeAnyMyBean2",
"observeQ1MyBean2", "observeQ2MyBean1", "observeQ2MyBean2" };
-
+ /**
+ * Method creates Decorator component with entered name and package name.
+ * Then it opens beans.xml and simulates direct openOn through method openOnDirect.
+ * Finally it checks if the class which was opened-on to is correct.
+ * @param packageName
+ * @param className
+ * @return
+ */
protected boolean checkBeanXMLDecoratorOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.DECORATOR, className, packageName,
"java.util.Set");
@@ -41,6 +48,15 @@
return getEd().getTitle().equals(className + ".java");
}
+
+ /**
+ * Method creates Interceptor component with entered name and package name.
+ * Then it opens beans.xml and simulates direct openOn through method openOnDirect.
+ * Finally it checks if the class which was opened-on to is correct.
+ * @param packageName
+ * @param className
+ * @return
+ */
protected boolean checkBeanXMLInterceptorOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.INTERCEPTOR, className, packageName,
null);
@@ -50,6 +66,14 @@
return getEd().getTitle().equals(className + ".java");
}
+ /**
+ * Method creates Alternative Bean component with entered name and package name.
+ * Then it opens beans.xml and simulates direct openOn through method openOnDirect.
+ * Finally it checks if the class which was opened-on to is correct.
+ * @param packageName
+ * @param className
+ * @return
+ */
protected boolean checkBeanXMLAlternativeOpenOn(String packageName, String className) {
wizard.createCDIComponent(CDIWizardType.BEAN, className, packageName,
"alternative+beansxml");
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/openon/OpenOnTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -26,7 +26,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on hyperlinks-openons using CDI tools
+ * Test operates on hyperlinks-openons using CDI support
*
* @author Jaroslav Jankovic
*
@@ -73,9 +73,8 @@
}
- /**
- * https://issues.jboss.org/browse/JBIDE-6251
- */
+
+ // https://issues.jboss.org/browse/JBIDE-6251
@Test
public void testDisposerProducerOpenOn() {
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/BeanValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI bean component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/DecoratorValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI Decorator component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/IBindingValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI Interceptor Binding component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/InterceptorValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI Interceptor component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QualifierValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI Qualifier component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/QuickFixTestBase.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -120,7 +120,7 @@
/**
* Method resolves particular validation problem (parameter ti).
* It simply open context menu for param "ti", open menu "Quick Fix" and
- * chooses first option and confirms it
+ * chooses first option and confirms it (resolve it)
*
* @param ti
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/ScopeValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/ScopeValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/ScopeValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI components validation
+ * Test operates on quick fixes used for validation errors of CDI Scope component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/StereotypeValidationQuickFixTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -24,7 +24,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
- * Test operates on quick fixes of CDI stereotype component validation
+ * Test operates on quick fixes used for validation errors of CDI Stereotype component
*
* @author Jaroslav Jankovic
*/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/AbstractValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/AbstractValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/AbstractValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeanValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeanValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeanValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/DecoratorValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/DecoratorValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/DecoratorValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorBindingValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorBindingValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorBindingValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/InterceptorValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/QualifierValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/QualifierValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/QualifierValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ScopeValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ScopeValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ScopeValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/StereotypeValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/StereotypeValidationProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/StereotypeValidationProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import java.util.ArrayList;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ValidationErrorProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ValidationErrorProvider.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/ValidationErrorProvider.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.quickfix.validators;
import org.jboss.tools.cdi.bot.test.annotations.CDIAnnotationsType;
@@ -7,13 +18,43 @@
public interface ValidationErrorProvider {
+ /**
+ * Method gets all validation errors showed in Problems View for actual component
+ * @return
+ */
Map<String, ArrayList<String>> getAllValidationErrors();
+ /**
+ * Method gets all validation errors showed in Problems View as warnings
+ * according to entered annotation
+ *
+ * @param annotationType
+ * @return
+ */
ArrayList<String> getAllWarningForAnnotationType(CDIAnnotationsType annotationType);
+ /**
+ * Method gets all validation errors showed in Problems View as errors
+ * according to entered annotation
+ *
+ * @param annotationType
+ * @return
+ */
ArrayList<String> getAllErrorsForAnnotationType(CDIAnnotationsType annotationType);
+ /**
+ * Method gets all annotations for which exist validation errors showed in Problems View
+ * marked as warning
+ *
+ * @return
+ */
ArrayList<CDIAnnotationsType> getAllWarningsAnnotation();
+ /**
+ * Method gets all annotations for which exist validation errors showed in Problems View
+ * marked as errors
+ *
+ * @return
+ */
ArrayList<CDIAnnotationsType> getAllErrorsAnnotation();
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLValidationHelper.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -19,7 +19,7 @@
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
/**
- * Test operates on code completion in beans.xml
+ * Helper for beans.xml validation
*
* @author Jaroslav Jankovic
*
@@ -28,6 +28,8 @@
public class BeansXMLValidationHelper extends CDITestBase {
/**
+ * Method checks if there is validation problem with text
+ * specified by parameter validationErrors for entered project
*
* @param validationError
* @return
@@ -55,6 +57,9 @@
}
/**
+ * Method checks if there is no validation problem when
+ * creating interceptor component with entered className
+ * packageName for project with name projectName
*
* @param projectName
* @param packageName
@@ -68,6 +73,9 @@
}
/**
+ * Method checks if there is no validation problem when
+ * creating decorator component with entered className
+ * packageName for project with name projectName
*
* @param projectName
* @param packageName
@@ -81,6 +89,9 @@
}
/**
+ * Method checks if there is no validation problem when
+ * creating alternative bean component with entered className
+ * packageName for project with name projectName
*
* @param projectName
* @param packageName
@@ -94,6 +105,8 @@
}
/**
+ * Method gets all beans.xml validation errors showed in Problems View
+ * for entered project
*
* @return
*/
@@ -103,9 +116,8 @@
}
/**
- * Methods creates beans.xml with no tags. Location is provided by parameter.
- * If beans.xml already exists, its content is replaced by pure beans.xml with no
- * tags in it.
+ * Methods creates beans.xml with no tags for entered project.
+ *
* @param projectName
*/
public void createClearBeansXML(String projectName) {
@@ -115,6 +127,9 @@
}
/**
+ * Methods creates beans.xml with interceptor tags in it for entered project.
+ * Package and interceptor component name which should be showed in tag is
+ * determined by parameters
*
* @param projectName
* @param packageName
@@ -130,6 +145,9 @@
}
/**
+ * Methods creates beans.xml with decorator tags in it for entered project.
+ * Package and decorator component name which should be showed in tag is
+ * determined by parameters
*
* @param projectName
* @param packageName
@@ -144,6 +162,9 @@
}
/**
+ * Methods creates beans.xml with alternative tags in it for entered project.
+ * Package and alternative bean component name which should be showed in tag is
+ * determined by parameters
*
* @param projectName
* @param packageName
@@ -158,6 +179,9 @@
}
/**
+ * Methods create beans.xml for entered project with content of file
+ * determined by parameter path. If there is beans.xml in project, its
+ * content is simply replaced
*
* @param projectName
* @param path
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/NodeContextUtil.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/NodeContextUtil.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/NodeContextUtil.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.uiutils;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -20,6 +20,7 @@
/**
* Method creates Java Annotation with selected name and package
+ *
* @param name
* @param packageName
*/
@@ -29,7 +30,8 @@
/**
* Method creates CDI component with workaround for beans.xml -
- * if component is beans.xml, editor is not set
+ * if component is beans.xml, editor is not set (there is no active editor by default)
+ *
* @param component
* @param name
* @param packageName
@@ -50,6 +52,7 @@
/**
* Method creates larger number("amount") of the same component.
+ *
* @param component
* @param amount
* @param baseName
@@ -69,6 +72,7 @@
/**
* Method that actually creates CDI component according to parameter
+ *
* @param component
* @param name
* @param packageName
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBaseExt.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBaseExt.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBaseExt.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.cdi.bot.test.uiutils.wizards;
import org.eclipse.swtbot.swt.finder.SWTBot;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2011-11-22 13:26:39 UTC (rev 36531)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2011-11-22 14:16:15 UTC (rev 36532)
@@ -25,7 +25,7 @@
import org.junit.runners.Suite.SuiteClasses;
/**
-* Test checks if beans.xml is created when selectin CDI Facet
+* Test checks if beans.xml is created when selecting CDI Facet
*
* @author Jaroslav Jankovic
*/
14 years, 4 months