JBoss Tools SVN: r38345 - trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-31 18:00:25 -0500 (Tue, 31 Jan 2012)
New Revision: 38345
Modified:
trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
Log:
JBIDE-10752
https://issues.jboss.org/browse/JBIDE-10752
Test xml is fixed - unsupported element is removed.
Modified: trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml 2012-01-31 21:39:14 UTC (rev 38344)
+++ trunk/seam/tests/org.jboss.tools.seam.xml.test/projects/Test/components22.xml 2012-01-31 23:00:25 UTC (rev 38345)
@@ -16,7 +16,7 @@
<value>v2</value>
</navigation:resources>
</navigation:pages>
- <pdf:document-store name="mypdfStore"/>
+
<core:init debug="#{debug}" jndi-pattern="i2"/>
<core:init debug="@debug" name="org.jboss.seam.core.init1"/>
<core:init debug="@debug@" name="org.jboss.seam.core.init2"/>
12 years, 11 months
JBoss Tools SVN: r38344 - trunk/build/aggregate/soa-site.
by jbosstools-commits@lists.jboss.org
Author: dpalmer
Date: 2012-01-31 16:39:14 -0500 (Tue, 31 Jan 2012)
New Revision: 38344
Modified:
trunk/build/aggregate/soa-site/site.xml
Log:
[JBIDE-10720] Added jbpm 5 eclipse tools
Modified: trunk/build/aggregate/soa-site/site.xml
===================================================================
--- trunk/build/aggregate/soa-site/site.xml 2012-01-31 19:54:17 UTC (rev 38343)
+++ trunk/build/aggregate/soa-site/site.xml 2012-01-31 21:39:14 UTC (rev 38344)
@@ -20,10 +20,6 @@
<category name="GeneralTools" />
</feature>
- <feature url="features/org.jboss.tools.jbpm4.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.feature" version="0.0.0">
- <category name="AbridgedTools" />
- <category name="SOATools" />
- </feature>
<feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
<category name="SOATools" />
</feature>
@@ -41,6 +37,18 @@
<category name="AbridgedTools" />
<category name="SOATools" />
</feature>
+ <feature url="features/org.jboss.tools.jbpm4.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
+ <feature url="features/org.jbpm.eclipse.feature_0.0.0.jar" id="org.jbpm.eclipse.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
+ <feature url="features/org.jbpm.eclipse.task.feature_0.0.0.jar" id="org.jbpm.eclipse.task.feature" version="0.0.0">
+ <category name="AbridgedTools" />
+ <category name="SOATools" />
+ </feature>
<feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
<category name="AbridgedTools" />
12 years, 11 months
JBoss Tools SVN: r38343 - in trunk: cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-31 14:54:17 -0500 (Tue, 31 Jan 2012)
New Revision: 38343
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerFieldBean.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerMethodBean.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java
trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
Log:
Rename named bean action does work for Producer Fields and Producer Methods https://issues.jboss.org/browse/JBIDE-10741
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-31 19:42:00 UTC (rev 38342)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIRenameProcessor.java 2012-01-31 19:54:17 UTC (rev 38343)
@@ -12,11 +12,9 @@
import java.util.ArrayList;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
@@ -29,7 +27,6 @@
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
-import org.jboss.tools.common.model.project.ProjectHome;
import org.jboss.tools.common.refactoring.BaseFileChange;
import org.jboss.tools.jst.web.kb.refactoring.RefactorSearcher;
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerFieldBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerFieldBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerFieldBean.java 2012-01-31 19:54:17 UTC (rev 38343)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.jbt.refactoring;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+
+public class ProducerFieldBean {
+ @Produces @Named("sField") String s;
+
+ String s1 = "#{sField.charAt(0)}";
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerFieldBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerMethodBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerMethodBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerMethodBean.java 2012-01-31 19:54:17 UTC (rev 38343)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.jbt.refactoring;
+
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+
+public class ProducerMethodBean {
+ @Produces
+ @Named("infoMethod")
+ String info(){
+ return "info";
+ }
+
+ String s1 = "#{infoMethod.charAt(0)}";
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/refactoring/ProducerMethodBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java 2012-01-31 19:42:00 UTC (rev 38342)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java 2012-01-31 19:54:17 UTC (rev 38343)
@@ -33,8 +33,7 @@
private static final String newName = "abcde";
private static final int NUM_OF_CHAR = 5;
- public void testNamedBeanRename() throws CoreException {
-
+ public void testNamedBeanClassRename() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
TestChangeStructure structure = new TestChangeStructure(tckProject, FILE_NAME1);
@@ -43,19 +42,19 @@
list.add(structure);
structure = new TestChangeStructure(tckProject, FILE_NAME2);
- change = new TestTextChange(526, NUM_OF_CHAR, newName);
+ change = new TestTextChange(/*526*/"gamme}", NUM_OF_CHAR, newName);
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(tckProject, FILE_NAME3);
- change = new TestTextChange(789, NUM_OF_CHAR, newName);
+ change = new TestTextChange(/*789*/"gamme.check}", NUM_OF_CHAR, newName);
structure.addTextChange(change);
- change = new TestTextChange(924, NUM_OF_CHAR, newName);
+ change = new TestTextChange(/*924*/"gamme.reset}", NUM_OF_CHAR, newName);
structure.addTextChange(change);
list.add(structure);
structure = new TestChangeStructure(tckProject, FILE_NAME4);
- change = new TestTextChange(293, NUM_OF_CHAR, newName);
+ change = new TestTextChange(/*293*/"gamme.biggest}", NUM_OF_CHAR, newName);
structure.addTextChange(change);
list.add(structure);
@@ -69,7 +68,49 @@
AbstractRefactorTest.checkRename(processor, list);
}
+
+ public void testNamedBeanProducerFieldRename() throws CoreException {
+ ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
+ TestChangeStructure structure = new TestChangeStructure(tckProject, "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/ProducerFieldBean.java");
+ TestTextChange change = new TestTextChange("sField\")", 6, "uField");
+ structure.addTextChange(change);
+ change = new TestTextChange("sField.charAt(0)}", 6, "uField");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ IFile sourceFile = tckProject.getProject().getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/ProducerFieldBean.java");
+
+ IBean bean = getBean(sourceFile, "sField");
+ assertNotNull("Can't get the bean.", bean);
+
+ RenameNamedBeanProcessor processor = new RenameNamedBeanProcessor(bean);
+ processor.setNewName("uField");
+
+ AbstractRefactorTest.checkRename(processor, list);
+ }
+
+ public void testNamedBeanProducerMethodRename() throws CoreException {
+ ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
+
+ TestChangeStructure structure = new TestChangeStructure(tckProject, "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/ProducerMethodBean.java");
+ TestTextChange change = new TestTextChange("infoMethod\")", 10, "memoMethod");
+ structure.addTextChange(change);
+ change = new TestTextChange("infoMethod.charAt(0)}", 10, "memoMethod");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ IFile sourceFile = tckProject.getProject().getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/ProducerMethodBean.java");
+
+ IBean bean = getBean(sourceFile, "infoMethod");
+ assertNotNull("Can't get the bean.", bean);
+
+ RenameNamedBeanProcessor processor = new RenameNamedBeanProcessor(bean);
+ processor.setNewName("memoMethod");
+
+ AbstractRefactorTest.checkRename(processor, list);
+ }
+
private IBean getBean(IFile file, String name) {
CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
assertNotNull("Can't get CDI nature.", cdiNature);
Modified: trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-01-31 19:42:00 UTC (rev 38342)
+++ trunk/common/tests/org.jboss.tools.common.base.test/src/org/jboss/tools/common/base/test/AbstractRefactorTest.java 2012-01-31 19:54:17 UTC (rev 38343)
@@ -35,6 +35,7 @@
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
import org.eclipse.text.edits.MultiTextEdit;
import org.jboss.tools.common.refactoring.BaseFileChange;
+import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.test.util.JobUtils;
public class AbstractRefactorTest extends TestCase{
@@ -44,6 +45,8 @@
}
public static void checkRename(RenameProcessor processor, List<TestChangeStructure> changeList) throws CoreException{
+ processTestChanges(changeList);
+
JobUtils.waitForIdle(2000);
// Test before renaming
@@ -74,7 +77,22 @@
checkChanges(rootChange, changeList);
}
+ private static void processTestChanges(List<TestChangeStructure> structureList) throws CoreException{
+ for(TestChangeStructure tStructure : structureList){
+ IFile file = tStructure.getProject().getFile(tStructure.getFileName());
+ String fileContent = FileUtil.readStream(file);
+ for(TestTextChange tChange : tStructure.getTextChanges()){
+ if(tChange.getOffset() == -1){
+ int offset = fileContent.indexOf(tChange.getSearchText());
+ tChange.setOffset(offset);
+ }
+ }
+ }
+ }
+
public static void checkMove(RefactoringProcessor processor, IResource oldObject, IResource destinationObject, MoveParticipant participant, List<TestChangeStructure> changeList) throws CoreException {
+ processTestChanges(changeList);
+
JobUtils.waitForIdle(2000);
// Test before moving
@@ -104,6 +122,8 @@
}
public static void checkRename(RefactoringProcessor processor, IResource oldObject, String newName, RenameParticipant participant, List<TestChangeStructure> changeList) throws CoreException {
+ processTestChanges(changeList);
+
JobUtils.waitForIdle(2000);
// Test before renaming
@@ -234,6 +254,7 @@
}
public static class TestTextChange{
+ private String searchText;
private int offset;
private int length;
private String text;
@@ -244,6 +265,21 @@
this.text = text;
}
+ public TestTextChange(String searchText, int length, String text){
+ this.offset = -1;
+ this.searchText = searchText;
+ this.length = length;
+ this.text = text;
+ }
+
+ public void setOffset(int offset){
+ this.offset = offset;
+ }
+
+ public String getSearchText(){
+ return searchText;
+ }
+
public int getOffset(){
return offset;
}
12 years, 11 months
JBoss Tools SVN: r38342 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources: properties and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-01-31 14:42:00 -0500 (Tue, 31 Jan 2012)
New Revision: 38342
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/properties/
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/properties/swtbot.properties
Log:
SWTBot integration to maven
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/properties/swtbot.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/properties/swtbot.properties (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/properties/swtbot.properties 2012-01-31 19:42:00 UTC (rev 38342)
@@ -0,0 +1,23 @@
+# SWTBotTest properties
+# all properties are optional, all defined paths should exist
+# <java version>,<jre/jdk home>
+# JAVA=1.6,/usr/java/jdk1.6.0_25/jre
+# JAVA=1.6,${JAVA_HOME}
+#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
+# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
+SERVER=EAP,5.x,default,${jbosstools.test.jboss-as.home}
+#<seam version>,<seam runtime home>
+#SEAM=2.2,/opt/jbdevstudio4.1.1.GA/jboss-eap/seam
+#<esb versoin>,<esb runtime home>
+# ESB=4.7,/data/jboss/esb-4.7
+# #DB Definition
+#DB=<db_type>,<version>,<driver_path>,<jdbc_string>,<username>,[<password>,<scriptpath>]
+#Supported types: hsqldb18, db2_97, mssql2005, mssql2008, mysql50, mysql51, oracle10g, oracle11gR1, oracle11gR1RAC, oracle11gR2, oracle11gR2RAC, postgresql82, postgresql83, postgresql84, sybase15
+#For internal: use "hsqldb18" as type and "internal" as a version
+#Internal DB example (driver,jdbc,user,password are ignored)
+#DB=hsqldb18,internal,driver,jdbc,user,,
+#External db example
+#DB=hsqldb18,1.8,/home/username/lib/hsqldb/lib/hsqldb.jar,jdbc:hsqldb:hsql://localhost:8001/xdb,sa,,
+#Connection profile named <db_type>_<version> will be created
+#Annotation usage for TestCase db=@DB
+# DB=hsqldb18,1.8,/home/user/lib/hsqldb/lib/hsqldb.jar,jdbc\:hsqldb\:hsql\://localhost\:8001/xdb,sa,,
12 years, 11 months
JBoss Tools SVN: r38341 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-01-31 14:38:25 -0500 (Tue, 31 Jan 2012)
New Revision: 38341
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/requirements.properties
Log:
SWTBot integration to maven
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/requirements.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/requirements.properties (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/requirements.properties 2012-01-31 19:38:25 UTC (rev 38341)
@@ -0,0 +1 @@
+requirements=jbossas-5.1.0.GA
12 years, 11 months
JBoss Tools SVN: r38340 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-01-31 14:34:29 -0500 (Tue, 31 Jan 2012)
New Revision: 38340
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/pom.xml
Log:
SWTBot integration to maven
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/pom.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/pom.xml 2012-01-31 19:10:39 UTC (rev 38339)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/pom.xml 2012-01-31 19:34:29 UTC (rev 38340)
@@ -9,15 +9,49 @@
<groupId>org.jboss.tools.vpe.tests</groupId>
<artifactId>org.jboss.tools.vpe.ui.bot.test</artifactId>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
+ <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home}</systemProperties>
+ <test.suite.class>org.jboss.tools.vpe.ui.bot.test.VPEAllBotTests</test.suite.class>
+ </properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
- <version>${tychoVersion}</version>
<configuration>
+ <testSuite>org.jboss.tools.vpe.ui.bot.test</testSuite>
+ <testClass>${test.suite.class}</testClass>
<useUIThread>false</useUIThread>
+ <skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.vpe.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </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.eclipse.jst.enterprise_ui.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.web_core.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
</configuration>
</plugin>
</plugins>
12 years, 11 months
JBoss Tools SVN: r38339 - 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: 2012-01-31 14:10:39 -0500 (Tue, 31 Jan 2012)
New Revision: 38339
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Fix method removeProjectFromServers(String, String) to not fail when no server is defined
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 2012-01-31 17:55:08 UTC (rev 38338)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-01-31 19:10:39 UTC (rev 38339)
@@ -238,37 +238,43 @@
delay();
- SWTBotTree serverTree = bot.viewByTitle(IDELabel.View.SERVERS).bot().tree();
-
- delay();
-
- // Expand All
- for (SWTBotTreeItem serverTreeItem : serverTree.getAllItems()){
- serverTreeItem.expand();
- // if JSF Test Project is deployed to server remove it
- SWTBotTreeItem[] serverTreeItemChildren = serverTreeItem.getItems();
- if (serverTreeItemChildren != null && serverTreeItemChildren.length > 0){
- int itemIndex = 0;
- boolean found = false;
- String treeItemlabel = null;
- do{
- treeItemlabel = serverTreeItemChildren[itemIndex].getText();
- found = treeItemlabel.startsWith(projectName)
- && (stringToContain == null || treeItemlabel.indexOf(stringToContain) >= 0);
- } while (!found && ++itemIndex < serverTreeItemChildren.length);
- // Server Tree Item has Child with Text equal to JSF TEst Project
- if (found){
- log.info("Found project to be removed from server: " + treeItemlabel);
- ContextMenuHelper.prepareTreeItemForContextMenu(serverTree,serverTreeItemChildren[itemIndex]);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(serverTree, IDELabel.Menu.REMOVE, false)).click();
- bot.shell("Server").activate();
- bot.button(IDELabel.Button.OK).click();
- log.info("Removed project from server: " + treeItemlabel);
- bot.sleep(10*1000L);
- }
+ try{
+ SWTBotTree serverTree = bot.viewByTitle(IDELabel.View.SERVERS).bot().tree();
+
+ delay();
+
+ // Expand All
+ for (SWTBotTreeItem serverTreeItem : serverTree.getAllItems()){
+ serverTreeItem.expand();
+ // if JSF Test Project is deployed to server remove it
+ SWTBotTreeItem[] serverTreeItemChildren = serverTreeItem.getItems();
+ if (serverTreeItemChildren != null && serverTreeItemChildren.length > 0){
+ int itemIndex = 0;
+ boolean found = false;
+ String treeItemlabel = null;
+ do{
+ treeItemlabel = serverTreeItemChildren[itemIndex].getText();
+ found = treeItemlabel.startsWith(projectName)
+ && (stringToContain == null || treeItemlabel.indexOf(stringToContain) >= 0);
+ } while (!found && ++itemIndex < serverTreeItemChildren.length);
+ // Server Tree Item has Child with Text equal to JSF TEst Project
+ if (found){
+ log.info("Found project to be removed from server: " + treeItemlabel);
+ ContextMenuHelper.prepareTreeItemForContextMenu(serverTree,serverTreeItemChildren[itemIndex]);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(serverTree, IDELabel.Menu.REMOVE, false)).click();
+ bot.shell("Server").activate();
+ bot.button(IDELabel.Button.OK).click();
+ log.info("Removed project from server: " + treeItemlabel);
+ bot.sleep(10*1000L);
+ }
+ }
}
+ delay();
+
+ } catch (WidgetNotFoundException wnfe){
+ // do nothing it means there is no server defined
}
- delay();
+
}
public void delay() {
12 years, 11 months
JBoss Tools SVN: r38338 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test: resources and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-01-31 12:55:08 -0500 (Tue, 31 Jan 2012)
New Revision: 38338
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
Log:
SWTBot integration to maven
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-01-31 17:28:08 UTC (rev 38337)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-01-31 17:55:08 UTC (rev 38338)
@@ -9,5 +9,51 @@
<groupId>org.jboss.tools.jsf.tests</groupId>
<artifactId>org.jboss.tools.jsf.ui.bot.test</artifactId>
- <packaging>eclipse-plugin</packaging>
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
+ <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home}</systemProperties>
+ <test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <testSuite>org.jboss.tools.jsf.ui.bot.test</testSuite>
+ <testClass>${test.suite.class}</testClass>
+ <useUIThread>false</useUIThread>
+ <skip>${swtbot.test.skip}</skip>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.vpe.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </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.eclipse.jst.enterprise_ui.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jst.web_core.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties 2012-01-31 17:55:08 UTC (rev 38338)
@@ -0,0 +1 @@
+requirements=jbossas-5.1.0.GA
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/requirements.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties 2012-01-31 17:55:08 UTC (rev 38338)
@@ -0,0 +1,23 @@
+# SWTBotTest properties
+# all properties are optional, all defined paths should exist
+# <java version>,<jre/jdk home>
+# JAVA=1.6,/usr/java/jdk1.6.0_25/jre
+# JAVA=1.6,${JAVA_HOME}
+#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
+# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
+SERVER=EAP,5.x,default,${jbosstools.test.jboss-as.home}
+#<seam version>,<seam runtime home>
+#SEAM=2.2,/opt/jbdevstudio4.1.1.GA/jboss-eap/seam
+#<esb versoin>,<esb runtime home>
+# ESB=4.7,/data/jboss/esb-4.7
+# #DB Definition
+#DB=<db_type>,<version>,<driver_path>,<jdbc_string>,<username>,[<password>,<scriptpath>]
+#Supported types: hsqldb18, db2_97, mssql2005, mssql2008, mysql50, mysql51, oracle10g, oracle11gR1, oracle11gR1RAC, oracle11gR2, oracle11gR2RAC, postgresql82, postgresql83, postgresql84, sybase15
+#For internal: use "hsqldb18" as type and "internal" as a version
+#Internal DB example (driver,jdbc,user,password are ignored)
+#DB=hsqldb18,internal,driver,jdbc,user,,
+#External db example
+#DB=hsqldb18,1.8,/home/username/lib/hsqldb/lib/hsqldb.jar,jdbc:hsqldb:hsql://localhost:8001/xdb,sa,,
+#Connection profile named <db_type>_<version> will be created
+#Annotation usage for TestCase db=@DB
+# DB=hsqldb18,1.8,/home/user/lib/hsqldb/lib/hsqldb.jar,jdbc\:hsqldb\:hsql\://localhost\:8001/xdb,sa,,
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/properties/swtbot.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 11 months
JBoss Tools SVN: r38337 - trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-01-31 12:28:08 -0500 (Tue, 31 Jan 2012)
New Revision: 38337
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
Log:
JBIDE-10621
Redesign HyperlinkDetector so that partitioning and hyperlinks not do twice the same job.
Hyperlinks and Hyperlink Partitioners are redesigned due to exclude duplication work on regions calculation.
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlinkPartitioner.java 2012-01-31 17:28:08 UTC (rev 38337)
@@ -104,7 +104,7 @@
int textOffset = text.getStartOffset();
String contentType = superRegion.getContentType();
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
IHyperlinkRegion hyperRegion = new HyperlinkRegion(textOffset, textLength,
axis, contentType, type);
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamBeanHyperlinkPartitioner.java 2012-01-31 17:28:08 UTC (rev 38337)
@@ -71,7 +71,7 @@
Map<String, ISeamMessages> messages = findMessagesComponents(document, offset);
if (messages != null && !messages.isEmpty()) {
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
String contentType = superRegion.getContentType();
String type = SEAM_MESSAGES_BEAN_PARTITION;
@@ -84,11 +84,8 @@
}
}
- protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
- if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
- return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) + "/";
- }
- return superRegion.getAxis();
+ protected String getAxis(IDocument document, int offset) {
+ return JSPRootHyperlinkPartitioner.computeAxis(document, offset) + "/";
}
public static IHyperlinkRegion getWordRegion (IDocument document, final int offset) {
12 years, 11 months
JBoss Tools SVN: r38336 - trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-01-31 12:27:46 -0500 (Tue, 31 Jan 2012)
New Revision: 38336
Modified:
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionMappingHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java
trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java
Log:
JBIDE-10621
Redesign HyperlinkDetector so that partitioning and hyperlinks not do twice the same job.
Hyperlinks and Hyperlink Partitioners are redesigned due to exclude duplication work on regions calculation.
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionHyperlinkPartitioner.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionHyperlinkPartitioner.java 2012-01-31 17:27:20 UTC (rev 38335)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2007-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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.struts.text.ext.hyperlink;
@@ -16,8 +16,6 @@
/**
* @author Jeremy
*
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
*/
public class StrutsActionHyperlinkPartitioner extends JSPTagAttributeValueHyperlinkPartitioner {
public static final String STRUTS_JSP_ACTION_PARTITION = "org.jboss.tools.common.text.ext.jsp.STRUTS_JSP_ACTION";
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionMappingHyperlinkPartitioner.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionMappingHyperlinkPartitioner.java 2012-01-31 17:27:20 UTC (rev 38335)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsActionMappingHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2007-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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.struts.text.ext.hyperlink;
@@ -16,8 +16,6 @@
/**
* @author Jeremy
*
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
*/
public class StrutsActionMappingHyperlinkPartitioner extends JSPTagAttributeValueHyperlinkPartitioner {
public static final String STRUTS_JSP_ACTION_MAPPING_PARTITION = "org.jboss.tools.common.text.ext.jsp.STRUTS_JSP_ACTION_MAPPING";
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java 2012-01-31 17:27:20 UTC (rev 38335)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagAttributeHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
@@ -21,9 +21,9 @@
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
-import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
import org.jboss.tools.struts.StrutsProject;
import org.jboss.tools.struts.text.ext.StrutsExtensionsPlugin;
import org.w3c.dom.Attr;
@@ -53,7 +53,7 @@
IRegion r = getRegion(document, offset);
if (r == null) return null;
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
String contentType = superRegion.getContentType();
String type = STRUTS_JSP_TAG_ATTRIBUTE_PARTITION;
@@ -162,10 +162,7 @@
}
}
- protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
- if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
- return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) + "/";
- }
- return superRegion.getAxis();
+ protected String getAxis(IDocument document, int offset) {
+ return JSPRootHyperlinkPartitioner.computeAxis(document, offset) + "/";
}
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java 2012-01-31 17:27:20 UTC (rev 38335)
+++ trunk/struts/plugins/org.jboss.tools.struts.text.ext/src/org/jboss/tools/struts/text/ext/hyperlink/StrutsJSPTagNameHyperlinkPartitioner.java 2012-01-31 17:27:46 UTC (rev 38336)
@@ -51,7 +51,7 @@
IRegion r = getRegion(document, offset);
if (r == null) return null;
- String axis = getAxis(document, superRegion);
+ String axis = getAxis(document, offset);
String contentType = superRegion.getContentType();
String type = STRUTS_JSP_TAG_NAME_PARTITION;
@@ -112,10 +112,7 @@
}
- protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
- if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
- return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) + "/";
- }
- return superRegion.getAxis();
+ protected String getAxis(IDocument document, int offset) {
+ return JSPRootHyperlinkPartitioner.computeAxis(document, offset) + "/";
}
}
12 years, 11 months