JBoss Tools SVN: r9176 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-18 10:21:04 -0400 (Fri, 18 Jul 2008)
New Revision: 9176
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
Complete. https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-18 13:58:05 UTC (rev 9175)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-18 14:21:04 UTC (rev 9176)
@@ -56,11 +56,19 @@
*
* @return the singleton instance
*/
- public static IELService getInstance() {
+ public static synchronized IELService getInstance() {
return INSTANCE;
}
/**
+ * The Constructor.
+ */
+ private ElService() {
+ super();
+ }
+
+
+ /**
* Replace el.
*
* @param resourceFile the resource file
16 years, 5 months
JBoss Tools SVN: r9175 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-18 09:58:05 -0400 (Fri, 18 Jul 2008)
New Revision: 9175
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
JBIDE-2505
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-18 13:24:41 UTC (rev 9174)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-18 13:58:05 UTC (rev 9175)
@@ -1,6 +1,8 @@
package org.jboss.tools.vpe.editor.template;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.graphics.Point;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.NodeData;
@@ -10,7 +12,9 @@
import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
+import org.jboss.tools.vpe.editor.util.TextUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNSUIEvent;
import org.mozilla.interfaces.nsIDOMNode;
@@ -47,7 +51,7 @@
this.selectionController = selectionController;
}
- final public void setSelection(nsISelection selection) {
+ public final void setSelection(nsISelection selection) {
nsIDOMNode selectedVisualNode = SelectionUtil
.getSelectedNode(selection);
@@ -99,7 +103,7 @@
}
} else {
-
+ //here we processed text node
targetVisualNode = nodeMapping.getVisualNode();
targetSourceNode = nodeMapping.getSourceNode();
isNodeEditable = true;
@@ -111,10 +115,10 @@
if (isNodeEditable) {
- Point range = SelectionUtil.getSelectionRange(selection);
+ Point sourceSelectionRange = SelectionUtil.getSourceSelectionRange(selection,targetSourceNode);
- focusOffset = range.x;
- length = range.y;
+ focusOffset = sourceSelectionRange.x;
+ length = sourceSelectionRange.y;
} else {
@@ -222,30 +226,40 @@
targetVisualNode);
}
-
+ /**
+ * Syncronization visual selection and source selection,
+ * actually moves source selection to visual selection
+ */
final public void refreshVisualSelection() {
+ //TODO Max Areshkau Adjust for restoring cursor position
+ Point range = SelectionUtil.getSourceSelectionRange(getSourceEditor());
+
+ ISelection selection = getSourceEditor().getTextViewer().getSelection();
- Point range = SelectionUtil.getSourceSelection(getSourceEditor());
-
if (range == null)
return;
- int focus = range.x;
+ int focusOffcetInSourceDocument = range.x;
- int anchor = focus + range.y;
+ int anchorOffcetInSourceDocument = focusOffcetInSourceDocument + range.y;
// get element mapping
VpeNodeMapping nodeMapping = SelectionUtil
.getNodeMappingBySourceSelection(NodesManagingUtil
.getStructuredModel(getSourceEditor()),
- getDomMapping(), focus, anchor);
+ getDomMapping(), focusOffcetInSourceDocument, anchorOffcetInSourceDocument);
if (nodeMapping == null)
return;
// visual node which will be selected
nsIDOMNode targetVisualNode;
-
+
+ IndexedRegion targetSourceNode = (IndexedRegion) SelectionUtil.getSourceNodeByPosition(NodesManagingUtil
+ .getStructuredModel(getSourceEditor()), focusOffcetInSourceDocument);
+
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
+
// if mapping is elementMapping
if (nodeMapping.getType() == VpeNodeMapping.ELEMENT_MAPPING) {
@@ -254,19 +268,28 @@
VpeTemplate template = elementMapping.getTemplate();
targetVisualNode = template.getVisualNodeByBySourcePosition(
- elementMapping, focus, anchor, getDomMapping());
+ elementMapping, focusOffcetInSourceDocument, anchorOffcetInSourceDocument, getDomMapping());
} else {
targetVisualNode = nodeMapping.getVisualNode();
}
-
+ //here we restore only highlight
getPageContext().getVisualBuilder().setSelectionRectangle(
targetVisualNode);
-
+ //TODO Max Areshkau now it's workd only for simple text, and should be adjusted
+ targetVisualNode = targetVisualNode.getFirstChild();
+ int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+ //added by Max Areshkau restore selection
+// Point visualSelectionRange = SelectionUtil.getVisualSelectionRange(selection);
+ VpeDebugUtil.debugInfo(targetVisualNode.getNodeValue());
+// TextUtil.visualPosition(sourceText, sourcePosition)
+ selectionController.getSelection((short)1).collapse(targetVisualNode, visualNodeOffcet);
+// selectionController.getSelection((short)1).extend(targetVisualNode, focus);
}
-
+
+
protected VpePageContext getPageContext() {
return pageContext;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-18 13:24:41 UTC (rev 9174)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-18 13:58:05 UTC (rev 9175)
@@ -4,11 +4,11 @@
import java.util.List;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
@@ -19,7 +19,7 @@
import org.w3c.dom.Node;
/**
- *
+ * Util class for selection manupalating
* @author S.Dzmitrovich
*
*/
@@ -147,8 +147,15 @@
return node;
}
-
- public static Point getSelectionRange(nsISelection selection) {
+ /**
+ * Returns selection range for visual part of editor
+ * Focus offset and anchor offset can be not equals to source focus offset and anchor offset
+ *
+ * @param selection -selection in visual part of editor
+ *
+ * @return selection range for visual part of editor
+ */
+ public static Point getVisualSelectionRange(nsISelection selection) {
nsIDOMNode focusedNode = getSelectedNode(selection);
Point range = new Point(0, 0);
@@ -161,7 +168,24 @@
}
return range;
}
-
+ /**
+ * Return source editor part selection range, range returns relatively to start of text in source,
+ * not for start of document
+ *
+ * @param selection
+ * @return source editor selection range
+ */
+ public static Point getSourceSelectionRange(nsISelection selection, Node sourceNode) {
+
+ nsIDOMNode focusedNode = getSelectedNode(selection);
+ //gets visual selection range
+ Point sourceRange = new Point(0, 0);
+ //converts to source selection
+ sourceRange.x = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getFocusOffset());
+ sourceRange.y = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getAnchorOffset())-sourceRange.x;
+ return sourceRange;
+ }
+
public static VpeNodeMapping getNodeMappingBySourceSelection(
StructuredTextEditor sourceEditor, VpeDomMapping domMapping) {
@@ -208,11 +232,15 @@
.getLastSelectedNode();
}
+ /**
+ * Returns sourceSelectionRange
+ * @param sourceEditor
+ * @return sourceSelectionRange
+ */
+ static public Point getSourceSelectionRange(StructuredTextEditor sourceEditor) {
- static public Point getSourceSelection(StructuredTextEditor sourceEditor) {
+ ITextViewer textViewer = sourceEditor.getTextViewer();
- StructuredTextViewer textViewer = sourceEditor.getTextViewer();
-
if (textViewer != null)
return textViewer.getSelectedRange();
16 years, 5 months
JBoss Tools SVN: r9174 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-18 09:24:41 -0400 (Fri, 18 Jul 2008)
New Revision: 9174
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
Log:
Complete. https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-18 12:42:35 UTC (rev 9173)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-18 13:24:41 UTC (rev 9174)
@@ -2288,7 +2288,11 @@
protected nsIDOMNode createTextNode(Node sourceNode, boolean registerFlag) {
String sourceText = sourceNode.getNodeValue();
-
+ if(sourceText!=null){
+ final IFile file = getPageContext().getVisualBuilder().getCurrentIncludeInfo().getFile();
+
+ sourceText = ElService.getInstance().replaceEl(file, sourceText);
+ }
/*
* Max Areshkau this code causes very slow work of visual editor
* when we editing in big files txt nodes.For example exmployee.xhtml
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-07-18 12:42:35 UTC (rev 9173)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-07-18 13:24:41 UTC (rev 9174)
@@ -40,7 +40,6 @@
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNamedNodeMap;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMText;
import org.w3c.dom.Attr;
@@ -1483,23 +1482,29 @@
public void beforeTemplateCreated(VpePageContext pageContext, Node sourceNode, nsIDOMDocument domDocument) {
final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
- if ((file != null) && (sourceNode.getNodeType() == Node.ELEMENT_NODE) && ElService.getInstance().isAvailable(file)) {
+ if ((file != null) && ElService.getInstance().isAvailable(file)) {
// Node first((Element
Node text = sourceNode.getFirstChild();
- if(text instanceof TextImpl){
- ((TextImpl)text).setData(ElService.getInstance().replaceEl(file, ((TextImpl)text).getData()));
+ if(text instanceof Text){
+ ((Text)text).setData(ElService.getInstance().replaceEl(file, ((TextImpl)text).getData()));
+ }else if((sourceNode.getFirstChild()!=null) && (sourceNode.getFirstChild().getFirstChild() instanceof Text)){
+ text = sourceNode.getFirstChild().getFirstChild();
+ ((Text)text).setData(ElService.getInstance().replaceEl(file, ((TextImpl)text).getData()));
}
- final NamedNodeMap nodeMap = sourceNode.getAttributes();
- for (int i = 0; i < nodeMap.getLength(); i++) {
- final Attr n = (Attr)nodeMap.item(i);
-
- n.setValue(ElService.getInstance().replaceEl(file, n.getValue()));
-
- }
- if ((sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
- for (int j = 0; j < sourceNode.getChildNodes().getLength(); j++) {
- beforeTemplateCreated(pageContext, sourceNode.getChildNodes().item(j), domDocument);
+ final NamedNodeMap nodeMap = sourceNode.getAttributes();
+
+ if ((nodeMap != null) && (nodeMap.getLength() > 0)) {
+ for (int i = 0; i < nodeMap.getLength(); i++) {
+ final Attr n = (Attr) nodeMap.item(i);
+
+ n.setValue(ElService.getInstance().replaceEl(file, n.getValue()));
+
}
+ if ((sourceNode.getChildNodes() != null) && (sourceNode.getChildNodes().getLength() > 0)) {
+ for (int j = 0; j < sourceNode.getChildNodes().getLength(); j++) {
+ beforeTemplateCreated(pageContext, sourceNode.getChildNodes().item(j), domDocument);
+ }
+ }
}
}
16 years, 5 months
JBoss Tools SVN: r9173 - in trunk: documentation/guides/Exadel-migration/en and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-07-18 08:42:35 -0400 (Fri, 18 Jul 2008)
New Revision: 9173
Modified:
trunk/as/docs/reference/en/master.xml
trunk/documentation/guides/Exadel-migration/en/master.xml
trunk/documentation/guides/GettingStartedGuide/en/master.xml
trunk/esb/docs/esb_ref_guide/en/master.xml
trunk/hibernatetools/docs/reference/en/master.xml
trunk/jbpm/docs/reference/en/master.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
trunk/seam/docs/reference/en/master.xml
trunk/struts/docs/struts_tools_ref_guide/en/master.xml
trunk/struts/docs/struts_tools_tutorial/en/master.xml
Log:
https://jira.jboss.org/jira/browse/RF-3937
Modified: trunk/as/docs/reference/en/master.xml
===================================================================
--- trunk/as/docs/reference/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/as/docs/reference/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY quick_start SYSTEM "modules/quick_start.xml">
<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
Modified: trunk/documentation/guides/Exadel-migration/en/master.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/documentation/guides/Exadel-migration/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"?http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY jsf_struts SYSTEM "modules/jsf_struts.xml">
<!ENTITY jsf_struts_war SYSTEM "modules/jsf_struts_war.xml">
Modified: trunk/documentation/guides/GettingStartedGuide/en/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"?http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
<!ENTITY manage SYSTEM "modules/manage.xml">
Modified: trunk/esb/docs/esb_ref_guide/en/master.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/esb/docs/esb_ref_guide/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"?http://www.docbook.org/xsd/4.3/docbook.xsd"
[
<!ENTITY introduction SYSTEM "modules/introduction.xml">
Modified: trunk/hibernatetools/docs/reference/en/master.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/hibernatetools/docs/reference/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
+
[
<!ENTITY preface SYSTEM "modules/preface.xml">
<!ENTITY setup SYSTEM "modules/setup.xml">
Modified: trunk/jbpm/docs/reference/en/master.xml
===================================================================
--- trunk/jbpm/docs/reference/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/jbpm/docs/reference/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"?http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY introduction SYSTEM "modules/Introduction.xml">
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
[
<!ENTITY introduction SYSTEM "modules/introduction.xml">
Modified: trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY introduction SYSTEM "modules/introduction.xml">
<!ENTITY jsf_application SYSTEM "modules/jsf_application.xml">
Modified: trunk/seam/docs/reference/en/master.xml
===================================================================
--- trunk/seam/docs/reference/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/seam/docs/reference/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
-
[<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY creating_new_seam SYSTEM "modules/creating_new_seam.xml">
<!ENTITY directory_structure SYSTEM "modules/directory_structure.xml">
Modified: trunk/struts/docs/struts_tools_ref_guide/en/master.xml
===================================================================
--- trunk/struts/docs/struts_tools_ref_guide/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/struts/docs/struts_tools_ref_guide/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
[
<!ENTITY introduction SYSTEM "modules/introduction.xml">
Modified: trunk/struts/docs/struts_tools_tutorial/en/master.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
+++ trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-07-18 12:42:35 UTC (rev 9173)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xsd/4.3/docbook.xsd"
[<!ENTITY introduction SYSTEM "modules/introduction.xml">
<!ENTITY struts_application SYSTEM "modules/struts_application.xml">
16 years, 5 months
JBoss Tools SVN: r9172 - trunk/documentation/movies/index/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-07-18 07:16:18 -0400 (Fri, 18 Jul 2008)
New Revision: 9172
Modified:
trunk/documentation/movies/index/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-348 - adding seam2+ejb3 demo
Modified: trunk/documentation/movies/index/en/master.xml
===================================================================
--- trunk/documentation/movies/index/en/master.xml 2008-07-18 11:15:48 UTC (rev 9171)
+++ trunk/documentation/movies/index/en/master.xml 2008-07-18 11:16:18 UTC (rev 9172)
@@ -23,6 +23,12 @@
<ulink url="../../../../../../cust_tag_lib_to_pallete/cust_tag_lib_to_pallete.htm">Importing Custom Tag Library to Pallete</ulink>
</primaryie>
</indexentry>
+
+ <indexentry>
+ <primaryie>
+ <ulink url="../../../../../../seam2_plus_ejb3/seam2_plus_ejb3.htm">Creating Seam2 + EJB3 EAR Project</ulink>
+ </primaryie>
+ </indexentry>
<!--indexentry>
<primaryie>Visual Web Tools Reference Guide <ulink url="en/jsf/html/index.html"
16 years, 5 months
JBoss Tools SVN: r9171 - in trunk/documentation/movies: seam2_plus_ejb3 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-07-18 07:15:48 -0400 (Fri, 18 Jul 2008)
New Revision: 9171
Added:
trunk/documentation/movies/seam2_plus_ejb3/
trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.htm
trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.js
trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.swf
Log:
https://jira.jboss.org/jira/browse/JBDS-348 - adding one more demo
Added: trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.htm
===================================================================
--- trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.htm (rev 0)
+++ trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.htm 2008-07-18 11:15:48 UTC (rev 9171)
@@ -0,0 +1,26 @@
+<HTML>
+<head>
+<link rel="stylesheet" href="../resources/tools.css" type="text/css"/>
+<link xmlns="" rel="shortcut icon" type="image/vnd.microsoft.icon" href="../resources/images/favicon.ico"/>
+</head>
+
+<BODY>
+<div class="book">
+<p id="title"><a href="http://www.jboss.org" class="site_href">
+<strong>JBoss.org</strong></a><a href="http://docs.jboss.org/" class="doc_href">
+<strong >Community Demos</strong></a></p>
+
+<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="822" HEIGHT="634" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0">
+<PARAM NAME=movie VALUE="seam2_plus_ejb3.swf">
+<PARAM NAME=play VALUE=true>
+<PARAM NAME=loop VALUE=false>
+<PARAM NAME=wmode VALUE=transparent>
+<PARAM NAME=quality VALUE=low>
+<EMBED SRC="seam2_plus_ejb3.swf" WIDTH=822 HEIGHT=634 quality=low loop=false wmode=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Sh...">
+</EMBED>
+</OBJECT></center>
+</div>
+
+<SCRIPT src='seam2_plus_ejb3.js'></script>
+</BODY>
+</HTML>
Added: trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.js
===================================================================
--- trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.js (rev 0)
+++ trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.js 2008-07-18 11:15:48 UTC (rev 9171)
@@ -0,0 +1,3 @@
+obj=document.getElementsByTagName('object');
+for (var i=0; i<obj.length; ++i)
+ obj[i].outerHTML=obj[i].outerHTML;
Added: trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.swf
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/movies/seam2_plus_ejb3/seam2_plus_ejb3.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 5 months
JBoss Tools SVN: r9170 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-18 07:02:17 -0400 (Fri, 18 Jul 2008)
New Revision: 9170
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java
Log:
Restore not worked selection https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-07-18 11:02:10 UTC (rev 9169)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-07-18 11:02:17 UTC (rev 9170)
@@ -114,6 +114,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.AbsoluteFolderReferenceList;
import org.jboss.tools.vpe.editor.css.CSSReferenceList;
+import org.jboss.tools.vpe.editor.css.ELReferenceList;
import org.jboss.tools.vpe.editor.css.RelativeFolderReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReferenceListListener;
import org.jboss.tools.vpe.editor.css.TaglibReferenceList;
@@ -205,6 +206,7 @@
private CSSReferenceList cssReferenceListListener;
private TaglibReferenceList taglibReferenceListListener;
+ private ELReferenceList elReferenceListListener;
private AbsoluteFolderReferenceList absoluteFolderReferenceListListener;
private RelativeFolderReferenceList relativeFolderReferenceListListener;
private VpeIncludeList includeList = new VpeIncludeList();
@@ -338,6 +340,9 @@
relativeFolderReferenceListListener = RelativeFolderReferenceList
.getInstance();
relativeFolderReferenceListListener.addChangeListener(this);
+
+ elReferenceListListener = ELReferenceList.getInstance();
+ elReferenceListListener.addChangeListener(this);
// pageContext.fireTaglibsChanged();
}
@@ -426,6 +431,9 @@
if (absoluteFolderReferenceListListener != null) {
absoluteFolderReferenceListListener.removeChangeListener(this);
}
+ if(elReferenceListListener!=null){
+ elReferenceListListener.removeChangeListener(this);
+ }
if (relativeFolderReferenceListListener != null) {
relativeFolderReferenceListListener.removeChangeListener(this);
}
@@ -2360,7 +2368,8 @@
pageContext.getVisualBuilder().refreshExternalLinks();
} else if (absoluteFolderReferenceListListener == source
|| relativeFolderReferenceListListener == source
- || taglibReferenceListListener == source) {
+ || taglibReferenceListListener == source
+ || elReferenceListListener == source) {
visualRefresh();
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-07-18 11:02:10 UTC (rev 9169)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpePreviewDomBuilder.java 2008-07-18 11:02:17 UTC (rev 9170)
@@ -24,6 +24,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.ElService;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.TextUtil;
import org.mozilla.interfaces.nsIDOMElement;
@@ -79,7 +80,7 @@
//FIX FOR JBIDE-1568, added by Max Areshkau
try {
- if (template.getClass().getName().contains("Rich") || template.getClass().getName().contains("Jsf")) {
+ if (ElService.getInstance().isCloneableNode(getPageContext(), (Element) sourceNode)) {
final Element sourceNodeClone = (Element) ((Element) sourceNode).cloneNode(true);
template.beforeTemplateCreated(getPageContext(), sourceNodeClone, getVisualDocument());
creationData = template.create(getPageContext(), sourceNodeClone, getVisualDocument());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-18 11:02:10 UTC (rev 9169)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-18 11:02:17 UTC (rev 9170)
@@ -67,6 +67,7 @@
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.jboss.tools.vpe.editor.template.dnd.VpeDnd;
+import org.jboss.tools.vpe.editor.util.ElService;
import org.jboss.tools.vpe.editor.util.FaceletUtil;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.TextUtil;
@@ -436,9 +437,7 @@
//
// }
- if (template.getClass().getName().contains("Rich") || template.getClass().getName().contains("Jsf")
- || template.getClass().getName().toLowerCase().contains("vpehtmltemplate")
- /*|| template.getClass().getName().toLowerCase().contains("vpecomposition")*/) {
+ if (ElService.getInstance().isCloneableNode(getPageContext(),(Element) sourceNode)) {
final Element sourceNodeClone = (Element) ((Element) sourceNode).cloneNode(true);
template.beforeTemplateCreated(getPageContext(), sourceNodeClone, getVisualDocument());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-18 11:02:10 UTC (rev 9169)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-18 11:02:17 UTC (rev 9170)
@@ -1,12 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
-
package org.jboss.tools.vpe.editor.util;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Assert;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.ELReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
/**
@@ -35,6 +49,7 @@
}
return rst;
}
+
/**
* Gets the singleton instance.
@@ -90,4 +105,77 @@
return result;
}
+
+ /**
+ * Checks if is cloneable node.
+ *
+ * @param sourceNode the source node
+ * @param pageContext the page context
+ *
+ * @return true, if is cloneable node
+ */
+ public boolean isCloneableNode(VpePageContext pageContext,Element sourceNode) {
+ boolean rst = false;
+ final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
+
+ if(this.isAvailable(file) && this.isAvailableForNode(sourceNode,file)){
+ rst = true;
+ }
+ return rst;
+ }
+
+
+ /**
+ * Checks if is available for node.
+ *
+ * @param resourceFile the resource file
+ * @param sourceNode the source node
+ *
+ * @return true, if is available for node
+ */
+ private boolean isAvailableForNode(Element sourceNode, IFile resourceFile) {
+ boolean rst = false;
+ final NamedNodeMap nodeMap = sourceNode.getAttributes();
+ final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
+ String textValue = null;
+ if (sourceNode.getFirstChild() != null && sourceNode.getFirstChild().getNodeType() == Node.TEXT_NODE) {
+ textValue = sourceNode.getFirstChild().getNodeValue();
+ }
+ if (textValue != null) {
+ if (isInReferenceResourcesList(references, textValue)) {
+ return true;
+ }
+ }
+ if ((nodeMap != null) && (nodeMap.getLength() > 0)) {
+ for (int i = 0; i < nodeMap.getLength(); i++) {
+ if (isInReferenceResourcesList(references, ((Attr) nodeMap.item(i)).getValue())) {
+ rst = true;
+ break;
+ }
+ }
+ }
+
+ return rst;
+ }
+
+
+ /**
+ * Checks if is in reference resources list.
+ *
+ * @param value the value
+ * @param references the references
+ *
+ * @return true, if is in reference resources list
+ */
+ private boolean isInReferenceResourcesList(ResourceReference[] references, String value) {
+ boolean rst = false;
+
+ for (ResourceReference ref : references) {
+ if (value.contains(ref.getLocation())) {
+ rst = true;
+ }
+ }
+ return rst;
+ }
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java 2008-07-18 11:02:10 UTC (rev 9169)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/IELService.java 2008-07-18 11:02:17 UTC (rev 9170)
@@ -4,14 +4,13 @@
import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.w3c.dom.Element;
-// TODO: Auto-generated Javadoc
/**
- * The service that substitute El values in vpe source editor.
- * For more details see issues
- * http://jira.jboss.com/jira/browse/JBIDE-2010
- * and
+ * The service that substitute El values in vpe source editor. For more details
+ * see issues http://jira.jboss.com/jira/browse/JBIDE-2010 and
* http://jira.jboss.com/jira/browse/JBIDE-1410
*
* @author Eugeny Stherbin
@@ -27,8 +26,7 @@
* @return string where el values was substituted.
*/
String replaceEl(IFile resourceFile, String resourceString);
-
-
+
/**
* Checks if is available.
*
@@ -38,4 +36,14 @@
*/
boolean isAvailable(IFile resourceFile);
+ /**
+ * Checks if is cloneable node.
+ *
+ * @param sourceNode the source node
+ * @param pageContext the page context
+ *
+ * @return true, if is cloneable node
+ */
+ public boolean isCloneableNode(VpePageContext pageContext, Element sourceNode);
+
}
16 years, 5 months
JBoss Tools SVN: r9169 - trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-18 07:02:10 -0400 (Fri, 18 Jul 2008)
New Revision: 9169
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java
Log:
Restore not worked selection https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-17 16:23:43 UTC (rev 9168)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-18 11:02:10 UTC (rev 9169)
@@ -40,7 +40,7 @@
protected static final String KEY_5 = "#{bean1.property3}";
/** The Constant VALUE_4. */
- protected static final String VALUE_4 = "background:red";
+ protected static final String VALUE_4 = "background: red";
/** The Constant KEY_4. */
protected static final String KEY_4 = "#{bean1.property2}";
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java 2008-07-17 16:23:43 UTC (rev 9168)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java 2008-07-18 11:02:10 UTC (rev 9169)
@@ -87,7 +87,7 @@
// DOMTreeDumper d = new DOMTreeDumper();
// d.dumpToStream(System.out, rst);
// assertEquals("Value should be equals", "Hello "+VALUE_5, pOne.getFirstChild().getFirstChild().getNodeValue());
- assertTrue("Value should be contains",pOne.getAttribute(HTML.ATTR_STYLE).contains(VALUE_4));
+ assertTrue("Value should be contains",pOne.getAttribute(HTML.ATTR_STYLE).startsWith(VALUE_4));
}
16 years, 5 months
JBoss Tools SVN: r9168 - trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-17 12:23:43 -0400 (Thu, 17 Jul 2008)
New Revision: 9168
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java
Log:
ADD JUNIT https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-17 16:22:13 UTC (rev 9167)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/CommonJBIDE2010Test.java 2008-07-17 16:23:43 UTC (rev 9168)
@@ -29,7 +29,16 @@
* >JBIDE-2010</a>issue.
*/
public abstract class CommonJBIDE2010Test extends CommonRichFacesTestCase {
+
+ /** The Constant DIR_TEST_PAGE_NAME_3. */
+ protected static final String DIR_TEST_PAGE_NAME_3 = "JBIDE/2010/page3.xhtml";
+ /** The Constant VALUE_5. */
+ protected static final String VALUE_5 = "world";
+
+ /** The Constant KEY_5. */
+ protected static final String KEY_5 = "#{bean1.property3}";
+
/** The Constant VALUE_4. */
protected static final String VALUE_4 = "background:red";
@@ -82,6 +91,7 @@
elValuesMap.put(KEY_2, "/path2/");
elValuesMap.put(KEY_3, "/facesContext/");
elValuesMap.put(KEY_4, VALUE_4);
+ elValuesMap.put(KEY_5, VALUE_5);
file = (IFile) TestUtil.getComponentPath(DIR_TEST_PAGE_NAME, IMPORT_PROJECT_NAME);
ResourceReference[] entries = new ResourceReference[elValuesMap.size()];
int i = 0;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java 2008-07-17 16:22:13 UTC (rev 9167)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/src/org/jboss/tools/vpe/test/JBIDE2010Test.java 2008-07-17 16:23:43 UTC (rev 9168)
@@ -18,10 +18,8 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -34,6 +32,7 @@
*/
public class JBIDE2010Test extends CommonJBIDE2010Test {
+
/**
* The Constructor.
*
@@ -63,16 +62,33 @@
final nsIDOMElement spanOne = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
assertEquals("Style attribute should be substituted", VALUE_4, spanOne.getFirstChild().getNodeValue());
- int i = 0;
- DOMTreeDumper dumper = new DOMTreeDumper();
- dumper.dumpToStream(System.out, rst);
- // for(nsIDOMNode n:elements){
- // final nsIDOMElement d = (nsIDOMElement)
- // elements.get(i++).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- // System.out.println("JBIDE2010Test.testElTemplateSimple()-"+d.
- // getAttribute("style"));
- // }
}
+
+ /**
+ * Test el template simple.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testElTemplateSimple2() throws CoreException, Throwable {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile) TestUtil.getComponentPath(DIR_TEST_PAGE_NAME_3,
+ IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "td" elements
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_P);
+
+ assertEquals("Value should be equals", 1, elements.size());
+ final nsIDOMElement pOne = (nsIDOMElement) elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ // DOMTreeDumper d = new DOMTreeDumper();
+ // d.dumpToStream(System.out, rst);
+// assertEquals("Value should be equals", "Hello "+VALUE_5, pOne.getFirstChild().getFirstChild().getNodeValue());
+ assertTrue("Value should be contains",pOne.getAttribute(HTML.ATTR_STYLE).contains(VALUE_4));
+
+ }
+
}
16 years, 5 months
JBoss Tools SVN: r9167 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-17 12:22:13 -0400 (Thu, 17 Jul 2008)
New Revision: 9167
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page3.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page2.jsp
Log:
ADD JUNIT https://jira.jboss.com:8443/jira/browse/JBIDE-2010
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page2.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page2.jsp 2008-07-17 15:04:51 UTC (rev 9166)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page2.jsp 2008-07-17 16:22:13 UTC (rev 9167)
@@ -4,8 +4,6 @@
<head>
</head>
<body>
-
-
<h:outputText id="id1" value="#{bean1.property2}"/>
</body>
</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page3.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page3.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page3.xhtml 2008-07-17 16:22:13 UTC (rev 9167)
@@ -0,0 +1,9 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <p style="#{bean1.property2}">Hello #{bean1.property3}</p>
+</ui:composition>
+
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2010/page3.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
16 years, 5 months