JBoss Tools SVN: r22788 - in workspace/mareshkau/xulrunner-1.9.2: org.mozilla.xpcom/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-14 10:04:14 -0400 (Mon, 14 Jun 2010)
New Revision: 22788
Modified:
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/META-INF/MANIFEST.MF
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/src/MozillaInterfaces-src.jar
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/META-INF/MANIFEST.MF
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/MozillaGlue.jar
workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/MozillaInterfaces.jar
Log:
https://jira.jboss.org/browse/JBIDE-6429
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/META-INF/MANIFEST.MF
===================================================================
--- workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/META-INF/MANIFEST.MF 2010-06-14 13:56:50 UTC (rev 22787)
+++ workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/META-INF/MANIFEST.MF 2010-06-14 14:04:14 UTC (rev 22788)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Mozilla XPCOM Eclipse plugin
Bundle-SymbolicName: org.mozilla.xpcom;singleton:=true
-Bundle-Version: 1.9.1.2
+Bundle-Version: 1.9.2
Bundle-ClassPath: MozillaGlue.jar,
MozillaInterfaces.jar
Export-Package: org.mozilla.interfaces,
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/MozillaGlue.jar
===================================================================
(Binary files differ)
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom/MozillaInterfaces.jar
===================================================================
(Binary files differ)
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/META-INF/MANIFEST.MF
===================================================================
--- workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/META-INF/MANIFEST.MF 2010-06-14 13:56:50 UTC (rev 22787)
+++ workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/META-INF/MANIFEST.MF 2010-06-14 14:04:14 UTC (rev 22788)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Mozilla XPCOM For Java
Bundle-SymbolicName: org.mozilla.xpcom.source;singleton:=true
-Bundle-Version: 1.9.1.2
+Bundle-Version: 1.9.2
Bundle-ClassPath: MozillaInterfaces.jar
Bundle-Vendor: mozilla.org
Require-Bundle: org.eclipse.pde.ui
Modified: workspace/mareshkau/xulrunner-1.9.2/org.mozilla.xpcom.source/src/MozillaInterfaces-src.jar
===================================================================
(Binary files differ)
14 years, 7 months
JBoss Tools SVN: r22787 - in trunk/jsf: plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-06-14 09:56:50 -0400 (Mon, 14 Jun 2010)
New Revision: 22787
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponentAfterRename.html
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponent.html
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6417 - fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/JSF2RenameParticipant.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -90,7 +90,7 @@
return false;
}
IContentType contentType = IDE.getContentType(file);
- if (!"org.eclipse.wst.html.core.htmlsource".equals(contentType.getId())) { //$NON-NLS-1$
+ if (!"jsf.facelet.composite".equals(contentType.getId()) && !"jsf.facelet".equals(contentType.getId())) { //$NON-NLS-1$ //$NON-NLS-2$
return false;
}
// if ((JSF2ComponentModelManager.getManager()
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/refactoring/action/rename/CompositeAttributeRenameProcessor.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -32,6 +32,7 @@
import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
+import org.jboss.tools.jsf.jsf2.model.JSF2ComponentModelManager;
import org.jboss.tools.jsf.jsf2.refactoring.core.StructuredChanges;
import org.jboss.tools.jsf.jsf2.refactoring.core.StructuredTextFileChange;
import org.jboss.tools.jsf.jsf2.util.JSF2ComponentUtil;
@@ -57,7 +58,7 @@
private static final GroupCategorySet CATEGORY_COMPOSITE_ATTR_RENAME = new GroupCategorySet(
new GroupCategory(
"org.jboss.tools.jsf.jsf2.refactoring.rename.composite.attr.type", JSFUIMessages.Refactoring_JSF_2_Rename_Composite_Attr_Changes, JSFUIMessages.Refactoring_JSF_2_Changes_Rename_Composite_Attr)); //$NON-NLS-1$
- public static String IDENTIFIER = "org.jboss.tools.jsf.jsf2.refactor.compositeattrrenameprocessor"; //$NON-NLS-1$
+ public static final String IDENTIFIER = "org.jboss.tools.jsf.jsf2.refactor.compositeattrrenameprocessor"; //$NON-NLS-1$
private String newAttrName;
private String currentAttrName;
private IProject project;
@@ -91,10 +92,7 @@
OperationCanceledException {
StructuredChanges changes = new StructuredChanges(
JSFUIMessages.Refactoring_JSF_2_Composite_Attr_Rename_Changes);
- StructuredTextFileChange baseFileChange = new StructuredTextFileChange(baseFile.getFullPath().toOSString(), baseFile);
- ReplaceEdit edit = new ReplaceEdit(attrToRename.getValueRegionStartOffset()+1, attrToRename.getValue().length(), getNewElementName());
- TextChangeCompatibility.addTextEdit(baseFileChange, JSFUIMessages.Refactoring_JSF_2_Rename_Composite_Attr_Name, edit, CATEGORY_COMPOSITE_ATTR_RENAME);
- changes.add(baseFileChange);
+ changes.add(createBaseFileChange());
Map<IFile, List<IDOMNode>> nodesMap = JSF2ComponentUtil
.findCompositeComponentsWithURI(getProject(), getURI());
Set<Entry<IFile, List<IDOMNode>>> entries = nodesMap.entrySet();
@@ -107,7 +105,31 @@
}
return changes;
}
+
+ private StructuredTextFileChange createBaseFileChange(){
+ StructuredTextFileChange baseFileChange = new StructuredTextFileChange(baseFile.getFullPath().toOSString(), baseFile);
+ ReplaceEdit edit = new ReplaceEdit(attrToRename.getValueRegionStartOffset()+1, attrToRename.getValue().length(), getNewElementName());
+ TextChangeCompatibility.addTextEdit(baseFileChange, JSFUIMessages.Refactoring_JSF_2_Rename_Composite_Attr_Name, edit, CATEGORY_COMPOSITE_ATTR_RENAME);
+ IDOMElement element = JSF2ComponentUtil.findCompositeImpl(JSF2ComponentModelManager.getReadableDOMDocument(baseFile));
+ if (element != null) {
+ IDOMAttr[] attrs = JSF2ComponentUtil.extractAttrsWithValue(element, computeAttrOldValue());
+ for (int i = 0; i < attrs.length; i++) {
+ edit = new ReplaceEdit(attrs[i].getValueRegionStartOffset()+1, attrs[i].getValue().length(), computeAttrNewValue());
+ TextChangeCompatibility.addTextEdit(baseFileChange, JSFUIMessages.Refactoring_JSF_2_Rename_Attr_Ref_Decl, edit, CATEGORY_COMPOSITE_ATTR_RENAME);
+ }
+ }
+ return baseFileChange;
+
+ }
+ private String computeAttrOldValue(){
+ return "#{cc.attrs." + getCurrentElementName() + "}"; //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ private String computeAttrNewValue(){
+ return "#{cc.attrs." + getNewElementName() + "}"; //$NON-NLS-1$//$NON-NLS-2$
+ }
+
private StructuredTextFileChange createFileChange(IFile file,
List<IDOMNode> nodeList) {
StructuredTextFileChange fileChange = null;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/jsf2/util/JSF2ComponentUtil.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -27,6 +27,7 @@
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.jsf.jsf2.model.JSF2ComponentModelManager;
import org.w3c.dom.Element;
@@ -184,5 +185,66 @@
}
}
}
-
+
+ public static IDOMElement findCompositeImpl(Node node){
+ IDOMElement[] compositeImpl = new IDOMElement[1];
+ findCompositeImpl(node, compositeImpl);
+ return compositeImpl[0];
+ }
+
+ private static void findCompositeImpl(Node node,
+ IDOMElement[] interfaceElement) {
+ if (node instanceof IDOMDocument) {
+ IDOMDocument document = (IDOMDocument) node;
+ findCompositeImpl(document.getDocumentElement(),
+ interfaceElement);
+ }
+ if (node instanceof ElementImpl) {
+ ElementImpl impl = (ElementImpl) node;
+ String nameSpace = impl.getNamespaceURI();
+ if (JSF2ResourceUtil.JSF2_URI_PREFIX.equals(nameSpace)) {
+ String nodeName = impl.getLocalName();
+ if ("implementation".equals(nodeName)) { //$NON-NLS-1$
+ interfaceElement[0] = impl;
+ return;
+ }
+ } else {
+ NodeList nodeList = node.getChildNodes();
+ if (nodeList != null) {
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ findCompositeImpl(nodeList.item(i),
+ interfaceElement);
+ }
+ }
+ }
+ }
+ }
+
+ public static IDOMAttr[] extractAttrsWithValue(IDOMElement elToExtract, String value){
+ List<IDOMAttr> attrs = new ArrayList<IDOMAttr>();
+ extractAttrsWithValue(elToExtract, value, attrs);
+ return attrs.toArray(new IDOMAttr[0]);
+ }
+
+ private static void extractAttrsWithValue(IDOMElement elToExtract, String value, List<IDOMAttr> attrs){
+ NamedNodeMap namedNodeMap = elToExtract.getAttributes();
+ if (namedNodeMap != null) {
+ for (int i = 0; i < namedNodeMap.getLength(); i++) {
+ IDOMAttr attr = (IDOMAttr) namedNodeMap.item(i);
+ if (value.equals(attr.getValue().trim())) {
+ attrs.add(attr);
+ }
+ }
+ }
+ NodeList children = elToExtract.getChildNodes();
+ if (children != null) {
+ for (int i = 0; i < children.getLength(); i++) {
+ Node node = children.item(i);
+ if (node instanceof IDOMElement) {
+ extractAttrsWithValue((IDOMElement) node, value, attrs);
+ }
+ }
+ }
+ }
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/JSFUIMessages.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -146,6 +146,7 @@
public static String Refactoring_JSF_2_Rename_Composite_Component_Changes;
public static String Refactoring_JSF_2_Changes_Rename_Composite_Component;
public static String Refactoring_JSF_2_Rename_Composite_Component;
+ public static String Refactoring_JSF_2_Rename_Attr_Ref_Decl;
static {
// load message values from bundle file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-06-14 13:56:50 UTC (rev 22787)
@@ -122,4 +122,5 @@
Refactoring_JSF_2_Rename_Composite_URI=Rename composite URI
Refactoring_JSF_2_Rename_Composite_Component_Changes=Rename composite component changes
Refactoring_JSF_2_Changes_Rename_Composite_Component=Changes to rename composite component
-Refactoring_JSF_2_Rename_Composite_Component=Rename composite component
\ No newline at end of file
+Refactoring_JSF_2_Rename_Composite_Component=Rename composite component
+Refactoring_JSF_2_Rename_Attr_Ref_Decl=Rename composite attribute reference in declaration
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponent.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponent.html 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponent.html 2010-06-14 13:56:50 UTC (rev 22787)
@@ -11,6 +11,10 @@
</composite:interface>
<!-- IMPLEMENTATION -->
-<composite:implementation></composite:implementation>
+<composite:implementation>
+ <composite:implementation>
+ <h1><h:outputText value="#{cc.attrs.echo}" /></h1>
+ </composite:implementation>
+</composite:implementation>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponentAfterRename.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponentAfterRename.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/refactor/compositeComponentAfterRename.html 2010-06-14 13:56:50 UTC (rev 22787)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:composite="http://java.sun.com/jsf/composite">
+
+<!-- INTERFACE -->
+<composite:interface>
+ <composite:attribute name="echo1"></composite:attribute>
+</composite:interface>
+
+<!-- IMPLEMENTATION -->
+<composite:implementation>
+ <composite:implementation>
+ <h1><h:outputText value="#{cc.attrs.echo1}" /></h1>
+ </composite:implementation>
+</composite:implementation>
+
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AbstractRefactorTest.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -8,53 +8,41 @@
import org.jboss.tools.ui.bot.test.WidgetVariables;
public abstract class JSF2AbstractRefactorTest extends JSFAutoTestCase {
-
+
protected static final String JSF2_Test_Page_Name = "jsf2TestPage"; //$NON-NLS-1$
-
+
protected void createCompositeComponent() throws Exception {
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
try {
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (WidgetNotFoundException e) {
- tree
- .getTreeItem(
- projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").select(); //$NON-NLS-1$ //$NON-NLS-2$
bot.menu("File").menu("New").menu("Folder").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("resources"); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} catch (WidgetNotFoundException e) {
- tree
- .getTreeItem(
- projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("File").menu("New").menu("Folder").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("mycomp"); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} catch (WidgetNotFoundException e) {
- tree
- .getTreeItem(
- projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("File").menu("New").menu("Folder").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.textWithLabel("Folder name:").setText("mycomp"); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
}
try {
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
} catch (WidgetNotFoundException e) {
- tree
- .getTreeItem(
- projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
bot.menu("File").menu("New").menu("Other...").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.shell("New").activate(); //$NON-NLS-1$
tree = bot.tree();
@@ -63,7 +51,14 @@
bot.textWithLabel("File name:").setText("echo"); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Finish").click(); //$NON-NLS-1$
bot.sleep(2000);
- bot.editorByTitle("echo.xhtml").saveAndClose(); //$NON-NLS-1$
+ SWTBotEclipseEditor editor = bot
+ .editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$//$NON-NLS-2$
+ bot.sleep(2000);
+ editor.setText(loadFileContent("refactor/compositeComponent.html")); //$NON-NLS-1$
+ editor.save();
+ bot.sleep(2000);
}
}
@@ -75,9 +70,7 @@
tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent"). //$NON-NLS-1$ //$NON-NLS-2$
getNode(JSF2_Test_Page_Name + ".xhtml").doubleClick(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
- tree
- .getTreeItem(
- projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
bot.menu("File").menu("New").menu("Other...").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.shell("New").activate(); //$NON-NLS-1$
tree = bot.tree();
@@ -97,5 +90,5 @@
bot.sleep(2000);
editor.saveAndClose();
}
-
+
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2010-06-14 13:55:13 UTC (rev 22786)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2010-06-14 13:56:50 UTC (rev 22787)
@@ -33,8 +33,7 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name + ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name + ".xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
delay();
SWTBotEclipseEditor editor = bot.editorByTitle(
JSF2_Test_Page_Name + ".xhtml").toTextEditor(); //$NON-NLS-1$
@@ -42,6 +41,13 @@
loadFileContent("refactor/jsf2RenameAttrTestPageRefactor.html"), editor.getText()); //$NON-NLS-1$
delay();
editor.close();
+ innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ tree = innerBot.tree();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ delay();
+ editor = bot.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
+ assertEquals(
+ loadFileContent("refactor/compositeComponentAfterRename.html"), editor.getText()); //$NON-NLS-1$
}
@Override
@@ -50,8 +56,7 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
SWTBotEclipseEditor editor = bot
.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$ //$NON-NLS-2$
@@ -67,13 +72,11 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
.bot();
SWTBotTree tree = innerBot.tree();
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name + ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode(JSF2_Test_Page_Name + ".xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
- tree
- .expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("WebContent").expandNode("resources").expandNode("mycomp").expandNode("echo.xhtml").select(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
delay();
@@ -83,12 +86,11 @@
private void checkPreview() throws IOException {
delay();
SWTBotTree tree = bot.tree();
- tree
- .expandNode("Composite attribute name changes").expandNode("echo.xhtml - " + projectProperties.getProperty("JSFProjectName") + "/WebContent/resources/mycomp").expandNode("Rename composite attribute name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- tree
- .expandNode("Composite attribute name changes").expandNode("jsf2TestPage.xhtml - " + projectProperties.getProperty("JSFProjectName") + "/WebContent").expandNode("Rename composite attribute"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode("Composite attribute name changes").expandNode("echo.xhtml - " + projectProperties.getProperty("JSFProjectName") + "/WebContent/resources/mycomp").expandNode("Rename composite attribute name"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ tree.expandNode("Composite attribute name changes").expandNode("jsf2TestPage.xhtml - " + projectProperties.getProperty("JSFProjectName") + "/WebContent").expandNode("Rename composite attribute"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
SWTBotStyledText styledText = bot.styledText(0);
- assertEquals(loadFileContent("refactor/compositeComponent.html"), styledText.getText()); //$NON-NLS-1$
+ assertEquals(
+ loadFileContent("refactor/compositeComponent.html"), styledText.getText()); //$NON-NLS-1$
System.out.println(styledText.getText());
}
14 years, 7 months
JBoss Tools SVN: r22786 - in trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: types and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-06-14 09:55:13 -0400 (Mon, 14 Jun 2010)
New Revision: 22786
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
Log:
SWTBot Extensions : added consoleView.switchConsole
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java 2010-06-14 12:41:39 UTC (rev 22785)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java 2010-06-14 13:55:13 UTC (rev 22786)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
* this is a special requirement which should run only once, main aim of this is to prepare
@@ -27,14 +28,14 @@
return new Vector<String>();
}
public String getName() {
- return "Welcome";
+ return IDELabel.View.WELCOME;
}});
// force console view not to steal focus when something happens
try {
SWTBotView consoleView = SWTTestExt.console.show();
- consoleView.toolbarToggleButton("Show Console When Standard Out Changes").deselect();
- consoleView.toolbarToggleButton("Show Console When Standard Error Changes").deselect();
+ consoleView.toolbarToggleButton(IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDOUT_CHANGES_TOOLTIP).deselect();
+ consoleView.toolbarToggleButton(IDELabel.ConsoleView.BUTTON_SHOW_WHEN_STDERR_CHANGES_TOOLTIP).deselect();
} catch (Exception ex) {
// do nothing since buttons must not always be available
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-06-14 12:41:39 UTC (rev 22785)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-06-14 13:55:13 UTC (rev 22786)
@@ -400,6 +400,9 @@
public static class ConsoleView {
public static final String BUTTON_CLEAR_CONSOLE_TOOLTIP = "Clear Console";
+ public static final String BUTTON_DISPLAY_SELECTED_CONSOLE_TOOLTIP = "Display Selected Console";
+ public static final String BUTTON_SHOW_WHEN_STDOUT_CHANGES_TOOLTIP = "Show Console When Standard Out Changes";
+ public static final String BUTTON_SHOW_WHEN_STDERR_CHANGES_TOOLTIP = "Show Console When Standard Error Changes";
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java 2010-06-14 12:41:39 UTC (rev 22785)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ConsoleView.java 2010-06-14 13:55:13 UTC (rev 22786)
@@ -11,9 +11,14 @@
package org.jboss.tools.ui.bot.ext.view;
import org.apache.log4j.Logger;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarDropDownButton;
+import org.hamcrest.core.IsAnything;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GeneralConsole;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
@@ -63,6 +68,27 @@
// Do nothing Clear Console button is not available
}
}
+ /**
+ * switches content displayed in cosole (see 'Display Selected Console' toolbar button)
+ * if content cannot be switched (e.g. only one console is displayed in view or console name does not match given
+ * String param) return false
+ * @param containedInonsoleName String contained in name of console to switch on
+ */
+ public boolean switchConsole(String containedInonsoleName) {
+ SWTBotView consoleView = show();
+ SWTBotToolbarDropDownButton button = consoleView.toolbarDropDownButton(IDELabel.ConsoleView.BUTTON_DISPLAY_SELECTED_CONSOLE_TOOLTIP);
+ if (button.isEnabled()) {
+ for (SWTBotMenu menu : button.menuItems(new IsAnything<MenuItem>()))
+ {
+ if (menu.getText().contains(containedInonsoleName)) {
+ log.info("Switching consoleView to display '"+menu.getText()+"'. console");
+ menu.click();
+ return true;
+ }
+ }
+ }
+ return false;
+ }
public String getConsoleText (long sleepTime , long timeOut , boolean quitWhenNoChange){
14 years, 7 months
JBoss Tools SVN: r22785 - in trunk/jst/tests/org.jboss.tools.ui.bot.ext: src/org/jboss/tools/ui/bot/ext and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-06-14 08:41:39 -0400 (Mon, 14 Jun 2010)
New Revision: 22785
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.multi.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
Log:
SWTBot Extensions : added testsuite supporting multiple configurations at one run
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.multi.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.multi.properties (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.multi.properties 2010-06-14 12:41:39 UTC (rev 22785)
@@ -0,0 +1,3 @@
+# multi-properties file, here can be defined multiple testing configurations similar to SWTTest-default.properties
+# <property name - configuration name>=<config properties file>
+EAP5=/data/lzoubek/workspace/eap5.properties
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.multi.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-06-14 12:41:39 UTC (rev 22785)
@@ -2,7 +2,8 @@
# all properties are optional, all defined paths should exist
# <java version>,<jre/jdk home>
JAVA=1.6,/opt/sun-jdk-1.6.0.19/jre
-#EAP|JBOSS_AS|EPP,<server version>,<jre version to run with>|default,<server 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.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as
#<seam version>,<seam runtime home>
SEAM=2.2,/data/jboss/jboss-eap-5.0/seam
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -3,18 +3,23 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map.Entry;
import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.junit.ScreenshotCaptureListener;
+import org.jboss.tools.ui.bot.ext.config.TestConfiguration;
import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementBase;
import org.junit.runner.Description;
import org.junit.runner.Runner;
+import org.junit.runner.manipulation.Filter;
+import org.junit.runner.manipulation.NoTestsRemainException;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.Suite;
+import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
import org.junit.runners.model.Statement;
@@ -31,18 +36,22 @@
final static DoAfterAllTestsRunListener cleanUp = new DoAfterAllTestsRunListener();
class ReqAwareClassRunner extends BlockJUnit4ClassRunner {
+ private final TestConfiguration config;
private final List<RequirementBase> requirements;
public ReqAwareClassRunner(Class<?> klass,
- List<RequirementBase> requirements) throws InitializationError {
+ List<RequirementBase> requirements, TestConfiguration config)
+ throws InitializationError {
super(klass);
this.requirements = requirements;
+ this.config = config;
}
@Override
public void run(RunNotifier notifier) {
- // planned test counter must know about all tests (methods) within a class
- cleanUp.incrPlanned(getChildren().size()-1);
+ // planned test counter must know about all tests (methods) within a
+ // class
+ cleanUp.incrPlanned(getChildren().size() - 1);
// ensure that we have exactly 1 cleanup listener registered
notifier.removeListener(cleanUp);
notifier.addListener(cleanUp);
@@ -57,8 +66,17 @@
notifier.removeListener(failureSpy);
}
}
+
@Override
+ protected String testName(FrameworkMethod method) {
+ return config.getPropName() + " - " + method.getName();
+ }
+
+ @Override
protected Statement withBeforeClasses(Statement statement) {
+ if (!this.config.equals(TestConfigurator.currentConfig)) {
+ TestConfigurator.currentConfig = this.config;
+ }
log.info("Fullfilling requirements before test "
+ getTestClass().getJavaClass());
try {
@@ -68,7 +86,6 @@
} catch (Exception e) {
log.error("Fulfilling failed", e);
}
-
return super.withBeforeClasses(statement);
}
}
@@ -77,21 +94,25 @@
.getLogger(RequirementAwareSuite.class);
private class RequirementAwareRunnerBuilder extends RunnerBuilder {
+ private final TestConfiguration config;
+
+ public RequirementAwareRunnerBuilder(TestConfiguration config) {
+ this.config = config;
+ }
+
@Override
public Runner runnerForClass(Class<?> klass) throws Throwable {
- List<RequirementBase> reqs = TestConfigurator
- .getClassRequirements(klass);
- if (reqs != null) {
- if (!TestConfigurator.checkConfig()) {
- log.info("Skipping class '" + klass.getCanonicalName()
- + "' - incorrect configuration");
- return null;
- }
+ if (!this.config.equals(TestConfigurator.currentConfig)) {
+ TestConfigurator.currentConfig = this.config;
+ }
+ List<RequirementBase> reqs = TestConfigurator.getClassRequirements(klass);
+ if (reqs != null) {
log.info("Returning runner for class '"
- + klass.getCanonicalName()+"'");
- // increment number of tests planned to run by 1 (class contains at least 1 test method)
+ + klass.getCanonicalName() + "'");
+ // increment number of tests planned to run by 1 (class contains
+ // at least 1 test method)
cleanUp.incrPlanned();
- return new ReqAwareClassRunner(klass, reqs);
+ return new ReqAwareClassRunner(klass, reqs, config);
}
log.info("Skipping class '" + klass.getCanonicalName()
+ "' - annotations do not met configuration");
@@ -108,14 +129,17 @@
*
*/
static class DoAfterAllTestsRunListener extends RunListener {
- // As we can run more suites at once, we need to count tests which are planned to run
- // and the ones which already passed (or failed), perform cleanups when the last one finishes
+ // As we can run more suites at once, we need to count tests which are
+ // planned to run
+ // and the ones which already passed (or failed), perform cleanups when
+ // the last one finishes
private int testsAboutToRun = 0;
private int testsFinished = 0;
public void incrPlanned() {
testsAboutToRun += 1;
}
+
public void incrPlanned(int amount) {
testsAboutToRun += amount;
}
@@ -130,14 +154,16 @@
public int getFinished() {
return testsFinished;
- }
+ }
+
@Override
public void testFinished(Description description) throws Exception {
incrFinished();
- log.info("Finished test : "+description.getDisplayName());
- log.info("Finished tests : "+getFinished()+"/"+getPlanned());
+ log.info("Finished test : " + description.getDisplayName());
+ log.info("Finished tests : " + getFinished() + "/" + getPlanned());
if (getFinished() >= getPlanned()) {
- log.info("All tests finished, performing cleanup requirements ");
+ log
+ .info("All tests finished, performing cleanup requirements ");
try {
RequirementBase.createStopServer().fulfill();
@@ -165,11 +191,40 @@
*/
public RequirementAwareSuite(Class<?> klass) throws Throwable {
super(klass, Collections.<Runner> emptyList());
- runners.add(new Suite(klass, new RequirementAwareRunnerBuilder()));
+ log.info("Loading test configurations");
+ for (Entry<Object, Object> entry : TestConfigurator.multiProperties
+ .entrySet()) {
+ try {
+ TestConfiguration config = new TestConfiguration(entry.getKey()
+ .toString(), entry.getValue().toString());
+ String suiteName = config.getPropName() + " - "
+ + klass.getCanonicalName();
+ runners.add(new NamedSuite(klass,
+ new RequirementAwareRunnerBuilder(config), suiteName));
+ } catch (Exception ex) {
+ log.error("Error loading test configuration", ex);
+ }
+ }
}
@Override
protected List<Runner> getChildren() {
return runners;
}
+
+ public class NamedSuite extends Suite {
+ private final String suiteName;
+
+ public NamedSuite(Class<?> klass, RunnerBuilder builder, String name)
+ throws InitializationError {
+ super(klass, builder);
+ this.suiteName = name;
+ }
+
+ @Override
+ protected String getName() {
+ return suiteName;
+ }
+
+ }
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -154,6 +154,10 @@
}
public enum ServerType {
/**
+ * SOA platform (includes EAP)
+ */
+ SOA,
+ /**
* EAP
*/
EAP,
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -90,6 +90,10 @@
* version of java configured to server (1.5 or 1.6)
*/
public String withJavaVersion = null;
+ /**
+ * version of bundled ESB (applicable only for server type SOA)
+ */
+ public String bundledESBVersion=null;
}
public class Seam {
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -0,0 +1,135 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.apache.log4j.Logger;
+import org.jboss.tools.ui.bot.ext.Activator;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator.Keys;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator.Values;
+
+public class TestConfiguration {
+ private static final Logger log = Logger.getLogger(TestConfiguration.class);
+
+ private Properties swtTestProperties = new Properties();
+
+ public String getProperty(String key) {
+ return swtTestProperties.getProperty(key);
+ }
+
+ private final String propName;
+ private final String propFile;
+
+ private ServerBean server;
+ private SeamBean seam;
+ private ESBBean esb;
+ private JavaBean java;
+
+ public TestConfiguration(String propName, String propFile) throws Exception {
+ this.propName = propName;
+ this.propFile = propFile;
+ if (propFile != null) {
+ if (new File(propFile).exists()) {
+ log.info("Loading configuration file '" + propFile + "'");
+ swtTestProperties.load(new FileInputStream(propFile));
+ } else {
+ throw new IOException(propName + " " + propFile + " does not exist!");
+ }
+
+ } else {
+ log.info("Loading default configuration");
+ swtTestProperties.load(new FileInputStream(SWTTestExt.util
+ .getResourceFile(Activator.PLUGIN_ID,
+ "/SWTBotTest-default.properties")));
+ }
+ // properties got loaded
+ java = JavaBean.fromString(getProperty(Keys.JAVA));
+ printConfig(Keys.JAVA, java);
+ server = ServerBean.fromString(getProperty(Keys.SERVER));
+ printConfig(Keys.SERVER, server);
+ seam = SeamBean.fromString(getProperty(Keys.SEAM));
+ printConfig(Keys.SEAM, seam);
+ esb = ESBBean.fromString(getProperty(Keys.ESB));
+ printConfig(Keys.ESB, esb);
+
+ checkConfig();
+ }
+
+ private static void printConfig(String propName, Object bean) {
+ if (bean == null) {
+ log.info("Property " + propName + " not found, " + propName
+ + " not configured");
+ } else {
+ log.info("Configured " + bean.toString());
+ }
+ }
+
+ private boolean checkConfig() throws Exception {
+ if (java != null)
+ checkDirExists(java.javaHome);
+ if (seam != null)
+ checkDirExists(seam.seamHome);
+ if (server != null)
+ checkDirExists(server.runtimeHome);
+ if (esb != null)
+ checkDirExists(esb.esbHome);
+ // special checks capturing dependency of server on java
+ if (java == null
+ && server != null
+ && !server.withJavaVersion
+ .equals(Values.SERVER_WITH_DEFAULT_JAVA)) {
+ throw new Exception(
+ "Server is configured to run with java version="
+ + server.withJavaVersion
+ + " but no JAVA is configured");
+ }
+ if (java != null) {
+ if (!java.version.equals(server.withJavaVersion)
+ && !Values.SERVER_WITH_DEFAULT_JAVA
+ .equals(server.withJavaVersion)) {
+ throw new Exception(
+ "Server is configured to run with java version="
+ + server.withJavaVersion
+ + " but JAVA is configured with "
+ + java.version);
+ }
+ }
+ return true;
+
+ }
+
+ private static void checkDirExists(String dir) throws FileNotFoundException {
+ if (!new File(dir).exists() || !new File(dir).isDirectory()) {
+ throw new FileNotFoundException("File '" + dir
+ + "' does not exist or is not directory");
+ }
+ }
+
+ public ESBBean getEsb() {
+ return esb;
+ }
+
+ public SeamBean getSeam() {
+ return seam;
+ }
+
+ public ServerBean getServer() {
+ return server;
+ }
+
+ public JavaBean getJava() {
+ return java;
+ }
+
+ public String getPropFile() {
+ return propFile;
+ }
+
+ public String getPropName() {
+ return propName;
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfiguration.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -2,7 +2,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -11,8 +10,6 @@
import java.util.Properties;
import org.apache.log4j.Logger;
-import org.jboss.tools.ui.bot.ext.Activator;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
@@ -34,120 +31,45 @@
public class Values {
public static final String SERVER_TYPE_EPP = "EPP";
public static final String SERVER_TYPE_EAP = "EAP";
+ public static final String SERVER_TYPE_SOA = "SOA";
public static final String SERVER_TYPE_JBOSSAS = "JBOSS_AS";
public static final String SERVER_WITH_DEFAULT_JAVA = "default";
}
public static final String SWTBOT_TEST_PROPERTIES_FILE = "swtbot.test.properties.file";
- private static Properties swtTestProperties = new Properties();
- public static ServerBean server;
- public static SeamBean seam;
- public static ESBBean esb;
- public static JavaBean java;
+ public static final String SWTBOT_TEST_PROPERTIES_MULTI_FILE = "swtbot.test.properties.multi.file";
+ public static Properties multiProperties = new Properties();
+ public static TestConfiguration currentConfig;
static {
try {
// try to load from file first
String propFile = System.getProperty(SWTBOT_TEST_PROPERTIES_FILE,
null);
- if (propFile != null) {
- try {
- if (new File(propFile).exists()) {
- log
- .info("Loading exeternaly provided configuration file '"
- + propFile + "'");
- swtTestProperties.load(new FileInputStream(propFile));
- } else {
- throw new IOException(SWTBOT_TEST_PROPERTIES_FILE + " "
- + propFile + " does not exist!");
- }
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ String propMultiFile = System.getProperty(SWTBOT_TEST_PROPERTIES_MULTI_FILE,
+ null);
+ if (propMultiFile!=null) {
+ if (new File(propMultiFile).exists()) {
+ log
+ .info("Loading exeternaly provided multi-configuration file '"
+ + propMultiFile + "'");
+ multiProperties.load(new FileInputStream(propMultiFile));
}
- } else {
- try {
- log.info("Loading default configuration, override by pointing java system property '"+SWTBOT_TEST_PROPERTIES_FILE+"' to your custom property file");
- swtTestProperties.load(new FileInputStream(SWTTestExt.util
- .getResourceFile(Activator.PLUGIN_ID,
- "/SWTBotTest-default.properties")));
- } catch (IOException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
+ else {
+ throw new IOException(SWTBOT_TEST_PROPERTIES_MULTI_FILE + " "
+ + propMultiFile + " does not exist!");
}
+ } else {
+ multiProperties.put(SWTBOT_TEST_PROPERTIES_FILE, propFile);
+
}
+
} catch (Exception ex) {
ex.printStackTrace();
}
- // properties got loaded
- try {
- java = JavaBean.fromString(getProperty(Keys.JAVA));
- printConfig(Keys.JAVA, java);
- server = ServerBean.fromString(getProperty(Keys.SERVER));
- printConfig(Keys.SERVER, server);
- seam = SeamBean.fromString(getProperty(Keys.SEAM));
- printConfig(Keys.SEAM, seam);
- esb = ESBBean.fromString(getProperty(Keys.ESB));
- printConfig(Keys.ESB, esb);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- private static void printConfig(String propName, Object bean) {
- if (bean == null) {
- log.info("Property " + propName
- + " not found, "+propName+" not configured");
- } else {
- log.info("Configured " + bean.toString());
- }
}
-
/**
- * check config values if they seem to be valid (existing dirs)
- *
- * @throws FileNotFoundException
- */
- public static boolean checkConfig() {
- try {
- if (java != null)
- checkDirExists(java.javaHome);
- if (seam != null)
- checkDirExists(seam.seamHome);
- if (server != null)
- checkDirExists(server.runtimeHome);
- if (esb != null)
- checkDirExists(esb.esbHome);
- // special checks capturing dependency of server on java
- if (java==null && server!=null && !server.withJavaVersion.equals(Values.SERVER_WITH_DEFAULT_JAVA)) {
- throw new Exception("Server is configured to run with java version="+server.withJavaVersion+" but no JAVA is configured");
- }
- if (java!=null && !java.version.equals(server.withJavaVersion)) {
- throw new Exception("Server is configured to run with java version="+server.withJavaVersion+" but JAVA is configured with "+java.version);
- }
- return true;
- } catch (Exception ex) {
- log
- .error("'"
- + ex.getMessage()
- + "' - incorrect configuration, update your configuraton");
- return false;
- }
-
- }
-
- private static void checkDirExists(String dir) throws FileNotFoundException {
- if (!new File(dir).exists() || !new File(dir).isDirectory()) {
- throw new FileNotFoundException("File '" + dir
- + "' does not exist or is not directory");
- }
- }
-
- /**
* returns null when given Server annotation does not match global test
* configuration (e.g. Test wants Server type EAP but we are running on
* JbossAS)
@@ -158,27 +80,31 @@
*/
private static RequirementBase getServerRequirement(Server s) {
// tests omitting server must run even when server not configured
- if (ServerState.Disabled.equals(s.state()) && server == null) {
+ if (ServerState.Disabled.equals(s.state()) && currentConfig.getServer() == null) {
return RequirementBase.createRemoveServer();
}
- if (!s.required() || server == null) {
+ if (!s.required() || currentConfig.getServer() == null) {
return null;
}
if (!s.type().equals(ServerType.ALL)) {
if (s.type().equals(ServerType.EAP)
- && !server.type.equals(Values.SERVER_TYPE_EAP)) {
+ && !currentConfig.getServer().type.equals(Values.SERVER_TYPE_EAP)) {
return null;
}
if (s.type().equals(ServerType.JbossAS)
- && !server.type.equals(Values.SERVER_TYPE_JBOSSAS)) {
+ && !currentConfig.getServer().type.equals(Values.SERVER_TYPE_JBOSSAS)) {
return null;
}
if (s.type().equals(ServerType.EPP)
- && !server.type.equals(Values.SERVER_TYPE_EPP)) {
+ && !currentConfig.getServer().type.equals(Values.SERVER_TYPE_EPP)) {
return null;
}
+ if (s.type().equals(ServerType.SOA)
+ && !currentConfig.getServer().type.equals(Values.SERVER_TYPE_SOA)) {
+ return null;
+ }
}
- if (!matches(server.version, s.operator(), s.version())) {
+ if (!matches(currentConfig.getServer().version, s.operator(), s.version())) {
return null;
}
if (ServerState.Disabled.equals(s.state())) {
@@ -203,20 +129,20 @@
* @return AddSeam requirement otherwise
*/
private static RequirementBase getSeamRequirement(Seam s) {
- if (!s.required() || seam == null) {
+ if (!s.required() || currentConfig.getSeam() == null) {
return null;
}
- if (!matches(seam.version, s.operator(), s.version())) {
+ if (!matches(currentConfig.getSeam().version, s.operator(), s.version())) {
return null;
}
return RequirementBase.createAddSeam();
}
private static RequirementBase getESBRequirement(ESB e) {
- if (!e.required() || esb == null) {
+ if (!e.required() || currentConfig.getEsb() == null) {
return null;
}
- if (!matches(esb.version, e.operator(), e.version())) {
+ if (!matches(currentConfig.getEsb().version, e.operator(), e.version())) {
return null;
}
return RequirementBase.createAddESB();
@@ -319,11 +245,19 @@
}
private static int versionToNumber(String version) {
- return Integer.parseInt(version.replaceAll("\\.", ""));
+ version = version.replaceAll("\\.", "");
+ int addZeros = 4-version.length();
+ if (addZeros>0) {
+ while (addZeros>0) {
+ version+="0";
+ addZeros--;
+ }
+ }
+ return Integer.parseInt(version);
}
public static String getProperty(String key) {
- return swtTestProperties.getProperty(key);
+ return currentConfig.getProperty(key);
// return SWTTestExt.util.getValue(swtTestProperties, key);
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -12,11 +12,11 @@
@Override
public void handle() {
- String esbName = "ESB-"+TestConfigurator.esb.version;
- SWTTestExt.eclipse.addESBRuntime(esbName,TestConfigurator.esb.version,TestConfigurator.esb.esbHome);
+ String esbName = "ESB-"+TestConfigurator.currentConfig.getEsb().version;
+ SWTTestExt.eclipse.addESBRuntime(esbName,TestConfigurator.currentConfig.getEsb().version,TestConfigurator.currentConfig.getEsb().esbHome);
SWTTestExt.configuredState.getEsb().isConfiured=true;
SWTTestExt.configuredState.getEsb().name=esbName;
- SWTTestExt.configuredState.getEsb().version=TestConfigurator.esb.version;
+ SWTTestExt.configuredState.getEsb().version=TestConfigurator.currentConfig.getEsb().version;
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -26,10 +26,10 @@
SWTTestExt.configuredState.getJreList().add(getAddedAsName());
}
public String getAddedAsName() {
- return "JRE-"+TestConfigurator.java.version;
+ return "JRE-"+TestConfigurator.currentConfig.getJava().version;
}
private String getJavaHome() {
- return TestConfigurator.java.javaHome;
+ return TestConfigurator.currentConfig.getJava().javaHome;
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddSeam.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -12,11 +12,11 @@
@Override
public void handle() {
- String seamName = "Seam-"+TestConfigurator.seam.version;
- SWTTestExt.eclipse.addSeamRuntime(seamName, TestConfigurator.seam.version, TestConfigurator.seam.seamHome);
+ String seamName = "Seam-"+TestConfigurator.currentConfig.getSeam().version;
+ SWTTestExt.eclipse.addSeamRuntime(seamName, TestConfigurator.currentConfig.getSeam().version, TestConfigurator.currentConfig.getSeam().seamHome);
SWTTestExt.configuredState.getSeam().isConfiured=true;
SWTTestExt.configuredState.getSeam().name=seamName;
- SWTTestExt.configuredState.getSeam().version=TestConfigurator.seam.version;
+ SWTTestExt.configuredState.getSeam().version=TestConfigurator.currentConfig.getSeam().version;
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -27,8 +27,8 @@
private String javaName=null;
public AddServer() {
- String javaVer = getNeededJavaVersion(TestConfigurator.server.withJavaVersion);
- if (javaVer!=null && TestConfigurator.java!=null &&javaVer.equals(TestConfigurator.java.version)) {
+ String javaVer = getNeededJavaVersion(TestConfigurator.currentConfig.getServer().withJavaVersion);
+ if (javaVer!=null && TestConfigurator.currentConfig.getJava()!=null &&javaVer.equals(TestConfigurator.currentConfig.getJava().version)) {
AddJava addJava = createAddJava();
getDependsOn().add(addJava);
javaName=addJava.getAddedAsName();
@@ -38,17 +38,26 @@
@Override
public void handle() {
- ServerInfo serverInfo = getRuntime(TestConfigurator.server.type,TestConfigurator.server.version);
- String runtimeHome=TestConfigurator.server.runtimeHome;
- String runtimeName=TestConfigurator.server.type+"-"+TestConfigurator.server.version;
+ ServerInfo serverInfo = getRuntime(TestConfigurator.currentConfig.getServer().type,TestConfigurator.currentConfig.getServer().version);
+ String runtimeHome=TestConfigurator.currentConfig.getServer().runtimeHome;
+ String runtimeName=TestConfigurator.currentConfig.getServer().type+"-"+TestConfigurator.currentConfig.getServer().version;
SWTTestExt.eclipse.addJbossServerRuntime(serverInfo.runtime,
runtimeHome, runtimeName, javaName);
SWTTestExt.eclipse.addServer(serverInfo.server, runtimeName);
SWTTestExt.configuredState.getServer().isConfigured=true;
SWTTestExt.configuredState.getServer().name=runtimeName;
- SWTTestExt.configuredState.getServer().version=TestConfigurator.server.version;
- SWTTestExt.configuredState.getServer().type=TestConfigurator.server.type;
- SWTTestExt.configuredState.getServer().withJavaVersion = TestConfigurator.server.withJavaVersion;
+ SWTTestExt.configuredState.getServer().version=TestConfigurator.currentConfig.getServer().version;
+ SWTTestExt.configuredState.getServer().type=TestConfigurator.currentConfig.getServer().type;
+ SWTTestExt.configuredState.getServer().withJavaVersion = TestConfigurator.currentConfig.getServer().withJavaVersion;
+ // setup bundled ESB versions for SOA server type
+ if (TestConfigurator.currentConfig.getServer().type.equals(TestConfigurator.Values.SERVER_TYPE_SOA)) {
+ if ("4.3".equals(TestConfigurator.currentConfig.getServer().version)) {
+ SWTTestExt.configuredState.getServer().bundledESBVersion="4.4";
+ }
+ if ("5.0".equals(TestConfigurator.currentConfig.getServer().version)) {
+ SWTTestExt.configuredState.getServer().bundledESBVersion="4.7";
+ }
+ }
}
@@ -79,7 +88,8 @@
JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
}
- }if (TestConfigurator.Values.SERVER_TYPE_EPP.equals(serverType)) {
+ }
+ if (TestConfigurator.Values.SERVER_TYPE_EPP.equals(serverType)) {
if ("4.3".equals(version)) {
return new ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime.LABEL,
JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43.LABEL
@@ -91,6 +101,18 @@
}
}
+ if (TestConfigurator.Values.SERVER_TYPE_SOA.equals(serverType)) {
+ if ("4.3".equals(version)) {
+ return new ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43.LABEL
+ );
+ }
+ if ("5.0".equals(version)) {
+ return new ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime.LABEL,
+ JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
+ }
+
+ }
else if (TestConfigurator.Values.SERVER_TYPE_JBOSSAS.equals(serverType)) {
if ("4.2".equals(version)) {
return new ServerInfo(JBossCommunityJBoss42Runtime.LABEL,JBossCommunityJBossAS42.LABEL);
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -23,6 +23,7 @@
SWTTestExt.configuredState.getServer().version=null;
SWTTestExt.configuredState.getServer().type=null;
SWTTestExt.configuredState.getServer().withJavaVersion=null;
+ SWTTestExt.configuredState.getServer().bundledESBVersion=null;
}
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-06-14 12:02:55 UTC (rev 22784)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ExplorerBase.java 2010-06-14 12:41:39 UTC (rev 22785)
@@ -142,6 +142,7 @@
public void runOnServer(String projectName) {
SWTBot viewBot = show().bot();
SWTBotTreeItem item = viewBot.tree().expandNode(projectName);
+ item.select();
ContextMenuHelper.prepareTreeItemForContextMenu(viewBot.tree(), item);
final SWTBotMenu menuRunAs = viewBot.menu(IDELabel.Menu.RUN).menu(IDELabel.Menu.RUN_AS);
final MenuItem menuItem = UIThreadRunnable
@@ -151,6 +152,7 @@
MenuItem menuItem = null;
final MenuItem[] menuItems = menuRunAs.widget.getMenu().getItems();
while (menuItem == null && menuItemIndex < menuItems.length){
+ log.info("Found item" +menuItems[menuItemIndex].getText());
if (menuItems[menuItemIndex].getText().indexOf("Run on Server") > - 1){
menuItem = menuItems[menuItemIndex];
}
14 years, 7 months
JBoss Tools SVN: r22784 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-06-14 08:02:55 -0400 (Mon, 14 Jun 2010)
New Revision: 22784
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-6429
- Reverting XulRunnerVpeUtils
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-14 11:30:01 UTC (rev 22783)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-14 12:02:55 UTC (rev 22784)
@@ -105,40 +105,41 @@
* {@code selectionContainer}.
*/
public static Rectangle getTextSelectionBounds(nsIDOMText selectionContainer) {
-// nsIAccessibleText accessibleTextAncestor = getAccessibleTextAncestor(selectionContainer);
-// if (accessibleTextAncestor == null) {
-// // cannot get selection bounds
-// return null;
-// }
-// if (accessibleTextAncestor.getSelectionCount() == 0) {
-// // no text selected
-// return null;
-// }
-//
-// int[] startOffset = new int[1];
-// int[] endOffset = new int[1];
-// accessibleTextAncestor.getSelectionBounds(0, startOffset, endOffset);
-//
-// int[] x = new int[1];
-// int[] y = new int[1];
-// int[] width = new int[1];
-// int[] height = new int[1];
-// accessibleTextAncestor.getRangeExtents(startOffset[0], endOffset[0],
-// x, y, width, height, nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE);
-//
-// nsIAccessible ancestorAccessibleParent
-// = queryInterface(accessibleTextAncestor, nsIAccessible.class).getParent();
-// nsIDOMNode ancestorParent
-// = queryInterface(ancestorAccessibleParent, nsIAccessNode.class).getDOMNode();
-//
-// Rectangle ancestorParentBounds;
-// if (ancestorParent != null) {
-// ancestorParentBounds = getElementBounds(ancestorParent);
-// } else {
-// ancestorParentBounds = new Rectangle(0, 0, 0, 0);
-// }
-//
- return new Rectangle(0, 0, 0, 0);
+ nsIAccessibleText accessibleTextAncestor = getAccessibleTextAncestor(selectionContainer);
+ if (accessibleTextAncestor == null) {
+ // cannot get selection bounds
+ return null;
+ }
+ if (accessibleTextAncestor.getSelectionCount() == 0) {
+ // no text selected
+ return null;
+ }
+
+ int[] startOffset = new int[1];
+ int[] endOffset = new int[1];
+ accessibleTextAncestor.getSelectionBounds(0, startOffset, endOffset);
+
+ int[] x = new int[1];
+ int[] y = new int[1];
+ int[] width = new int[1];
+ int[] height = new int[1];
+ accessibleTextAncestor.getRangeExtents(startOffset[0], endOffset[0],
+ x, y, width, height, nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE);
+
+ nsIAccessible ancestorAccessibleParent
+ = queryInterface(accessibleTextAncestor, nsIAccessible.class).getParent();
+ nsIDOMNode ancestorParent
+ = queryInterface(ancestorAccessibleParent, nsIAccessNode.class).getDOMNode();
+
+ Rectangle ancestorParentBounds;
+ if (ancestorParent != null) {
+ ancestorParentBounds = getElementBounds(ancestorParent);
+ } else {
+ ancestorParentBounds = new Rectangle(0, 0, 0, 0);
+ }
+
+ return new Rectangle(ancestorParentBounds.x + x[0], ancestorParentBounds.y + y[0],
+ width[0], height[0]);
}
/**
14 years, 7 months
JBoss Tools SVN: r22783 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-14 07:30:01 -0400 (Mon, 14 Jun 2010)
New Revision: 22783
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
Log:
NPE prevention - trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2010-06-14 11:26:49 UTC (rev 22782)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2010-06-14 11:30:01 UTC (rev 22783)
@@ -198,7 +198,8 @@
}
if(currentQuery != null) {
editXPathButton.setEnabled(true);
- currentValueText.setText(currentQuery.getFirstResult());
+ String result = currentQuery.getFirstResult();
+ currentValueText.setText(result == null ? "" : result);
} else {
}
}
14 years, 7 months
JBoss Tools SVN: r22782 - branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-14 07:26:49 -0400 (Mon, 14 Jun 2010)
New Revision: 22782
Modified:
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
Log:
NPE prevention in 3.1.x maintenance
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2010-06-14 11:03:53 UTC (rev 22781)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2010-06-14 11:26:49 UTC (rev 22782)
@@ -198,7 +198,8 @@
}
if(currentQuery != null) {
editXPathButton.setEnabled(true);
- currentValueText.setText(currentQuery.getFirstResult());
+ String result = currentQuery.getFirstResult();
+ currentValueText.setText(result == null ? "" : result);
} else {
}
}
14 years, 7 months
JBoss Tools SVN: r22781 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-06-14 07:03:53 -0400 (Mon, 14 Jun 2010)
New Revision: 22781
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XPCOM.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-6429
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XPCOM.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XPCOM.java 2010-06-14 10:16:28 UTC (rev 22780)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XPCOM.java 2010-06-14 11:03:53 UTC (rev 22781)
@@ -255,7 +255,7 @@
interfacesList.add(org.mozilla.interfaces.extIPreferenceBranch.class);
interfacesList.add(org.mozilla.interfaces.extISessionStorage.class);
// interfacesList.add(org.mozilla.interfaces.gfxIFormats.class);
- interfacesList.add(org.mozilla.interfaces.gfxIImageFrame.class);
+// interfacesList.add(org.mozilla.interfaces.gfxIImageFrame.class);
interfacesList.add(org.mozilla.interfaces.IDispatch.class);
interfacesList.add(org.mozilla.interfaces.imgICache.class);
interfacesList.add(org.mozilla.interfaces.imgIContainer.class);
@@ -298,7 +298,7 @@
interfacesList.add(org.mozilla.interfaces.mozISpellI18NUtil.class);
interfacesList.add(org.mozilla.interfaces.mozIStorageAggregateFunction.class);
interfacesList.add(org.mozilla.interfaces.mozIStorageConnection.class);
- interfacesList.add(org.mozilla.interfaces.mozIStorageDataSet.class);
+// interfacesList.add(org.mozilla.interfaces.mozIStorageDataSet.class);
interfacesList.add(org.mozilla.interfaces.mozIStorageError.class);
interfacesList.add(org.mozilla.interfaces.mozIStorageFunction.class);
interfacesList.add(org.mozilla.interfaces.mozIStoragePendingStatement.class);
@@ -393,7 +393,7 @@
interfacesList.add(org.mozilla.interfaces.nsIBrowserBoxObject.class);
interfacesList.add(org.mozilla.interfaces.nsIBrowserDOMWindow.class);
interfacesList.add(org.mozilla.interfaces.nsIBrowserHistory.class);
- interfacesList.add(org.mozilla.interfaces.nsIBrowserHistory_MOZILLA_1_9_1_ADDITIONS.class);
+// interfacesList.add(org.mozilla.interfaces.nsIBrowserHistory_MOZILLA_1_9_1_ADDITIONS.class);
interfacesList.add(org.mozilla.interfaces.nsIBrowserInstance.class);
interfacesList.add(org.mozilla.interfaces.nsIBrowserSearchService.class);
interfacesList.add(org.mozilla.interfaces.nsIBufferedInputStream.class);
@@ -511,9 +511,9 @@
interfacesList.add(org.mozilla.interfaces.nsIDNSService.class);
interfacesList.add(org.mozilla.interfaces.nsIDocCharset.class);
interfacesList.add(org.mozilla.interfaces.nsIDocShell.class);
- interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1.class);
- interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1_dns.class);
- interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1_SessionStorage.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1_dns.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDocShell_MOZILLA_1_9_1_SessionStorage.class);
interfacesList.add(org.mozilla.interfaces.nsIDocShellHistory.class);
interfacesList.add(org.mozilla.interfaces.nsIDocShellLoadInfo.class);
interfacesList.add(org.mozilla.interfaces.nsIDocShellTreeItem.class);
@@ -677,7 +677,7 @@
interfacesList.add(org.mozilla.interfaces.nsIDOMKeyEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMLinkStyle.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMLoadStatus.class);
- interfacesList.add(org.mozilla.interfaces.nsIDOMLoadStatusEvent.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDOMLoadStatusEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMLocation.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMLSException.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMLSInput.class);
@@ -710,7 +710,7 @@
interfacesList.add(org.mozilla.interfaces.nsIDOMNotifyPaintEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSCSS2Properties.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSDataTransfer.class);
- interfacesList.add(org.mozilla.interfaces.nsIDOMNSDataTransfer_MOZILLA_1_9_1.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDOMNSDataTransfer_MOZILLA_1_9_1.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSDocument.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSDocumentStyle.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSEditableElement.class);
@@ -738,7 +738,7 @@
interfacesList.add(org.mozilla.interfaces.nsIDOMNSRange.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSRGBAColor.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSUIEvent.class);
- interfacesList.add(org.mozilla.interfaces.nsIDOMNSXBLFormControl.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDOMNSXBLFormControl.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMNSXPathExpression.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMOfflineResourceList.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMPageTransitionEvent.class);
@@ -759,13 +759,13 @@
interfacesList.add(org.mozilla.interfaces.nsIDOMSimpleGestureEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMSmartCardEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorage.class);
- interfacesList.add(org.mozilla.interfaces.nsIDOMStorage2.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDOMStorage2.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorageEvent.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorageItem.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorageList.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorageManager.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStorageWindow.class);
- interfacesList.add(org.mozilla.interfaces.nsIDOMStorageWindow_1_9_1.class);
+// interfacesList.add(org.mozilla.interfaces.nsIDOMStorageWindow_1_9_1.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStyleSheet.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMStyleSheetList.class);
interfacesList.add(org.mozilla.interfaces.nsIDOMSVGAElement.class);
@@ -1010,7 +1010,7 @@
interfacesList.add(org.mozilla.interfaces.nsIFrameLoaderOwner.class);
interfacesList.add(org.mozilla.interfaces.nsIFTPChannel.class);
interfacesList.add(org.mozilla.interfaces.nsIFTPEventSink.class);
- interfacesList.add(org.mozilla.interfaces.nsIFullScreen.class);
+// interfacesList.add(org.mozilla.interfaces.nsIFullScreen.class);
interfacesList.add(org.mozilla.interfaces.nsIGConfService.class);
interfacesList.add(org.mozilla.interfaces.nsIGeneratingKeypairInfoDialogs.class);
interfacesList.add(org.mozilla.interfaces.nsIGeolocationPrompt.class);
@@ -1072,10 +1072,10 @@
interfacesList.add(org.mozilla.interfaces.nsIJSIID.class);
interfacesList.add(org.mozilla.interfaces.nsIJSON.class);
interfacesList.add(org.mozilla.interfaces.nsIJSXMLHttpRequest.class);
- interfacesList.add(org.mozilla.interfaces.nsIJVMConfig.class);
- interfacesList.add(org.mozilla.interfaces.nsIJVMConfigManager.class);
- interfacesList.add(org.mozilla.interfaces.nsIJVMManager.class);
- interfacesList.add(org.mozilla.interfaces.nsIJVMPluginInstance.class);
+// interfacesList.add(org.mozilla.interfaces.nsIJVMConfig.class);
+// interfacesList.add(org.mozilla.interfaces.nsIJVMConfigManager.class);
+// interfacesList.add(org.mozilla.interfaces.nsIJVMManager.class);
+// interfacesList.add(org.mozilla.interfaces.nsIJVMPluginInstance.class);
interfacesList.add(org.mozilla.interfaces.nsIKeygenThread.class);
interfacesList.add(org.mozilla.interfaces.nsIKeyObject.class);
interfacesList.add(org.mozilla.interfaces.nsIKeyObjectFactory.class);
@@ -1091,7 +1091,7 @@
interfacesList.add(org.mozilla.interfaces.nsILocalHandlerApp.class);
interfacesList.add(org.mozilla.interfaces.nsILoginInfo.class);
interfacesList.add(org.mozilla.interfaces.nsILoginManager.class);
- interfacesList.add(org.mozilla.interfaces.nsILoginManager_MOZILLA_1_9_1.class);
+// interfacesList.add(org.mozilla.interfaces.nsILoginManager_MOZILLA_1_9_1.class);
interfacesList.add(org.mozilla.interfaces.nsILoginManagerIEMigrationHelper.class);
interfacesList.add(org.mozilla.interfaces.nsILoginManagerPrompter.class);
interfacesList.add(org.mozilla.interfaces.nsILoginManagerStorage.class);
@@ -1114,13 +1114,13 @@
interfacesList.add(org.mozilla.interfaces.nsIMutableArray.class);
interfacesList.add(org.mozilla.interfaces.nsINativeAppSupport.class);
interfacesList.add(org.mozilla.interfaces.nsINavBookmarkObserver.class);
- interfacesList.add(org.mozilla.interfaces.nsINavBookmarkObserver_MOZILLA_1_9_1_ADDITIONS.class);
+// interfacesList.add(org.mozilla.interfaces.nsINavBookmarkObserver_MOZILLA_1_9_1_ADDITIONS.class);
interfacesList.add(org.mozilla.interfaces.nsINavBookmarksService.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryBatchCallback.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryContainerResultNode.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryFullVisitResultNode.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryObserver.class);
- interfacesList.add(org.mozilla.interfaces.nsINavHistoryObserver_MOZILLA_1_9_1_ADDITIONS.class);
+// interfacesList.add(org.mozilla.interfaces.nsINavHistoryObserver_MOZILLA_1_9_1_ADDITIONS.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryQuery.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryQueryOptions.class);
interfacesList.add(org.mozilla.interfaces.nsINavHistoryQueryResultNode.class);
@@ -1145,7 +1145,7 @@
interfacesList.add(org.mozilla.interfaces.nsIOfflineCacheUpdate.class);
interfacesList.add(org.mozilla.interfaces.nsIOfflineCacheUpdateObserver.class);
interfacesList.add(org.mozilla.interfaces.nsIOfflineCacheUpdateService.class);
- interfacesList.add(org.mozilla.interfaces.nsIOSChromeItem.class);
+// interfacesList.add(org.mozilla.interfaces.nsIOSChromeItem.class);
interfacesList.add(org.mozilla.interfaces.nsIOutputIterator.class);
interfacesList.add(org.mozilla.interfaces.nsIOutputStream.class);
interfacesList.add(org.mozilla.interfaces.nsIOutputStreamCallback.class);
@@ -1166,7 +1166,7 @@
interfacesList.add(org.mozilla.interfaces.nsIPKIParamBlock.class);
interfacesList.add(org.mozilla.interfaces.nsIPlaintextEditor.class);
interfacesList.add(org.mozilla.interfaces.nsIPluginHost.class);
- interfacesList.add(org.mozilla.interfaces.nsIPluginManager.class);
+// interfacesList.add(org.mozilla.interfaces.nsIPluginManager.class);
interfacesList.add(org.mozilla.interfaces.nsIPluginTag.class);
interfacesList.add(org.mozilla.interfaces.nsIPopupBoxObject.class);
interfacesList.add(org.mozilla.interfaces.nsIPopupWindowManager.class);
@@ -1188,7 +1188,7 @@
interfacesList.add(org.mozilla.interfaces.nsIPrintStatusFeedback.class);
interfacesList.add(org.mozilla.interfaces.nsIPrivateBrowsingService.class);
interfacesList.add(org.mozilla.interfaces.nsIProcess.class);
- interfacesList.add(org.mozilla.interfaces.nsIProcess2.class);
+// interfacesList.add(org.mozilla.interfaces.nsIProcess2.class);
interfacesList.add(org.mozilla.interfaces.nsIProfile.class);
interfacesList.add(org.mozilla.interfaces.nsIProfileChangeStatus.class);
interfacesList.add(org.mozilla.interfaces.nsIProfileLock.class);
@@ -1266,7 +1266,7 @@
interfacesList.add(org.mozilla.interfaces.nsISAXXMLReader.class);
interfacesList.add(org.mozilla.interfaces.nsIScreen.class);
interfacesList.add(org.mozilla.interfaces.nsIScreenManager.class);
- interfacesList.add(org.mozilla.interfaces.nsIScreenManager_MOZILLA_1_9_1_BRANCH.class);
+// interfacesList.add(org.mozilla.interfaces.nsIScreenManager_MOZILLA_1_9_1_BRANCH.class);
interfacesList.add(org.mozilla.interfaces.nsIScriptableDateFormat.class);
interfacesList.add(org.mozilla.interfaces.nsIScriptableInputStream.class);
interfacesList.add(org.mozilla.interfaces.nsIScriptableInterfaces.class);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-14 10:16:28 UTC (rev 22780)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-14 11:03:53 UTC (rev 22781)
@@ -105,41 +105,40 @@
* {@code selectionContainer}.
*/
public static Rectangle getTextSelectionBounds(nsIDOMText selectionContainer) {
- nsIAccessibleText accessibleTextAncestor = getAccessibleTextAncestor(selectionContainer);
- if (accessibleTextAncestor == null) {
- // cannot get selection bounds
- return null;
- }
- if (accessibleTextAncestor.getSelectionCount() == 0) {
- // no text selected
- return null;
- }
-
- int[] startOffset = new int[1];
- int[] endOffset = new int[1];
- accessibleTextAncestor.getSelectionBounds(0, startOffset, endOffset);
-
- int[] x = new int[1];
- int[] y = new int[1];
- int[] width = new int[1];
- int[] height = new int[1];
- accessibleTextAncestor.getRangeExtents(startOffset[0], endOffset[0],
- x, y, width, height, nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE);
-
- nsIAccessible ancestorAccessibleParent
- = queryInterface(accessibleTextAncestor, nsIAccessible.class).getParent();
- nsIDOMNode ancestorParent
- = queryInterface(ancestorAccessibleParent, nsIAccessNode.class).getDOMNode();
-
- Rectangle ancestorParentBounds;
- if (ancestorParent != null) {
- ancestorParentBounds = getElementBounds(ancestorParent);
- } else {
- ancestorParentBounds = new Rectangle(0, 0, 0, 0);
- }
-
- return new Rectangle(ancestorParentBounds.x + x[0], ancestorParentBounds.y + y[0],
- width[0], height[0]);
+// nsIAccessibleText accessibleTextAncestor = getAccessibleTextAncestor(selectionContainer);
+// if (accessibleTextAncestor == null) {
+// // cannot get selection bounds
+// return null;
+// }
+// if (accessibleTextAncestor.getSelectionCount() == 0) {
+// // no text selected
+// return null;
+// }
+//
+// int[] startOffset = new int[1];
+// int[] endOffset = new int[1];
+// accessibleTextAncestor.getSelectionBounds(0, startOffset, endOffset);
+//
+// int[] x = new int[1];
+// int[] y = new int[1];
+// int[] width = new int[1];
+// int[] height = new int[1];
+// accessibleTextAncestor.getRangeExtents(startOffset[0], endOffset[0],
+// x, y, width, height, nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE);
+//
+// nsIAccessible ancestorAccessibleParent
+// = queryInterface(accessibleTextAncestor, nsIAccessible.class).getParent();
+// nsIDOMNode ancestorParent
+// = queryInterface(ancestorAccessibleParent, nsIAccessNode.class).getDOMNode();
+//
+// Rectangle ancestorParentBounds;
+// if (ancestorParent != null) {
+// ancestorParentBounds = getElementBounds(ancestorParent);
+// } else {
+// ancestorParentBounds = new Rectangle(0, 0, 0, 0);
+// }
+//
+ return new Rectangle(0, 0, 0, 0);
}
/**
14 years, 7 months
JBoss Tools SVN: r22780 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-14 06:16:28 -0400 (Mon, 14 Jun 2010)
New Revision: 22780
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd
Log:
JBIDE-6454 and JBIDE-6455 committing to trunk...
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -248,6 +248,7 @@
rtToPortsFile.put(IConstants.AS_42, properties.append(IJBossToolingConstants.DEFAULT_PROPS_42));
rtToPortsFile.put(IConstants.AS_50, properties.append(IJBossToolingConstants.DEFAULT_PROPS_50));
rtToPortsFile.put(IConstants.AS_51, properties.append(IJBossToolingConstants.DEFAULT_PROPS_51));
+ rtToPortsFile.put(IConstants.AS_60, properties.append(IJBossToolingConstants.DEFAULT_PROPS_60));
rtToPortsFile.put(IConstants.EAP_43, properties.append(IJBossToolingConstants.DEFAULT_PROPS_EAP_43));
rtToPortsFile.put(IConstants.EAP_50, properties.append(IJBossToolingConstants.DEFAULT_PROPS_EAP_50));
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBoss6Server.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.core.server;
+
+import org.eclipse.core.runtime.IPath;
+import org.jboss.ide.eclipse.as.core.Messages;
+
+public interface IJBoss6Server {
+ public static final String JMX_RMI_PORT = "org.jboss.ide.eclipse.as.core.server.jmxrmiport"; //$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DETECT = "org.jboss.ide.eclipse.as.core.server.jmxrmiport_AutoDetect"; //$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DETECT_XPATH = "org.jboss.ide.eclipse.as.core.server.jmxrmiport_AutoDetect.XPath"; //$NON-NLS-1$
+ public static final String JMX_RMI_PORT_DEFAULT_XPATH = Messages.Ports + IPath.SEPARATOR + "JMX RMI Port"; //$NON-NLS-1$
+ public static final int JMX_RMI_DEFAULT_PORT = 1090;
+
+ public int getJMXRMIPort();
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss6Server.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.core.server.internal;
+
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
+
+public class JBoss6Server extends JBossServer implements IJBoss6Server {
+
+ public int getJMXRMIPort() {
+ return findPort(JMX_RMI_PORT, JMX_RMI_PORT_DETECT, JMX_RMI_PORT_DETECT_XPATH,
+ JMX_RMI_PORT_DEFAULT_XPATH, JMX_RMI_DEFAULT_PORT);
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -31,6 +31,7 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
@@ -105,7 +106,8 @@
String runtimeTypeId = jbs.getRuntime().getRuntime().getRuntimeType().getId();
String serverUrl;
if (runtimeTypeId.equals(tc.AS_60)){
- serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":" + 1090 + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ IJBoss6Server server6 = (IJBoss6Server)jbs.getServer().loadAdapter(IJBoss6Server.class, new NullProgressMonitor());
+ serverUrl = "service:jmx:rmi:///jndi/rmi://" + jbs.getHost() + ":" + server6.getJMXRMIPort() + "/jmxrmi"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
serverUrl = jbs.getHost() + ":" + jbs.getJNDIPort(); //$NON-NLS-1$
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossToolingConstants.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -59,6 +59,7 @@
public static final String DEFAULT_PROPS_42 = "jboss.42.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_50 = "jboss.50.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_51 = "jboss.51.default.ports.properties"; //$NON-NLS-1$
+ public static final String DEFAULT_PROPS_60 = "jboss.60.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_EAP_43 = "jboss.eap.43.default.ports.properties"; //$NON-NLS-1$
public static final String DEFAULT_PROPS_EAP_50 = "jboss.eap.50.default.ports.properties"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-06-14 10:16:28 UTC (rev 22780)
@@ -96,7 +96,7 @@
<serverType
behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBoss6Server"
description="%jboss.version.60.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.60"
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.60.default.ports.properties 2010-06-14 10:16:28 UTC (rev 22780)
@@ -0,0 +1,40 @@
+# As much as possible, try to create file patterns that match
+# as few files as possible. Each matching file *WILL* be scanned
+# and cached, regardless of if there's a match.
+
+JNDI=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=Naming' and jboss_bean-deployer_2:property='Port']/jboss_bean-deployer_2:property[@name='port']
+JNDI_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JBoss_Web=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.web:service=WebServer'][not(jboss_bean-deployer_2:property='HttpsConnector')]/jboss_bean-deployer_2:property[@name='port']
+JBoss_Web_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HTTPS_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.web:service=WebServer'][jboss_bean-deployer_2:property='HttpsConnector']/jboss_bean-deployer_2:property[@name='port']
+HTTPS_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Unified_Invoker_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='UnifiedInvokerConnector']/jboss_bean-deployer_2:property[@name='port']
+Unified_Invoker_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+RMI_JRMP_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=jrmp']/jboss_bean-deployer_2:property[@name='port']
+RMI_JRMP_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Pooled_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=pooled']/jboss_bean-deployer_2:property[@name='port']
+Pooled_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_JNDI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=HAJNDI'][jboss_bean-deployer_2:property='Port']/jboss_bean-deployer_2:property[@name='port']
+HA_JNDI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+RMI_JNDI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=HAJNDI'][jboss_bean-deployer_2:property='RmiPort']/jboss_bean-deployer_2:property[@name='port']
+RMI_JNDI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_RMI_JRMP_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=jrmpha']/jboss_bean-deployer_2:property[@name='port']
+HA_RMI_JRMP_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+HA_Pooled_Invoker=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=invoker,type=pooledha']/jboss_bean-deployer_2:property[@name='port']
+HA_Pooled_Invoker_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+IIOP_Deploy=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss:service=CorbaORB']/jboss_bean-deployer_2:property[@name='port']
+IIOP_Deploy_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+SNMP_Manager=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.jmx:name=SnmpAgent,service=trapd,type=logger']/jboss_bean-deployer_2:property[@name='port']
+SNMP_Manager_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+SNMP_Adapter=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor']/jboss_bean-deployer_2:property[@name='port']
+SNMP_Adapter_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JMX_Remoting=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.remoting:service=JMXConnectorServer,protocol=rmi']/jboss_bean-deployer_2:property[@name='port']
+JMX_Remoting_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JBM_Bisocket_Connector=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.messaging:service=Connector,transport=bisocket']/jboss_bean-deployer_2:property[@name='port']
+JBM_Bisocket_Connector_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Transaction_Recovery_Manager=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='TransactionManager'][jboss_bean-deployer_2:property='recoveryManager']/jboss_bean-deployer_2:property[@name='port']
+Transaction_Recovery_Manager_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+Transaction_SocketProcessId=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='TransactionManager'][jboss_bean-deployer_2:property='socketProcessId']/jboss_bean-deployer_2:property[@name='port']
+Transaction_SocketProcessId_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+JMX_RMI_Port=/deployment/jboss_bean-deployer_2:bean/jboss_bean-deployer_2:constructor/jboss_bean-deployer_2:parameter/jboss_bean-deployer_2:set/jboss_bean-deployer_2:bean[jboss_bean-deployer_2:property='jboss.remoting:service=JMXConnectorServer,protocol=rmi']/jboss_bean-deployer_2:property[@name='port']
+JMX_RMI_Port_FILE=conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -187,10 +187,12 @@
public static String EditorServerPortsDescription;
public static String EditorJNDIPort;
public static String EditorWebPort;
+ public static String EditorJMXRMIPort;
public static String EditorAutomaticallyDetectPort;
public static String EditorPortInvalid;
public static String EditorChangeJNDICommandName;
public static String EditorChangeWebCommandName;
+ public static String EditorChangeJMXRMICommandName;
public static String EditorChangeUsernameCommandName;
public static String EditorChangePasswordCommandName;
public static String EditorCPD_Value;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-06-14 10:16:28 UTC (rev 22780)
@@ -162,10 +162,12 @@
EditorServerPortsDescription=The ports entered here are which ports the tools\nwill poll the server on. Changing these fields\nwill not change the ports the server itself listens on.
EditorJNDIPort=JNDI Port
EditorWebPort=Web Port
+EditorJMXRMIPort=JMX RMI Port
EditorAutomaticallyDetectPort=Automatically detect
EditorPortInvalid=One or more ports have an invalid value. This may adversely affect the tooling's ability to interact with the server.
EditorChangeJNDICommandName=Change JNDI Port Details
EditorChangeWebCommandName=Change Web Port Details
+EditorChangeJMXRMICommandName=Change JMX RMI Port Details
EditorChangeUsernameCommandName=Change Username
EditorChangePasswordCommandName=Change Password
EditorCPD_Value=Current Value
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2010-06-14 10:16:28 UTC (rev 22780)
@@ -1,3 +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 org.jboss.ide.eclipse.as.ui.editor;
import java.util.ArrayList;
@@ -2,3 +12,2 @@
import java.util.Iterator;
-import java.util.List;
@@ -38,6 +47,7 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.server.IJBoss6Server;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
@@ -57,21 +67,35 @@
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
helper = new ServerAttributeHelper(server.getOriginal(), server);
+ String serverTypeId = server.getServerType().getId();
if (sectionList.size() <= 0) {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] cf = registry.getConfigurationElementsFor(
JBossServerUIPlugin.PLUGIN_ID, "ServerEditorPortSection"); //$NON-NLS-1$
for (int i = 0; i < cf.length; i++) {
try {
- Object o = cf[i].createExecutableExtension("class"); //$NON-NLS-1$
- if (o != null && o instanceof IPortEditorExtension)
- sectionList.add((IPortEditorExtension) o);
+ String approvedTypes = cf[i].getAttribute("serverIds"); //$NON-NLS-1$
+ if( serverTypeMatches(serverTypeId, approvedTypes)) {
+ Object o = cf[i].createExecutableExtension("class"); //$NON-NLS-1$
+ if (o != null && o instanceof IPortEditorExtension)
+ sectionList.add((IPortEditorExtension) o);
+ }
} catch (CoreException ce) { /* ignore */
}
}
}
}
+ protected boolean serverTypeMatches(String serverType, String approvedTypes) {
+ if( approvedTypes == null || approvedTypes.equals(""))
+ return true;
+ String[] split = approvedTypes.split(",");
+ for( int i = 0; i < split.length; i++ )
+ if( split[i].equals(serverType))
+ return true;
+ return false;
+ }
+
public void createSection(Composite parent) {
super.createSection(parent);
createUI(parent);
@@ -90,22 +114,9 @@
IJBossServerConstants.JNDI_PORT_DETECT_XPATH,
IJBossServerConstants.JNDI_PORT_DETECT,
IJBossServerConstants.JNDI_PORT,
- IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH);
+ IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeJNDICommandName);
}
- public ServerCommand getCommand() {
- return new SetPortCommand(helper.getWorkingCopy(), helper, Messages.EditorChangeJNDICommandName,
- IJBossServerConstants.JNDI_PORT, IJBossServerConstants.JNDI_PORT_DETECT,
- IJBossServerConstants.JNDI_PORT_DETECT_XPATH, IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH,
- this);
- }
- protected ChangePortDialogInfo getDialogInfo() {
- ChangePortDialogInfo info = new ChangePortDialogInfo();
- info.port = Messages.EditorJNDIPort;
- info.defaultValue = IJBossServerConstants.JNDI_PORT_DEFAULT_XPATH;
- info.server = helper.getWorkingCopy().getOriginal();
- info.currentXPath = currentXPath;
- return info;
- }
}
public static class WebPortEditorExtension extends PortEditorExtension {
@@ -114,42 +125,42 @@
IJBossServerConstants.WEB_PORT_DETECT_XPATH,
IJBossServerConstants.WEB_PORT_DETECT,
IJBossServerConstants.WEB_PORT,
- IJBossServerConstants.WEB_PORT_DEFAULT_XPATH);
+ IJBossServerConstants.WEB_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeWebCommandName);
}
-
- public ServerCommand getCommand() {
- return new SetPortCommand(helper.getWorkingCopy(), helper, Messages.EditorChangeWebCommandName,
- IJBossServerConstants.WEB_PORT, IJBossServerConstants.WEB_PORT_DETECT,
- IJBossServerConstants.WEB_PORT_DETECT_XPATH, IJBossServerConstants.WEB_PORT_DEFAULT_XPATH,
- this);
+ }
+
+ public static class JBoss6JMXRMIPortEditorExtension extends PortEditorExtension {
+ public JBoss6JMXRMIPortEditorExtension() {
+ super(Messages.EditorJMXRMIPort,
+ IJBoss6Server.JMX_RMI_PORT_DETECT_XPATH,
+ IJBoss6Server.JMX_RMI_PORT_DETECT,
+ IJBoss6Server.JMX_RMI_PORT,
+ IJBoss6Server.JMX_RMI_PORT_DEFAULT_XPATH,
+ Messages.EditorChangeJMXRMICommandName);
}
- protected ChangePortDialogInfo getDialogInfo() {
- ChangePortDialogInfo info = new ChangePortDialogInfo();
- info.port = Messages.EditorWebPort;
- info.defaultValue = IJBossServerConstants.WEB_PORT_DEFAULT_XPATH;
- info.server = helper.getWorkingCopy().getOriginal();
- info.currentXPath = currentXPath;
- return info;
- }
}
+
public static abstract class PortEditorExtension implements IPortEditorExtension {
protected Button detect;
protected Text text;
protected Label label;
protected Link link;
protected String labelText, currentXPathKey, detectXPathKey, overrideValueKey, defaultXPath;
- protected String currentXPath;
+ protected String currentXPath, changeValueCommandName;
protected ServerAttributeHelper helper;
protected Listener listener;
protected PortSection section;
public PortEditorExtension(String labelText, String currentXPathKey,
- String detectXPathKey, String overrideValueKey, String defaultXPath) {
+ String detectXPathKey, String overrideValueKey, String defaultXPath,
+ String changeValueCommandName) {
this.labelText = labelText;
this.currentXPathKey = currentXPathKey;
this.detectXPathKey = detectXPathKey;
this.overrideValueKey = overrideValueKey;
this.defaultXPath = defaultXPath;
+ this.changeValueCommandName = changeValueCommandName;
}
public void setServerAttributeHelper(ServerAttributeHelper helper) {
this.helper = helper;
@@ -238,11 +249,18 @@
public ChangePortDialog getDialog() {
return new ChangePortDialog(section.getShell(), getDialogInfo());
}
- protected abstract ChangePortDialogInfo getDialogInfo();
-
- protected /* abstract */ ServerCommand getCommand() {
- return null;
+ public ServerCommand getCommand() {
+ return new SetPortCommand(helper.getWorkingCopy(), helper, changeValueCommandName,
+ overrideValueKey, detectXPathKey,currentXPathKey, defaultXPath, this);
}
+ protected ChangePortDialogInfo getDialogInfo() {
+ ChangePortDialogInfo info = new ChangePortDialogInfo();
+ info.port = labelText;
+ info.defaultValue = defaultXPath;
+ info.server = helper.getWorkingCopy().getOriginal();
+ info.currentXPath = currentXPath;
+ return info;
+ }
public String getValue() {
return text.getText();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.properties 2010-06-14 10:16:28 UTC (rev 22780)
@@ -22,3 +22,7 @@
NavigatorContent_ServersViewDefaultContent=Servers View Default Content
NavigatorContent_XMLConfiguration=XML Configuration
NavigatorContent_JMX=JMX
+
+AllJBossRuntimeTypes=org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50
+AllJBossServerTypes=org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50
+ServerTypesJBoss6OrHigher=org.jboss.ide.eclipse.as.60
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-06-14 10:16:28 UTC (rev 22780)
@@ -9,11 +9,11 @@
point="org.eclipse.wst.server.ui.serverImages">
<image
icon="$nl$/icons/jboss.gif"
- typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"
+ typeIds="%AllJBossServerTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
icon="$nl$/icons/jboss.gif"
- typeIds="org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50,org.jboss.ide.eclipse.as.runtime.51,org.jboss.ide.eclipse.as.runtime.60,org.jboss.ide.eclipse.as.runtime.eap.43,org.jboss.ide.eclipse.as.runtime.eap.50"
+ typeIds="%AllJBossRuntimeTypes"
id="org.jboss.ide.eclipse.as.ui.jbossIcon"/>
<image
@@ -35,7 +35,7 @@
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.JBossServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.jbossServerWizardFragment"
- typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.StrippedServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.strippedServerWizardFragment"
@@ -141,7 +141,7 @@
class="org.jboss.ide.eclipse.as.ui.editor.ModuleDeploymentPage"
id="org.jboss.ide.eclipse.as.ui.editor.deploymentPage"
name="Deployment"
- typeIds="org.jboss.ide.eclipse.as.systemCopyServer, org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50">
+ typeIds="org.jboss.ide.eclipse.as.systemCopyServer, %AllJBossServerTypes%">
</page>
</extension>
@@ -161,19 +161,19 @@
id="org.jboss.ide.eclipse.as.ui.editor.pollerSection"
insertionId="org.eclipse.wst.server.editor.overview.right"
order="10"
- typeIds="org.jboss.ide.eclipse.as.32, org.jboss.ide.eclipse.as.40, org.jboss.ide.eclipse.as.42, org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.PortSection"
id="org.jboss.ide.eclipse.as.ui.editor.portSection"
insertionId="org.eclipse.wst.server.editor.overview.right"
order="11"
- typeIds="org.jboss.ide.eclipse.as.32, org.jboss.ide.eclipse.as.40, org.jboss.ide.eclipse.as.42, org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection"
id="org.jboss.ide.eclipse.as.ui.editor.passwordSection"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"
- typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50"/>
+ typeIds="%AllJBossServerTypes"/>
</extension>
@@ -253,11 +253,17 @@
<extension
point="org.jboss.ide.eclipse.as.ui.ServerEditorPortSection">
<section
- class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JNDIPortEditorExtension">
+ class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JNDIPortEditorExtension"
+ serverIds="%AllJBossServerTypes">
</section>
<section
- class="org.jboss.ide.eclipse.as.ui.editor.PortSection$WebPortEditorExtension">
+ class="org.jboss.ide.eclipse.as.ui.editor.PortSection$WebPortEditorExtension"
+ serverIds="%AllJBossServerTypes">
</section>
+ <section
+ class="org.jboss.ide.eclipse.as.ui.editor.PortSection$JBoss6JMXRMIPortEditorExtension"
+ serverIds="%ServerTypesJBoss6OrHigher">
+ </section>
</extension>
@@ -569,7 +575,7 @@
<runtimeLocator
class="org.jboss.ide.eclipse.as.ui.wizards.JBossRuntimeLocator"
id="org.jboss.ide.eclipse.as.ui.wizards.jboss.runtimeLocator"
- typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50,org.jboss.ide.eclipse.as.51,org.jboss.ide.eclipse.as.60,org.jboss.ide.eclipse.as.eap.43,org.jboss.ide.eclipse.as.eap.50">
+ typeIds="%AllJBossServerTypes">
</runtimeLocator>
</extension>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd 2010-06-14 09:03:11 UTC (rev 22779)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/schema/ServerEditorPortSection.exsd 2010-06-14 10:16:28 UTC (rev 22780)
@@ -2,9 +2,9 @@
<!-- Schema file written by PDE -->
<schema targetNamespace="org.jboss.ide.eclipse.as.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
- <appinfo>
+ <appInfo>
<meta.schema plugin="org.jboss.ide.eclipse.as.ui" id="ServerEditorPortSection" name="org.jboss.ide.as.ui.editor.portSection"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter description of this extension point.]
</documentation>
@@ -12,9 +12,9 @@
<element name="extension">
<annotation>
- <appinfo>
+ <appInfo>
<meta.element />
- </appinfo>
+ </appInfo>
</annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
@@ -39,9 +39,9 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute translatable="true"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
</complexType>
@@ -54,45 +54,52 @@
<documentation>
</documentation>
- <appinfo>
+ <appInfo>
<meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.as.ui.editor.PortSection$IPortEditorExtension"/>
- </appinfo>
+ </appInfo>
</annotation>
</attribute>
+ <attribute name="serverIds" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="since"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="examples"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="apiinfo"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
- <appinfo>
+ <appInfo>
<meta.section type="implementation"/>
- </appinfo>
+ </appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
14 years, 7 months
JBoss Tools SVN: r22779 - in trunk/maven/plugins/org.jboss.tools.maven.seam: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-06-14 05:03:11 -0400 (Mon, 14 Jun 2010)
New Revision: 22779
Added:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/CDIProjectConfigurator.java
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.properties
trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/JSFProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/messages.properties
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencesInitializer.java
Log:
https://jira.jboss.org/browse/JBIDE-6412 Add CDI Maven configurator
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF 2010-06-14 09:03:11 UTC (rev 22779)
@@ -16,7 +16,8 @@
org.eclipse.jst.j2ee.core,
org.eclipse.jst.j2ee,
org.eclipse.wst.common.emfworkbench.integration,
- org.eclipse.jst.jsf.core
+ org.eclipse.jst.jsf.core,
+ org.jboss.tools.cdi.core
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.properties 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.properties 2010-06-14 09:03:11 UTC (rev 22779)
@@ -2,6 +2,7 @@
Bundle-Vendor = JBoss by Red Hat
Bundle-Name = Integration Seam projects with Maven
Seam_Project_configurator = Seam Project configurator
+CDI_Project_configurator = CDI Project configurator
JSF_Project_configurator = JSF Project configurator
Portlet_Core_Project_configurator = Portlet Core Project configurator
JBoss_Maven_Integration = JBoss Maven Integration
\ No newline at end of file
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml 2010-06-14 09:03:11 UTC (rev 22779)
@@ -16,6 +16,13 @@
<extension point="org.maven.ide.eclipse.projectConfigurators">
<configurator
+ id="org.jboss.tools.maven.cdi.configurator"
+ class="org.jboss.tools.maven.seam.configurators.CDIProjectConfigurator"
+ name="%CDI_Project_configurator" priority="250"/>
+ </extension>
+
+ <extension point="org.maven.ide.eclipse.projectConfigurators">
+ <configurator
id="org.jboss.tools.maven.jsf.configurator"
class="org.jboss.tools.maven.seam.configurators.JSFProjectConfigurator"
name="%JSF_Project_configurator" priority="150"/>
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -40,6 +40,7 @@
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.cdi.internal.core.project.facet.CDIFacetInstallDataModelProvider;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import org.jboss.tools.maven.core.MavenCoreActivator;
import org.jboss.tools.seam.core.SeamUtil;
@@ -104,6 +105,10 @@
public static final boolean CONFIGURE_SEAMPORTLET_VALUE = true;
+ public static final String CONFIGURE_CDI = "configureCDI"; //$NON-NLS-1$
+
+ public static final boolean CONFIGURE_CDI_VALUE = true;
+
// The shared instance
private static MavenSeamActivator plugin;
@@ -925,4 +930,10 @@
return config;
}
+
+ public IDataModel createCDIDataModel(IFacetedProject fproj, IProjectFacetVersion facetVersion) {
+ IDataModel config = (IDataModel) new CDIFacetInstallDataModelProvider().create();
+
+ return config;
+ }
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/Messages.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/Messages.java 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/Messages.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -13,6 +13,7 @@
public static String SeamConfiguratorPreferencePage_Configure_JBoss_Portlet_Core_facet;
public static String SeamConfiguratorPreferencePage_Configure_JBoss_Seam_Portlet_facet;
public static String SeamConfiguratorPreferencePage_Configure_JSF_facet;
+ public static String SeamConfiguratorPreferencePage_Configure_CDI_facet;
public static String SeamConfiguratorPreferencePage_Configure_Seam_Artifacts;
public static String SeamConfiguratorPreferencePage_Configure_Seam_Runtime;
public static String SeamConfiguratorPreferencePage_Configure_Seam_when_importing_Maven_projects;
Added: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/CDIProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/CDIProjectConfigurator.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/CDIProjectConfigurator.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -0,0 +1,128 @@
+package org.jboss.tools.maven.seam.configurators;
+
+import org.apache.maven.project.MavenProject;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.wst.common.componentcore.ModuleCoreNature;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.maven.core.IJBossMavenConstants;
+import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
+import org.jboss.tools.maven.seam.MavenSeamActivator;
+import org.jboss.tools.maven.seam.Messages;
+import org.maven.ide.eclipse.project.IMavenProjectFacade;
+import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
+import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
+import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
+
+public class CDIProjectConfigurator extends AbstractProjectConfigurator {
+
+ private static final String CDI_API_GROUP_ID = "javax.enterprise"; //$NON-NLS-1$
+ private static final String CDI_API_ARTIFACT_ID = "cdi-api"; //$NON-NLS-1$
+
+ protected static final IProjectFacet dynamicWebFacet;
+ protected static final IProjectFacetVersion dynamicWebVersion;
+
+ protected static final IProjectFacet cdiFacet;
+ protected static final IProjectFacetVersion cdiVersion;
+
+ protected static final IProjectFacet m2Facet;
+ protected static final IProjectFacetVersion m2Version;
+
+ static {
+ dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
+ dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
+ cdiFacet = ProjectFacetsManager.getProjectFacet("jst.cdi"); //$NON-NLS-1$
+ cdiVersion = cdiFacet.getVersion("1.0"); //$NON-NLS-1$
+ m2Facet = ProjectFacetsManager.getProjectFacet("jboss.m2"); //$NON-NLS-1$
+ m2Version = m2Facet.getVersion("1.0"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void configure(ProjectConfigurationRequest request,
+ IProgressMonitor monitor) throws CoreException {
+ MavenProject mavenProject = request.getMavenProject();
+ IProject project = request.getProject();
+ configureInternal(mavenProject,project, monitor);
+ }
+
+ private void configureInternal(MavenProject mavenProject,IProject project,
+ IProgressMonitor monitor) throws CoreException {
+ IPreferenceStore store = MavenSeamActivator.getDefault().getPreferenceStore();
+ boolean configureCDI = store.getBoolean(MavenSeamActivator.CONFIGURE_CDI);
+ if (!configureCDI) {
+ return;
+ }
+
+ String packaging = mavenProject.getPackaging();
+ String cdiVersion = getCDIVersion(mavenProject);
+ if (cdiVersion != null) {
+ final IFacetedProject fproj = ProjectFacetsManager.create(project);
+ if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
+ installWarFacets(fproj, cdiVersion, monitor);
+ }
+ }
+ }
+
+
+ @Override
+ protected void mavenProjectChanged(MavenProjectChangedEvent event,
+ IProgressMonitor monitor) throws CoreException {
+ IMavenProjectFacade facade = event.getMavenProject();
+ if(facade != null) {
+ IProject project = facade.getProject();
+ if(isWTPProject(project)) {
+ MavenProject mavenProject = facade.getMavenProject(monitor);
+ configureInternal(mavenProject, project, monitor);
+ }
+ }
+ super.mavenProjectChanged(event, monitor);
+ }
+
+ private boolean isWTPProject(IProject project) {
+ return ModuleCoreNature.getModuleCoreNature(project) != null;
+ }
+
+ private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor) throws CoreException {
+ if (!fproj.hasProjectFacet(m2Facet)) {
+ IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider().create();
+ config.setBooleanProperty(IJBossMavenConstants.MAVEN_PROJECT_EXISTS, true);
+ fproj.installProjectFacet(m2Version, config, monitor);
+ }
+ }
+
+
+ private void installWarFacets(IFacetedProject fproj, String cdiVersion,IProgressMonitor monitor) throws CoreException {
+
+ if (!fproj.hasProjectFacet(dynamicWebFacet)) {
+ MavenSeamActivator.log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
+ }
+ installCDIFacet(fproj, cdiVersion, monitor);
+ installM2Facet(fproj, monitor);
+
+ }
+
+
+ private void installCDIFacet(IFacetedProject fproj, String cdiVersionString, IProgressMonitor monitor)
+ throws CoreException {
+ if (!fproj.hasProjectFacet(cdiFacet)) {
+ if (cdiVersionString.startsWith("1.0")) { //$NON-NLS-1$
+ IDataModel model = MavenSeamActivator.getDefault().createCDIDataModel(fproj,cdiVersion);
+ fproj.installProjectFacet(cdiVersion, model, monitor);
+ }
+ }
+ }
+
+ private String getCDIVersion(MavenProject mavenProject) {
+ String version = null;
+ version = MavenSeamActivator.getDefault().getDependencyVersion(mavenProject, CDI_API_GROUP_ID, CDI_API_ARTIFACT_ID);
+
+ return version;
+ }
+
+}
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/JSFProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/JSFProjectConfigurator.java 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/JSFProjectConfigurator.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -5,11 +5,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
-import org.eclipse.jst.jsf.core.internal.project.facet.IJSFFacetInstallDataModelProperties;
-import org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDataModelProvider;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -20,7 +15,6 @@
import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
import org.jboss.tools.maven.seam.MavenSeamActivator;
import org.jboss.tools.maven.seam.Messages;
-import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
import org.maven.ide.eclipse.project.IMavenProjectFacade;
import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
@@ -36,6 +30,7 @@
protected static final IProjectFacetVersion dynamicWebVersion;
protected static final IProjectFacet jsfFacet;
+ protected static final IProjectFacetVersion jsfVersion20;
protected static final IProjectFacetVersion jsfVersion12;
protected static final IProjectFacetVersion jsfVersion11;
protected static final IProjectFacet m2Facet;
@@ -45,6 +40,7 @@
dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
jsfFacet = ProjectFacetsManager.getProjectFacet("jst.jsf"); //$NON-NLS-1$
+ jsfVersion20 = jsfFacet.getVersion("2.0"); //$NON-NLS-1$
jsfVersion12 = jsfFacet.getVersion("1.2"); //$NON-NLS-1$
jsfVersion11 = jsfFacet.getVersion("1.1"); //$NON-NLS-1$
m2Facet = ProjectFacetsManager.getProjectFacet("jboss.m2"); //$NON-NLS-1$
@@ -127,10 +123,9 @@
IDataModel model = MavenSeamActivator.getDefault().createJSFDataModel(fproj,jsfVersion12);
fproj.installProjectFacet(jsfVersion12, model, monitor);
}
- // FIXME
if (jsfVersionString.startsWith("2.0")) { //$NON-NLS-1$
- IDataModel model = MavenSeamActivator.getDefault().createJSFDataModel(fproj,jsfVersion12);
- fproj.installProjectFacet(jsfVersion12, model, monitor);
+ IDataModel model = MavenSeamActivator.getDefault().createJSFDataModel(fproj,jsfVersion20);
+ fproj.installProjectFacet(jsfVersion20, model, monitor);
}
}
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/messages.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/messages.properties 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/messages.properties 2010-06-14 09:03:11 UTC (rev 22779)
@@ -7,6 +7,7 @@
SeamConfiguratorPreferencePage_Configure_JBoss_Portlet_Core_facet=Configure JBoss Portlet Core facet when importing Maven projects
SeamConfiguratorPreferencePage_Configure_JBoss_Seam_Portlet_facet=Configure JBoss Seam Portlet facet when importing Maven projects
SeamConfiguratorPreferencePage_Configure_JSF_facet=Configure JSF facet when importing Maven projects
+SeamConfiguratorPreferencePage_Configure_CDI_facet=Configure CDI facet when importing Maven projects
SeamConfiguratorPreferencePage_Configure_Seam_Artifacts=Configure Seam Artifacts (view folder, model source folder, package ...)
SeamConfiguratorPreferencePage_Configure_Seam_Runtime=Configure Seam Runtime
SeamConfiguratorPreferencePage_Configure_Seam_when_importing_Maven_projects=Configure Seam when importing Maven projects
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencePage.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -25,6 +25,7 @@
private Button configurePortletButton;
private Button configureJSFPortletButton;
private Button configureSeamPortletButton;
+ private Button configureCDIButton;
@Override
protected Control createContents(Composite parent) {
@@ -82,6 +83,10 @@
boolean configureSeamPortlet = store.getBoolean(MavenSeamActivator.CONFIGURE_SEAMPORTLET);
configureJSFPortletButton.setSelection(configureSeamPortlet);
+ configureCDIButton = new Button(composite,SWT.CHECK);
+ configureCDIButton.setText(Messages.SeamConfiguratorPreferencePage_Configure_CDI_facet);
+ boolean configureCDI = store.getBoolean(MavenSeamActivator.CONFIGURE_CDI);
+ configureCDIButton.setSelection(configureCDI);
return composite;
}
@@ -97,6 +102,8 @@
configurePortletButton.setSelection(MavenSeamActivator.CONFIGURE_PORTLET_VALUE);
configureJSFPortletButton.setSelection(MavenSeamActivator.CONFIGURE_JSFPORTLET_VALUE);
configureSeamPortletButton.setSelection(MavenSeamActivator.CONFIGURE_SEAMPORTLET_VALUE);
+ configureCDIButton.setSelection(MavenSeamActivator.CONFIGURE_CDI_VALUE);
+
IPreferenceStore store = MavenSeamActivator.getDefault().getPreferenceStore();
store.setValue(MavenSeamActivator.CONFIGURE_SEAM, MavenSeamActivator.CONFIGURE_SEAM_VALUE);
store.setValue(MavenSeamActivator.CONFIGURE_JSF, MavenSeamActivator.CONFIGURE_JSF_VALUE);
@@ -105,6 +112,7 @@
store.setValue(MavenSeamActivator.CONFIGURE_PORTLET, MavenSeamActivator.CONFIGURE_PORTLET_VALUE);
store.setValue(MavenSeamActivator.CONFIGURE_SEAM_RUNTIME, MavenSeamActivator.CONFIGURE_SEAM_RUNTIME_VALUE);
store.setValue(MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS, MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS_VALUE);
+ store.setValue(MavenSeamActivator.CONFIGURE_CDI, MavenSeamActivator.CONFIGURE_CDI_VALUE);
configureSeamRuntimeButton.setEnabled(configureSeamButton.getSelection());
configureSeamArtifactsButton.setEnabled(configureSeamButton.getSelection());
super.performDefaults();
@@ -120,6 +128,7 @@
store.setValue(MavenSeamActivator.CONFIGURE_SEAMPORTLET, configureSeamPortletButton.getSelection());
store.setValue(MavenSeamActivator.CONFIGURE_SEAM_RUNTIME, configureSeamRuntimeButton.getSelection());
store.setValue(MavenSeamActivator.CONFIGURE_SEAM_ARTIFACTS, configureSeamArtifactsButton.getSelection());
+ store.setValue(MavenSeamActivator.CONFIGURE_CDI, configureCDIButton.getSelection());
return super.performOk();
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencesInitializer.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencesInitializer.java 2010-06-12 09:46:44 UTC (rev 22778)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/preferences/SeamConfiguratorPreferencesInitializer.java 2010-06-14 09:03:11 UTC (rev 22779)
@@ -34,6 +34,9 @@
node.putBoolean(
MavenSeamActivator.CONFIGURE_SEAMPORTLET,
MavenSeamActivator.CONFIGURE_SEAMPORTLET_VALUE);
+ node.putBoolean(
+ MavenSeamActivator.CONFIGURE_CDI,
+ MavenSeamActivator.CONFIGURE_CDI_VALUE);
}
}
14 years, 7 months