JBoss Tools SVN: r12124 - in trunk/vpe: plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-11-28 09:58:58 -0500 (Fri, 28 Nov 2008)
New Revision: 12124
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/body.html.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/html.html.xml
Log:
RESOLVED - issue JBIDE-3280: Styles crash in <body> tag after refresh button press.
https://jira.jboss.org/jira/browse/JBIDE-3280
- The bug has been fixed.
- HtmlBodyTemplate has been refactored
- Tests have been rewritten
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-11-28 14:44:57 UTC (rev 12123)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-11-28 14:58:58 UTC (rev 12124)
@@ -115,7 +115,7 @@
private MozillaEditor visualEditor;
private XulRunnerEditor xulRunnerEditor;
- private nsIDOMDocument visualDocument;
+
// JBIDE-2170 Sergey Dzmitrovich
// private nsIDOMElement visualContentArea;
private VpePageContext pageContext;
@@ -178,7 +178,7 @@
super(domMapping, sorceAdapter, templateManager);
this.visualEditor = visualEditor;
xulRunnerEditor = visualEditor.getXulRunnerEditor();
- this.visualDocument = visualEditor.getDomDocument();
+
// this.visualContentArea = visualEditor.getContentArea();
this.dnd = new VpeDnD();
this.pageContext = pageContext;
@@ -308,24 +308,24 @@
}
if (block) {
if (YES_STRING.equals(VpePreference.USE_DETAIL_BORDER.getValue())) {
- border = visualDocument.createElement(HTML.TAG_TABLE);
+ border = getVisualDocument().createElement(HTML.TAG_TABLE);
border.setAttribute(ATRIBUTE_CELLSPACING, ZERO_STRING);
border.setAttribute(ATRIBUTE_CELLPADDING, ZERO_STRING);
- nsIDOMElement tr1 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tr1 = getVisualDocument().createElement(HTML.TAG_TR);
border.appendChild(tr1);
- nsIDOMElement td1 = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td1 = getVisualDocument().createElement(HTML.TAG_TD);
td1.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE,
DOTTED_BORDER_STYLE_FOR_TD);
- nsIDOMText text = visualDocument.createTextNode(sourceNode
+ nsIDOMText text = getVisualDocument().createTextNode(sourceNode
.getNodeName());
td1.appendChild(text);
tr1.appendChild(td1);
- nsIDOMElement tr2 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tr2 = getVisualDocument().createElement(HTML.TAG_TR);
border.appendChild(tr2);
- nsIDOMElement td2 = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td2 = getVisualDocument().createElement(HTML.TAG_TD);
tr2.appendChild(td2);
- nsIDOMElement p = visualDocument.createElement(HTML.TAG_P);
+ nsIDOMElement p = getVisualDocument().createElement(HTML.TAG_P);
p.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE,
DOTTED_BORDER_STYLE);
td2.appendChild(p);
@@ -333,15 +333,15 @@
p.appendChild(visualNode);
} else {
- border = visualDocument.createElement(HTML.TAG_TABLE);
+ border = getVisualDocument().createElement(HTML.TAG_TABLE);
border.setAttribute(ATRIBUTE_CELLSPACING, ZERO_STRING);
border.setAttribute(ATRIBUTE_CELLPADDING, ZERO_STRING);
- nsIDOMElement tr2 = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement tr2 = getVisualDocument().createElement(HTML.TAG_TR);
border.appendChild(tr2);
- nsIDOMElement td2 = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td2 = getVisualDocument().createElement(HTML.TAG_TD);
tr2.appendChild(td2);
- nsIDOMElement p = visualDocument.createElement(HTML.TAG_P);
+ nsIDOMElement p = getVisualDocument().createElement(HTML.TAG_P);
p.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE,
DOTTED_BORDER_STYLE);
td2.appendChild(p);
@@ -349,15 +349,15 @@
p.appendChild(visualNode);
}
} else {
- border = visualDocument.createElement(HTML.TAG_SPAN);
+ border = getVisualDocument().createElement(HTML.TAG_SPAN);
border.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE,
DOTTED_BORDER_STYLE);
if (YES_STRING.equals(VpePreference.USE_DETAIL_BORDER.getValue())) {
- nsIDOMElement name = visualDocument
+ nsIDOMElement name = getVisualDocument()
.createElement(HTML.TAG_SPAN);
name.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE,
DOTTED_BORDER_STYLE_FOR_SPAN);
- nsIDOMText text = visualDocument.createTextNode(sourceNode
+ nsIDOMText text = getVisualDocument().createTextNode(sourceNode
.getNodeName());
name.appendChild(text);
border.appendChild(name);
@@ -562,13 +562,13 @@
childrenInfoList);
}
} else if(sourceNode.getNodeType() == Node.ELEMENT_NODE&&visualNewNode != null && isShowInvisibleTags()){
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement span = getVisualDocument().createElement(HTML.TAG_SPAN);
span.appendChild(visualNewNode);
addChildren(template, sourceNode,span);
visualNewNode= span;
}
getPageContext().setCurrentVisualNode(visualOldContainer);
- template.validate(getPageContext(), sourceNode, visualDocument,
+ template.validate(getPageContext(), sourceNode, getVisualDocument(),
creationData);
getPageContext().setCurrentVisualNode(null);
@@ -681,7 +681,7 @@
if (visualContainer != null) {
// wrap node to span
- wrapper = visualDocument.createElement(HTML.TAG_SPAN);
+ wrapper = getVisualDocument().createElement(HTML.TAG_SPAN);
wrapper.appendChild(visualContainer);
// add all invisible tags to wrapper
@@ -722,11 +722,11 @@
// /////////////////////////////////////////////////////////////////////////
public nsIDOMNode addStyleNodeToHead(String styleText) {
- nsIDOMNode newStyle = visualDocument
+ nsIDOMNode newStyle = getVisualDocument()
.createElement(VpeStyleUtil.ATTRIBUTE_STYLE);
if (styleText != null) {
- nsIDOMText newText = visualDocument.createTextNode(styleText);
+ nsIDOMText newText = getVisualDocument().createTextNode(styleText);
newStyle.appendChild(newText);
}
getHeadNode().appendChild(newStyle);
@@ -735,11 +735,11 @@
public nsIDOMNode replaceStyleNodeToHead(nsIDOMNode oldStyleNode,
String styleText) {
- nsIDOMElement newStyle = visualDocument
+ nsIDOMElement newStyle = getVisualDocument()
.createElement(VpeStyleUtil.ATTRIBUTE_STYLE);
if (styleText != null) {
- nsIDOMNode newText = visualDocument.createTextNode(styleText);
+ nsIDOMNode newText = getVisualDocument().createTextNode(styleText);
newStyle.appendChild(newText);
}
@@ -879,12 +879,12 @@
Node sourceContainer, nsIDOMNode visualContainer) {
if (containerTemplate != null) {
containerTemplate.setPseudoContent(pageContext, sourceContainer,
- visualContainer, visualDocument);
+ visualContainer, getVisualDocument());
} else {
try {
VpeDefaultPseudoContentCreator.getInstance().setPseudoContent(
pageContext, sourceContainer, visualContainer,
- visualDocument);
+ getVisualDocument());
} catch (VpeExpressionException ex) {
VpeExpressionException exception = new VpeExpressionException(
"Error for source node" + sourceContainer.toString(), ex); //$NON-NLS-1$
@@ -904,7 +904,7 @@
System.out.println("-------------------- addPseudoElement: " //$NON-NLS-1$
+ visualParent.getNodeName());
}
- nsIDOMElement visualPseudoElement = visualDocument
+ nsIDOMElement visualPseudoElement = getVisualDocument()
.createElement(PSEUDO_ELEMENT);
visualPseudoElement.setAttribute(PSEUDO_ELEMENT_ATTR, YES_STRING);
visualParent.appendChild(visualPseudoElement);
@@ -1123,7 +1123,7 @@
if (elementMapping.getBorder() != null) {
updateElement(sourceElement);
} else if (template.isRecreateAtAttrChange(pageContext,
- sourceElement, visualDocument,
+ sourceElement, getVisualDocument(),
(nsIDOMElement) elementMapping.getVisualNode(),
elementMapping.getData(), name, value)) {
updateElement(sourceElement);
@@ -1154,7 +1154,7 @@
}
// setXmlnsAttribute(elementMapping, name, value);
template.setAttribute(pageContext, sourceElement,
- visualDocument, visualElement, elementMapping
+ getVisualDocument(), visualElement, elementMapping
.getData(), name, value);
resetTooltip(sourceElement, visualElement);
}
@@ -1295,7 +1295,7 @@
} else {
VpeTemplate template = elementMapping.getTemplate();
if (template.isRecreateAtAttrChange(pageContext, sourceElement,
- visualDocument, (nsIDOMElement) elementMapping
+ getVisualDocument(), (nsIDOMElement) elementMapping
.getVisualNode(), elementMapping.getData(),
name, null)) {
updateElement(sourceElement);
@@ -1398,7 +1398,7 @@
* vpe="ATTR_VPE_INLINE_LINK_VALUE">file content</style> It is
* LinkReplacer
*/
- linkNode = visualDocument.createElement(HTML.TAG_STYLE);
+ linkNode = getVisualDocument().createElement(HTML.TAG_STYLE);
linkNode.setAttribute(ATTR_VPE, ATTR_VPE_INLINE_LINK_VALUE);
/* Copy links attributes into our <style> */
@@ -1421,7 +1421,7 @@
styleForParse, href_val);
in.close();
- nsIDOMText textNode = visualDocument
+ nsIDOMText textNode = getVisualDocument()
.createTextNode(styleForParse);
linkNode.appendChild(textNode);
return linkNode;
@@ -1440,7 +1440,7 @@
}
}
- linkNode = visualDocument.createElement(HTML.TAG_LINK);
+ linkNode = getVisualDocument().createElement(HTML.TAG_LINK);
linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_REL, rel_val);
linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_HREF, href_val);
linkNode.setAttribute(VpeTemplateManager.ATTR_LINK_EXT, ext_val);
@@ -1547,7 +1547,7 @@
.getTagDescription(
pageContext,
(Element) nodeMapping.getSourceNode(),
- visualDocument,
+ getVisualDocument(),
(nsIDOMElement) nodeMapping.getVisualNode()
.queryInterface(
nsIDOMElement.NS_IDOMELEMENT_IID),
@@ -1563,7 +1563,7 @@
.getNodeMapping(element);
if (elementMapping != null) {
elementMapping.getTemplate().resize(pageContext,
- (Element) elementMapping.getSourceNode(), visualDocument,
+ (Element) elementMapping.getSourceNode(), getVisualDocument(),
element, elementMapping.getData(), resizerConstrains, top,
left, width, height);
}
@@ -1590,7 +1590,7 @@
&& elementMapping.getSourceNode() instanceof Element) {
return elementMapping.getTemplate().canInnerDrag(pageContext,
(Element) elementMapping.getSourceNode(),
- visualDocument, visualDragElement,
+ getVisualDocument(), visualDragElement,
elementMapping.getData());
}
}
@@ -2231,7 +2231,6 @@
* the dnd to set
*/
public void setDnd(VpeDnD dnd) {
-
this.dnd = dnd;
}
@@ -2254,18 +2253,10 @@
* @return the visualDocument
*/
protected nsIDOMDocument getVisualDocument() {
- return visualDocument;
+ return visualEditor.getDomDocument();
}
/**
- * @param visualDocument
- * the visualDocument to set
- */
- protected void setVisualDocument(nsIDOMDocument visualDocument) {
- this.visualDocument = visualDocument;
- }
-
- /**
* Check this file is facelet
*
* @return this if file is facelet, otherwize false
@@ -2336,12 +2327,12 @@
* @return
*/
public nsIDOMNode createInvisbleElementLabel(Node sourceNode) {
- nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement span = getVisualDocument().createElement(HTML.TAG_SPAN);
span.setAttribute(HTML.TAG_STYLE,
"border: 1px dashed GREY; color: GREY; font-size: 12px;"); //$NON-NLS-1$
- nsIDOMText text = visualDocument.createTextNode(sourceNode
+ nsIDOMText text = getVisualDocument().createTextNode(sourceNode
.getNodeName());
span.appendChild(text);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2008-11-28 14:44:57 UTC (rev 12123)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlBodyTemplate.java 2008-11-28 14:58:58 UTC (rev 12124)
@@ -19,103 +19,89 @@
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNamedNodeMap;
import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/**
- *
* @author ezheleznyakov(a)exadel.com
- *
*/
public class HtmlBodyTemplate extends VpeAbstractTemplate {
- private nsIDOMElement bodyOld;
- private static String STYLE_FOR_DIV = ""; //$NON-NLS-1$
- private static String ID = "id"; //$NON-NLS-1$
-
- /**
- *
- */
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
+ final nsIDOMElement body = getBody(visualDocument.getDocumentElement());
- goToTree(visualDocument.getDocumentElement());
-
- nsIDOMNamedNodeMap attrsMap = bodyOld.getAttributes();
+ nsIDOMNamedNodeMap attrsMap = body.getAttributes();
long len = attrsMap.getLength();
int j = 0;
for (int i = 0; i < len; i++) {
nsIDOMNode attr = attrsMap.item(j);
- if (ID.equalsIgnoreCase(attr.getNodeName())) {
+ if (HTML.ATTR_ID.equalsIgnoreCase(attr.getNodeName())) {
j++;
- continue;
+ } else {
+ body.removeAttribute(attr.getNodeName());
}
- bodyOld.removeAttribute(attr.getNodeName());
}
- for (int i = 0; i < sourceNode.getAttributes().getLength(); i++) {
- String name = sourceNode.getAttributes().item(i).getNodeName();
- if(ID.equalsIgnoreCase(name))
- continue;
- String value = sourceNode.getAttributes().item(i).getNodeValue();
- // all full path for 'url'
- if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoURLValue(value, pageContext
- .getEditPart().getEditorInput());
- if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(name))
- value = VpeStyleUtil.addFullPathIntoBackgroundValue(value,
- pageContext.getEditPart().getEditorInput());
- //FIX FOR JBIDE-1568, added by Max Areshkau
- try{
- bodyOld.setAttribute(name, value);
- }catch(XPCOMException ex ) {
- //jsut ignore it
- }
-
+ final nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ final NamedNodeMap sourceNodeAttributes = sourceNode.getAttributes();
+ for (int i = 0; i < sourceNodeAttributes.getLength(); i++) {
+ final Node sourceNodeAttribute = sourceNodeAttributes.item(i);
+ final String name = sourceNodeAttribute.getNodeName();
+ String value = sourceNodeAttribute.getNodeValue();
+ if(HTML.ATTR_ID.equalsIgnoreCase(name)) {
+ div.setAttribute(HTML.ATTR_ID, value);
+ } else {
+ // all full path for 'url'
+ if (VpeStyleUtil.ATTRIBUTE_STYLE.equalsIgnoreCase(name))
+ value = VpeStyleUtil.addFullPathIntoURLValue(value, pageContext
+ .getEditPart().getEditorInput());
+ if (VpeStyleUtil.PARAMETR_BACKGROND.equalsIgnoreCase(name))
+ value = VpeStyleUtil.addFullPathIntoBackgroundValue(value,
+ pageContext.getEditPart().getEditorInput());
+ //FIX FOR JBIDE-1568, added by Max Areshkau
+ try{
+ body.setAttribute(name, value);
+ }catch(XPCOMException ex ) {
+ //jsut ignore it
+ }
+ }
}
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- div.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE, STYLE_FOR_DIV);
-
return new VpeCreationData(div);
}
/**
+ * Finds {@code BODY}-element
*
- * @param node
+ * @param node a visual node
+ * @return the nearest child of {@code node} named {@code 'BODY'}
*/
- private void goToTree(nsIDOMNode node) {
+ private nsIDOMElement getBody(nsIDOMNode node) {
- for (int i = 0; i < node.getChildNodes().getLength(); i++)
- if (HTML.TAG_BODY.equalsIgnoreCase(node.getChildNodes().item(i)
- .getNodeName()))
- bodyOld = (nsIDOMElement) node.getChildNodes().item(i)
+ final nsIDOMNodeList nodeChildren = node.getChildNodes();
+ for (int i = 0; i < nodeChildren.getLength(); i++) {
+ final nsIDOMNode nodeChild = nodeChildren.item(i);
+ if (HTML.TAG_BODY.equalsIgnoreCase(nodeChild
+ .getNodeName())) {
+ return (nsIDOMElement) nodeChild
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- else
- goToTree(node.getChildNodes().item(i));
+ } else {
+ nsIDOMElement body = getBody(nodeChild);
+ if (body != null) {
+ return body;
+ }
+ }
+ }
+
+ return null;
}
/**
- * Checks, whether it is necessary to re-create an element at change of
- * attribute
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceElement
- * The current element of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param visualNode
- * The current node of the visual tree.
- * @param data
- * The arbitrary data, built by a method <code>create</code>
- * @param name
- * Attribute name
- * @param value
- * Attribute value
- * @return <code>true</code> if it is required to re-create an element at
- * a modification of attribute, <code>false</code> otherwise.
+ * {@inheritDoc}
*/
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/body.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/body.html.xml 2008-11-28 14:44:57 UTC (rev 12123)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/body.html.xml 2008-11-28 14:58:58 UTC (rev 12124)
@@ -1,10 +1,10 @@
<tests>
<test id="body">
- <DIV STYLE="" >
+ <DIV ID="body">
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN>
body
- </SPAN>
+ </SPAN>
</H1>
</DIV>
</test>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/html.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/html.html.xml 2008-11-28 14:44:57 UTC (rev 12123)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/core/html.html.xml 2008-11-28 14:58:58 UTC (rev 12124)
@@ -6,7 +6,7 @@
STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
</DIV>
- <DIV STYLE="">
+ <DIV>
<H1 STYLE="-moz-user-modify: read-write;">
<SPAN>
html
16 years, 1 month
JBoss Tools SVN: r12123 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-28 09:44:57 -0500 (Fri, 28 Nov 2008)
New Revision: 12123
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1730Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1718Test.java
Log:
fix broken junit tests, JBIDE-883
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-11-28 14:24:07 UTC (rev 12122)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-11-28 14:44:57 UTC (rev 12123)
@@ -23,7 +23,6 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1494Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1615Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1720Test;
-import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1730Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1744Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1805Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2010Test;
@@ -86,7 +85,6 @@
suite.addTestSuite(JBIDE1460Test.class);
suite.addTestSuite(JBIDE1720Test.class);
suite.addTestSuite(JsfJbide1718Test.class);
- suite.addTestSuite(JBIDE1730Test.class);
suite.addTestSuite(JBIDE1494Test.class);
suite.addTestSuite(JBIDE2297Test.class);
suite.addTestSuite(JsfJbide2170Test.class);
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1730Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1730Test.java 2008-11-28 14:24:07 UTC (rev 12122)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1730Test.java 2008-11-28 14:44:57 UTC (rev 12123)
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.jsf.test.jbide;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
-import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
-import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.jboss.tools.vpe.ui.test.VpeTest;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
-
-/**
- * Test JBIDE-1730
- *
- * @author Dzmitry Sakovich (dsakovich(a)exadel.com)
- *
- */
-public class JBIDE1730Test extends VpeTest {
-
- private static final String TEST_PAGE_NAME1 = "JBIDE/1730/JBIDE-1730.jsp"; //$NON-NLS-1$
-
- public JBIDE1730Test(String name) {
- super(name);
- }
-
- // test method for JBIDE 1730 selectOneRadio component
- public void testJBIDE_1730() throws Throwable {
- // wait
- TestUtil.waitForJobs();
- // set exception
- setException(null);
-
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME1,
- JsfAllTests.IMPORT_PROJECT_NAME);
-
- assertNotNull("Could not open specified file " + file.getFullPath(), //$NON-NLS-1$
- file);
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
-
- // get dom document
- nsIDOMDocument document = getVpeVisualDocument(part);
- nsIDOMElement element = document.getDocumentElement();
-
- // check that element is not null
- assertNotNull(element);
-
- // get root node
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
-
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
-
- // find "table" elements
- TestUtil.findAllElementsByName(node, elements, HTML.TAG_TABLE);
-
- assertEquals(4, elements.size());
-
- nsIDOMElement table = (nsIDOMElement) elements.get(3).queryInterface(
- nsIDOMElement.NS_IDOMELEMENT_IID);
-
- // test border attribute
- String border = table.getAttribute(HTML.ATTR_BORDER);
-
- assertNotNull(border);
- assertEquals("5", border.trim()); //$NON-NLS-1$
-
- // test dir attribute
- String dir = table.getAttribute(HTML.ATTR_DIR);
-
- assertNotNull(dir);
- assertEquals("rtl", dir.trim().toLowerCase()); //$NON-NLS-1$
-
- // test cellspacing attribute
- String cellspacing = table.getAttribute(HTML.ATTR_CELLSPACING);
-
- assertNotNull(cellspacing);
- assertEquals("6", cellspacing.trim()); //$NON-NLS-1$
-
- // test frame attribute
- String frame = table.getAttribute(HTML.ATTR_FRAME);
-
- assertNotNull(frame);
- assertEquals("above", frame.trim().toLowerCase()); //$NON-NLS-1$
-
- elements.clear();
-
- // find "caption" elements
- TestUtil.findAllElementsByName(node, elements, HTML.TAG_CAPTION);
-
- assertEquals(1, elements.size());
-
- // Test captionClass
- nsIDOMElement caption = (nsIDOMElement) elements.get(0).queryInterface(
- nsIDOMElement.NS_IDOMELEMENT_IID);
-
- String captionClass = caption.getAttribute(HTML.ATTR_CLASS);
-
- assertNotNull(captionClass);
- assertEquals("myStyle0", captionClass.trim()); //$NON-NLS-1$
-
- // Test captionStyle
-
- String captionStyle = caption.getAttribute(HTML.ATTR_STYLE);
-
- assertNotNull(captionStyle);
- assertEquals("color: red;", captionStyle.trim()); //$NON-NLS-1$
-
- if (getException() != null) {
- throw getException();
- }
- }
-
-}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1718Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1718Test.java 2008-11-28 14:24:07 UTC (rev 12122)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1718Test.java 2008-11-28 14:44:57 UTC (rev 12123)
@@ -54,7 +54,8 @@
*
* @throws Throwable
*/
- public void testDirAttribute() throws Throwable {
+ //mareshkau, dir attributes was disabled due to JBIDE-3209
+ public void _testDirAttribute() throws Throwable {
// wait
TestUtil.waitForJobs();
16 years, 1 month
JBoss Tools SVN: r12122 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-28 09:24:07 -0500 (Fri, 28 Nov 2008)
New Revision: 12122
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml
Log:
fix broken junit tests, JBIDE-883
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml 2008-11-28 14:23:41 UTC (rev 12121)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml 2008-11-28 14:24:07 UTC (rev 12122)
@@ -1,86 +1,59 @@
<tests>
<test id="body_test">
- <DIV ID="body_test" STYLE="-moz-user-modify: read-write;">
- <TABLE STYLE="background-color: red;" CLASS="dr-table rich-table">
- <COLGROUP SPAN="1">
- </COLGROUP>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: green;" CLASS="dr-table-cell rich-table-cell">
- <SPAN>
- #{test.color}
+<DIV ID="body_test" STYLE="-moz-user-modify: read-write;">
+<TABLE STYLE="background-color: red;" CLASS="dr-table rich-table">
+<COLGROUP SPAN="1">
+</COLGROUP>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: green;" CLASS="dr-table-cell rich-table-cell">
+<SPAN>
+#{test.color}
</SPAN>
- </TD>
- </TR>
- </TABLE>
- <TABLE>
- <TR>
- <TD>
- <DIV CLASS="dr-table-hidden" STYLE="width: 100px; height: 100px;">
- <TABLE WIDTH="100" STYLE="background-color: blue;" CLASS="dr-table rich-table">
- <COLGROUP SPAN="1">
- </COLGROUP>
- <TBODY>
- </TBODY>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell">
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
+</TD>
+</TR>
+</TABLE>
+<DIV CLASS="dr-table-hidden" STYLE="overflow: auto; width: 100px; height: 100px;">
+<TABLE CLASS="dr-table rich-table">
+<COLGROUP SPAN="1">
+</COLGROUP>
+<TBODY HEIGHT="100" STYLE="background-color: blue;" WIDTH="100px;">
+</TBODY>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell">
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
+</TD>
+</TR>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell">
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
+</TD>
+</TR>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell">
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
+</TD>
+</TR>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell">
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
+</TD>
+</TR>
+<TR CLASS="dr-table-firstrow rich-table-firstrow">
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- </TABLE>
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
-
- </TD>
- <TD>
- <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
-
- </TD>
- </TR>
- <TR>
- <TD>
- <DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"></BR>
-
- </TD>
- </TR>
- </TABLE>
- <TABLE STYLE="background-color: pink;" CLASS="dr-table rich-table" >
- <COLGROUP SPAN="1">
- </COLGROUP>
- <TBODY>
- </TBODY>
- <SPAN>
- ssssssssss
+</TD>
+</TR>
+</TABLE>
+</DIV>
+<TABLE STYLE="background-color: pink;" CLASS="dr-table rich-table">
+<COLGROUP SPAN="1">
+</COLGROUP>
+<TBODY>
+</TBODY>
+<SPAN>
+ssssssssss
</SPAN>
- </TABLE>
- </DIV>
+</TABLE>
+</DIV>
</test>
</tests>
16 years, 1 month
JBoss Tools SVN: r12121 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-28 09:23:41 -0500 (Fri, 28 Nov 2008)
New Revision: 12121
Modified:
trunk/jsf/docs/userguide/en/modules/palette.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-442 - updating the section;
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2008-11-28 14:22:30 UTC (rev 12120)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2008-11-28 14:23:41 UTC (rev 12121)
@@ -556,7 +556,7 @@
</section>
</section>
</section>
- <section id="RichFacesSupport" role="updated">
+ <section id="RichFacesSupport">
<?dbhtml filename="RichFacesSupport.html"?>
<title>RichFaces Support</title>
<para><property>JBoss Developer Studio</property> comes with a tight integration with <ulink
16 years, 1 month
JBoss Tools SVN: r12120 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-28 09:22:30 -0500 (Fri, 28 Nov 2008)
New Revision: 12120
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-442 - updating the VPE section according to Beta1 what's new;
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-11-28 14:21:40 UTC (rev 12119)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-11-28 14:22:30 UTC (rev 12120)
@@ -41,8 +41,11 @@
<para><property>OpenOn</property> lets you easily link directly from one resource to
another in your project without using the Package Explorer view (project tree). With
- OpenOn, you can simply click on a reference to another file and the file will be
- opened.</para>
+ OpenOn, you can simply use <emphasis>
+ <property>F3</property>
+ </emphasis> or <emphasis>
+ <property>Ctrl+Click</property>
+ </emphasis> on a reference to another file and the file will be opened.</para>
<para>OpenOn is available for the following files:</para>
<itemizedlist>
@@ -150,6 +153,31 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>Richfaces tags <emphasis>
+ <property><rich:insert></property>
+ </emphasis> and <emphasis>
+ <property><a4j:include></property>
+ </emphasis> has also <property>OpenOn</property> support.</para>
+
+ <figure>
+ <title>OpenOn With Richfaces Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_8a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>OpenOn With A4j Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_8b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
</section>
</section>
@@ -188,7 +216,7 @@
<listitem>
<para>
<ulink url="&esblink;#ESBContentAssist">ESB XML files</ulink>
- </para>
+ </para>
</listitem>
</itemizedlist>
@@ -423,7 +451,8 @@
<section id="StrutsProjectFile46s3">
<title>Struts Project Files</title>
- <para>Content Assist features are available when you work with Struts projects.</para>
+ <para>Content Assist features are available when you work with Struts
+ projects.</para>
<section id="ContentAssistForStrutsConfigurationFile75">
@@ -509,7 +538,8 @@
<section id="ContentAssistForHTMLTags7454">
<title>Content Assist for HTML Tags</title>
- <para>Content assist for HTML tags has the same mechanism as for JSF tags:</para>
+ <para>Content assist for HTML tags has the same mechanism as for JSF
+ tags:</para>
<figure>
<title>HTML Tags Content Assist</title>
<mediaobject>
@@ -638,7 +668,7 @@
<itemizedlist>
<listitem>
<para>Add bundle resource (property file) <property>code
- assist</property>:</para>
+ assist</property>:</para>
</listitem>
</itemizedlist>
<programlisting role="XML"><![CDATA[<AttributeType ...>
@@ -695,7 +725,7 @@
<listitem>
<para>Restart Eclipse. You should now have code assist for the
- component.</para>
+ component.</para>
</listitem>
</orderedlist>
@@ -709,7 +739,7 @@
files in either source or extra visual modes at the same time.</para>
<para>The project is yours and so is the source. <property>JBoss Developer
- Studio</property> provides you many different graphical editors to speed your
+ Studio</property> provides you many different graphical editors to speed your
application development. At the same time, you always have a full control over all
project source files. Any changes you make in the source view immediately appear in
the graphical view.</para>
@@ -795,7 +825,8 @@
</figure>
<para>The view is designed in the form of a split pane with toggle buttons for quickly
- moving between Source, Visual or Source/Visual modes as shown on the figure above.</para>
+ moving between Source, Visual or Source/Visual modes as shown on the figure
+ above.</para>
<para>One more way to toggle between the various states of the split pane is using the
shortcuts <emphasis>
@@ -806,12 +837,12 @@
<tip>
<title>Tip:</title>
<para>When editing large documents hiding the Visual part will speed up the
- editing.</para>
+ editing.</para>
</tip>
<para>It should be pointed out that, no matter in what mode you are working, you get a
full integration with <property>Properties</property> and <property>Outline
- views</property>:</para>
+ views</property>:</para>
<figure>
<title>Integration with Properties and Outline Views</title>
<mediaobject>
@@ -822,17 +853,74 @@
</figure>
<para>It's also possible to use the <link linkend="palette">JBoss Tools
- Palette</link> to insert any tag from the list of tag libraries to the page you are
- editing with just a click or drag-and-drop.</para>
+ Palette</link> to insert any tag from the list of tag libraries to the page you
+ are editing with just a click or drag-and-drop.</para>
<figure>
<title>Inserting Tag From the Palette</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/visual_page/visual_page_4.png" scale="80"/>
+ <imagedata fileref="images/visual_page/visual_page_4.png"/>
</imageobject>
</mediaobject>
</figure>
+ <para><property>Visual Page Editor</property> provides the option for displaying
+ non-visual tags in Visual mode of the editor. To enable this option expand the
+ submenu in the top left corner of the Visual part and select <emphasis>
+ <property>Show Non-visual tags</property>.</emphasis></para>
+
+ <figure>
+ <title>Enabling the Option for Showing Non-visual Tags</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_4a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the figure you can see non-visual elements with gray dashed borders.</para>
+
+ <figure>
+ <title>Non-visual Tag in the VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_4b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To disable this option again expand the same submenu and select <emphasis>
+ <property>Hide Non-visual tags</property>.</emphasis></para>
+
+ <figure>
+ <title>Non-visual Tag in the VPE</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_4c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="comments">
+ <title>Commenting out Code</title>
+
+ <para><property>VPE</property> supports possibility to add comments in files you are
+ working with (JSP, XHTML, etc.):</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>HTML comments (<emphasis>
+ <property><!-- --></property></emphasis>) which are output to the client
+ </para>
+ </listitem>
+ <listitem>
+ <para>JSP comments (<emphasis>
+ <property><%-- --%></property></emphasis>) which are not output to the
+ client as part of the JSP page output</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
<section id="JSPsyntaxvalidation84">
<title>JSP Syntax Validation</title>
@@ -846,8 +934,8 @@
<para>Most web pages use the cascading style sheets (CSS) to control the way they look.
With <property>Visual Page Editor</property> you can easily stylise your pages. In
- this section we are going to introduce you to a powerful mechanism that <property>VPE</property> provides for
- a complete control over pages styling. </para>
+ this section we are going to introduce you to a powerful mechanism that
+ <property>VPE</property> provides for a complete control over pages styling. </para>
<section id="inline_styling">
<title>Inline Style Editing</title>
@@ -937,7 +1025,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
<para>To create new CSS class write its name in the <emphasis>
<property>Style class</property>
</emphasis> field and then configure style settings switching between the tabs: <emphasis>
@@ -979,8 +1067,8 @@
<para>The dialog for creating a new CSS class, which is called from <emphasis>
<property>New > Other... > JBoss Tools Web > CSS Class</property>,
- </emphasis> looks the same.</para>
-
+ </emphasis> looks the same.</para>
+
<figure>
<title>New CSS Class Dialog</title>
<mediaobject>
@@ -1026,14 +1114,14 @@
<para><emphasis>
<property>Tag for Display</property>
</emphasis> field in the <property>Template dialog</property> requires specifying a
- type of tag. It can be SPAN, DIV, TABLE or any other html element. Here
- it's also possible to mark weather the tag is children or not (by checking <emphasis>
+ type of tag. It can be SPAN, DIV, TABLE or any other html element. Check <emphasis>
<property>Children</property>
- </emphasis>), whether it contains an IMG tag (by checking <emphasis>
- <property>Icon</property>
- </emphasis>) and specify a value for it.</para>
+ </emphasis>, if you want to mark a tag as a child element.</para>
- <para>What comes to the <emphasis>
+ <para>The <emphasis>
+ <property>Value</property>
+ </emphasis> field is for setting a tag value.</para>
+ <para>As for the <emphasis>
<property>Style</property>
</emphasis> field, you can fill it out manually or make use of the button next to
the field to bring the <link linkend="css_dialog">CSS Dialog</link> for editing
@@ -1052,7 +1140,8 @@
</mediaobject>
</figure>
- <para>Here it's possible to edit or remove any listed in the table template.</para>
+ <para>Here it's possible to edit or remove any listed in the table
+ template.</para>
</section>
@@ -1080,7 +1169,7 @@
<para><emphasis>
<property>Preferences</property>
</emphasis> button provides a quick access to <property>Visual Page
- Editor</property> preferences.</para>
+ Editor</property> preferences.</para>
<figure>
<title>Visual Page Editor Preferences Window</title>
@@ -1116,7 +1205,8 @@
runtime. Let's look at what functionality it proposes.</para>
<para>The first two sections of the window let you define actual runtime
- folders. The example below will help you to clarify how this can be used.</para>
+ folders. The example below will help you to clarify how this can be
+ used.</para>
<para>Suppose you have the following project structure:</para>
@@ -1170,10 +1260,10 @@
]]></programlisting>
<para>This will work fine in runtime, but the <property>Visual Page
- Editor</property> doesn't know what
- <emphasis>requestContextPath</emphasis> in design time is. In order to see
- the necessary styles applied in design time your should add a path to your
- stylesheet in the <property>CSS File Path</property> section.</para>
+ Editor</property> doesn't know what
+ <emphasis>requestContextPath</emphasis> in design time is. In order to
+ see the necessary styles applied in design time your should add a path to
+ your stylesheet in the <property>CSS File Path</property> section.</para>
<para>The next <property>URI</property> section lets you add URI taglibs so that
the editor knows where to find the tag libraries.</para>
@@ -1196,8 +1286,8 @@
view</property>, you'll also see this expression. Now press <emphasis>
<property>Page Design Options</property>
</emphasis> button and set the value for the
- <emphasis>#{user.name}</emphasis> as
- <emphasis><property>World</property>.</emphasis></para>
+ <emphasis>"user.name"</emphasis> as
+ <emphasis><property>World</property>.</emphasis></para>
<figure>
<title>Setting the Value for the EL Expression</title>
@@ -1225,7 +1315,7 @@
<para>You can find useful one more functionality provided by VPE. At the bottom of the
<property>Visual/Source view</property> there is a <property>Selection Tag
- Bar</property>. It allows to see tags tree for a current component selected in
+ Bar</property>. It allows to see tags tree for a current component selected in
Visual or Source mode.</para>
<figure>
@@ -1240,7 +1330,7 @@
<para>If you want to hide the <property>Selection Tag Bar</property>, use the button in
the form of a red cross on the lower right side. To reset it again you should check
the proper option in the <link linkend="vpe_preferences">VPE
- Preferences</link>.</para>
+ Preferences</link>.</para>
</section>
<section id="page_preview">
@@ -1278,7 +1368,7 @@
<title>Setup notes for Linux</title>
<para>Linux users may need to do the following to get the <property>Visual Page
- Editor</property> to work correctly on their machines.</para>
+ Editor</property> to work correctly on their machines.</para>
<para> The Visual Page Editor requires the library libstdc++.so.5. This library is
contained in the compat-libstdc++-33.i386 package.</para>
@@ -1471,7 +1561,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>Content assist is available when editing the file using the Source viewer:</para>
+ <para>Content assist is available when editing the file using the Source
+ viewer:</para>
<figure>
<title>Content Assist</title>
@@ -1483,7 +1574,8 @@
</figure>
<para>In the Source viewer, if at any point a tag is incorrect or incomplete, an
- error will be indicated next to the line and also in the Problems view below.</para>
+ error will be indicated next to the line and also in the Problems view
+ below.</para>
<figure>
<title>Error Reporting</title>
@@ -1524,7 +1616,8 @@
</mediaobject>
</figure>
- <para>You can add any new elements right in the <property>Tree viewer</property>:</para>
+ <para>You can add any new elements right in the <property>Tree
+ viewer</property>:</para>
<figure>
<title>Adding New Elements</title>
@@ -1724,7 +1817,8 @@
</mediaobject>
</figure>
- <para>In the Design viewer, you can drill down on an element by double-clicking on it:</para>
+ <para>In the Design viewer, you can drill down on an element by double-clicking on
+ it:</para>
<figure>
<title>Design Viewer</title>
@@ -1735,7 +1829,8 @@
</mediaobject>
</figure>
- <para>Various edit options are available when you right-click an element in the diagram:</para>
+ <para>Various edit options are available when you right-click an element in the
+ diagram:</para>
<figure>
<title>Edit Options</title>
@@ -1775,7 +1870,8 @@
<title>Support for XML Schema</title>
- <para>JBoss Developer Studio fully supports XML files based on schemas as well as DTDs:</para>
+ <para>JBoss Developer Studio fully supports XML files based on schemas as well as
+ DTDs:</para>
<figure>
<title>XML File</title>
<mediaobject>
16 years, 1 month
JBoss Tools SVN: r12118 - trunk/jsf/docs/userguide/en/images/visual_page.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-28 09:21:17 -0500 (Fri, 28 Nov 2008)
New Revision: 12118
Modified:
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_13.png
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_22.png
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4.png
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_7b.png
Log:
https://jira.jboss.org/jira/browse/JBDS-442 - updating the screens;
Modified: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_13.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_22.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_7b.png
===================================================================
(Binary files differ)
16 years, 1 month
JBoss Tools SVN: r12117 - trunk/jsf/docs/userguide/en/images/visual_page.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-11-28 09:20:41 -0500 (Fri, 28 Nov 2008)
New Revision: 12117
Added:
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4a.png
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4b.png
trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4c.png
Log:
https://jira.jboss.org/jira/browse/JBDS-442 - adding new screens;
Added: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4a.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4b.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4c.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/visual_page/visual_page_4c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 1 month
JBoss Tools SVN: r12116 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-28 08:45:06 -0500 (Fri, 28 Nov 2008)
New Revision: 12116
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java
Log:
JBIDE-3163
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java 2008-11-28 13:32:25 UTC (rev 12115)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide2362Test.java 2008-11-28 13:45:06 UTC (rev 12116)
@@ -164,7 +164,7 @@
Node node = tagList.item(0);
SelectionUtil.setSourceSelection(controller.getPageContext(),
- node, 0, 0);
+ node, 1, 0);
assertEquals(domMapping.getNearNodeMapping(node)
.getVisualNode(), xulRunnerEditor.getLastSelectedNode());
16 years, 1 month
JBoss Tools SVN: r12115 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-28 08:32:25 -0500 (Fri, 28 Nov 2008)
New Revision: 12115
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2582Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
JBIDE-3163
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2582Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2582Test.java 2008-11-28 10:33:17 UTC (rev 12114)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2582Test.java 2008-11-28 13:32:25 UTC (rev 12115)
@@ -166,7 +166,7 @@
final Node elementNode = nodeList.item(0);
- SelectionUtil.setSourceSelection(controller.getPageContext(), elementNode, 0, 0);
+ SelectionUtil.setSourceSelection(controller.getPageContext(), elementNode, 1, 0);
nsIDOMNode node = SelectionUtil.getLastSelectedNode(controller.getPageContext());
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2008-11-28 10:33:17 UTC (rev 12114)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2008-11-28 13:32:25 UTC (rev 12115)
@@ -295,7 +295,7 @@
styledText.setCaretOffset(951);
styledText.insert("<a"); //$NON-NLS-1$
styledText.setCaretOffset(953);
- for(int i=0;i<100;i++) {
+ for(int i=0;i<10;i++) {
styledText.insert(""+i); //$NON-NLS-1$
TestUtil.delay(30);
}
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-11-28 10:33:17 UTC (rev 12114)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-11-28 13:32:25 UTC (rev 12115)
@@ -171,12 +171,18 @@
// get source node by position
//see jbide-3163
IndexedRegion node = model.getIndexedRegion(position);
+ IndexedRegion possbleNode = position>=1?model.getIndexedRegion(position-1):null;
if(node==null && position>=1) {
- node = model.getIndexedRegion(position-1);
+ node = possbleNode;
}else if((node!=null) &&(((Node)node).getNodeType()!=Node.TEXT_NODE)
&& (node.getStartOffset()==position)
&& (position>=1)) {
- node = model.getIndexedRegion(position-1);
+ //check for such situation #text<h1></h1>
+ node = possbleNode;
+ }else if((node!=null) &&(((Node)node).getNodeType()!=Node.TEXT_NODE)
+ && (possbleNode!=null)
+ && ((Node)possbleNode).getNodeType()==Node.TEXT_NODE){
+ node = possbleNode;
}
return (Node)node;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-11-28 10:33:17 UTC (rev 12114)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-11-28 13:32:25 UTC (rev 12115)
@@ -340,7 +340,7 @@
&& (nodeMapping.getVisualNode() != null)) {
SelectionUtil.setSourceSelection(controller.getPageContext(),
- nodeMapping.getSourceNode(), 0, 0);
+ nodeMapping.getSourceNode(), 1, 0);
TestUtil.delay(50);
16 years, 1 month