JBoss Tools SVN: r39759 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 07:18:09 -0400 (Thu, 22 Mar 2012)
New Revision: 39759
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java
Log:
Template of new seam3 bot test added
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/FullyQualifiedTest.java 2012-03-22 11:18:09 UTC (rev 39759)
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.seam3.bot.test.tests;
+
+import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
+import org.junit.Test;
+
+
+public class FullyQualifiedTest extends SolderTestBase {
+
+ @Override
+ public String getProjectName() {
+ return "fullyQualified";
+ }
+
+ @Override
+ public void waitForJobs() {
+ projectExplorer.deleteAllProjects();
+ }
+
+ @Override
+ public void prepareWorkspace() {
+
+ }
+
+ // should be error
+ @Test
+ public void testNonNamedBean() {
+
+ }
+ // all beans in that package are fully qualified
+ @Test
+ public void testQualifiedPackage() {
+
+ }
+ // should be ok
+ @Test
+ public void testDifferentExistedPackage() {
+
+ }
+ // should be error
+ @Test
+ public void testDifferentNonExistedPackage() {
+
+ }
+ // should be ok
+ @Test
+ public void testDifferentExistedClass() {
+
+ }
+ // should be error
+ @Test
+ public void testDifferentNonExistedClass() {
+
+ }
+ // should be ok
+ @Test
+ public void testNamedBean() {
+
+ }
+ // should be ok
+ @Test
+ public void testProducerMethod() {
+
+ }
+ // should be ok
+ @Test
+ public void testProducerField() {
+
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r39758 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-22 07:03:12 -0400 (Thu, 22 Mar 2012)
New Revision: 39758
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java
Log:
[JBIDE-11322] create SSH2 home directory if not present yet
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java 2012-03-22 10:53:56 UTC (rev 39757)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/NewDomainWizardPageModel.java 2012-03-22 11:03:12 UTC (rev 39758)
@@ -71,14 +71,27 @@
}
public File getLibraPrivateKey() throws OpenShiftException {
+ String ssh2Home = getSSH2Home();
+ File ssh2HomeFile = new File(ssh2Home);
+ if (!FileUtils.canRead(ssh2HomeFile)) {
+ try {
+ ssh2HomeFile.createNewFile();
+ } catch(IOException e) {
+ throw new OpenShiftException("Could not create ssh2 home directory at {0}", ssh2Home);
+ }
+ }
+
+ return new File(ssh2Home, LIBRA_KEY);
+ }
+
+ private String getSSH2Home() throws OpenShiftException {
Preferences preferences = JSchCorePlugin.getPlugin().getPluginPreferences();
String ssh2Home = preferences.getString(IConstants.KEY_SSH2HOME);
if (ssh2Home == null
|| ssh2Home.trim().length() == 0) {
throw new OpenShiftException("Could not determine your ssh2 home directory");
}
-
- return new File(ssh2Home, LIBRA_KEY);
+ return ssh2Home;
}
public String getNamespace() {
@@ -103,6 +116,7 @@
// key already exists
return;
}
+ createSSHHome(getSSH2Home());
File libraPrivateKey = getLibraPrivateKey();
SSHKeyPair keyPair = SSHKeyPair.create(passPhrase, libraPrivateKey.getAbsolutePath(), libraPublicKey.getAbsolutePath());
setFilePermissions(libraPrivateKey);
@@ -110,6 +124,26 @@
setSshKey(keyPair.getPublicKeyPath());
}
+ private void createSSHHome(String ssh2Home)
+ throws OpenShiftException {
+ File ssh2HomeFile = new File(ssh2Home);
+ if (FileUtils.canRead(ssh2HomeFile)) {
+ if (!FileUtils.isDirectory(ssh2HomeFile)) {
+ throw new OpenShiftException(
+ ssh2Home + " is a file instead of a directory. This prevents creation and usage of ssh keys");
+ }
+ return;
+ }
+
+ try {
+ if(!ssh2HomeFile.mkdirs()) {
+ throw new OpenShiftException("Could not create ssh2 home directory at {0}", ssh2Home);
+ }
+ } catch(SecurityException e) {
+ throw new OpenShiftException(e, "Could not create ssh2 home directory at {0}", ssh2Home);
+ }
+ }
+
private void setFilePermissions(File file) {
// set f permission to correspond to 'chmod 0600' read/write only for user
// First clear all permissions for both user and others
12 years, 7 months
JBoss Tools SVN: r39757 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 06:53:56 -0400 (Thu, 22 Mar 2012)
New Revision: 39757
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/CDISeam3AllBotTests.java
Log:
New implemented test NamedPackagesTest added into TestSuite
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/CDISeam3AllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/CDISeam3AllBotTests.java 2012-03-22 10:53:13 UTC (rev 39756)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/CDISeam3AllBotTests.java 2012-03-22 10:53:56 UTC (rev 39757)
@@ -15,6 +15,7 @@
import org.jboss.tools.cdi.seam3.bot.test.tests.DefaultBeansTest;
import org.jboss.tools.cdi.seam3.bot.test.tests.ExactAnnotationTest;
import org.jboss.tools.cdi.seam3.bot.test.tests.GenericOpenOnTest;
+import org.jboss.tools.cdi.seam3.bot.test.tests.NamedPackagesTest;
import org.jboss.tools.cdi.seam3.bot.test.tests.RequiresAnnotationTest;
import org.jboss.tools.cdi.seam3.bot.test.tests.ResourceOpenOnTest;
import org.jboss.tools.cdi.seam3.bot.test.tests.VetoAnnotationTest;
@@ -51,6 +52,7 @@
ExactAnnotationTest.class,
VetoAnnotationTest.class,
RequiresAnnotationTest.class,
+ NamedPackagesTest.class
})
public class CDISeam3AllBotTests extends AbstractTestSuite {
12 years, 7 months
JBoss Tools SVN: r39756 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 06:53:13 -0400 (Thu, 22 Mar 2012)
New Revision: 39756
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ResourceOpenOnTest.java
Log:
Modifying ResourceOpenOnTest to use new version of method moveFileInExplorerBase
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ResourceOpenOnTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ResourceOpenOnTest.java 2012-03-22 10:51:38 UTC (rev 39755)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/ResourceOpenOnTest.java 2012-03-22 10:53:13 UTC (rev 39756)
@@ -46,7 +46,7 @@
assertTrue("ERROR: redirected to " + destinationFile,
destinationFile.equals(CDIConstants.BEANS_XML));
- editResourceUtil.moveFileInProjectExplorer(CDIConstants.BEANS_XML,
+ editResourceUtil.moveFileInExplorerBase(projectExplorer, CDIConstants.BEANS_XML,
getProjectName() + "/" + CDIConstants.WEBCONTENT + "/" + CDIConstants.WEB_INF,
getProjectName() + "/" + CDIConstants.WEBCONTENT + "/" + CDIConstants.META_INF);
LOGGER.info("bean.xml was moved to META-INF");
12 years, 7 months
JBoss Tools SVN: r39755 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 06:51:38 -0400 (Thu, 22 Mar 2012)
New Revision: 39755
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java
Log:
NamedPackagesTest added into Seam3 bot tests
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/tests/NamedPackagesTest.java 2012-03-22 10:51:38 UTC (rev 39755)
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2010-2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.seam3.bot.test.tests;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.cdi.bot.test.CDIConstants;
+import org.jboss.tools.cdi.seam3.bot.test.base.SolderTestBase;
+import org.junit.Test;
+
+public class NamedPackagesTest extends SolderTestBase {
+
+ private final String CDI_SEAM_PACKAGE = "cdi.seam";
+ private final String CDI_TEST_PACKAGE = "cdi.test";
+ private final String ORG_JBOSS_PACKAGE = "org.jboss";
+
+ private final String PACKAGE_INFO_JAVA_CDI = "package-info.java.cdi";
+ private final String PACKAGE_INFO_JAVA = "package-info.java";
+
+ private final String MANAGER_JAVA = "Manager.java";
+
+ @Override
+ public String getProjectName() {
+ return "named";
+ }
+
+ @Override
+ public void waitForJobs() {
+ projectExplorer.deleteAllProjects();
+ }
+
+ @Test
+ public void testNoNamedPackaged() {
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ ORG_JBOSS_PACKAGE, MANAGER_JAVA).toTextEditor());
+ List<String> beansProposal = editResourceUtil.getProposalList(
+ MANAGER_JAVA, "\"#{}\"", 3, 0);
+ List<String> nonexpectedList = Arrays.asList("bean1 : Bean1", "bean2 : Bean2",
+ "bean3 : Bean3", "bean4 : Bean4");
+ assertTrue(checkNoMatch(beansProposal, nonexpectedList));
+
+ }
+
+ @Test
+ public void testOneNamedPackage() {
+
+ editResourceUtil.renameFileInExplorerBase(packageExplorer, PACKAGE_INFO_JAVA_CDI,
+ getProjectName() + "/" + CDIConstants.SRC + "/" + CDI_SEAM_PACKAGE, PACKAGE_INFO_JAVA);
+ eclipse.cleanAllProjects();
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ ORG_JBOSS_PACKAGE, MANAGER_JAVA).toTextEditor());
+ List<String> beansProposal = editResourceUtil.getProposalList(
+ MANAGER_JAVA, "\"#{}\"", 3, 0);
+
+ List<String> nonExpectedList = Arrays.asList("bean3 : Bean3", "bean4 : Bean4");
+ assertTrue(checkNoMatch(beansProposal, nonExpectedList));
+ List<String> expectedList = Arrays.asList("bean1 : Bean1", "bean2 : Bean2");
+ assertTrue(checkMatch(beansProposal, expectedList));
+
+ }
+
+ @Test
+ public void testBothNamedPackages() {
+
+ editResourceUtil.renameFileInExplorerBase(packageExplorer, PACKAGE_INFO_JAVA_CDI,
+ getProjectName() + "/" + CDIConstants.SRC + "/" + CDI_SEAM_PACKAGE, PACKAGE_INFO_JAVA);
+ editResourceUtil.renameFileInExplorerBase(packageExplorer, PACKAGE_INFO_JAVA_CDI,
+ getProjectName() + "/" + CDIConstants.SRC + "/" + CDI_TEST_PACKAGE, PACKAGE_INFO_JAVA);
+ eclipse.cleanAllProjects();
+
+ setEd(packageExplorer.openFile(getProjectName(), CDIConstants.SRC,
+ ORG_JBOSS_PACKAGE, MANAGER_JAVA).toTextEditor());
+ List<String> beansProposal = editResourceUtil.getProposalList(
+ MANAGER_JAVA, "\"#{}\"", 3, 0);
+
+ List<String> expectedList = Arrays.asList("bean1 : Bean1", "bean2 : Bean2",
+ "bean3 : Bean3", "bean4 : Bean4");
+ assertTrue(checkMatch(beansProposal, expectedList));
+
+ }
+
+ private boolean checkNoMatch(List<String> proposalList, List<String> nonexpectedList) {
+ boolean noMatch = true;
+ for (String proposeValue : proposalList) {
+ for (String nonexpectedValue : nonexpectedList) {
+ if (proposeValue.equals(nonexpectedValue)) {
+ noMatch = false;
+ break;
+ }
+ }
+ }
+ return noMatch;
+ }
+
+ private boolean checkMatch(List<String> proposalList, List<String> expectedList) {
+ boolean match = false;
+ for (String expectedValue : expectedList) {
+ match = false;
+ for (String proposeValue : proposalList) {
+ if (expectedValue.equals(proposeValue)) {
+ match = true;
+ }
+ }
+ if (!match) return match;
+ }
+ return match;
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r39754 - in trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects: named and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 06:50:38 -0400 (Thu, 22 Mar 2012)
New Revision: 39754
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/.jsdtscope
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.component
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/WEB-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/WEB-INF/lib/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/build/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean1.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean2.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/package-info.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean3.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean4.java
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/package-info.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/jboss/Manager.java
Log:
Resource project for NamedPackagesTest added
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/AS-7.0">
+ <attributes>
+ <attribute name="owner.project.facets" value="jst.web"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.project 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>named</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ </natures>
+</projectDescription>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/.jsdtscope
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/.jsdtscope (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/.jsdtscope 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="WebContent"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.component 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="named">
+ <wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
+ <property name="context-root" value="named"/>
+ <property name="java-output-path" value="/named/build/classes"/>
+ </wb-module>
+</project-modules>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.common.project.facet.core.xml 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="AS-7.0"/>
+ <fixed facet="java"/>
+ <fixed facet="wst.jsdt.web"/>
+ <fixed facet="jst.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="3.0"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.container 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.wst.jsdt.ui.superType.name 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/WebContent/META-INF/MANIFEST.MF 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean1.java 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,5 @@
+package cdi.seam;
+
+public class Bean1 {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/Bean2.java 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,5 @@
+package cdi.seam;
+
+public class Bean2 {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/package-info.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/package-info.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/seam/package-info.java.cdi 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,2 @@
+(a)javax.inject.Named
+package cdi.seam;
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean3.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean3.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean3.java 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,5 @@
+package cdi.test;
+
+public class Bean3 {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean4.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean4.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/Bean4.java 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,5 @@
+package cdi.test;
+
+public class Bean4 {
+
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/package-info.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/package-info.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/cdi/test/package-info.java.cdi 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,2 @@
+(a)javax.inject.Named
+package cdi.test;
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/jboss/Manager.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/jboss/Manager.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/src/org/jboss/Manager.java 2012-03-22 10:50:38 UTC (rev 39754)
@@ -0,0 +1,15 @@
+package org.jboss;
+
+public class Manager {
+
+ private String value = "#{}";
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+}
12 years, 7 months
JBoss Tools SVN: r39753 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: src/org/jboss/tools/cdi/bot/test/beansxml and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-03-22 06:49:03 -0400 (Thu, 22 Mar 2012)
New Revision: 39753
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
Log:
RenameFileInExplorerBase method added + moving getProposalList from BeansXML test to EditorResourceHelper
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-03-22 10:11:58 UTC (rev 39752)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-03-22 10:49:03 UTC (rev 39753)
@@ -40,16 +40,11 @@
<artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
- <dependency>
+ <dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.tools.jsf.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
- <!-- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.cdi.seam.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency> -->
</dependencies>
</configuration>
</plugin>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-03-22 10:11:58 UTC (rev 39752)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-03-22 10:49:03 UTC (rev 39753)
@@ -17,12 +17,7 @@
import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDITestBase;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
-import org.jboss.tools.ui.bot.ext.SWTJBTExt;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.ContentAssistHelper;
-import org.jboss.tools.ui.bot.ext.parts.ContentAssistBot;
-import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
import org.junit.Test;
/**
@@ -69,7 +64,8 @@
beansHelper.createBeansXMLWithInterceptor(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with interceptors tag was created");
- List<String> proposalList = getProposalList(CDIConstants.BEANS_XML, CDIConstants.CLASS_END_TAG, 0, 0);
+ List<String> proposalList = editResourceUtil.getProposalList(
+ CDIConstants.BEANS_XML, CDIConstants.CLASS_END_TAG, 0, 0);
for (String interceptor : INTERCEPTOR_NAMES) {
assertTrue(proposalList.contains(interceptor + " - " + getPackageName()));
}
@@ -84,7 +80,7 @@
beansHelper.createBeansXMLWithDecorator(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with decorators tag was created");
- List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ List<String> proposalList = editResourceUtil.getProposalList(CDIConstants.BEANS_XML,
CDIConstants.CLASS_END_TAG, 0, 0);
for (String decorator : DECORATORS_NAMES) {
assertTrue(proposalList.contains(decorator + " - " + getPackageName()));
@@ -101,7 +97,7 @@
beansHelper.createBeansXMLWithStereotype(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with stereotype tag was created");
- List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ List<String> proposalList = editResourceUtil.getProposalList(CDIConstants.BEANS_XML,
CDIConstants.STEREOTYPE_END_TAG, 0, 0);
for (String stereotype : STEREOTYPES_NAMES) {
assertTrue(proposalList.contains(stereotype + " - " + getPackageName()));
@@ -118,7 +114,7 @@
beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), null);
LOGGER.info("Beans.xml with alternative tag was created");
- List<String> proposalList = getProposalList(CDIConstants.BEANS_XML,
+ List<String> proposalList = editResourceUtil.getProposalList(CDIConstants.BEANS_XML,
CDIConstants.CLASS_END_TAG, 0, 0);
for (String alternative : ALTERNATIVES_NAMES) {
assertTrue(proposalList.contains(alternative + " - " + getPackageName()));
@@ -145,7 +141,8 @@
beansHelper.createBeansXMLWithEmptyTag(getProjectName());
LOGGER.info("Clear beans.xml with empty tag was created");
- List<String> proposalList = getProposalList(CDIConstants.BEANS_XML, "<>", 1, 0);
+ List<String> proposalList = editResourceUtil.getProposalList(
+ CDIConstants.BEANS_XML, "<>", 1, 0);
List<String> nonSupportedComponents = Arrays.asList(components);
for (String nonSupportedComponent : nonSupportedComponents) {
@@ -177,26 +174,4 @@
editResourceUtil.replaceInEditor(text, "");
}
- /**
- * Method returns proposal list for given text on given position
- * @param editorTitle
- * @param textToSelect
- * @param selectionOffset
- * @param selectionLength
- * @return
- */
- private List<String> getProposalList(String editorTitle, String textToSelect, int selectionOffset,
- int selectionLength) {
- SWTJBTExt.selectTextInSourcePane(bot,
- editorTitle, textToSelect, selectionOffset, selectionLength,
- 0);
-
- bot.sleep(Timing.time1S());
-
- SWTBotEditorExt editor = SWTTestExt.bot.swtBotEditorExtByTitle(editorTitle);
- ContentAssistBot contentAssist = editor.contentAssist();
- List<String> currentProposalList = contentAssist.getProposalList();
- return currentProposalList;
- }
-
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-03-22 10:11:58 UTC (rev 39752)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/EditorResourceHelper.java 2012-03-22 10:49:03 UTC (rev 39753)
@@ -14,6 +14,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
+import java.util.List;
import java.util.Scanner;
import org.eclipse.core.resources.IFile;
@@ -25,9 +26,14 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.cdi.bot.test.CDIBase;
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
+import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.TreeHelper;
+import org.jboss.tools.ui.bot.ext.parts.ContentAssistBot;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.ExplorerBase;
public class EditorResourceHelper extends CDIBase {
@@ -127,15 +133,38 @@
}
/**
- * in Project Explorer View, the file which is located in "sourceFolder"
+ * Method returns proposal list for given text on given position
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @return
+ */
+ public List<String> getProposalList(String editorTitle, String textToSelect, int selectionOffset,
+ int selectionLength) {
+ SWTJBTExt.selectTextInSourcePane(bot,
+ editorTitle, textToSelect, selectionOffset, selectionLength,
+ 0);
+
+ bot.sleep(Timing.time1S());
+
+ SWTBotEditorExt editor = SWTTestExt.bot.swtBotEditorExtByTitle(editorTitle);
+ ContentAssistBot contentAssist = editor.contentAssist();
+ List<String> currentProposalList = contentAssist.getProposalList();
+ return currentProposalList;
+ }
+
+ /**
+ * in explorer base View, the file which is located in "sourceFolder"
* is moved to location "destFolder"
* @param file
* @param sourceFolder
* @param destFolder
*/
- public void moveFileInProjectExplorer(String file, String sourceFolder, String destFolder) {
+ public void moveFileInExplorerBase(ExplorerBase explorerBase,
+ String file, String sourceFolder, String destFolder) {
- projectExplorer.selectTreeItem(file, sourceFolder.split("/"));
+ explorerBase.selectTreeItem(file, sourceFolder.split("/"));
bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.MOVE).click();
bot.waitForShell(IDELabel.Shell.MOVE_RESOURCES);
@@ -150,6 +179,29 @@
}
/**
+ * in explorer base View, the file which is located in "path"
+ * is renamed to newFileName value
+ * @param explorerBase
+ * @param file
+ * @param path
+ * @param newFileName
+ */
+ public void renameFileInExplorerBase(ExplorerBase explorerBase,
+ String file, String path, String newFileName) {
+
+ explorerBase.selectTreeItem(file, path.split("/"));
+
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.RENAME_WITH_DOTS).click();
+ bot.waitForShell(IDELabel.Shell.RENAME_RESOURCE);
+
+ bot.text().setText(newFileName);
+
+ bot.button(IDELabel.Button.OK).click();
+ util.waitForNonIgnoredJobs();
+
+ }
+
+ /**
* Method deletes whole package with given name for entered project
* @param projectName
* @param packageName
12 years, 7 months
JBoss Tools SVN: r39752 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test: src/org/jboss/tools/hb/ui/bot/test/view and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-22 06:11:58 -0400 (Thu, 22 Mar 2012)
New Revision: 39752
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java
Log:
check codeToJPAView added to JPADetailView ui bot test
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java 2012-03-22 10:10:56 UTC (rev 39751)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/jpadetails/Machine.java 2012-03-22 10:11:58 UTC (rev 39752)
@@ -1,16 +1,15 @@
package org.jpadetails;
import java.io.Serializable;
-import javax.persistence.*;
-import org.hibernate.annotations.NamedNativeQuery;
+import javax.persistence.Entity;
+import javax.persistence.Id;
/**
* Entity implementation class for Entity: Dog
*
*/
@Entity
-@NamedNativeQuery(name = "query ", query = "SELECT * FROM MACHINE")
public class Machine implements Serializable {
@Id
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java 2012-03-22 10:10:56 UTC (rev 39751)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/view/JPADetailViewTest.java 2012-03-22 10:11:58 UTC (rev 39752)
@@ -1,17 +1,21 @@
package org.jboss.tools.hb.ui.bot.test.view;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withLabel;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
import static org.eclipse.swtbot.swt.finder.waits.Conditions.waitForWidget;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.hb.ui.bot.common.ProjectExplorer;
import org.jboss.tools.hb.ui.bot.test.HibernateBaseTest;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.StringHelper;
import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.junit.Test;
/**
@@ -33,10 +37,12 @@
importTestProject("/resources/prj/hibernatelib");
importTestProject("/resources/prj/jpatest40");
- checkGenericGeneratorValidation();
+ addNativeQueryViaJPAView();
+ modifyNativeQueryAndCheckJPAView();
}
- private void checkGenericGeneratorValidation() {
+
+ private void addNativeQueryViaJPAView() {
SWTBotView jd = open.viewOpen(ActionItem.View.JPAJPADetails.LABEL);
ProjectExplorer.open(prj, "src", pkg, entity);
@@ -53,10 +59,43 @@
jd.bot().waitWhile(waitForWidget(withLabel(label)));
bot.sleep(TIME_5S);
- SWTBotTwistie twistieBot = bot.twistieByLabel("Entity");
- while (!twistieBot.isExpanded()) {
- twistieBot.toggle();
+ SWTBotTwistie twistie = bot.twistieByLabel("Queries");
+ while (!twistie.isExpanded()) {
+ twistie.toggle();
}
+ bot.button("Add...").click();
+ String title = "Add Query";
+ bot.waitForShell(title);
+ SWTBotShell shell = bot.shell(title);
+ shell.bot().textWithLabel("Name:").setText("selectmachine");
+ shell.bot().comboBoxWithLabel("Type:").setSelection("Named Native Query (hibernate)");
+ shell.bot().button("OK").click();
+ bot.waitUntil(shellCloses(shell));
+ jd.bot().textWithLabel("Query:").setText("SELECT * FROM MACHINE");
+
+ editor.save();
+
+ String path = "/" + prj + "/src/org/jpadetails";
+ String type = "JPA Problem";
+
+ SWTBotTreeItem[] items = null;
+ items = ProblemsView.getFilteredErrorsTreeItems(bot, "", path, entity, type);
+ assertTrue(items.length == 0);
}
+
+ private void modifyNativeQueryAndCheckJPAView() {
+ SWTBotEditor editor = bot.editorByTitle(entity);
+ StringHelper sh = new StringHelper(editor.toTextEditor().getText());
+ String str = "SELECT * FROM MACHINE";
+ Point pos = sh.getPositionAfter(str);
+ editor.setFocus();
+ editor.toTextEditor().selectRange(pos.y, pos.x + 1, 0);
+ editor.toTextEditor().insertText(" ORDER BY name");
+ editor.save();
+
+ SWTBotView jd = open.viewOpen(ActionItem.View.JPAJPADetails.LABEL);
+ String jpaText = jd.bot().textWithLabel("Query:").getText();
+ assertTrue(jpaText.equals("SELECT * FROM MACHINE ORDER BY name"));
+ }
}
12 years, 7 months
JBoss Tools SVN: r39751 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test: src/org/jboss/tools/hb/ui/bot/test/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-22 06:10:56 -0400 (Thu, 22 Mar 2012)
New Revision: 39751
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/validation/GeneratorValidationEntity.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/validation/AnnotationValidationTest.java
Log:
HB Validation test order change, default state is correct
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/validation/GeneratorValidationEntity.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/validation/GeneratorValidationEntity.java 2012-03-22 09:29:02 UTC (rev 39750)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/jpatest40/src/org/validation/GeneratorValidationEntity.java 2012-03-22 10:10:56 UTC (rev 39751)
@@ -13,7 +13,7 @@
* Entity implementation class for Entity: GeneratorValidationEntity
*
*/
-@GenericGenerator(name="mygenerator", strategy = "uuid")
+@GenericGenerator(name="mygen", strategy = "uuid")
@Entity
public class GeneratorValidationEntity implements Serializable {
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/validation/AnnotationValidationTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/validation/AnnotationValidationTest.java 2012-03-22 09:29:02 UTC (rev 39750)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/validation/AnnotationValidationTest.java 2012-03-22 10:10:56 UTC (rev 39751)
@@ -40,9 +40,9 @@
SWTBotTreeItem[] items = null;
items = ProblemsView.getFilteredErrorsTreeItems(bot, desc, path, resource, type);
- assertTrue(items.length == 1);
+ assertTrue(items.length == 0);
- // fix
+ // make validation error
SWTBotEditor editor = bot.editorByTitle(resource);
editor.show();
StringHelper sh = new StringHelper(editor.toTextEditor().getText());
@@ -54,6 +54,6 @@
// check
items = ProblemsView.getFilteredErrorsTreeItems(bot, desc, path, resource, type);
- assertTrue(items.length == 0);
+ assertTrue(items.length == 1);
}
}
\ No newline at end of file
12 years, 7 months
JBoss Tools SVN: r39750 - in trunk/as/features: org.jboss.ide.eclipse.as.feature and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-22 05:29:02 -0400 (Thu, 22 Mar 2012)
New Revision: 39750
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.archives.integration.feature/feature.xml
trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
trunk/as/features/org.jboss.ide.eclipse.as.jmx.integration.feature/feature.xml
Log:
JBIDE-11373 - re-patched as under advisement from Nick
Modified: trunk/as/features/org.jboss.ide.eclipse.as.archives.integration.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.archives.integration.feature/feature.xml 2012-03-22 08:52:32 UTC (rev 39749)
+++ trunk/as/features/org.jboss.ide.eclipse.as.archives.integration.feature/feature.xml 2012-03-22 09:29:02 UTC (rev 39750)
@@ -50,10 +50,10 @@
<import plugin="org.jboss.ide.eclipse.as.ui"/>
<import plugin="org.jboss.ide.eclipse.as.wtp.ui"/>
<import plugin="org.eclipse.wst.common.modulecore.ui" version="1.0.100" match="greaterOrEqual"/>
- <import feature="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature"/>
<import feature="org.jboss.ide.eclipse.archives.feature"/>
</requires>
+ <includes id="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature" version="0.0.0" />
<plugin
id="org.jboss.ide.eclipse.archives.webtools"
download-size="0"
Modified: trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2012-03-22 08:52:32 UTC (rev 39749)
+++ trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2012-03-22 09:29:02 UTC (rev 39750)
@@ -61,13 +61,14 @@
<import plugin="org.eclipse.jst.j2ee.ui" version="1.1.500" match="greaterOrEqual"/>
<import plugin="org.eclipse.jst.common.frameworks" version="1.1.500" match="greaterOrEqual"/>
<import feature="org.jboss.ide.eclipse.archives.feature"/>
- <import feature="org.jboss.ide.eclipse.as.archives.integration.feature"/>
- <import feature="org.jboss.ide.eclipse.as.jmx.integration.feature"/>
- <import feature="org.jboss.ide.eclipse.as.server.rse.integration.feature"/>
- <import feature="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature"/>
<import feature="org.jboss.tools.jmx.feature"/>
</requires>
+ <includes id="org.jboss.ide.eclipse.as.archives.integration.feature" version="0.0.0" />
+ <includes id="org.jboss.ide.eclipse.as.jmx.integration.feature" version="0.0.0" />
+ <includes id="org.jboss.ide.eclipse.as.server.rse.integration.feature" version="0.0.0" />
+ <includes id="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature" version="0.0.0" />
+
<plugin
id="org.jboss.ide.eclipse.as.ui.mbeans"
download-size="0"
Modified: trunk/as/features/org.jboss.ide.eclipse.as.jmx.integration.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.jmx.integration.feature/feature.xml 2012-03-22 08:52:32 UTC (rev 39749)
+++ trunk/as/features/org.jboss.ide.eclipse.as.jmx.integration.feature/feature.xml 2012-03-22 09:29:02 UTC (rev 39750)
@@ -50,9 +50,9 @@
<import plugin="org.eclipse.rse.subsystems.shells.local" version="2.1.300" match="greaterOrEqual" />
<import plugin="org.eclipse.rse.subsystems.shells.ssh" version="2.1.300" match="greaterOrEqual" />
<import plugin="org.eclipse.rse.subsystems.shells.telnet" version="1.2.200" match="greaterOrEqual" />
- <import feature="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature"/>
<import feature="org.jboss.tools.jmx.feature"/>
</requires>
-
+
+ <includes id="org.jboss.ide.eclipse.as.serverAdapter.wtp.feature" version="0.0.0" />
<plugin id="org.jboss.ide.eclipse.as.jmx.integration" download-size="0" install-size="0" version="0.0.0" unpack="false" />
</feature>
12 years, 7 months