JBoss Tools SVN: r13048 - in trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test: java2java and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-01-14 21:16:32 -0500 (Wed, 14 Jan 2009)
New Revision: 13048
Added:
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/SelectorTester.java
Modified:
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/JavaSelectorTestCase.java
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java2java/NormalJ2JConfigFileAnalyzerTester.java
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/AbstractXML2JavaTestCase.java
trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/order/ClassicX2JTestCase.java
Log:
JBIDE-3479
Add a new test case for testing local the Javabean with "selector"
Modified: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/JavaSelectorTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/JavaSelectorTestCase.java 2009-01-14 21:45:43 UTC (rev 13047)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/JavaSelectorTestCase.java 2009-01-15 02:16:32 UTC (rev 13048)
@@ -6,9 +6,10 @@
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.jboss.tools.smooks.javabean.analyzer.JavaBeanAnalyzer;
import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
import org.jboss.tools.smooks.javabean.model.JavaBeanModelFactory;
+import org.jboss.tools.smooks.ui.IXMLStructuredObject;
+import org.jboss.tools.smooks.utils.UIUtils;
/**
* @author Dart
@@ -23,19 +24,16 @@
JavaBeanModel model = JavaBeanModelFactory
.getJavaBeanModelWithLazyLoad(A.class);
- JavaBeanModel aModel = JavaBeanAnalyzer.localJavaBeanModelWithSelector(
- "a", model);
+ IXMLStructuredObject aModel = UIUtils.localXMLNodeWithPath("a", model);
Assert.assertNotNull(aModel);
- Assert.assertEquals(aModel.getBeanClass(), A.class);
+ Assert.assertEquals(((JavaBeanModel) aModel).getBeanClass(), A.class);
- JavaBeanModel nullModel = JavaBeanAnalyzer
- .localJavaBeanModelWithSelectorWithoutException("a" + sperator
- + "null", model);
+ IXMLStructuredObject nullModel = UIUtils.localXMLNodeWithPath("a" + sperator
+ + "null", model, null, false);
Assert.assertNull(nullModel);
// avoid died loop
- nullModel = JavaBeanAnalyzer
- .localJavaBeanModelWithSelectorWithoutException("null", model);
+ nullModel = UIUtils.localXMLNodeWithPath("null", model, null, false);
Assert.assertNull(nullModel);
}
}
Added: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/SelectorTester.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/SelectorTester.java (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/SelectorTester.java 2009-01-15 02:16:32 UTC (rev 13048)
@@ -0,0 +1,85 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.test.java;
+
+import java.util.Iterator;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.jboss.tools.smooks.javabean.analyzer.JavaBeanAnalyzer;
+import org.jboss.tools.smooks.model.AbstractResourceConfig;
+import org.jboss.tools.smooks.model.ResourceConfigType;
+import org.jboss.tools.smooks.model.ResourceType;
+import org.jboss.tools.smooks.model.SmooksResourceListType;
+import org.jboss.tools.smooks.model.util.SmooksModelUtils;
+import org.jboss.tools.smooks.ui.IXMLStructuredObject;
+import org.jboss.tools.smooks.utils.UIUtils;
+
+/**
+ * @author Dart
+ *
+ */
+public class SelectorTester {
+
+ /**
+ *
+ * @param list
+ * @param source
+ * @param target
+ */
+ public void validSmooksConfigFile(SmooksResourceListType list,
+ IXMLStructuredObject source, IXMLStructuredObject target) {
+ List<AbstractResourceConfig> resourceList = list
+ .getAbstractResourceConfig();
+ for (Iterator<AbstractResourceConfig> iterator = resourceList
+ .iterator(); iterator.hasNext();) {
+ AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator
+ .next();
+ if (abstractResourceConfig instanceof ResourceConfigType) {
+ ResourceConfigType config = (ResourceConfigType) abstractResourceConfig;
+ ResourceType resource = config.getResource();
+ if (resource != null) {
+ if (JavaBeanAnalyzer.BEANPOPULATOR.equals(resource
+ .getStringValue())) {
+ IXMLStructuredObject model = UIUtils
+ .localXMLNodeWithPath(config.getSelector(),
+ source);
+ Assert.assertNotNull(model);
+
+ List bindingList = SmooksModelUtils
+ .getBindingListFromResourceConfigType(config);
+
+ for (Iterator iterator2 = bindingList.iterator(); iterator2
+ .hasNext();) {
+ AnyType binding = (AnyType) iterator2.next();
+ String property = SmooksModelUtils
+ .getAttributeValueFromAnyType(binding,
+ SmooksModelUtils.ATTRIBUTE_PROPERTY);
+ if (property != null) {
+ property = property.trim();
+ }
+ String selector = SmooksModelUtils
+ .getAttributeValueFromAnyType(binding,
+ SmooksModelUtils.ATTRIBUTE_SELECTOR);
+ if (selector != null) {
+ selector = selector.trim();
+ }
+
+ if (selector.startsWith("${")) {
+ continue;
+ }
+
+ IXMLStructuredObject childModel = UIUtils
+ .localXMLNodeWithPath(config.getSelector(),
+ source);
+ Assert.assertNotNull(childModel);
+ }
+ }
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java/SelectorTester.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java2java/NormalJ2JConfigFileAnalyzerTester.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java2java/NormalJ2JConfigFileAnalyzerTester.java 2009-01-14 21:45:43 UTC (rev 13047)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/java2java/NormalJ2JConfigFileAnalyzerTester.java 2009-01-15 02:16:32 UTC (rev 13048)
@@ -30,6 +30,7 @@
import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
import org.jboss.tools.smooks.model.DocumentRoot;
import org.jboss.tools.smooks.model.SmooksResourceListType;
+import org.jboss.tools.smooks.test.java.SelectorTester;
/**
* @author Dart Peng Date : 2008-9-1
@@ -51,6 +52,11 @@
listType, null, null);
Object target = targetModelAnalyzer.buildTargetInputObjects(graph,
listType, null, null);
+
+ SelectorTester tester = new SelectorTester();
+ tester.validSmooksConfigFile(listType, (JavaBeanModel) ((List) source)
+ .get(0), (JavaBeanModel) ((List) target).get(0));
+
MappingResourceConfigList configList = connectionsAnalyzer
.analyzeMappingSmooksModel(listType, source, target);
List connections = configList.getMappingModelList();
@@ -67,18 +73,23 @@
MappingModel connectionModels = (MappingModel) iterator.next();
Assert.assertNotNull(connectionModels.getSource());
Assert.assertNotNull(connectionModels.getTarget());
- JavaBeanModel sourceModel = (JavaBeanModel)connectionModels.getSource();
- JavaBeanModel targetModel = (JavaBeanModel)connectionModels.getSource();
- if(targetModel.isPrimitive()){
+ JavaBeanModel sourceModel = (JavaBeanModel) connectionModels
+ .getSource();
+ JavaBeanModel targetModel = (JavaBeanModel) connectionModels
+ .getSource();
+ if (targetModel.isPrimitive()) {
// check the connection model properties
- if(targetModel.getName().equals("productCode")){
- Assert.assertTrue(connectionModels.getProperties().size() > 0);
+ if (targetModel.getName().equals("productCode")) {
+ Assert
+ .assertTrue(connectionModels.getProperties().size() > 0);
}
- if(targetModel.getName().equals("unitPrice")){
- Assert.assertTrue(connectionModels.getProperties().size() > 0);
+ if (targetModel.getName().equals("unitPrice")) {
+ Assert
+ .assertTrue(connectionModels.getProperties().size() > 0);
}
- if(targetModel.getName().equals("unitQuantity")){
- Assert.assertTrue(connectionModels.getProperties().size() > 0);
+ if (targetModel.getName().equals("unitQuantity")) {
+ Assert
+ .assertTrue(connectionModels.getProperties().size() > 0);
}
}
}
Modified: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/AbstractXML2JavaTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/AbstractXML2JavaTestCase.java 2009-01-14 21:45:43 UTC (rev 13047)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/AbstractXML2JavaTestCase.java 2009-01-15 02:16:32 UTC (rev 13048)
@@ -22,7 +22,9 @@
import org.jboss.tools.smooks.model.DocumentRoot;
import org.jboss.tools.smooks.model.SmooksResourceListType;
import org.jboss.tools.smooks.test.AbstractModelTestCase;
+import org.jboss.tools.smooks.test.java.SelectorTester;
import org.jboss.tools.smooks.test.java2java.NormalJ2JConfigFileAnalyzerTester;
+import org.jboss.tools.smooks.ui.IXMLStructuredObject;
import org.jboss.tools.smooks.xml.model.AbstractXMLObject;
import org.jboss.tools.smooks.xml.model.TagList;
import org.jboss.tools.smooks.xml.model.TagObject;
@@ -35,11 +37,11 @@
*
*/
public abstract class AbstractXML2JavaTestCase extends AbstractModelTestCase {
-
+
protected Object source;
protected Object target;
protected MappingResourceConfigList mappingResourceConfigList;
-
+
public Object getSource() {
return source;
}
@@ -65,6 +67,14 @@
this.mappingResourceConfigList = mappingResourceConfigList;
}
+ public void checkSelectors() {
+ SelectorTester tester = new SelectorTester();
+ SmooksResourceListType listType = ((DocumentRoot) smooksResource
+ .getContents().get(0)).getSmooksResourceList();
+ tester.validSmooksConfigFile(listType, (IXMLStructuredObject) source,
+ (IXMLStructuredObject) ((List) target).get(0));
+ }
+
/*
* (non-Javadoc)
*
@@ -110,12 +120,13 @@
listType, null, null);
return source;
}
-
+
/*
* (non-Javadoc)
+ *
* @see junit.framework.TestCase#setUp()
*/
- public void setUp() throws Exception{
+ public void setUp() throws Exception {
super.setUp();
setSource(loadSource());
setTarget(loadTarget());
@@ -173,7 +184,7 @@
protected ITargetModelAnalyzer newTargetModelAnalyzer() {
return new JavaBeanAnalyzer();
}
-
+
protected void checkTargetConnectionCount(
List<MappingModel> mappingModelList) throws Exception {
HashMap map = new HashMap();
@@ -187,7 +198,7 @@
map.put(mappingModel.getTarget(), "Exist");
}
}
-
+
public void checkXMLNodeModelValue(AbstractXMLObject tag) {
Assert.assertNotNull(tag.getName());
if (!(tag instanceof TagList))
@@ -195,7 +206,8 @@
else
Assert.assertNull(tag.getParent());
if (tag instanceof TagObject) {
- List<AbstractXMLObject> children = ((TagObject) tag).getChildren();
+ List<AbstractXMLObject> children = ((TagObject) tag)
+ .getXMLNodeChildren();
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
AbstractXMLObject abstractXMLObject = (AbstractXMLObject) iterator
.next();
@@ -225,7 +237,7 @@
if (name.equalsIgnoreCase(tag.getName())) {
return tag;
}
- List list = tag.getChildren();
+ List list = tag.getXMLNodeChildren();
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
if (object instanceof TagObject) {
@@ -237,5 +249,4 @@
return null;
}
-
}
Modified: trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/order/ClassicX2JTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/order/ClassicX2JTestCase.java 2009-01-14 21:45:43 UTC (rev 13047)
+++ trunk/smooks/tests/org.jboss.tools.smooks.test/src/org/jboss/tools/smooks/test/xml2java/order/ClassicX2JTestCase.java 2009-01-15 02:16:32 UTC (rev 13048)
@@ -47,6 +47,9 @@
}
public void testGraph() throws Exception {
+
+ checkSelectors();
+
MappingResourceConfigList configList = getMappingResourceConfigList();
List<MappingModel> mappingModelList = configList.getMappingModelList();
// there are 9 connections
@@ -84,7 +87,7 @@
}
}
Assert.assertEquals(equalsUrl, tag.getNamespaceURL());
- List<AbstractXMLObject> children = tag.getChildren();
+ List<AbstractXMLObject> children = tag.getXMLNodeChildren();
for (Iterator<AbstractXMLObject> iterator = children.iterator(); iterator
.hasNext();) {
AbstractXMLObject abstractXMLObject = (AbstractXMLObject) iterator
16 years
JBoss Tools SVN: r13047 - trunk/vpe/features/org.jboss.tools.xulrunner.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-01-14 16:45:43 -0500 (Wed, 14 Jan 2009)
New Revision: 13047
Modified:
trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
Log:
previous commit rolled back
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-01-14 21:37:10 UTC (rev 13046)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-01-14 21:45:43 UTC (rev 13047)
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.xulrunner.feature"
- label="%featureName"
- version="1.8.1.3-20070904"
- provider-name="%providerName"
- plugin="org.jboss.tools.xulrunner.initializer">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
- <discovery label="%discoverySiteName" url="http://download.jboss.org/updates/development"/>
- </url>
-
- <plugin
- id="org.mozilla.xpcom"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.mozilla.xulrunner.carbon.macosx"
- os="macosx"
- ws="carbon"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.mozilla.xulrunner.gtk.linux.x86"
- os="linux"
- ws="gtk"
- arch="x86"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.mozilla.xulrunner.gtk.linux.x86_64"
- os="linux"
- ws="gtk"
- arch="x86_64"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.mozilla.xulrunner.win32.win32.x86"
- os="win32"
- ws="win32"
- arch="x86"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.jboss.tools.xulrunner.initializer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.xulrunner.feature"
+ label="%featureName"
+ version="1.8.1.3-20070904"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.xulrunner.initializer">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ <discovery label="%discoverySiteName" url="http://download.jboss.org/updates/development"/>
+ </url>
+
+ <plugin
+ id="org.mozilla.xpcom"
+ download-size="0"
+ install-size="0"
+ version="1.8.1.3-20070904"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.carbon.macosx"
+ os="macosx"
+ ws="carbon"
+ download-size="0"
+ install-size="0"
+ version="1.8.1.3-20070904"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.gtk.linux.x86"
+ os="linux"
+ ws="gtk"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="1.8.1.3-20070904"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.gtk.linux.x86_64"
+ os="linux"
+ ws="gtk"
+ arch="x86_64"
+ download-size="0"
+ install-size="0"
+ version="1.8.1.4-20080112"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.win32.win32.x86"
+ os="win32"
+ ws="win32"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="1.8.1.3-20070904"/>
+
+ <plugin
+ id="org.jboss.tools.xulrunner.initializer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+</feature>
16 years
JBoss Tools SVN: r13046 - trunk/vpe/features/org.jboss.tools.xulrunner.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-01-14 16:37:10 -0500 (Wed, 14 Jan 2009)
New Revision: 13046
Modified:
trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
Log:
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-01-14 21:01:01 UTC (rev 13045)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-01-14 21:37:10 UTC (rev 13046)
@@ -1,75 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.xulrunner.feature"
- label="%featureName"
- version="1.8.1.3-20070904"
- provider-name="%providerName"
- plugin="org.jboss.tools.xulrunner.initializer">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
- <discovery label="%discoverySiteName" url="http://download.jboss.org/updates/development"/>
- </url>
-
- <plugin
- id="org.mozilla.xpcom"
- download-size="0"
- install-size="0"
- version="1.8.1.3-20070904"/>
-
- <plugin
- id="org.mozilla.xulrunner.carbon.macosx"
- os="macosx"
- ws="carbon"
- download-size="0"
- install-size="0"
- version="1.8.1.3-20070904"/>
-
- <plugin
- id="org.mozilla.xulrunner.gtk.linux.x86"
- os="linux"
- ws="gtk"
- arch="x86"
- download-size="0"
- install-size="0"
- version="1.8.1.3-20070904"/>
-
- <plugin
- id="org.mozilla.xulrunner.gtk.linux.x86_64"
- os="linux"
- ws="gtk"
- arch="x86_64"
- download-size="0"
- install-size="0"
- version="1.8.1.4-20080112"/>
-
- <plugin
- id="org.mozilla.xulrunner.win32.win32.x86"
- os="win32"
- ws="win32"
- arch="x86"
- download-size="0"
- install-size="0"
- version="1.8.1.3-20070904"/>
-
- <plugin
- id="org.jboss.tools.xulrunner.initializer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.xulrunner.feature"
+ label="%featureName"
+ version="1.8.1.3-20070904"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.xulrunner.initializer">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ <discovery label="%discoverySiteName" url="http://download.jboss.org/updates/development"/>
+ </url>
+
+ <plugin
+ id="org.mozilla.xpcom"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.carbon.macosx"
+ os="macosx"
+ ws="carbon"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.gtk.linux.x86"
+ os="linux"
+ ws="gtk"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.gtk.linux.x86_64"
+ os="linux"
+ ws="gtk"
+ arch="x86_64"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.mozilla.xulrunner.win32.win32.x86"
+ os="win32"
+ ws="win32"
+ arch="x86"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.jboss.tools.xulrunner.initializer"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+</feature>
16 years
JBoss Tools SVN: r13045 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu: action and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-14 16:01:01 -0500 (Wed, 14 Jan 2009)
New Revision: 13045
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ReplaceAction.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
Log:
CODING IN PROGRESS - issue JBIDE-3519: Ctrl+Z (Undo) doesn't work properly for "Replace With" operation from context menu.
https://jira.jboss.org/jira/browse/JBIDE-3519
- the issue has been fixed
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-01-14 17:48:10 UTC (rev 13044)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/MenuCreationHelper.java 2009-01-14 21:01:01 UTC (rev 13045)
@@ -44,7 +44,6 @@
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.menu.BaseActionManager.MyMenuManager;
import org.jboss.tools.vpe.editor.menu.action.InsertAction;
-import org.jboss.tools.vpe.editor.menu.action.ReplaceAction;
import org.jboss.tools.vpe.editor.menu.action.VpeMenuListener;
import org.jboss.tools.vpe.editor.menu.action.VpeTextOperationAction;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
@@ -508,7 +507,7 @@
*/
private void createReplaceAction(MenuManager menu, Point region, XModelObject item){
String tagName = getTagName(menu, region, item);
- menu.add(new ReplaceAction(tagName, region, item, pageContext, sourceEditor));
+ menu.add(new InsertAction(tagName, region, item, pageContext, sourceEditor, true));
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-01-14 17:48:10 UTC (rev 13044)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-01-14 21:01:01 UTC (rev 13045)
@@ -30,14 +30,12 @@
* @author Igor Zhukov (izhukov(a)exadel.com)
*/
public class InsertAction extends Action {
-
private XModelObject item;
private Point region;
+ private VpePageContext pageContext;
+ private StructuredTextEditor sourceEditor;
+ private boolean replace;
- private VpePageContext pageContext = null;
- private StructuredTextEditor sourceEditor = null;
- private boolean replace= false;
-
/**
* Constructor.
*
@@ -49,11 +47,7 @@
*/
public InsertAction(String title, Point region, XModelObject item, VpePageContext pageContext,
StructuredTextEditor sourceEditor) {
- super(title);
- this.item = item;
- this.region = region;
- this.pageContext = pageContext;
- this.sourceEditor = sourceEditor;
+ this(title, region, item, pageContext, sourceEditor, false);
}
/**
@@ -97,15 +91,14 @@
String startText = Constants.EMPTY + item.getAttributeValue("start text"); //$NON-NLS-1$
String endText = Constants.EMPTY + item.getAttributeValue("end text"); //$NON-NLS-1$
- if (this.replace) {
- getSourceEditor().getTextViewer().getTextWidget().replaceTextRange(
- region.x, region.y, ""); //$NON-NLS-1$
- region.y = 0;
- }
-
if (region != null) {
- // set source selection
- SelectionUtil.setSourceSelection(pageContext, region.x, region.y);
+ if (this.replace) {
+ getSourceEditor().getTextViewer().getTextWidget().replaceTextRange(
+ region.x, region.y, ""); //$NON-NLS-1$
+ } else {
+ // set source selection
+ SelectionUtil.setSourceSelection(pageContext, region.x, region.y);
+ }
}
// Gets source editor's selection provider with updated text selection.
@@ -131,13 +124,6 @@
}
/**
- * @return the region
- */
- protected Point getRegion() {
- return region;
- }
-
- /**
* @return the pageContext
*/
protected VpePageContext getPageContext() {
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ReplaceAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ReplaceAction.java 2009-01-14 17:48:10 UTC (rev 13044)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/ReplaceAction.java 2009-01-14 21:01:01 UTC (rev 13045)
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2008 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.editor.menu.action;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.jboss.tools.common.model.XModelObject;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-
-/**
- * Replace Action for visual editor from content menu
- * @author mareshkau
- *
- */
-public class ReplaceAction extends InsertAction{
-
- /**
- *
- * @param title
- * @param region
- * @param item
- * @param pageContext
- * @param sourceEditor
- */
- public ReplaceAction(String title, Point region, XModelObject item,
- VpePageContext pageContext, StructuredTextEditor sourceEditor) {
- super(title, region, item, pageContext, sourceEditor);
- }
-
- @Override
- public void run() {
- getSourceEditor().getTextViewer().getTextWidget().replaceTextRange(getRegion().x, getRegion().y, ""); //$NON-NLS-1$
- getRegion().y=0;
- super.run();
- }
-
-
-}
16 years
JBoss Tools SVN: r13044 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-14 12:48:10 -0500 (Wed, 14 Jan 2009)
New Revision: 13044
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-514 - images titles updated
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 17:43:45 UTC (rev 13043)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 17:48:10 UTC (rev 13044)
@@ -281,7 +281,7 @@
</itemizedlist>
<figure>
- <title>Finding Available Servers in the Selected Directory</title>
+ <title>Finding Servers in the Selected Directory</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_3_3_1.png"/>
@@ -297,7 +297,7 @@
<figure>
- <title>List of Servers</title>
+ <title>List of Servers Added</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_3_3.png"/>
@@ -312,7 +312,7 @@
</itemizedlist>
<figure>
- <title>Add Server to be configured</title>
+ <title>Add Server to be Configured</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_3_1.png"/>
16 years
JBoss Tools SVN: r13043 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-14 12:43:45 -0500 (Wed, 14 Jan 2009)
New Revision: 13043
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-514 - the Getting Started section is updated
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 17:30:07 UTC (rev 13042)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 17:43:45 UTC (rev 13043)
@@ -205,11 +205,11 @@
</listitem>
<listitem>
<para>Then run in console:</para>
- <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-2.0.0.Beta1.jar
+ <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-2.0.0.Cr2.jar
]]></programlisting>
</listitem>
<listitem>
- <para>Follow the instructions presented by the installation wizard</para>
+ <para>Follow the instructions presented by the installation wizard:</para>
</listitem>
</itemizedlist>
@@ -263,8 +263,7 @@
<para>Installation process includes <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
Platform</ulink>. Select <emphasis>
<property>Yes</property>
- </emphasis> to use it in JBoss Developer Studio. This step lets you configure locally available JBoss Application Servers. You can fill the list automatically using the <emphasis><property>Find</property></emphasis> button - select a folder where search of available JBoss Application Servers should be started. After finding the list can be edited by the <emphasis><property>Add</property></emphasis> and <emphasis><property>Remove</property></emphasis> buttons.
- </para>
+ </emphasis> to use it in JBoss Developer Studio. This step lets you configure locally available JBoss Application Servers: </para>
</listitem>
</itemizedlist>
@@ -277,8 +276,38 @@
</mediaobject>
</figure>
+<itemizedlist>
+ <listitem><para>You can fill the list automatically using the <emphasis><property>Find</property></emphasis> button: click <emphasis><property>Find</property></emphasis>, select a folder where search of available JBoss Application Servers should be started and click on <emphasis><property>Ok</property></emphasis>: </para> </listitem>
+</itemizedlist>
+
+ <figure>
+ <title>Finding Available Servers in the Selected Directory</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_3_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+
<itemizedlist>
- <listitem> <para>Or you can also add servers one by one using the <emphasis><property>Add</property></emphasis> button:</para>
+ <listitem><para> All available servers in the selected directory will be added to the list with the following information specified: Name, Type, Version and Location.
+ </para></listitem>
+ </itemizedlist>
+
+
+ <figure>
+ <title>List of Servers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+
+ <itemizedlist>
+ <listitem> <para>You can also add servers one by one using the <emphasis><property>Add</property></emphasis> button:</para>
</listitem>
</itemizedlist>
@@ -305,20 +334,12 @@
<para/>
- <para>Click on <emphasis><property>Ok</property></emphasis>. The server is added to the list with the details on its type, version and location:</para>
+ <para>Click on <emphasis><property>Ok</property></emphasis>. The server is added to the list with the details on its type, version and location.</para>
- <figure>
- <title>List of Servers</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para/>
- <para>If necessary, you can edit the server details clicking on the <emphasis><property>Edit</property></emphasis> button:</para>
+ <para>The <emphasis><property>Remove</property></emphasis> button will the remove the selected server from the list. If necessary, you can edit the server details clicking on the <emphasis><property>Edit</property></emphasis> button:</para>
+
<figure>
<title>Edit Server</title>
<mediaobject>
@@ -340,7 +361,7 @@
<itemizedlist>
<listitem>
- <para>The <emphasis><property>Remove</property></emphasis> button will the remove the selected server from the list. Click <emphasis><property>Next</property></emphasis>. Check your installation paths and see the components to install. If you'd like to change
+ <para>Click <emphasis><property>Next</property></emphasis>. Check your installation paths and see the components to install. If you'd like to change
something, press the <emphasis>
<property>Previous</property>
</emphasis> button. Click <emphasis>
16 years
JBoss Tools SVN: r13042 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-01-14 12:30:07 -0500 (Wed, 14 Jan 2009)
New Revision: 13042
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionHref.java
Log:
correct path for windows
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionHref.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionHref.java 2009-01-14 17:04:31 UTC (rev 13041)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionHref.java 2009-01-14 17:30:07 UTC (rev 13042)
@@ -73,7 +73,7 @@
}
if (imgPath != null && imgPath.toFile().exists()) {
- return new VpeValue(getPrefix() + imgPath.toOSString());
+ return new VpeValue(getPrefix() + imgPath.toString());
}
return new VpeValue(getUnresolved());
16 years
JBoss Tools SVN: r13041 - trunk/documentation/guides/GettingStartedGuide/en/images/getting_started.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-14 12:04:31 -0500 (Wed, 14 Jan 2009)
New Revision: 13041
Added:
trunk/documentation/guides/GettingStartedGuide/en/images/getting_started/getting_started_3_3_1.png
Log:
https://jira.jboss.org/jira/browse/JBDS-514 - image added
Added: trunk/documentation/guides/GettingStartedGuide/en/images/getting_started/getting_started_3_3_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/guides/GettingStartedGuide/en/images/getting_started/getting_started_3_3_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years
JBoss Tools SVN: r13040 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-01-14 11:49:47 -0500 (Wed, 14 Jan 2009)
New Revision: 13040
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
Log:
JBIDE-2820: Add supports for new jsf 2.0 elements
https://jira.jboss.org/jira/browse/JBIDE-2820
- JUnit tests were fixed.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml 2009-01-14 16:00:04 UTC (rev 13039)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/components/outputStylesheet.xhtml 2009-01-14 16:49:47 UTC (rev 13040)
@@ -6,6 +6,6 @@
<h:body>
<h:outputStylesheet name="/resources/css/stylesRed.css" id="outputStylesheetRed"/>
<h:outputStylesheet name="/resources/css/stylesBlue.css" id="outputStylesheetBlue"/>
- Blue text
+ <span>Blue text</span>
</h:body>
</html>
\ No newline at end of file
16 years
JBoss Tools SVN: r13039 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-14 11:00:04 -0500 (Wed, 14 Jan 2009)
New Revision: 13039
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-514
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 14:54:36 UTC (rev 13038)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-01-14 16:00:04 UTC (rev 13039)
@@ -278,7 +278,7 @@
</figure>
<itemizedlist>
- <listitem> <para>You can also add servers or one by one using the <emphasis><property>Add</property></emphasis> button:</para>
+ <listitem> <para>Or you can also add servers one by one using the <emphasis><property>Add</property></emphasis> button:</para>
</listitem>
</itemizedlist>
@@ -292,9 +292,45 @@
</figure>
<para/>
-<para>Click on <emphasis><property>Browse</property></emphasis>, select </para>
+<para>Click on <emphasis><property>Browse</property></emphasis> and select the server location. Fields Name, Type and Version will be filled in automatically:</para>
+ <figure>
+ <title>Specify Server Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para/>
+
+
+ <para>Click on <emphasis><property>Ok</property></emphasis>. The server is added to the list with the details on its type, version and location:</para>
+
+ <figure>
+ <title>List of Servers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+
+ <para>If necessary, you can edit the server details clicking on the <emphasis><property>Edit</property></emphasis> button:</para>
+
+ <figure>
+ <title>Edit Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+
+
+
<!-- <note>
<title>Note:</title>
<para>The installer installs JBoss Enterprise Application Platform for running your applications
@@ -304,8 +340,8 @@
<itemizedlist>
<listitem>
- <para>Check your installation paths and see the components to install. If you'd like to change
- something, press <emphasis>
+ <para>The <emphasis><property>Remove</property></emphasis> button will the remove the selected server from the list. Click <emphasis><property>Next</property></emphasis>. Check your installation paths and see the components to install. If you'd like to change
+ something, press the <emphasis>
<property>Previous</property>
</emphasis> button. Click <emphasis>
<property>Next</property>
16 years