JBoss Tools SVN: r26176 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-11-02 06:19:29 -0400 (Tue, 02 Nov 2010)
New Revision: 26176
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
Log:
[JBIDE-7367] destroy is hidden for running instances, reboot is hidden from stopped instances
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-11-02 09:03:25 UTC (rev 26175)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-11-02 10:19:29 UTC (rev 26176)
@@ -23,13 +23,13 @@
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.debug.ui@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.expressions@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.help.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.emf.common@default:default,org.eclipse.jface.text@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.core.databinding@default:default,org.hamcrest.core@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.osgi@-1:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.jdt.debug@default:default,org.!
eclipse.rse.core@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ui.editors@default:default,org.junit4@default:default,org.eclipse.search@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.validation@default:default,org.eclipse.update.configurator@3:true,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.filebuffers@default:default,org.apache.lucene@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.compare@default:defaul!
t,org.eclipse.osgi.util@default:default,org.apache.ant@default!
:default
,org.eclipse.ui.workbench@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.rse.services@default:default,org.eclipse.equinox.http.registry@default:default,org.apache.xml.serializer@default:default,org.eclipse.core.databinding.property@default:default,javax.servlet@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.jface@default:default,org.eclipse.ecf@default:default,org.eclipse.ui.navigator.resources@default:default,org.jboss.tools.common@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.compare.core@default:default,org.apache.lucene.analysis@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help.webapp@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.filesystem.linux.x86_64@default:fal!
se,org.apache.xml.resolver@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.team.core@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.emf.ecore.change@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.equinox.p2.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.core.resources@default:default,javax.xml@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.common.emf@default:default,org.mortbay.jetty.server@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.help.base@default:default,org.eclipse.wst.common.frameworks@default:default!
,org.eclipse.core.filesystem@default:default,org.eclipse.core.!
jobs@def
ault:default,org.eclipse.sdk@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.debug.core@default:default,org.eclipse.text@default:default,org.eclipse.ecf.ssl@default:false,org.apache.jasper@default:default,org.eclipse.core.net@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.views@default:default,org.eclipse.swt@default:default,org.mortbay.jetty.util@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt.core@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ecf.identity@default:default,org.eclipse.jem.util@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.apache.commons.el@default:default,org.eclipse.equinox.app@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.apache.xerces@default:default,org.eclipse.!
wst.sse.core@default:default,javax.servlet.jsp@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.help@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.http.jetty@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.core.runtime.compatibility.registry@default:false"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jruby.jruby@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.docs@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.jobs@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.equinox.http.registry@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.net@default:default,org.apache.commons.el@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi@-1:true,org.eclipse.emf.edit@default:default,org.apache.ant@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.debug.core@default:def!
ault,org.eclipse.help.webapp@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.core.resources@default:default,org.eclipse.debug.ui@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.security@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.databinding@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.apache.xml.serializer@default:default,org.eclipse.jface@default:default,org.eclipse.emf.common@default:default,org.eclipse.rse.services@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.team.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.sdk@default:default,org.eclipse.help.appserver@default:default,org.eclipse.emf.ecore.x!
mi@default:default,org.eclipse.core.net.linux.x86_64@default:f!
alse,org
.eclipse.ecf.filetransfer@default:default,com.ibm.icu@default:default,org.eclipse.jface.text@default:default,org.eclipse.jem.util@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.ide@default:default,org.eclipse.search@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.jdt.core@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.rse.core@default:default,org.eclipse.text@default:default,org.jboss.tools.common@default:default,org.eclipse.wst.sse.core@default:default,javax.xml@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.ui.forms@default:default,org.mortbay.jetty.server@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.expressions@default:default,org.eclipse.osgi.util@default:default,org.eclipse.ui.nav!
igator.resources@default:default,org.apache.jasper@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.swt@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.apache.lucene.analysis@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.p2.engine@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.help.base@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ecf@default:default,org.ec!
lipse.jdt.ui@default:default,org.eclipse.equinox.p2.metadata.r!
epositor
y@default:default,org.hamcrest.core@default:default,org.eclipse.ui.console@default:default,org.eclipse.core.commands@default:default,org.eclipse.compare.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.compare@default:default,org.eclipse.ui.cheatsheets@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.apache.lucene@default:default,org.apache.xml.resolver@default:default,org.eclipse.help@default:default,org.eclipse.core.variables@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,javax.servlet@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.workbench.texteditor@default:default!
,org.eclipse.ecf.ssl@default:false,org.eclipse.wst.common.core@default:default,org.junit4@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.update.configurator@3:true,org.eclipse.help.ui@default:default,org.eclipse.core.databinding.beans@default:default,javax.servlet.jsp@default:default,org.apache.xerces@default:default,org.eclipse.ui@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default,org.jruby.jruby@default:default,org.jboss.tools.deltacloud.ui@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
<booleanAttribute key="useProduct" value="true"/>
</launchConfiguration>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-02 09:03:25 UTC (rev 26175)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-11-02 10:19:29 UTC (rev 26176)
@@ -159,17 +159,22 @@
<with
variable="selection">
<iterate operator="and">
- <and>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- <test
- property="org.jboss.tools.deltacloud.ui.instance.isStopped"
- value="true"/>
- </and>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
</iterate>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <test
+ property="org.jboss.tools.deltacloud.ui.instance.isStopped"
+ value="true"/>
+ </iterate>
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.StopInstanceHandler"
@@ -177,18 +182,23 @@
<activeWhen>
<with
variable="selection">
- <iterate>
- <and>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
- </instanceof>
- <test
- property="org.jboss.tools.deltacloud.ui.instance.isStopped"
- value="false"/>
- </and>
+ <iterate operator="and">
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
</iterate>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <test
+ property="org.jboss.tools.deltacloud.ui.instance.isStopped"
+ value="false"/>
+ </iterate>
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.RebootInstanceHandler"
@@ -196,13 +206,23 @@
<activeWhen>
<with
variable="selection">
- <iterate>
+ <iterate operator="and">
<instanceof
value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
</instanceof>
</iterate>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <test
+ property="org.jboss.tools.deltacloud.ui.instance.isStopped"
+ value="false"/>
+ </iterate>
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.DestroyInstanceHandler"
@@ -210,13 +230,23 @@
<activeWhen>
<with
variable="selection">
- <iterate>
+ <iterate operator="and">
<instanceof
value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
</instanceof>
</iterate>
</with>
</activeWhen>
+ <enabledWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <test
+ property="org.jboss.tools.deltacloud.ui.instance.isStopped"
+ value="true"/>
+ </iterate>
+ </with>
+ </enabledWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.CreateInstanceHandler2"
@@ -445,16 +475,16 @@
<with
variable="selection">
<iterate>
- <and>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
- </instanceof>
- <not>
- <instanceof
- value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
- </instanceof>
- </not>
- </and>
+ <and>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CloudViewElement">
+ </instanceof>
+ <not>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
+ </instanceof>
+ </not>
+ </and>
</iterate>
</with>
</visibleWhen>
14 years, 2 months
JBoss Tools SVN: r26175 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-11-02 05:03:25 -0400 (Tue, 02 Nov 2010)
New Revision: 26175
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
Log:
change jdk version to 1.6
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-11-02 08:11:33 UTC (rev 26174)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/.classpath 2010-11-02 09:03:25 UTC (rev 26175)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/jhighlight-1.0.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-11-02 08:11:33 UTC (rev 26174)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/META-INF/MANIFEST.MF 2010-11-02 09:03:25 UTC (rev 26175)
@@ -24,4 +24,4 @@
.
Export-Package: org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.richfaces.template.util
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
14 years, 2 months
JBoss Tools SVN: r26174 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: uiutils/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-11-02 04:11:33 -0400 (Tue, 02 Nov 2010)
New Revision: 26174
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java
Log:
minor test improvement
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2010-11-02 05:20:10 UTC (rev 26173)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2010-11-02 08:11:33 UTC (rev 26174)
@@ -131,6 +131,7 @@
try {
be.add(item, name);
Assert.assertTrue(be.isDirty());
+ Assert.assertEquals(name, be.getSelectedItem());
be.activatePage("Source");
String text = be.toTextEditor().getText();
List<Node> nl = getItems(text, item);
@@ -197,14 +198,8 @@
List<Node> list = new ArrayList<Node>();
for (int i = 0; i < nl.getLength(); i++) {
Node n = nl.item(i);
- if (item == Item.STEREOTYPE) {
- if ("stereotype".equals(n.getNodeName())) {
- list.add(n);
- }
- } else {
- if ("class".equals(n.getNodeName())) {
- list.add(n);
- }
+ if (item.getElementName().equals(n.getNodeName())) {
+ list.add(n);
}
}
return list;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java 2010-11-02 05:20:10 UTC (rev 26173)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java 2010-11-02 08:11:33 UTC (rev 26174)
@@ -39,6 +39,15 @@
private String getNode() {
return node;
}
+
+ public String getElementName() {
+ switch (this) {
+ case STEREOTYPE:
+ return "stereotype";
+ default:
+ return "class";
+ }
+ }
}
private SWTBotExt bot = new SWTBotExt();
@@ -56,6 +65,10 @@
return modify(item, name, "Remove...", new DeleteDialogHandler());
}
+ public String getSelectedItem() {
+ return bot().tree().selection().get(0, 0);
+ }
+
private BeansEditor modify(Item item, String name, String actionLabel, DialogHandler h) {
SWTBotTree tree = bot.tree();
tree.expandNode(ROOT_NODE, item.getNode()).select().click();
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 2010-11-02 05:20:10 UTC (rev 26173)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java 2010-11-02 08:11:33 UTC (rev 26174)
@@ -58,6 +58,7 @@
protected void clickButton(String text) {
bot().button(text).click();
+ bot().sleep(500);
}
protected void setText(String label, String text) {
14 years, 2 months
JBoss Tools SVN: r26173 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-02 01:20:10 -0400 (Tue, 02 Nov 2010)
New Revision: 26173
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
Log:
=@Override annotation removed from org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2010-11-02 04:32:58 UTC (rev 26172)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAutocompleteTemplate.java 2010-11-02 05:20:10 UTC (rev 26173)
@@ -32,7 +32,6 @@
private boolean disabled;
private boolean showButton;
- @Override
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
14 years, 2 months
JBoss Tools SVN: r26172 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-11-02 00:32:58 -0400 (Tue, 02 Nov 2010)
New Revision: 26172
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with new fixed issues
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-11-01 22:41:49 UTC (rev 26171)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-11-02 04:32:58 UTC (rev 26172)
@@ -118,6 +118,21 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6758">JBIDE-6758</ulink>: An existing <parameter>service</parameter> element without a child <parameter>security</parameter> element would not be be able to have the <parameter>security</parameter> element added through the user interface. To this issue, each <parameter>service</parameter> element now has a <parameter>security</parameter> element and a subsequent <guimenuitem>Security</guimenuitem> form automatically attached in the ESB editor. The <parameter>security</parameter> element can safely be deleted from the <parameter>service</parameter> element code without the <guimenuitem>Security</guimenuitem> form being removed in the ESB editor. This ensures that if a user wishes to re-add a <parameter>security</parameter> element at a later stage, the functionality will exist to do so within the user interface.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6616">JBIDE-6616</ulink>: Support for ESB actions through annotations has been added to the ESB editor. When creating the configuration for a new ESB action, you can now create a new Annotated POJO class as well as a class that extends the <classname>AbstractActionPipelinedProcessor</classname> class.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6615">JBIDE-6615</ulink>: ESB 4.9 includes a new router for utilizing the Camel runtime; support for this new router has been added to the ESB tooling.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6615">JBIDE-6615</ulink>: ESB 4.9 includes new functionality for complex event processing, utilizing the <classname>BusinessRulesProcessor</classname> action. Support for this action has been added to the ESB tooling.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -192,6 +207,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6686">JBIDE-6686</ulink>: An error existed where the Hibernate platform to be used was not filtered based on the version of JPA being used. This meant that selecting the JPA version to use would present all Hibernate platforms to the user, with indistinct names. This issue has been corrected by only displaying the Hibernate platform that corresponds to the specified JPA version, and renaming these platforms for easier identification.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6621">JBIDE-6621</ulink>: In previous versions, when a user selected Ingres from the list of databases or databse dialects the <guilabel>Driver Name</guilabel> and <guilabel>Connection URL</guilabel> fields would not be auto-populated as they are for other databases in the list. This has lead to concerns of the compatibility of Ingres with JBoss Enterprise Application Platform. To correct this issue the new Ingres dialects <filename>Ingres9Dialect</filename> and <filename>Ingres10Dialect</filename> have been added, ensuring the aforementioned fields are auto-populated for both versions 9 and 10 of Hibernate core.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -258,6 +278,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6707">JBIDE-6707</ulink>: The ability to <option>Explore</option> a specific resource on a server has now been expanded to encapsulate the entire server, allowing the deploy directory to be explored.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6612">JBIDE-6612</ulink>: The new version of Eclipse would not recognise JBoss Application Server 6 as a valid JEE6 environment. To rectify this bug, Java EE6 has been configured to support JBoss Application Server 6 by modifying <filename>/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml </filename>.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -319,6 +344,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6869">JBIDE-6869</ulink>: Quick fix now offers to rename a component if it is a duplicate and to delete <property>Name</property> annotation.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6610">JBIDE-6610</ulink>: Components defined in a custom <filename>component.xml</filename> file were not recognized. This bug has been corrected through the modification of <filename>XMLScanner.java</filename>, <filename>SeamComponentsEntityRecognizer.java</filename> and <filename>SeamResourceVisitor.java</filename>.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -405,6 +435,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6721">JBIDE-6721</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6711">JBIDE-6711</ulink>: Spring support has been added to the Visual Page Editor through the addition of a new plug-in. The plug-in is available as <filename>org.jboss.tools.vpe.spring</filename>.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6631">JBIDE-6631</ulink>: Previously the only way to export a template was by navigating to <menuchoice><guimenuitem>File</guimenuitem><guimenuitem>Export</guimenuitem><guimenuitem>Unknown</guimenuitem></menuchoice>. This process was not intuitive and so <guibutton>Import</guibutton> and <guibutton>Export</guibutton> buttons have been added to the <guilabel>Visual Templates Preferences</guilabel> page. Due to Java prohibiting the extension of more than one class, extra classes have been written for this added functionality.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
14 years, 2 months
JBoss Tools SVN: r26171 - in trunk/maven/plugins: org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-11-01 18:41:49 -0400 (Mon, 01 Nov 2010)
New Revision: 26171
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
Log:
JBIDE-7011 Mavenized Seam Web project can't be created using m2eclipse 0.11
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-11-01 19:46:12 UTC (rev 26170)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-11-01 22:41:49 UTC (rev 26171)
@@ -72,7 +72,7 @@
@Override
- protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
if(facade != null) {
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2010-11-01 19:46:12 UTC (rev 26170)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2010-11-01 22:41:49 UTC (rev 26171)
@@ -55,7 +55,7 @@
@Override
- protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
if(facade != null) {
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2010-11-01 19:46:12 UTC (rev 26170)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2010-11-01 22:41:49 UTC (rev 26171)
@@ -76,7 +76,7 @@
@Override
- protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
if(facade != null) {
Modified: trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java 2010-11-01 19:46:12 UTC (rev 26170)
+++ trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java 2010-11-01 22:41:49 UTC (rev 26171)
@@ -87,7 +87,7 @@
@Override
- protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
if(facade != null) {
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2010-11-01 19:46:12 UTC (rev 26170)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2010-11-01 22:41:49 UTC (rev 26171)
@@ -238,7 +238,7 @@
}
@Override
- protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
if(facade != null) {
14 years, 2 months
JBoss Tools SVN: r26170 - trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2010-11-01 15:46:12 -0400 (Mon, 01 Nov 2010)
New Revision: 26170
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/PublishPage.java
Log:
JBIDE-7463 Unable to publish Teiid Example Project to ModeShape repository (IllegalArgumentException). The IAE exception had to do with mimetype loading and was fixed in MODE-989. There was also an i18n problem: key "serverManagerGetWorkspacesExceptionMsg" requires an argument. I've fixed that in PublishPage.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/PublishPage.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/PublishPage.java 2010-11-01 16:52:54 UTC (rev 26169)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/wizards/PublishPage.java 2010-11-01 19:46:12 UTC (rev 26170)
@@ -833,7 +833,7 @@
this.workspaces = new ArrayList<Workspace>(getServerManager().getWorkspaces(this.repository));
} catch (Exception e) {
this.workspaces = Collections.emptyList();
- String msg = RestClientI18n.serverManagerGetWorkspacesExceptionMsg.text();
+ String msg = RestClientI18n.serverManagerGetWorkspacesExceptionMsg.text(this.repository);
Activator.getDefault().log(new Status(Severity.ERROR, msg, e));
if (getControl().isVisible()) {
14 years, 2 months
JBoss Tools SVN: r26169 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-11-01 12:52:54 -0400 (Mon, 01 Nov 2010)
New Revision: 26169
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
Log:
removing unused import
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 2010-11-01 16:51:41 UTC (rev 26168)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2010-11-01 16:52:54 UTC (rev 26169)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.bot.test;
-import java.util.logging.Logger;
-
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
import org.jboss.tools.cdi.bot.test.wizard.CdiATWizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
14 years, 2 months
JBoss Tools SVN: r26168 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-11-01 12:51:41 -0400 (Mon, 01 Nov 2010)
New Revision: 26168
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CDIAllBotTests.launch
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/editor/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Bar.jav_
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Foo.jav_
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/beans.xml
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
Log:
adding basic test for beans.xml editor
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CDIAllBotTests.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CDIAllBotTests.launch (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/CDIAllBotTests.launch 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.cdi.bot.test.CDIAllBotTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.cdi.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx512m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF 2010-11-01 16:40:15 UTC (rev 26167)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF 2010-11-01 16:51:41 UTC (rev 26168)
@@ -14,6 +14,7 @@
org.junit4;bundle-version="4.8.1",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.ui;bundle-version="3.6.0",
- org.jboss.tools.ui.bot.ext;bundle-version="3.2.0"
+ org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
+ org.eclipse.core.resources;bundle-version="3.6.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: 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 (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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;
+
+import java.util.logging.Logger;
+
+import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
+import org.jboss.tools.cdi.bot.test.wizard.CdiATWizardTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * System properties:
+ * -Dswtbot.test.properties.file=$PATH
+ * -Dusage_reporting_enabled=$BOOLEAN
+ *
+ * Suite duration: aprox. 3min
+ *
+ * @author Lukas Jungmann
+ */
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({
+ CdiATWizardTest.class,
+ BeansEditorTest.class})
+public class CDIAllBotTests {
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,252 @@
+/*******************************************************************************
+ * 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.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.jboss.tools.cdi.bot.test.uiutils.editor.BeansEditor;
+import org.jboss.tools.cdi.bot.test.uiutils.editor.BeansEditor.Item;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Lukas Jungmann
+ */
+@SWTBotTestRequires(clearProjects = false, perspective = "Java EE", server = @Server(state = ServerState.NotRunning, version = "6.0", operator = ">="))
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({ BeansEditorTest.class })
+public class BeansEditorTest extends SWTTestExt {
+
+ private static final String descPath = "WebContent/WEB-INF/beans.xml";
+ private static final String project = "CDIProject";
+ private static final Logger LOGGER = Logger.getLogger(BeansEditorTest.class.getName());
+
+ @BeforeClass
+ public static void prepare() {
+ copyResource("resources/beans.xml", descPath);
+ copyResource("resources/Foo.jav_", "src/cdi/Foo.java");
+ copyResource("resources/Bar.jav_", "src/cdi/Bar.java");
+ }
+
+ @Before
+ public void setup() {
+ new ProjectExplorer().openFile(project, descPath.split("/"));
+ }
+
+ @Test
+ public void testInterceptors() {
+ addItem(Item.INTERCEPTOR, "cdi.I1");
+ removeItem(Item.INTERCEPTOR, "cdi.I1");
+ addItem(Item.INTERCEPTOR, "cdi.I2");
+ }
+
+ @Test
+ public void testDecorators() {
+ addItem(Item.DECORATOR, "cdi.MapDecorator");
+ addItem(Item.DECORATOR, "cdi.ComparableDecorator");
+ removeItem(Item.DECORATOR, "cdi.ComparableDecorator");
+ }
+
+ @Test
+ public void testClasses() {
+ addItem(Item.CLASS, "cdi.Foo");
+ addItem(Item.CLASS, "cdi.Bar");
+ removeItem(Item.CLASS, "cdi.Foo");
+ }
+
+ @Test
+ public void testStereotypes() {
+ addItem(Item.STEREOTYPE, "cdi.S2");
+ addItem(Item.STEREOTYPE, "cdi.S3");
+ removeItem(Item.STEREOTYPE, "cdi.S3");
+ addItem(Item.STEREOTYPE, "cdi.S1");
+ removeItem(Item.STEREOTYPE, "cdi.S2");
+ }
+
+ @Test
+ public void testResult() {
+ SWTBotEditor editor = new SWTWorkbenchBot().activeEditor();
+ BeansEditor be = new BeansEditor(editor.getReference(), new SWTWorkbenchBot());
+ be.activatePage("Source");
+ String text = be.toTextEditor().getText();
+ List<Node> nl = getItems(text, Item.INTERCEPTOR);
+ assertEquals(1, nl.size());
+ assertTrue(containsItem(nl, "cdi.I2"));
+
+ nl = getItems(text, Item.DECORATOR);
+ assertEquals(1, nl.size());
+ assertTrue(containsItem(nl, "cdi.MapDecorator"));
+
+ nl = getItems(text, Item.CLASS);
+ assertEquals(1, nl.size());
+ assertTrue(containsItem(nl, "cdi.Bar"));
+
+ nl = getItems(text, Item.STEREOTYPE);
+ assertEquals(1, nl.size());
+ assertTrue(containsItem(nl, "cdi.S1"));
+ }
+
+ private void addItem(Item item, String name) {
+ SWTBotEditor editor = new SWTWorkbenchBot().activeEditor();
+ BeansEditor be = new BeansEditor(editor.getReference(), new SWTWorkbenchBot());
+ be.activatePage("Tree");
+ try {
+ be.add(item, name);
+ Assert.assertTrue(be.isDirty());
+ be.activatePage("Source");
+ String text = be.toTextEditor().getText();
+ List<Node> nl = getItems(text, item);
+ assertTrue(containsItem(nl, name));
+ } finally {
+ if (be.isDirty()) {
+ be.save();
+ }
+ }
+ }
+
+ private void removeItem(Item item, String name) {
+ SWTBotEditor editor = new SWTWorkbenchBot().activeEditor();
+ BeansEditor be = new BeansEditor(editor.getReference(), new SWTWorkbenchBot());
+ be.activatePage("Tree");
+ try {
+ be.remove(item, name);
+ Assert.assertTrue(be.isDirty());
+ be.activatePage("Source");
+ String text = be.toTextEditor().getText();
+ List<Node> nl = getItems(text, item);
+ assertFalse(containsItem(nl, name));
+ } finally {
+ if (be.isDirty()) {
+ be.save();
+ }
+ }
+ }
+
+ private Document getDocument(String text) {
+ Document d = null;
+ try {
+ d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(text.getBytes()));
+ } catch (SAXException e) {
+ LOGGER.log(Level.SEVERE, e.getMessage(), e);
+ } catch (IOException e) {
+ LOGGER.log(Level.SEVERE, e.getMessage(), e);
+ } catch (ParserConfigurationException e) {
+ LOGGER.log(Level.SEVERE, e.getMessage(), e);
+ }
+ return d;
+ }
+
+ private List<Node> getItems(String doc, Item i) {
+ Document d = getDocument(doc);
+ NodeList nl = null;
+ switch (i) {
+ case DECORATOR:
+ nl = d.getElementsByTagName("decorators");
+ break;
+ case INTERCEPTOR:
+ nl = d.getElementsByTagName("interceptors");
+ break;
+ case STEREOTYPE:
+ return getNodes(d.getElementsByTagName("stereotype"), i);
+ case CLASS:
+ nl = d.getElementsByTagName("alternatives");
+ break;
+ }
+ return nl.getLength() > 0 ? getNodes(nl.item(0).getChildNodes(), i) : new ArrayList<Node>();
+ }
+
+ private List<Node> getNodes(NodeList nl, Item item) {
+ List<Node> list = new ArrayList<Node>();
+ for (int i = 0; i < nl.getLength(); i++) {
+ Node n = nl.item(i);
+ if (item == Item.STEREOTYPE) {
+ if ("stereotype".equals(n.getNodeName())) {
+ list.add(n);
+ }
+ } else {
+ if ("class".equals(n.getNodeName())) {
+ list.add(n);
+ }
+ }
+ }
+ return list;
+ }
+
+ private boolean containsItem(List<Node> nl, String name) {
+ if (nl == null) {
+ return false;
+ }
+ for (int i = 0; i < nl.size(); i++) {
+ if (name.equals(nl.get(i).getTextContent())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static void copyResource(String src, String target) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProjects()[0];
+ IFile f = project.getFile(target);
+ if (f.exists()) {
+ LOGGER.info("Replacing " + target + " file");
+ try {
+ f.delete(true, new NullProgressMonitor());
+ } catch (CoreException ce) {
+ LOGGER.log(Level.WARNING, ce.getMessage(), ce);
+ }
+ }
+ InputStream is = null;
+ try {
+ is = BeansEditorTest.class.getResourceAsStream(src);
+ f.create(is, true, new NullProgressMonitor());
+ } catch (CoreException ce) {
+ LOGGER.log(Level.WARNING, ce.getMessage(), ce);
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException ioe) {
+ //ignore
+ }
+ }
+ }
+ }
+}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Bar.jav_
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Bar.jav_ (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Bar.jav_ 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,13 @@
+/*******************************************************************************
+ * 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 cdi;
+
+public class Bar {}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Foo.jav_
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Foo.jav_ (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/Foo.jav_ 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,13 @@
+/*******************************************************************************
+ * 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 cdi;
+
+public class Foo {}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/beans.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/resources/beans.xml 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,15 @@
+<?xml version="1.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
+******************************************************************************
+-->
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd"/>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2010-11-01 16:40:15 UTC (rev 26167)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2010-11-01 16:51:41 UTC (rev 26168)
@@ -15,40 +15,48 @@
import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
public abstract class Action<T> {
private final SWTBotExt bot = new SWTBotExt();
- private final String[] path;
+ private final String[] actionPath;
+ private final String[] nodePath;
+ private final SWTBotTree tree;
public Action(String... path) {
- assert path.length > 0;
- this.path = path;
+ this(null, null, path);
}
+
+ public Action(SWTBotTree tree, String[] nodePath, String... actionPath) {
+ assert actionPath.length > 0;
+ this.tree = tree;
+ this.nodePath = nodePath;
+ this.actionPath = actionPath;
+ }
public abstract T run();
protected SWTBot performMenu() {
- SWTBotMenu m = bot.menu(path[0]);
- for (int i = 1; i < path.length; i++) {
- m = m.menu(path[i]);
+ SWTBotMenu m = bot.menu(actionPath[0]);
+ for (int i = 1; i < actionPath.length; i++) {
+ m = m.menu(actionPath[i]);
}
m.click();
return new SWTBot();
}
- protected SWTBot pepformPopup(final SWTBotTree tree, SWTBotTreeItem item) {
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ protected SWTBot pepformPopup() {
+ assert tree != null : "Tree cannot be null!";
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, tree.expandNode(nodePath));
UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
public SWTBotMenu run() {
SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
- tree, path[0], false));
- for (int i = 1; i < path.length; i++) {
- m = m.menu(path[i]);
+ tree, actionPath[0], false));
+ for (int i = 1; i < actionPath.length; i++) {
+ m = m.menu(actionPath[i]);
}
return m;
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/editor/BeansEditor.java 2010-11-01 16:51:41 UTC (rev 26168)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * 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.editor;
+
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.ui.IEditorReference;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.widgets.SWTBotMultiPageEditor;
+
+/**
+ * @author Lukas Jungmann
+ */
+public class BeansEditor extends SWTBotMultiPageEditor {
+
+ public enum Item {
+ INTERCEPTOR("Interceptors"), DECORATOR("Decorators"),
+ CLASS("Alternatives"), STEREOTYPE("Alternatives");
+
+ private final String node;
+
+ private Item(String node) {
+ this.node = node;
+ }
+
+ private String getNode() {
+ return node;
+ }
+ }
+
+ private SWTBotExt bot = new SWTBotExt();
+ private static final String ROOT_NODE = "beans.xml";
+
+ public BeansEditor(IEditorReference editorReference, SWTWorkbenchBot bot) {
+ super(editorReference, bot);
+ }
+
+ public BeansEditor add(Item item, String name) {
+ return modify(item, name, "Add...", new AddDialogHandler(item, name));
+ }
+
+ public BeansEditor remove(Item item, String name) {
+ return modify(item, name, "Remove...", new DeleteDialogHandler());
+ }
+
+ private BeansEditor modify(Item item, String name, String actionLabel, DialogHandler h) {
+ SWTBotTree tree = bot.tree();
+ tree.expandNode(ROOT_NODE, item.getNode()).select().click();
+ selectItem(item, name);
+ getItemButton(item, actionLabel).click();
+ h.handle(bot.activeShell());
+ bot.sleep(500);
+ this.setFocus();
+ return this;
+ }
+
+ private void selectItem(Item item, String name) {
+ SWTBotTable t = item == Item.STEREOTYPE ? bot.table(1) : bot.table(0);
+ if (t.containsItem(name)) {
+ t.select(name);
+ }
+ }
+
+ private SWTBotButton getItemButton(Item i, String label) {
+ return i == Item.STEREOTYPE ? bot.button(label, 1) : bot.button(label, 0);
+ }
+
+ private interface DialogHandler {
+ void handle(SWTBotShell dialog);
+ }
+
+ private class AddDialogHandler implements DialogHandler {
+
+ private final Item type;
+ private final String name;
+
+ public AddDialogHandler(Item type, String name) {
+ this.type = type;
+ this.name = name;
+ }
+
+ public void handle(SWTBotShell dialog) {
+ SWTBot sh = dialog.bot();
+ SWTBotText t = type == Item.STEREOTYPE
+ ? sh.textWithLabel("Stereotype:*")
+ : sh.textWithLabel("Class:*");
+ t.setText(name);
+ sh.button("Finish").click();
+ }
+ }
+
+ private class DeleteDialogHandler implements DialogHandler {
+
+ public void handle(SWTBotShell dialog) {
+ dialog.bot().button("OK").click();
+ }
+
+ }
+}
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 2010-11-01 16:40:15 UTC (rev 26167)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2010-11-01 16:51:41 UTC (rev 26168)
@@ -250,6 +250,7 @@
bot().button("Add...", 0).click();
SWTBotShell sh = bot().activeShell();
sh.bot().text().setText(intf);
+ sh.bot().sleep(1000);
sh.bot().table().getTableItem(0).select();
sh.bot().button("OK").click();
break;
14 years, 2 months
JBoss Tools SVN: r26167 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-11-01 12:40:15 -0400 (Mon, 01 Nov 2010)
New Revision: 26167
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6872
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2010-11-01 16:26:23 UTC (rev 26166)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2010-11-01 16:40:15 UTC (rev 26167)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.ui.test.marker;
import java.io.IOException;
+import java.io.InputStream;
import junit.framework.TestCase;
@@ -18,16 +19,21 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
+import org.jboss.tools.seam.core.SeamCoreBuilder;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
import org.jboss.tools.seam.ui.marker.AddAnnotatedMethodMarkerResolution;
import org.jboss.tools.seam.ui.marker.AddAnnotationMarkerResolution;
+import org.jboss.tools.seam.ui.marker.AddSetterMarkerResolution;
import org.jboss.tools.seam.ui.marker.ChangeScopeMarkerResolution;
import org.jboss.tools.seam.ui.marker.DeleteAnnotationMarkerResolution;
import org.jboss.tools.seam.ui.marker.RenameAnnotationMarkerResolution;
@@ -441,5 +447,72 @@
}
assertEquals("Not all quickfixes \"Change scope to...\" found.", 8, found);
}
+
+ public void testAddSetterForProperty() throws CoreException {
+ String TARGET_FILE_NAME = "WebContent/WEB-INF/components.xml";
+ copyContentsFile(TARGET_FILE_NAME, "WebContent/WEB-INF/components.3");
+
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, SeamCoreBuilder.BUILDER_ID, null, null);
+
+ JobUtils.waitForIdle();
+
+ IFile file = project.getFile(TARGET_FILE_NAME);
+
+ assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ assertTrue("Problem marker not found", markers.length > 0);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof AddSetterMarkerResolution) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("The quickfix \"Add setter for 'abc' property in 'org.domain.SeamWebWarTestProject.session.StatefulComponentWithAbcField' class\" doesn't exist.", found);
+ }
+
+ protected void copyContentsFile(String originalName, String newContentName) throws CoreException{
+ IFile originalFile = project.getFile(originalName);
+ IFile newContentFile = project.getFile(newContentName);
+
+ copyContentsFile(originalFile, newContentFile);
+ }
+
+ protected void copyContentsFile(IFile originalFile, IFile newContentFile) throws CoreException{
+ PageContextFactory.getInstance().cleanUp(originalFile);
+ InputStream is = null;
+ try{
+ is = newContentFile.getContents();
+ originalFile.setContents(is, true, false, null);
+ } finally {
+ if(is!=null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+ JobUtils.waitForIdle();
+ originalFile.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, "org.eclipse.jdt.internal.core.builder.JavaBuilder", null, null);
+ JobUtils.waitForIdle();
+ originalFile.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, SeamCoreBuilder.BUILDER_ID, null, null);
+// originalFile.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ JobUtils.waitForIdle();
+ }
+
}
14 years, 2 months