JBoss Tools SVN: r5918 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-23 20:25:48 -0500 (Wed, 23 Jan 2008)
New Revision: 5918
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.jboss.tools.seam.core.prefs
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.eclipse.wst.common.project.facet.core.xml
Log:
Missing configuration files added to fix test exceptions
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-01-23 22:17:08 UTC (rev 5917)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-01-24 01:25:48 UTC (rev 5918)
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
- <runtime name="Apache Tomcat v5.5"/>
+ <fixed facet="jst.jsf"/>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.seam"/>
<fixed facet="jst.java"/>
- <fixed facet="jst.web"/>
<installed facet="jst.java" version="5.0"/>
<installed facet="jst.web" version="2.4"/>
+ <installed facet="jst.jsf" version="1.2"/>
+ <installed facet="jst.seam" version="1.2"/>
</faceted-project>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.jboss.tools.seam.core.prefs
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.jboss.tools.seam.core.prefs (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.jboss.tools.seam.core.prefs 2008-01-24 01:25:48 UTC (rev 5918)
@@ -0,0 +1,6 @@
+#Tue Oct 23 14:08:40 MSD 2007
+action.package=demo
+eclipse.preferences.version=1
+model.package=demo
+seam.project.connection.profile=DefaultDS
+seam.project.deployment.type=war
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/.settings/org.jboss.tools.seam.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
18 years, 2 months
JBoss Tools SVN: r5917 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-23 17:17:08 -0500 (Wed, 23 Jan 2008)
New Revision: 5917
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-1306 can hand-edit fields now.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-01-23 20:12:12 UTC (rev 5916)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-01-23 22:17:08 UTC (rev 5917)
@@ -21,6 +21,11 @@
*/
package org.jboss.ide.eclipse.as.ui.editor;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -46,6 +51,7 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.editor.ServerEditorSection;
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -57,6 +63,9 @@
*/
public class DeploySection extends ServerEditorSection {
+ private Text text;
+ private Text tempDeployText;
+
public DeploySection() {
// TODO Auto-generated constructor stub
}
@@ -82,10 +91,11 @@
Label descriptionLabel = toolkit.createLabel(composite, Messages.swf_DeploymentDescription);
Label label = toolkit.createLabel(composite, Messages.swf_DeployDirectory);
- final Text text = toolkit.createText(composite, getDeployDir(), SWT.BORDER);
+ text = toolkit.createText(composite, getDeployDir(), SWT.BORDER);
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
execute(new SetDeployDirCommand(server, text, text.getText()));
+ getSaveStatus();
}
});
@@ -103,10 +113,11 @@
});
Label tempDeployLabel = toolkit.createLabel(composite, Messages.swf_TempDeployDirectory);
- final Text tempDeployText = toolkit.createText(composite, getTempDeployDir(), SWT.BORDER);
+ tempDeployText = toolkit.createText(composite, getTempDeployDir(), SWT.BORDER);
tempDeployText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
execute(new SetTempDeployDirCommand(server, tempDeployText, tempDeployText.getText()));
+ getSaveStatus();
}
});
@@ -167,9 +178,6 @@
tempButtonData.top = new FormAttachment(text,5);
tempDeployButton.setLayoutData(tempButtonData);
- text.setEditable(false);
- tempDeployText.setEditable(false);
-
toolkit.paintBordersFor(composite);
section.setClient(composite);
}
@@ -188,7 +196,25 @@
return "";
}
+ public IStatus[] getSaveStatus() {
+ String error = "";
+ ArrayList status = new ArrayList();
+ if(!new Path(text.getText()).toFile().exists()) {
+ String msg = "The path \"" + text.getText() + "\" does not exist.";
+ status.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, msg));
+ error = msg + "\n";
+ }
+ if(!new Path(tempDeployText.getText()).toFile().exists()) {
+ String msg = "The path \"" + tempDeployText.getText() + "\" does not exist.";
+ status.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, msg));
+ error = error + msg + "\n";
+ }
+
+ setErrorMessage(error.equals("") ? null : error);
+ return status.size() == 0 ? null : (IStatus[]) status.toArray(new IStatus[status.size()]);
+ }
+
public static class SetDeployDirCommand extends ServerCommand {
private String oldDir;
18 years, 2 months
JBoss Tools SVN: r5916 - trunk/vpe/plugins/org.jboss.tools.vpe/templates.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-23 15:12:12 -0500 (Wed, 23 Jan 2008)
New Revision: 5916
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
Fix border for panelgrid template
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-01-23 19:28:33 UTC (rev 5915)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-01-23 20:12:12 UTC (rev 5916)
@@ -907,7 +907,7 @@
<vpe:tag name="h:panelGrid" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <vpe:panelgrid border="{@border}" style="{@style}" class="{@styleClass}" width="{@width}" frame="{@frame}" rules="{@rules}"
+ <vpe:panelgrid border="{iif(@border='','0','@border')}" style="{@style}" class="{@styleClass}" width="{@width}" frame="{@frame}" rules="{@rules}"
columnClasses="{@columnClasses}" footerClass="{@footerClass}" headerClass="{@headerClass}" rowClasses="{@rowClasses}"
cellspacing="{@cellspacing}" cellpadding="{@cellpadding}" bgcolor="{@bgcolor}" title="{tagstring()}"
table-size="{@columns}"/>
18 years, 2 months
JBoss Tools SVN: r5915 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-23 14:28:33 -0500 (Wed, 23 Jan 2008)
New Revision: 5915
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1580
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-23 19:26:06 UTC (rev 5914)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-23 19:28:33 UTC (rev 5915)
@@ -736,9 +736,6 @@
<vpe:container-child tag-name="column" />
</vpe:drop>
</vpe:dnd>
- <vpe:resize>
- <vpe:height height-attr="listsHeight" />
- </vpe:resize>
<vpe:textFormating>
<vpe:format type="UnderlineFormat">
<vpe:formatAttribute type="style" />
18 years, 2 months
JBoss Tools SVN: r5914 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-23 14:26:06 -0500 (Wed, 23 Jan 2008)
New Revision: 5914
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1580
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css 2008-01-23 17:04:32 UTC (rev 5913)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/shuttle/shuttle.css 2008-01-23 19:26:06 UTC (rev 5914)
@@ -12,7 +12,7 @@
overflow: hidden;
}
-.rich-shuttle-header-tab-cell,.rich-shuttle-header-tab-cell-last {
+.rich-shuttle-header-tab-cell {
padding: 2px;
border-style: solid;
font-weight: normal;
@@ -20,8 +20,22 @@
background-repeat: repeat-x;
border-top: 0;
border-left: 0;
+ background-color: #E3DED5;
+ color: #000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-right-color: #C4C0C9;
+ border-bottom-color: #C4C0C9;
+
}
+.
+rich-shuttle-header-tab-cell-last {
+ border-right-width: 0;
+}
+
.rich-shuttle-list-content {
background-color: #FFF;
border-color: #C0C0C0;
@@ -63,7 +77,7 @@
font-size: 11px;
}
-.rich-shuttle-button-content img {
+.rich-shuttle-button-content img { //
margin-right: 2px;
vertical-align: middle;
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-01-23 17:04:32 UTC (rev 5913)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesListShuttleTemplate.java 2008-01-23 19:26:06 UTC (rev 5914)
@@ -11,6 +11,7 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -24,7 +25,6 @@
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMText;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -65,7 +65,7 @@
/**
* path to img
*/
- private static final String HEADER_IMG_PATH = "shuttle/button.gif";
+ private static final String HEADER_IMG_PATH = "shuttle/header.gif";
/**
* default value of width of box(list)
@@ -177,7 +177,8 @@
defaultStyleClasses.put("style", "rich-list-shuttle");
// styles of the lists
- defaultStyleClasses.put("list-header", "rich-shuttle-list-header");
+ defaultStyleClasses.put("header", "rich-shuttle-list-header");
+ defaultStyleClasses.put("headerCell", "rich-shuttle-header-tab-cell");
defaultStyleClasses.put("list", "rich-shuttle-list-content");
// styles of button's block
@@ -360,17 +361,11 @@
}
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#isRecreateAtAttrChange(org.jboss.tools.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.mozilla.interfaces.nsIDOMDocument,
- * org.mozilla.interfaces.nsIDOMElement, java.lang.Object,
- * java.lang.String, java.lang.String)
- */
+ @Override
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
+ // TODO Auto-generated method stub
return true;
}
@@ -383,17 +378,13 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
- ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "shuttle");
-
// cast to Element
Element sourceElement = (Element) sourceNode;
- // get children
- List<Node> children = ComponentUtil.getChildren(sourceElement);
-
// prepare data
prepareData(sourceElement);
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "shuttle");
// create table element
nsIDOMElement basicTable = visualDocument.createElement(HTML.TAG_TABLE);
// ComponentUtil.copyAttributes(sourceNode, basicTable);
@@ -413,9 +404,9 @@
// create source box
nsIDOMElement sourceBoxTd = visualDocument.createElement(HTML.TAG_TD);
nsIDOMElement sourceBox = createBox(visualDocument, creationData,
- children, "source");
+ getChildren(sourceNode), "source");
sourceBox.setAttribute(HTML.ATTR_STYLE, "width:" + sourceListsWidth
- + ";height:" + listsHeight + ";");
+ + ";height:" + listsHeight + ";" );
sourceBoxTd.appendChild(sourceBox);
// create source buttons
@@ -432,9 +423,9 @@
// create target box
nsIDOMElement targetBoxTd = visualDocument.createElement(HTML.TAG_TD);
nsIDOMElement targetBox = createBox(visualDocument, creationData,
- children, "target");
+ getChildren(sourceNode), "target");
targetBox.setAttribute(HTML.ATTR_STYLE, "width:" + targetListsWidth
- + ";height:" + listsHeight + ";");
+ + ";height:" + listsHeight + ";");
targetBoxTd.appendChild(targetBox);
// create target buttons
@@ -556,20 +547,56 @@
box.setAttribute("cellspacing", "0");
box.setAttribute("cellpadding", "0");
box.setAttribute("width", "100%");
+// box.setAttribute("height", listsHeight);
- // create "tr" for box
+ nsIDOMElement header = createHeader(visualDocument, creationData,
+ children);
+ if (header != null)
+ box.appendChild(header);
+
+ // create body for box
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
tr.setAttribute(HTML.ATTR_STYLE, "vertical-align:top");
tr.setAttribute(HTML.ATTR_CLASS, styleClasses.get(boxId + "Row") + " "
+ rowClass);
- VpeChildrenInfo trInfo = new VpeChildrenInfo(tr);
- creationData.addChildrenInfo(trInfo);
+ // VpeChildrenInfo trInfo = new VpeChildrenInfo(tr);
+ // creationData.addChildrenInfo(trInfo);
// add children to "tr" element
+ int columnCount = 0;
for (Node child : children) {
if ("column".equals(child.getLocalName())) {
- trInfo.addSourceChild(child);
+
+ nsIDOMElement column = visualDocument
+ .createElement(HTML.TAG_TD);
+
+ tr.appendChild(column);
+
+ if (columnClasses.size() > 0) {
+
+ String columnClass = columnClasses.get(columnCount
+ % columnClasses.size());
+ column.setAttribute(HTML.ATTR_CLASS, columnClass);
+
+ }
+ nsIDOMElement columnTable = visualDocument
+ .createElement(HTML.TAG_TABLE);
+ column.appendChild(columnTable);
+
+ nsIDOMElement columnTableTr = visualDocument
+ .createElement(HTML.TAG_TR);
+ columnTable.appendChild(columnTableTr);
+
+ VpeChildrenInfo columnTableTrInfo = new VpeChildrenInfo(
+ columnTableTr);
+ creationData.addChildrenInfo(columnTableTrInfo);
+ columnTableTrInfo.addSourceChild(child);
+
+ columnCount++;
+
+ // trInfo.addSourceChild(child);
+
}
}
@@ -630,11 +657,17 @@
} else {
// button represent "div" element
+ nsIDOMElement metaButton = visualDocument
+ .createElement(HTML.TAG_DIV);
+
+ metaButton.setAttribute(HTML.ATTR_STYLE, ComponentUtil
+ .getBackgoundImgStyle(BUTTON_IMG_PATH));
+
+ // button represent "div" element
+
nsIDOMElement button = visualDocument.createElement(HTML.TAG_DIV);
button.setAttribute(HTML.ATTR_CLASS, styleClasses.get(buttonId));
- button.setAttribute(HTML.ATTR_STYLE, ComponentUtil
- .getBackgoundImgStyle(BUTTON_IMG_PATH));
- // button represent "div" element
+
nsIDOMElement buttonContent = visualDocument
.createElement(HTML.TAG_DIV);
buttonContent.setAttribute(HTML.ATTR_CLASS,
@@ -645,8 +678,6 @@
buttonImage.setAttribute(HTML.ATTR_WIDTH, "15");
buttonImage.setAttribute(HTML.ATTR_HEIGHT, "15");
- buttonImage.setAttribute(HTML.ATTR_CLASS,
- "rich-shuttle-button-content");
ComponentUtil.setImg(buttonImage, buttonImages.get(buttonId));
buttonContent.appendChild(buttonImage);
@@ -658,8 +689,8 @@
}
button.appendChild(buttonContent);
-
- buttonSpace.appendChild(button);
+ metaButton.appendChild(button);
+ buttonSpace.appendChild(metaButton);
}
return buttonSpace;
@@ -670,7 +701,7 @@
*
* @param sourceElement
*/
- void prepareData(Element sourceElement) {
+ private void prepareData(Element sourceElement) {
// prepare labels
Set<String> labelsKeys = defaultLabels.keySet();
@@ -700,7 +731,7 @@
styleClasses.put(key, defaultStyleClasses.get(key));
}
- // prepare facets
+ // prepare facets for caption and buttons
NodeList children = sourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
@@ -725,6 +756,13 @@
rowClass = rowClasses.split(",")[0];
}
+ String columnClassesAtribute = sourceElement
+ .getAttribute(ATTR_COLUMN_CLASSES);
+ if (columnClassesAtribute != null)
+ columnClasses = Arrays.asList(columnClassesAtribute.split(","));
+ else
+ columnClasses = new ArrayList<String>();
+
// if "controlsType" attribute is not "none" (if buttons are visible)
if (!"none".equalsIgnoreCase(sourceElement
.getAttribute(ATTR_CONTROLS_TYPE))) {
@@ -761,17 +799,34 @@
: DEFAULT_BUTTON_ALIGN;
// prepare lists attributes
- listsHeight = sourceElement.getAttribute(ATTR_LISTS_HEIGHT) != null ? sourceElement
- .getAttribute(ATTR_LISTS_HEIGHT)
- : DEFAULT_LIST_HEIGHT;
- sourceListsWidth = sourceElement.getAttribute(ATTR_SOURCE_LIST_WIDTH) != null ? sourceElement
- .getAttribute(ATTR_SOURCE_LIST_WIDTH)
- : DEFAULT_LIST_WIDTH;
+ String listsHeightString = sourceElement
+ .getAttribute(ATTR_LISTS_HEIGHT);
+ try {
+ Integer.parseInt(listsHeightString);
+ listsHeight = listsHeightString;
+ } catch (NumberFormatException e) {
+ listsHeight = DEFAULT_LIST_HEIGHT;
+ }
- targetListsWidth = sourceElement.getAttribute(ATTR_TARGET_LIST_WIDTH) != null ? sourceElement
- .getAttribute(ATTR_TARGET_LIST_WIDTH)
- : DEFAULT_LIST_WIDTH;
+ String sourceListWithString = sourceElement
+ .getAttribute(ATTR_SOURCE_LIST_WIDTH);
+ try {
+ Integer.parseInt(sourceListWithString);
+ sourceListsWidth = sourceListWithString;
+ } catch (NumberFormatException e) {
+ sourceListsWidth = DEFAULT_LIST_WIDTH;
+ }
+
+ String targetListWithString = sourceElement
+ .getAttribute(ATTR_TARGET_LIST_WIDTH);
+ try {
+ Integer.parseInt(targetListWithString);
+ targetListsWidth = targetListWithString;
+ } catch (NumberFormatException e) {
+ targetListsWidth = DEFAULT_LIST_WIDTH;
+ }
+
}
private void clearData() {
@@ -786,9 +841,125 @@
/**
*
- * @param sourceElement
+ * @param node
* @param name
* @return
*/
+ private Element getNodeFacet(Node node, String name) {
+ NodeList children = node.getChildNodes();
+
+ Element facet = null;
+
+ for (int i = 0; i < children.getLength(); i++) {
+
+ Node child = children.item(i);
+
+ if ((child instanceof Element)
+ && ("facet".equals(child.getLocalName()))
+ && (name.equals(((Element) child).getAttribute("name")))) {
+
+ facet = (Element) child;
+
+ }
+
+ }
+ return facet;
+ }
+
+ /**
+ *
+ * @param children
+ * @return
+ */
+ private boolean haveFacet(List<Node> children, String name) {
+
+ for (Node node : children) {
+
+ if (getNodeFacet(node, name) != null)
+ return true;
+ }
+
+ return false;
+
+ }
+
+ /**
+ *
+ * @param visualDocument
+ * @param creationData
+ * @param children
+ * @param id -
+ * "header" or "footer"
+ * @return
+ */
+ private nsIDOMElement createHeader(nsIDOMDocument visualDocument,
+ VpeCreationData creationData, List<Node> children) {
+
+ if (!haveFacet(children, "header"))
+ return null;
+
+ nsIDOMElement header = visualDocument.createElement(HTML.TAG_TR);
+
+ header.setAttribute(HTML.ATTR_CLASS, styleClasses.get(header));
+
+ for (Node child : children) {
+ if ("column".equals(child.getLocalName())) {
+
+ nsIDOMElement headerCell = visualDocument
+ .createElement(HTML.TAG_TH);
+
+ headerCell.setAttribute("background", ComponentUtil
+ .getAbsoluteResourcePath(HEADER_IMG_PATH));
+
+ // get header classes
+ String headerClass = styleClasses.get("headerCell");
+
+ if ((child instanceof Element)
+ && (((Element) child).getAttribute("headerClass")) != null) {
+ headerClass += " "
+ + ((Element) child).getAttribute("headerClass");
+ }
+ headerCell.setAttribute(HTML.ATTR_CLASS, headerClass);
+
+ Element facet = getNodeFacet(child, "header");
+ if (facet != null) {
+ VpeChildrenInfo headerCellInfo = new VpeChildrenInfo(
+ headerCell);
+ creationData.addChildrenInfo(headerCellInfo);
+
+ headerCellInfo.addSourceChild(facet);
+
+ } else {
+
+ nsIDOMElement pre = visualDocument
+ .createElement(HTML.TAG_PRE);
+
+ pre.appendChild(visualDocument.createTextNode(""));
+ headerCell.appendChild(pre);
+
+ }
+ header.appendChild(headerCell);
+
+ }
+ }
+
+ return header;
+
+ }
+
+ /**
+ *
+ * @param sourceNode
+ * @return
+ */
+ public static List<Node> getChildren(Node sourceNode) {
+ ArrayList<Node> children = new ArrayList<Node>();
+ NodeList nodeList = sourceNode.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ Node child = nodeList.item(i);
+ children.add(child);
+ }
+ return children;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-23 17:04:32 UTC (rev 5913)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-23 19:26:06 UTC (rev 5914)
@@ -51,6 +51,7 @@
public static final String TAG_OL = "OL";
public static final String TAG_UL = "UL";
public static final String TAG_CODE = "CODE";
+ public static final String TAG_PRE = "PRE";
public static final String ATTR_ID = "ID";
public static final String ATTR_TYPE = "TYPE";
@@ -67,4 +68,5 @@
public static final String ATTR_CELLPADDING = "cellpadding";
public static final String ATTR_WIDTH = "WIDTH";
public static final String ATTR_HEIGHT = "HEIGHT";
+ public static final String ATTR_BORDER = "BORDER";
}
\ No newline at end of file
18 years, 2 months
JBoss Tools SVN: r5913 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-23 12:04:32 -0500 (Wed, 23 Jan 2008)
New Revision: 5913
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
trunk/as/docs/reference/en/modules/quick_start.xml
trunk/as/docs/reference/en/modules/runtimes_servers.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-199 - rearranging chapters
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-01-23 16:20:30 UTC (rev 5912)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-01-23 17:04:32 UTC (rev 5913)
@@ -17,36 +17,266 @@
<para>The <property>JBoss AS</property> Perspective is similar to the Java perspective, but it
contains a few additional views. Two of the additional views are standard views,
- specifically the <property>Console </property> view and the <property>Properties</property>
- view. The other two views that are added are the <property>Project archives</property> view
- and the <property>JBoss Servers View</property>. </para>
+ specifically the <property>Console view</property> and the <property>Properties
+ view</property>. The other two views that are added are the <property>Project Archives view</property>
+ and the <property>JBoss Server view</property>.</para>
<section id="JBossServerView">
<?dbhtml filename="JBossServerView.html"?>
- <title>The JBoss Servers View</title>
- <para>This chapter will focus on the the JBoss Server's View. </para>
- <para>The JBoss Servers View is based on the WTP view, Servers View. The top half of the
- JBoss Servers View essentially embeds the original Servers View directly into it, making
- slight changes to the context menu. A second half was added to provide additional
- information about the server selected in the top half. In the image provided, categories
- in the second half include which modules are currently deployed.</para>
+ <title>The JBoss Server View</title>
+ <para>Let's have a look at the <property>JBoss Server View</property> and inspect in details all parts it consist of.
+ </para>
+ <para>The <property>JBoss Server View</property> is based on the WTP view, Server
+ View. The top part of the <property>JBoss Servers View</property> essentially embeds
+ the original Server View directly into it, making slight changes to the context
+ menu. A second part was added to provide additional information about the server
+ selected in the top part. In the image provided, categories in the second part
+ include which modules are currently deployed.</para>
+
<figure>
- <title>The JBoss Servers View</title>
+ <title>The JBoss Server View</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/perspective/perspective_1.png"/>
</imageobject>
</mediaobject>
</figure>
+ <para>Now, let's get to know with each of them.</para>
+ <section>
+ <title>Top Part of JBoss Server View</title>
+ <para>In the top part of the <property>JBoss Server view</property> all
+ declared servers are represented as well as their current states, that is, whether they
+ are started or stopped. </para>
+ <figure>
+ <title>Server Publish Status</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It also shows the server's publish status. The fallowing table lists each of them.</para>
+
+ <table>
+ <title>Server Publish Status</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">Status</entry>
+
+ <entry align="center">Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry align="center"><para>Republish</para></entry>
+
+ <entry align="center"><para>The status which allows you to see
+ if changes are awaiting.</para></entry>
+ </row>
+ <row>
+ <entry align="center"><para>Publishing...</para></entry>
+
+ <entry align="center"><para>The status which shows
+ if changes are being updated.</para></entry>
+ </row>
+ <row>
+ <entry align="center"><para>Synchronized</para></entry>
+
+ <entry align="center"><para>The status which allows you to see
+ if changes are in-sync.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>By double-clicking on any server an editor window
+ will appear allowing you to edit parts of that server. The editor will also link you to
+ modify that server's launch configuration, set command line arguments, and other things
+ that are relevant to launching the server.</para>
+
+ <figure>
+ <title>Preferences Page for the Chosen Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_20.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At the figure above you can see that a username/password is available in the UI when
+ configuring the server. If you get an SecurityException when trying to launch the server,
+ it is most likely because your server is protected and hence you need to fill the
+ username/password fields with appropriate values.</para>
+
+ <para>The view's toolbar shown below provides quick access to starting a server (in debug
+ mode, run mode, or profile mode), restarting the server, stopping the server, or
+ publishing to the server.</para>
+ <figure>
+ <title>The JBoss Server View Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In order to debug your applications or EJB's that are deployed to the server, you must
+ start the server in debug mode. By starting the server in debug mode, eclipse will allow
+ you to set breakpoints on code in your workspace and step through the code.</para>
+ <para>The publish icon on the extreme right will republish any modules where it has
+ determined the workspace is out of sync with the server. It will attempt to do an
+ incremental publish if it turns out that the module in question is capable of doing one.</para>
+ <para>As the JBoss servers have few properties to edit in the editor, a shortcut to the
+ launch configuration has been provided in the context menu when right-clicking on a
+ server.</para>
+ <figure>
+ <title>Launch Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_21.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes all those additional properties.</para>
+ <table>
+ <title>Server Properties through the Context Menu</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>New Server</para>
+ </entry>
+ <entry>
+ <para>The option allows to define a new server.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Delete</para>
+ </entry>
+ <entry>
+ <para>Standard option that allows to delete the chosen server.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Start</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a run mode.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Debug</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a debug mode.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Stop</para>
+ </entry>
+ <entry>
+ <para>The action for stopping a declared server.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Publish</para>
+ </entry>
+ <entry>
+ <para>The action for synching the publish information between the server
+ and workspace.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Clean</para>
+ </entry>
+ <entry>
+ <para>The option for complete redeploying.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Twiddle Server</para>
+ </entry>
+ <entry>
+ <para>The option provides a dialog for running Twiddle commands against
+ the Twiddle Server.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Edit Launch Configuration</para>
+ </entry>
+ <entry>
+ <para>The option that provides an editor for editing launch
+ configuration properties of the proper server.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Add and Remove Projects</para>
+ </entry>
+ <entry>
+ <para>The option allows to publish a new project to the server (if its
+ type is supported).</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Mentioned above Twiddle is a JMX library that comes with JBoss, and you can use it to
+ access any variables that exposed via the JBoss JMX interfaces.</para>
+ </section>
-
+ <section>
+ <title>Bottom Part of JBoss Server View</title>
+
<para>In order to access the view's preferences, you should access <emphasis>
- <property>Window > Preferences > JBoss Tools > JBoss Servers
- > View</property>
- </emphasis>. This preference page allows you to select which view extensions you want on
- or off, the order they appear in the view, as well as any other extension-specific
- preferences that may be available.</para>
+ <property>Window > Preferences > JBoss Tools > JBoss
+ Servers > View</property>
+ </emphasis>. This preference page allows you to select which view extensions you
+ want on or off, the order they appear in the view, as well as any other
+ extension-specific preferences that may be available.</para>
+
<figure>
<title>View Preferences</title>
<mediaobject>
@@ -55,10 +285,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>Extender is meant to provide additional functionality relevant to the server selected
- in the top half of the view. If a standard server element is selected from above, some
- of the extensions may still provide the additional information. Others may not. So,
- let's look at the currently available extensions to the JBoss Server's View.</para>
+
+ <para>Extender is meant to provide additional functionality relevant to the server
+ selected in the top part of the view. If a standard server element is selected from
+ above, some of the extensions may still provide the additional information. Others
+ may not. So, let's look at the currently available extensions to the
+ <property>JBoss Server View</property>.</para>
+
<figure>
<title>View Extensions</title>
<mediaobject>
@@ -67,10 +300,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>The <property>Modules</property> section shows what modules are currently deployed to
- the server, and allows you to remove them from the server, or force a full republish
- upon them. It only shows which modules have been deployed through Eclipse, not any and
- all modules that happen to be in the deploy directory.</para>
+
+ <para>The <emphasis>
+ <property>Modules</property></emphasis> section shows what modules are currently deployed
+ to the server, and allows you to remove them from the server, or force a full
+ republish upon them. It only shows which modules have been deployed through Eclipse, not any and all
+ modules that happen to be in the deploy directory.</para>
+
<figure>
<title>Modules Action</title>
<mediaobject>
@@ -79,11 +315,18 @@
</imageobject>
</mediaobject>
</figure>
- <para>The <property>Event Log</property> will show relevant information to your server's
- startup, shutdown, and publish processes. This allows you to keep an eye on what's going
- on (such as automatic incremental deployment if you have it enabled). The only action
- available is to clear the event log. However if the properties view is opened, you can
- receive further information on each event log item (when available).</para>
+
+ <para>The <emphasis>
+ <property>Event Log</property></emphasis> will show relevant information to your
+ server's startup, shutdown, and publish processes. This allows you to keep
+ an eye on what's going on (such as automatic incremental deployment if you
+ have it enabled). The only action available is to clear the <emphasis>
+ <property>Event
+ Log</property></emphasis>. However, if the <property>Properties view</property> is opened, you
+ can receive further information on each <emphasis>
+ <property>Event Log</property></emphasis> item (when
+ available).</para>
+
<figure>
<title>Event Log Actions</title>
<mediaobject>
@@ -92,6 +335,7 @@
</imageobject>
</mediaobject>
</figure>
+
<figure>
<title>Stopping the Server</title>
<mediaobject>
@@ -100,10 +344,15 @@
</imageobject>
</mediaobject>
</figure>
- <para>The <property>XML Configuration</property> category allows you to quickly browse to
- descriptor files in your server's deploy directory and check or change the values. Its
- use requires the Properties view. Basically, XML Configuration are XML XPaths where a
- xpath is a path used to access some specific part of an xml document.</para>
+
+ <para>The <emphasis>
+ <property>XML Configuration</property></emphasis> category allows you to quickly browse
+ to descriptor files in your server's deploy directory and check or change the
+ values. Basically, <emphasis>
+ <property>XML Configuration</property></emphasis> includes XML XPaths where
+ a XPath is a path used to access some specific part of an xml document. Besides, its
+ use requires the <property>Properties view</property>. </para>
+
<figure>
<title>XML Configuration and Properties View</title>
<mediaobject>
@@ -112,10 +361,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>The view itself contains only a list of categories. By right-clicking on <emphasis>
- <property>XML Configuration</property>
- </emphasis>, you can create a new category. Ports are provided by default and is filled
- with many of the most commonly used ports in the JBoss Server.</para>
+
+ <para>The category itself contains only a list of categories. By right-clicking on <emphasis>
+ <property>XML Configuration</property>
+ </emphasis>, you can create a new category. Ports are provided by default and is
+ filled with many of the most commonly used ports in the <property>JBoss
+ Server</property>.</para>
+
<figure>
<title>Adding New Category</title>
<mediaobject>
@@ -124,9 +376,11 @@
</imageobject>
</mediaobject>
</figure>
+
<para>By right-clicking on <emphasis>
- <property>Ports</property>
- </emphasis>, you can create a new XPaths.</para>
+ <property>Ports</property>
+ </emphasis>, you can create a new XPaths.</para>
+
<figure>
<title>Adding New XPath</title>
<mediaobject>
@@ -135,7 +389,9 @@
</imageobject>
</mediaobject>
</figure>
+
<para>After that, the dialog shown below will appear.</para>
+
<figure>
<title>Adding New XPath</title>
<mediaobject>
@@ -144,15 +400,17 @@
</imageobject>
</mediaobject>
</figure>
+
<para>As you type, the fields autocomplete to help you locate exactly what xpath you're
- looking for. The goal here is to get an end result where the xpath matches up with an
- easily changed property. With that in mind, if the property you want to change is the
- text of an element, then the final field Attribute Name should be left blank and your
- xpath should end with port. If, on the other hand, your desired field is the port
- attribute of <fieldName port="35">, then your xpath will end with
+ looking for. The goal here is to get an end result where the xpath matches up with
+ an easily changed property. With that in mind, if the property you want to change is
+ the text of an element, then the final field Attribute Name should be left blank and
+ your xpath should end with port. If, on the other hand, your desired field is the
+ port attribute of <fieldName port="35">, then your xpath will end with
fieldName and your Attribute Name will be "port". When finished, you can click <emphasis>
<property>Preview</property>
- </emphasis> to see how many matches you have for that particular xpath, as shown below.</para>
+ </emphasis> to see how many matches you have for that particular xpath, as shown
+ below.</para>
<figure>
<title>XPath Preview</title>
<mediaobject>
@@ -161,203 +419,25 @@
</imageobject>
</mediaobject>
</figure>
- </section>
- <para>As part of the JBoss Server view there is a <emphasis>
+
+ <para>As part of the JBoss Server view there is a <emphasis>
<property>JMX Console</property>
- </emphasis> section which allows you to browse and use the JMX exposed beans on the server.</para>
- <figure>
- <title>JMX Console</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/perspective/perspective_17.png" scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, let's return to the first part of the JBoss Servers view where all declared
- servers are represented as well as their current states, that is, whether they are started
- or stopped. It also shows the server's publish status that allows you to see if changes are
- awaiting (Republish), are being updated (Publishing...) or are in-sync (Synchronized).</para>
- <figure>
- <title>Server's Publish Status</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/perspective/perspective_18.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>By double-clicking on any server in the Server section of the view, an editor window will
- appear allowing you to edit parts of that server. The editor will also link you to modify
- that server's launch configuration, set command line arguments, and other things that are
- relevant to launching the server.</para>
-
- <figure>
- <title>Preferences Page for the Chosen Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/perspective/perspective_20.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>At the figure above you can see that a username/password is available in the UI when
- configuring the server. If you get an SecurityException when trying to launch the server it
- is most likely because your server is protected and hence you need to fill the
- username/password fields with appropriate values.</para>
-
- <para>The view's toolbar shown below provides quick access to starting a server (in debug mode,
- run mode, or profile mode), restarting the server, stopping the server, or publishing to the
- server.</para>
- <figure>
- <title>The JBoss Server View Toolbar</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/perspective/perspective_19.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </emphasis> section which allows you to browse and use the JMX exposed beans on the
+ server.</para>
+ <figure>
+ <title>JMX Console</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_17.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
- <para>In order to debug your applications or EJB's that are deployed to the server, you must
- start the server in debug mode. By starting the server in debug mode, eclipse will allow you
- to set breakpoints on code in your workspace and step through the code.</para>
- <para>The publish icon on the extreme right will republish any modules where it has determined
- the workspace is out of sync with the server. It will attempt to do an incremental publish
- if it turns out that the module in question is capable of doing one.</para>
- <para>As the JBoss servers have few properties to edit in the editor, a shortcut to the
- launch configuration has been provided in the context menu when right-clicking on a server.</para>
- <figure>
- <title>Launch Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/perspective/perspective_21.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The following table describes all those additional properties.</para>
- <table>
- <title>Server Properties through the Context Menu</title>
- <tgroup cols="2">
- <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*"/>
-
- <thead>
- <row>
- <entry align="center">
- <para>Name</para>
- </entry>
-
- <entry align="center">
- <para>Description</para>
- </entry>
- </row>
- </thead>
-
- <tbody>
- <row>
- <entry>
- <para>New Server</para>
- </entry>
- <entry>
- <para>The option allows to define a new server.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Delete</para>
- </entry>
- <entry>
- <para>Standard option that allows to delete the chosen server.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Start</para>
- </entry>
- <entry>
- <para>The action for stating a server in a run mode.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Debug</para>
- </entry>
- <entry>
- <para>The action for stating a server in a debug mode.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Stop</para>
- </entry>
- <entry>
- <para>The action for stopping a declared server.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Publish</para>
- </entry>
- <entry>
- <para>The action for synching the publish information between the server and
- workspace.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Clean</para>
- </entry>
- <entry>
- <para>The option for complete redeploying.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Twiddle Server</para>
- </entry>
- <entry>
- <para>The option provides a dialog for running Twiddle commands against the
- Twiddle Server.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Edit Launch Configuration</para>
- </entry>
- <entry>
- <para>The option that provides an editor for editing launch configuration
- properties of the proper server.</para>
- </entry>
- </row>
-
- <row>
- <entry>
- <para>Add and Remove Projects</para>
- </entry>
- <entry>
- <para>The option allows to publish a new project to the server (if its type
- is supported).</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <para>Mentioned above Twiddle is a JMX library that comes with JBoss, and you can use it to
- access any variables that exposed via the JBoss JMX interfaces.</para>
-
-
+ </section>
+ </section>
+
<section id="Project_archivesView">
- <title>Project archives View</title>
+ <title>Project Archives View</title>
<para>Every application, whether Plain Old Java, J2EE, or some other language altogether,
needs to be packaged in some way. In Java-related projects, many people use ANT. JBoss
Tools comes with our own archives tool with a bit easier and less-verbose XML and a
@@ -523,7 +603,7 @@
</section>
<section id="PublishToServer">
- <title>Publish to Server</title>
+ <title>Publishing to Server</title>
<figure>
<title>Context Menu on the Item</title>
<mediaobject>
Modified: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml 2008-01-23 16:20:30 UTC (rev 5912)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2008-01-23 17:04:32 UTC (rev 5913)
@@ -58,6 +58,38 @@
<para>Learn more about the JBoss Server View <link linkend="JBossServerView">here</link>.</para>
</section>
+ <section id="archiving">
+
+ <title>Project Archiving</title>
+
+ <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists primarily of a view to set up each packaging configuration
+ (<emphasis><property>Window > Show View > Other > JBoss Tools > Project archives</property></emphasis>).</para>
+ <para>Right clicking in the Project archives view you can create War, EJB War or EAR archive.</para>
+
+ <figure>
+ <title>Archive Creating</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Using the context menu on the item you can initiate a full <property>build</property> on archive, <property>edit</property>,
+ <property>delete</property> or <property>publish</property> it.</para>
+
+ <figure>
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Learn more about the <property>Project archives View</property> <link linkend="Project_archivesView">here</link>.</para>
+
+ </section>
<section id="deployment">
<title>Deploying an Application to a Server</title>
@@ -104,41 +136,6 @@
</figure>
- </section>
-
- <section id="archiving">
+ </section>
- <title>Project Archiving</title>
-
- <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists primarily of a view to set up each packaging configuration
- (<emphasis><property>Window > Show View > Other > JBoss Tools > Project archives</property></emphasis>).</para>
- <para>Right clicking in the Project archives view you can create War, EJB War or EAR archive.</para>
-
- <figure>
- <title>Archive Creating</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Using the context menu on the item you can initiate a full <property>build</property> on archive, <property>edit</property>,
- <property>delete</property> or <property>publish</property> it.</para>
-
- <figure>
- <title>Context Menu on the Item</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Learn more about the <property>Project archives View</property> <link linkend="Project_archivesView">here</link>.</para>
-
- </section>
-
-
-
</chapter>
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-01-23 16:20:30 UTC (rev 5912)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-01-23 17:04:32 UTC (rev 5913)
@@ -14,10 +14,6 @@
<para>In this chapter we will discuss how to install runtimes and servers.</para>
- <!-- <para>First of all it's necessary to say a few words about WTP </para> -->
-
- <!-- The Eclipse Web Tools Platform (WTP) project extends the Eclipse platform with tools for developing Web and Java EE applications. It includes source and graphical editors for a variety of languages, wizards and built-in applications to simplify development, and tools and APIs to support deploying, running, and testing apps. -->
-
<para>The JBoss AS plugin makes use of WTP. This includes starting and stopping servers in run or
debug mode. It also includes targeting WTP projects, such as dynamic web projects, to certain
server runtimes in order to ensure that the proper jars from a specific server are added to the
@@ -261,8 +257,8 @@
</mediaobject>
</figure>
- <para>Now, having JBoss server and runtime installed, we can dwell on all services and tools that
- JBoss Application Server provides.</para>
+ <para>Now, having JBoss server and runtime installed, we can dwell on all services and tools
+ that JBoss Server Manager provides.</para>
</section>
</section>
18 years, 2 months
JBoss Tools SVN: r5912 - in trunk/jsf/docs: userguide/en/modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-01-23 11:20:30 -0500 (Wed, 23 Jan 2008)
New Revision: 5912
Modified:
trunk/jsf/docs/resources/styles/en/fopdf.xsl
trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
trunk/jsf/docs/userguide/en/modules/jsf_support.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-162 Table parameters correction
Modified: trunk/jsf/docs/resources/styles/en/fopdf.xsl
===================================================================
--- trunk/jsf/docs/resources/styles/en/fopdf.xsl 2008-01-23 15:54:13 UTC (rev 5911)
+++ trunk/jsf/docs/resources/styles/en/fopdf.xsl 2008-01-23 16:20:30 UTC (rev 5912)
@@ -280,12 +280,27 @@
<xsl:attribute name="padding-top">4pt</xsl:attribute>
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
</xsl:attribute-set>
+
+ <xsl:param name="table.cell.border.color">black</xsl:param>
+ <xsl:param name="table.frame.border.color">black</xsl:param>
+
<!-- Only hairlines as frame and cell borders in tables -->
+
+
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
+
+ <xsl:attribute-set name="table.table.properties">
+ <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
+ </xsl:attribute-set>
+ <xsl:attribute-set name="table.properties">
+ <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
+ </xsl:attribute-set>
+
+
<!--###################################################
Labels
################################################### -->
Modified: trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-01-23 15:54:13 UTC (rev 5911)
+++ trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-01-23 16:20:30 UTC (rev 5912)
@@ -31,9 +31,16 @@
<section id="key_features">
<title>Key Features of Visual Web Tools</title>
<para>Here is the table of main features of Visual Web Tools:</para>
+
<table>
+
<title>Key Functionality for Visual Web Tools</title>
<tgroup cols="3">
+
+ <colspec colnum="1" colwidth="2*"/>
+ <colspec colnum="2" colwidth="4*"/>
+ <colspec colnum="3" colwidth="2*"/>
+
<thead>
<row>
<entry>Feature</entry>
Modified: trunk/jsf/docs/userguide/en/modules/jsf_support.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2008-01-23 15:54:13 UTC (rev 5911)
+++ trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2008-01-23 16:20:30 UTC (rev 5912)
@@ -117,7 +117,7 @@
<table>
<title>Facelets Templates</title>
<tgroup cols="2">
- <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="1" colwidth="2*"/>
<colspec colnum="2" colwidth="3*"/>
18 years, 2 months
JBoss Tools SVN: r5911 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-01-23 10:54:13 -0500 (Wed, 23 Jan 2008)
New Revision: 5911
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1579
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-23 15:29:57 UTC (rev 5910)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/orderingList/orderingList.css 2008-01-23 15:54:13 UTC (rev 5911)
@@ -127,6 +127,12 @@
text-align:left;
}
+.dr-buttons-border {
+ border:1px solid;
+ margin-bottom:3px;
+ border-color: #000000
+}
+
.rich-ordering-list-caption {
white-space: normal;
word-wrap: break-word;
@@ -144,7 +150,7 @@
}
.rich-ordering-controls {
- border:1px solid;
+ border:0px solid;
margin-bottom:3px;
}
.rich-ordering-control-top {
@@ -164,31 +170,28 @@
margin-bottom:3px;
}
-.rich-ordering-control-disabled {
- border:1px solid;
- margin-bottom:3px;
-}
-
.rich-ordering-list-button {
- background-color:#E3DED5;
- background-repeat: repeat-x;
background-attachment: scroll;
color:#000000;
font-family:Arial,Verdana,sans-serif;
font-size:11px;
cursor: pointer;
+ border-width:0px;
}
-a.rich-ordering-list-button-selection:visited, a.rich-ordering-list-button-selection:link, a.rich-ordering-list-button-a-disabled:visited, a.rich-ordering-list-button-a-disabled:link {
- text-decoration:none;
-}
.rich-ordering-list-button-content {
padding:0pt 4px 0pt 1px;
font-size:11px;
text-align:left;
white-space:nowrap;
+ border-width:0px;
}
+a.rich-ordering-list-button-selection:visited, a.rich-ordering-list-button-selection:link, a.rich-ordering-list-button-a-disabled:visited, a.rich-ordering-list-button-a-disabled:link {
+ text-decoration:none;
+}
+
+
.rich-ordering-list-button-content img {
margin-right:2px;
vertical-align:middle;
@@ -204,28 +207,34 @@
background-color:#FFFFFF;
border-color:#C0C0C0;
border-width:1px;
+ width: 100%;
}
-.rich-ordering-list-header {
+.rich-ordering-list-content {
overflow:hidden;
width:100%;
}
-
-.rich-ordering-list-content {
+.rich-ordering-list-header {
overflow:hidden;
width:100%;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ text-align: center;
}
.rich-ordering-list-footer {
overflow:hidden;
width:100%;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ text-align: center;
}
.rich-ordering-list-table-header {
}
-.rich-ordering-list-table-header-cell, .rich-ordering-list-table-header-cell-last {
+.rich-ordering-list-table-header-cell{
background-color: #E3DED5;
background-repeat: repeat-x;
background-attachment: scroll;
@@ -239,10 +248,26 @@
text-align: center;
}
-.rich-ordering-list-table-header-cell-last {
- border-right-width:0pt;
+
+.rich-ordering-list-table-footer {
+
}
+.rich-ordering-list-table-footer-cell{
+ background-color: #E3DED5;
+ background-repeat: repeat-x;
+ background-attachment: scroll;
+ border-bottom-color:#C4C0C9;
+ border-bottom-width:1px;
+ border-right-color:#C4C0C9;
+ border-right-width:1px;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ text-align: center;
+
+}
+
.rich-ordering-list-items {
width:100%;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-23 15:29:57 UTC (rev 5910)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-01-23 15:54:13 UTC (rev 5911)
@@ -27,7 +27,11 @@
public class RichFacesOrderingList extends VpeAbstractTemplate {
final static String DEFAULT_LIST_HEIGHT = "150px";
- final static String DEFAULT_LIST_WIDTH = "250px";
+ final static String DEFAULT_LIST_WIDTH = "300px";
+// final static String DEFAULT_LIST_HEIGHT = "100%";
+// final static String DEFAULT_LIST_WIDTH = "100%";
+// final static String DEFAULT_LIST_HEIGHT = "150px";
+// final static String DEFAULT_LIST_WIDTH = "250px";
final static String DEFAULT_HEIGHT = "200px";
final static String DEFAULT_WIDTH = "300px";
@@ -82,7 +86,43 @@
private static final String SHOW_BUTTON_LABELS = "showButtonLabels";
private static final String FAST_ORDER_CONTROL_VISIBLE = "fastOrderControlsVisible";
private static final String ORDER_CONTROL_VISIBLE = "orderControlsVisible";
+
+ private static final String LIST_CLASS = "listClass";
+ private static final String CONTROLS_CLASS = "controlsClass";
+ private static final String TOP_CONTROL_CLASS = "topControlClass";
+ private static final String UP_CONTROL_CLASS = "upControlClass";
+ private static final String DOWN_CONTROL_CLASS = "downControlClass";
+ private static final String BOTTOM_CONTROL_CLASS = "bottomControlClass";
+ private static final String ROW_CLASSES = "rowClasses";
+
+
+ private static final String CSS_CAPTION_CLASS = "rich-ordering-list-caption";
+
+ private static final String CSS_CONTROLS_CLASS = "rich-ordering-controls";
+ private static final String CSS_TOP_CONTROL_CLASS = "rich-ordering-control-top";
+ private static final String CSS_BUTTON_LAYOUT_CLASS = "rich-ordering-list-button-layout";
+ private static final String CSS_UP_CONTROL_CLASS = "rich-ordering-control-up";
+ private static final String CSS_DOWN_CONTROL_CLASS = "rich-ordering-control-down";
+ private static final String CSS_BOTTOM_CONTROL_CLASS = "rich-ordering-control-bottom";
+ private static final String CSS_BUTTON_CLASS = "rich-ordering-list-button";
+ private static final String CSS_BUTTON_SELECTION_CLASS = "rich-ordering-list-button-selection";
+ private static final String CSS_BUTTON_CONTENT_CLASS = "rich-ordering-list-button-content";
+ private static final String CSS_BUTTON_VALIGN_CLASS = "rich-ordering-list-button-valign";
+ private static final String CSS_HEADER_CLASS = "rich-ordering-list-header";
+ private static final String CSS_TABLE_HEADER_CLASS = "rich-ordering-list-table-header";
+ private static final String CSS_TABLE_HEADER_CELL_CLASS = "rich-ordering-list-table-header-cell";
+ private static final String CSS_FOOTER_CLASS = "rich-ordering-list-footer";
+ private static final String CSS_TABLE_FOOTER_CLASS = "rich-ordering-list-table-footer";
+ private static final String CSS_TABLE_FOOTER_CELL_CLASS = "rich-ordering-list-table-footer-cell";
+
+ private static final String CSS_LIST_BODY_CLASS = "rich-ordering-list-body";
+ private static final String CSS_LIST_OUTPUT_CLASS = "rich-ordering-list-output";
+ private static final String CSS_LIST_CONTENT_CLASS = "rich-ordering-list-content";
+ private static final String CSS_LIST_ITEMS_CLASS = "rich-ordering-list-items";
+ private static final String CSS_LIST_ROW_CLASS = "rich-ordering-list-row";
+ private static final String CSS_LIST_CELL_CLASS = "rich-ordering-list-cell";
+
/*
* (non-Javadoc)
*
@@ -94,61 +134,64 @@
Element sourceElement = (Element) sourceNode;
- String listWidth = sourceElement.getAttribute(LIST_WIDTH);
- String listHeight = sourceElement.getAttribute(LIST_HEIGHT);
String width = sourceElement.getAttribute(WIDTH);
String height = sourceElement.getAttribute(HEIGHT);
+ String listWidth = sourceElement.getAttribute(LIST_WIDTH);
+ String listHeight = sourceElement.getAttribute(LIST_HEIGHT);
- String controlsType = sourceElement
- .getAttribute(CONTROLS_TYPE);
- String controlsHorizontalAlign = sourceElement
- .getAttribute(CONTROLS_HORIZONTAL_ALIGN);
- String controlsVerticalAlign = sourceElement
- .getAttribute(CONTROLS_VERTICAL_ALIGN);
+ String controlsClass = sourceElement.getAttribute(CONTROLS_CLASS);
+
+ String controlsType = sourceElement.getAttribute(CONTROLS_TYPE);
+ String controlsHorizontalAlign = sourceElement.getAttribute(CONTROLS_HORIZONTAL_ALIGN);
+ String controlsVerticalAlign = sourceElement.getAttribute(CONTROLS_VERTICAL_ALIGN);
String captionLabel = sourceElement.getAttribute(CAPTION_LABEL);
// --------------------- COMMON TABLE ------------------------
+
+ ComponentUtil.setCSSLink(pageContext, "orderingList/orderingList.css",
+ "richFacesOrderingList");
+
nsIDOMElement tableCommon = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
VpeCreationData creationData = new VpeCreationData(tableCommon);
-
+/*
nsIDOMElement captionRow = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ */
nsIDOMElement dataRow = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
- tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, (width == null ? DEFAULT_WIDTH : width));
- tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, (height == null ? DEFAULT_HEIGHT : height));
+ tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH, (listWidth == null ? DEFAULT_LIST_WIDTH : width));
+ tableCommon.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT, (listHeight == null ? DEFAULT_LIST_HEIGHT : height));
-
- tableCommon.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-body");
- tableCommon.appendChild(captionRow);
+ tableCommon.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_BODY_CLASS);
+ //tableCommon.appendChild(captionRow);
tableCommon.appendChild(dataRow);
// ---------------------row1------------------------
+ /*
nsIDOMElement captionRow_TD = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
captionRow.appendChild(captionRow_TD);
-
+*/
nsIDOMElement captionRow_TD_DIV = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- captionRow_TD_DIV.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-caption");
+ captionRow_TD_DIV.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CAPTION_CLASS);
captionRow_TD_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- /*STYLE_FOR_CAPTOION_LABEL +*/ "width: "
- + (listWidth == null ? DEFAULT_LIST_WIDTH : listWidth)
- + "px");
+ "width: " + (listWidth == null ? DEFAULT_LIST_WIDTH : listWidth) + "px;"
+ +"height: " + (listHeight == null ? DEFAULT_LIST_WIDTH : listHeight) + "px;");
Element captionFacet = ComponentUtil.getFacet(sourceElement, CAPTION_FACET);
if (null != captionFacet) {
// Creating table caption with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(captionFacet, false, creationData, visualDocument);
+ nsIDOMElement fecetDiv = encodeFacetsToDiv(captionFacet, false, CSS_CAPTION_CLASS, null, creationData, visualDocument);
captionRow_TD_DIV.appendChild(fecetDiv);
} else {
captionRow_TD_DIV.appendChild(visualDocument.createTextNode(captionLabel));
}
- captionRow_TD.appendChild(captionRow_TD_DIV);
+ //captionRow_TD.appendChild(captionRow_TD_DIV);
// ---------------------row2 ---- with list table and buttons------------------------
nsIDOMElement dataRow_leftTD = visualDocument
@@ -174,7 +217,7 @@
// ---------------------buttons------------------------
if (!"none".equalsIgnoreCase(controlsType)) {
nsIDOMElement controlsDiv = createControlsDiv(creationData, visualDocument, sourceElement);
- buttonsTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-valign");
+ buttonsTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CONTROLS_CLASS + CSS_BUTTON_VALIGN_CLASS + controlsClass);
buttonsTD.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, "center");
buttonsTD.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN, ("center"
.equalsIgnoreCase(controlsVerticalAlign) ? "middle"
@@ -184,24 +227,35 @@
// --------------------------------------------
// ---------------------listTable------------------------
- tableListTD.appendChild(createListDiv(visualDocument, sourceElement, creationData, pageContext));
+ nsIDOMElement listDiv = createListTableDiv(visualDocument, sourceElement, creationData, pageContext);
+ //tableListTD.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_OUTPUT_CLASS);
+ tableListTD.appendChild(captionRow_TD_DIV);
+ tableListTD.appendChild(listDiv);
// --------------------------------------------
return creationData;
}
- private nsIDOMElement createListDiv(nsIDOMDocument visualDocument,
+ private nsIDOMElement createListTableDiv(nsIDOMDocument visualDocument,
Element sourceElement, VpeCreationData creationData, VpePageContext pageContext) {
+
+ nsIDOMElement listOutputDiv = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+
nsIDOMElement listTable = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
nsIDOMElement tr1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
nsIDOMElement tr2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
-
+
+ //listOutputDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_OUTPUT_CLASS);
+ listOutputDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "overflow:hidden;width:100%;");
+ //listTable.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_CONTENT_CLASS);
listTable.appendChild(tr1);
listTable.appendChild(tr2);
-
+ listOutputDiv.appendChild(listTable);
+
// ---------------------tr1------------------------
nsIDOMElement tr1_TD1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
@@ -232,42 +286,36 @@
// --------------------------------------------
- ComponentUtil.setCSSLink(pageContext, "orderingList/orderingList.css",
- "richFacesOrderingList");
- nsIDOMElement contentDiv = createOutputList(creationData, visualDocument,
+ nsIDOMElement contentDiv = createResultList(creationData, visualDocument,
sourceElement);
tr1_TD1.appendChild(contentDiv);
- return listTable;
+ //return listTable;
+ return listOutputDiv;
}
private nsIDOMElement createControlsDiv( VpeCreationData creationData, nsIDOMDocument visualDocument,
Element sourceElement) {
+ String topControlClass = sourceElement.getAttribute(TOP_CONTROL_CLASS);
+ String upControlClass = sourceElement.getAttribute(UP_CONTROL_CLASS);
+ String downControlClass = sourceElement.getAttribute(DOWN_CONTROL_CLASS);
+ String bottomControlClass = sourceElement.getAttribute(BOTTOM_CONTROL_CLASS);
+
String topControlLabel = sourceElement.getAttribute(TOP_CONTROL_LABEL);
String upControlLabel = sourceElement.getAttribute(UP_CONTROL_LABEL);
- String downControlLabel = sourceElement
- .getAttribute(DOWN_CONTROL_LABEL);
- String bottomControlLabel = sourceElement
- .getAttribute(BOTTOM_CONTROL_LABEL);
+ String downControlLabel = sourceElement.getAttribute(DOWN_CONTROL_LABEL);
+ String bottomControlLabel = sourceElement.getAttribute(BOTTOM_CONTROL_LABEL);
- String showButtonLabelsStr = sourceElement
- .getAttribute(SHOW_BUTTON_LABELS);
- String fastOrderControlsVisibleStr = sourceElement
- .getAttribute(FAST_ORDER_CONTROL_VISIBLE);
- String orderControlsVisibleStr = sourceElement
- .getAttribute(ORDER_CONTROL_VISIBLE);
- boolean showButtonLabels = ComponentUtil
- .string2boolean(showButtonLabelsStr);
- boolean fastOrderControlsVisible = ComponentUtil
- .string2boolean(fastOrderControlsVisibleStr);
- boolean orderControlsVisible = ComponentUtil
- .string2boolean(orderControlsVisibleStr);
+ String showButtonLabelsStr = sourceElement.getAttribute(SHOW_BUTTON_LABELS);
+ String fastOrderControlsVisibleStr = sourceElement.getAttribute(FAST_ORDER_CONTROL_VISIBLE);
+ String orderControlsVisibleStr = sourceElement.getAttribute(ORDER_CONTROL_VISIBLE);
+ boolean showButtonLabels = ComponentUtil.string2boolean(showButtonLabelsStr);
+ boolean fastOrderControlsVisible = ComponentUtil.string2boolean(fastOrderControlsVisibleStr);
+ boolean orderControlsVisible = ComponentUtil.string2boolean(orderControlsVisibleStr);
- nsIDOMElement buttonsDiv = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- buttonsDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-button-layout");
+ nsIDOMElement buttonsDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ buttonsDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CONTROLS_CLASS + " " + CSS_BUTTON_LAYOUT_CLASS);
Element top_control_facet = ComponentUtil.getFacet(sourceElement, TOP_CONTROL_FACET);
Element up_control_facet = ComponentUtil.getFacet(sourceElement, UP_CONTROL_FACET);
@@ -275,31 +323,31 @@
Element bottom_control_facet = ComponentUtil.getFacet(sourceElement, BOTTOM_CONTROL_FACET);
if (fastOrderControlsVisible) {
- nsIDOMElement btnTopDiv = createButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnTopDiv = createSingleButtonDiv(creationData, visualDocument,
(null == topControlLabel ? TOP_CONTROL_LABEL_DEFAULT
: topControlLabel), TOP_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue(), top_control_facet);
+ showButtonLabels).booleanValue(), top_control_facet, CSS_TOP_CONTROL_CLASS, topControlClass);
buttonsDiv.appendChild(btnTopDiv);
}
if (orderControlsVisible) {
- nsIDOMElement btnUpDiv = createButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnUpDiv = createSingleButtonDiv(creationData, visualDocument,
(null == upControlLabel ? UP_CONTROL_LABEL_DEFAULT
: upControlLabel), UP_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue(), up_control_facet);
- nsIDOMElement btnDownDiv = createButtonDiv(creationData, visualDocument,
+ showButtonLabels).booleanValue(), up_control_facet, CSS_UP_CONTROL_CLASS, upControlClass);
+ nsIDOMElement btnDownDiv = createSingleButtonDiv(creationData, visualDocument,
(null == downControlLabel ? DOWN_CONTROL_LABEL_DEFAULT
: downControlLabel), DOWN_CONTROL_IMG, new Boolean(
- showButtonLabels).booleanValue(), down_control_facet);
+ showButtonLabels).booleanValue(), down_control_facet, CSS_DOWN_CONTROL_CLASS, downControlClass);
buttonsDiv.appendChild(btnUpDiv);
buttonsDiv.appendChild(btnDownDiv);
}
if (fastOrderControlsVisible) {
- nsIDOMElement btnBottomDiv = createButtonDiv(creationData, visualDocument,
+ nsIDOMElement btnBottomDiv = createSingleButtonDiv(creationData, visualDocument,
(null == bottomControlLabel ? BOTTOM_CONTROL_LABEL_DEFAULT
: bottomControlLabel), BOTTOM_CONTROL_IMG,
- new Boolean(showButtonLabels).booleanValue(), bottom_control_facet);
+ new Boolean(showButtonLabels).booleanValue(), bottom_control_facet, CSS_BOTTOM_CONTROL_CLASS, bottomControlClass);
buttonsDiv.appendChild(btnBottomDiv);
}
@@ -320,8 +368,10 @@
*
* @return the button
*/
- private nsIDOMElement createButtonDiv(VpeCreationData creationData, nsIDOMDocument visualDocument,
- String btnName, String imgName, boolean showButtonLabels, Element buttonFacet) {
+ private nsIDOMElement createSingleButtonDiv(VpeCreationData creationData,
+ nsIDOMDocument visualDocument, String btnName, String imgName,
+ boolean showButtonLabels, Element buttonFacet, String cssStyleName,
+ String customStyleClass) {
nsIDOMElement div1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -334,11 +384,11 @@
nsIDOMElement img = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-controls");
- div2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button");
+ div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-buttons-border");
+ div2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CLASS);
- a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-selection");
- div3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "rich-ordering-list-button-content");
+ a.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_SELECTION_CLASS);
+ div3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CONTENT_CLASS + " " + cssStyleName + " " + customStyleClass);
String resourceFolder = RichFacesTemplatesActivator.getPluginResourcePath();
String divStyle = "background-image: url(file://" + resourceFolder + BUTTON_BG + ");";
@@ -347,7 +397,7 @@
if (null != buttonFacet) {
// Creating button with facet content
- nsIDOMElement fecetDiv = encodeFacetsToDiv(buttonFacet, true, creationData, visualDocument);;
+ nsIDOMElement fecetDiv = encodeFacetsToDiv(buttonFacet, true, cssStyleName, customStyleClass, creationData, visualDocument);
div2.appendChild(fecetDiv);
} else {
div2.appendChild(a);
@@ -365,10 +415,12 @@
}
- private nsIDOMElement createOutputList(VpeCreationData creationData, nsIDOMDocument visualDocument,
+ private nsIDOMElement createResultList(VpeCreationData creationData, nsIDOMDocument visualDocument,
Element sourceElement) {
+ /*
nsIDOMElement outputDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ */
nsIDOMElement contentDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -391,19 +443,20 @@
if (header != null || !columnsHeaders.isEmpty()) {
String headerClass = (String) sourceElement
.getAttribute(HEADER_CLASS);
+ /*
if (header != null) {
encodeTableHeaderOrFooterFacet(creationData, thead,
columnsLength, visualDocument, header,
- "dr-table-header rich-ordering-list-table-header",
- "dr-table-header-continue rich-ordering-list-header-continue",
- "dr-table-headercell rich-ordering-list-table-header-cell",
+ CSS_HEADER_CLASS,
+ CSS_HEADER_CLASS,
headerClass, HtmlComponentUtil.HTML_TAG_TD);
}
+ */
if (!columnsHeaders.isEmpty()) {
nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
thead.appendChild(tr);
String styleClass = encodeStyleClass(null,
- "dr-table-subheader rich-table-subheader", null,
+ CSS_TABLE_HEADER_CLASS + " " + CSS_TABLE_HEADER_CELL_CLASS, null,
headerClass);
if (styleClass != null) {
tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
@@ -411,13 +464,14 @@
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
columnsHeaders,
- "rich-ordering-list-table-header rich-ordering-list-table-header-cell",
+ CSS_TABLE_HEADER_CLASS + " " + CSS_TABLE_HEADER_CELL_CLASS,
headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
}
}
// ---------- FOOTER -----------
// Encode Footer
+ /*
Element footer = ComponentUtil.getFacet(sourceElement, FOOTER);
ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
if (footer != null || !columnsFooters.isEmpty()) {
@@ -428,7 +482,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_TR);
tfoot.appendChild(tr);
String styleClass = encodeStyleClass(null,
- "dr-table-subfooter rich-table-subfooter", null,
+ CSS_TABLE_HEADER_CLASS + " " + CSS_TABLE_HEADER_CELL_CLASS, null,
footerClass);
if (styleClass != null) {
tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
@@ -436,23 +490,26 @@
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
columnsFooters,
- "rich-ordering-list-table-header rich-ordering-list-table-header-cell",
+ CSS_TABLE_FOOTER_CLASS + " " + CSS_TABLE_FOOTER_CELL_CLASS,
footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
}
+
if (footer != null) {
encodeTableHeaderOrFooterFacet(creationData, tfoot,
columnsLength, visualDocument, footer,
- "dr-table-footer rich-ordering-list-table-header",
- "dr-table-footer-continue rich-table-footer-continue",
- "dr-table-footercell rich-ordering-list-table-header-cell",
+ CSS_FOOTER_CLASS,
+ CSS_HEADER_CLASS,
footerClass, HtmlComponentUtil.HTML_TAG_TD);
}
+
}
-
+ */
// ---------- CONTENT -----------
String listWidth = sourceElement.getAttribute(LIST_WIDTH);
String listHeight = sourceElement.getAttribute(LIST_HEIGHT);
+ String listClass = sourceElement.getAttribute(LIST_CLASS);
+ String rowClasses = sourceElement.getAttribute(ROW_CLASSES);
String divStyle = HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ (listWidth == null ? DEFAULT_LIST_WIDTH : listWidth) + ";"
@@ -461,21 +518,10 @@
contentDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
- /*
- // Encode colgroup definition.
- nsIDOMElement colgroup = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_COLGROUP);
- colgroup.setAttribute(HtmlComponentUtil.HTML_TAG_SPAN, String
- .valueOf(columnsLength));
- table.appendChild(colgroup);
-
- // Encode Caption
- encodeCaption(creationData, sourceElement, visualDocument, table);
- */
contentDiv.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-content");
+ CSS_LIST_OUTPUT_CLASS + " " + CSS_LIST_CONTENT_CLASS);
contentTable.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-items");
+ CSS_LIST_ITEMS_CLASS + listClass);
ComponentUtil.copyAttributes(sourceElement, contentTable);
contentTable.removeAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
@@ -485,8 +531,7 @@
for (int i = 0; i < NUM_ROW; i++) {
List<Node> children = ComponentUtil.getChildren(sourceElement);
nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-row");
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_LIST_ROW_CLASS + rowClasses);
VpeChildrenInfo trInfo = new VpeChildrenInfo(tr);
tbody.appendChild(tr);
creationData.addChildrenInfo(trInfo);
@@ -519,14 +564,18 @@
// ---------- FINILAZING -----------
contentTable.appendChild(thead);
contentTable.appendChild(tbody);
- contentTable.appendChild(tfoot);
+ //contentTable.appendChild(tfoot);
contentDiv.appendChild(contentTable);
- outputDiv.appendChild(contentDiv);
+ //outputDiv.appendChild(contentDiv);
- return outputDiv;
+ return contentDiv;
+ //return outputDiv;
}
- protected nsIDOMElement encodeFacetsToDiv(Element facetBody, boolean isControlFacet, VpeCreationData creationData, nsIDOMDocument visualDocument) {
+ protected nsIDOMElement encodeFacetsToDiv(Element facetBody,
+ boolean isControlFacet, String cssStyleName,
+ String customStyleClass, VpeCreationData creationData,
+ nsIDOMDocument visualDocument) {
nsIDOMElement fecetDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
nsIDOMElement table = visualDocument
@@ -557,12 +606,18 @@
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
creationData.addChildrenInfo(child);
+
+ if (isControlFacet) {
+ tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CLASS);
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_BUTTON_CONTENT_CLASS + " " + cssStyleName + " " + customStyleClass);
+ }
+
}
if (isControlFacet) {
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-default-control-button-text rich-ordering-list-button-content");
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CONTROLS_CLASS + " " + CSS_BUTTON_CONTENT_CLASS);
} else {
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-default-caption-text rich-ordering-list-caption");
+ table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, CSS_CAPTION_CLASS);
}
table.appendChild(tbody);
@@ -586,8 +641,8 @@
protected void encodeTableHeaderOrFooterFacet(VpeCreationData creationData,
nsIDOMElement parentTheadOrTfood, int columns,
nsIDOMDocument visualDocument, Element facetBody,
- String skinFirstRowClass, String skinRowClass,
- String skinCellClass, String facetBodyClass, String element) {
+ String skinFirstRowClass, String skinCellClass,
+ String facetBodyClass, String element) {
boolean isColumnGroup = facetBody.getNodeName()
.endsWith(":columnGroup");
boolean isSubTable = facetBody.getNodeName().endsWith(":subTable");
@@ -664,7 +719,7 @@
String div1Style = "background-image: url(file://" + resourceFolder
+ HEADER_CELL_BG + ");";
div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-table-header-cell");
+ styleClass);
div1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, div1Style);
td.appendChild(div1);
@@ -682,98 +737,8 @@
}
}
-
/**
*
- * @param creationData
- * @param sourceElement
- * @param visualDocument
- * @param table
- */
- protected void encodeCaption(VpeCreationData creationData,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement table) {
- // Encode caption
- Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
- HtmlComponentUtil.HTML_TAG_CAPTION);
- if (captionFromFacet != null) {
- String captionClass = (String) table.getAttribute(CAPTION_CLASS);
- String captionStyle = (String) table.getAttribute(CAPTION_STYLE);
-
- nsIDOMElement caption = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_CAPTION);
- table.appendChild(caption);
- if (captionClass != null && captionClass.length() > 0) {
- captionClass = "dr-table-caption rich-table-caption "
- + captionClass;
- } else {
- captionClass = "dr-table-caption rich-table-caption";
- }
- caption.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- captionClass);
- if (captionStyle != null && captionStyle.length() > 0) {
- caption.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- captionStyle);
- }
-
- VpeChildrenInfo cap = new VpeChildrenInfo(caption);
- cap.addSourceChild(captionFromFacet);
- creationData.addChildrenInfo(cap);
- }
-
- }
-
- /**
- *
- * @param creationData
- * @param parentTr
- * @param visualDocument
- * @param headersOrFooters
- * @param skinCellClass
- * @param headerClass
- * @param facetName
- * @param element
- */
- public static void encodeHeaderFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument,
- ArrayList<Element> headersOrFooters, String skinCellClass,
- String headerClass, String facetName, String element) {
- for (Element column : headersOrFooters) {
- String classAttribute = facetName + "Class";
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(element);
- parentTr.appendChild(td);
- String styleClass = encodeStyleClass(null, skinCellClass,
- headerClass, columnHeaderClass);
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
-
- nsIDOMElement div1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- String resourceFolder = RichFacesTemplatesActivator
- .getPluginResourcePath();
- String div1Style = "background-image: url(file://" + resourceFolder
- + HEADER_CELL_BG + ");";
- div1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-ordering-list-table-header-cell");
- div1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, div1Style);
- td.appendChild(div1);
-
- td.setAttribute("scop", "col");
- String colspan = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, facetName);
-
- VpeChildrenInfo child = new VpeChildrenInfo(div1);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- }
- }
-
- /**
- *
* @param parentSourceElement
* @return list of columns
*/
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-23 15:29:57 UTC (rev 5910)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-01-23 15:54:13 UTC (rev 5911)
@@ -348,8 +348,8 @@
<vpe:tag name="rich:orderingList" case-sensitive="yes">
<vpe:template children="yes" modify="no" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesOrderingList">
<vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
+ <vpe:width width-attr="listWidth" />
+ <vpe:height height-attr="listHeight" />
</vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
18 years, 2 months
JBoss Tools SVN: r5910 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-01-23 10:29:57 -0500 (Wed, 23 Jan 2008)
New Revision: 5910
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1209
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-01-23 14:48:17 UTC (rev 5909)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-01-23 15:29:57 UTC (rev 5910)
@@ -364,7 +364,12 @@
if(sourceNode.getNodeType()!=Node.TEXT_NODE) {
sourceBuilder.setSelection(sourceNode, 0, 0);
} else if(sourceNode.getNodeType()==Node.TEXT_NODE) {
- sourceBuilder.setSelection(sourceNode, 1, 0);
+ try{
+ IndexedRegion region = (IndexedRegion)sourceNode;
+ sourceBuilder.setSelection(sourceNode, 0, region.getLength());
+ }catch(Exception ex){
+ VpePlugin.reportProblem(ex);
+ }
}
return sourceNode;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2008-01-23 14:48:17 UTC (rev 5909)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2008-01-23 15:29:57 UTC (rev 5910)
@@ -17,6 +17,7 @@
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.TextSelection;
import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jst.jsp.core.internal.domdocument.TextImplForJSP;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
@@ -28,6 +29,7 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
@@ -313,9 +315,18 @@
// info.setSourceCommentValue(pageContext, (Comment)sourceParent);
// }
//Added by Max Areshkau in scope of bug JBIDE-1209
- } else if (sourceParent.getNodeType()==Node.TEXT_NODE) {
-
- setSelection(sourceParent, offset, length);
+ } else if (sourceParent instanceof TextImplForJSP) {
+ try{
+ IndexedRegion region = (IndexedRegion)sourceParent;
+ String text = sourceParent.getNodeValue();
+ int start= TextUtil.sourcePosition(text, visualText.getNodeValue(), offset);
+ int end =TextUtil.sourcePosition(text, visualText.getNodeValue(), offset+length);
+ offset=start;
+ length=end-start;
+ }catch(Exception ex){
+ VpePlugin.reportProblem(ex);
+ }
+ setSelection(sourceParent, offset, length);
}
}
}
18 years, 2 months
JBoss Tools SVN: r5909 - in trunk/jst/tests/org.jboss.tools.jst.jsp.test: projects/StrutsJbide1648Test and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-01-23 09:48:17 -0500 (Wed, 23 Jan 2008)
New Revision: 5909
Added:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.classpath
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.project
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.jsp
trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.xhtml
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspTestUtil.java
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1648 Content Assist falls with NullPointerException
JUnit Test Case is added
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.classpath
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.classpath (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.classpath 2008-01-23 14:48:17 UTC (rev 5909)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_07"/>
+ <classpathentry kind="con" path="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeInitializer/JBoss 4.2 Runtime"/>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.project
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.project (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.project 2008-01-23 14:48:17 UTC (rev 5909)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>StrutsJbide1648Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.struts.strutsnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.jsp
===================================================================
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.xhtml
===================================================================
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/projects/StrutsJbide1648Test/WebContent/pages/a.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java 2008-01-23 12:51:01 UTC (rev 5908)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java 2008-01-23 14:48:17 UTC (rev 5909)
@@ -1,6 +1,7 @@
package org.jboss.tools.jst.jsp.test;
import org.jboss.tools.jst.jsp.test.ca.JstJspJbide1585Test;
+import org.jboss.tools.jst.jsp.test.ca.StrutsJspJbide1648Test;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -10,6 +11,7 @@
public static Test suite() {
TestSuite suite = new TestSuite("Test for org.jboss.tools.jst.jsp.test");
suite.addTestSuite(JstJspJbide1585Test.class);
+ suite.addTestSuite(StrutsJspJbide1648Test.class);
return suite;
}
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspTestUtil.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspTestUtil.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspTestUtil.java 2008-01-23 14:48:17 UTC (rev 5909)
@@ -0,0 +1,64 @@
+package org.jboss.tools.jst.jsp.test;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension;
+import org.eclipse.swt.widgets.Display;
+
+public class JstJspTestUtil {
+
+
+ /**
+ * Returns the CA Processor from content assistant for the given offset in the document.
+ *
+ *
+ * @param viewer
+ * @param offset
+ * @param ca
+ */
+
+ public static IContentAssistProcessor getProcessor(ITextViewer viewer, int offset, IContentAssistant ca) {
+ try {
+ IDocument document= viewer.getDocument();
+ String type= TextUtilities.getContentType(document, ((IContentAssistantExtension)ca).getDocumentPartitioning(), offset, true);
+ return ca.getContentAssistProcessor(type);
+ } catch (BadLocationException x) {
+ }
+
+ return null;
+ }
+
+ /**
+ * Process UI input but do not return for the specified time interval.
+ *
+ * @param waitTimeMillis
+ * the number of milliseconds
+ */
+ public static void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+
+ // If this is the UI thread,
+ // then process input.
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+
+}
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspTestUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java 2008-01-23 12:51:01 UTC (rev 5908)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/JstJspJbide1585Test.java 2008-01-23 14:48:17 UTC (rev 5909)
@@ -26,6 +26,7 @@
import org.jboss.tools.jst.jsp.contentassist.RedHatCustomCompletionProposal;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.jst.jsp.test.JstJspTestUtil;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
import junit.framework.Test;
@@ -102,7 +103,7 @@
e.printStackTrace();
assertTrue("Waiting for the jobs to complete has failed.", false);
}
- delay(3000);
+ JstJspTestUtil.delay(3000);
JSPTextEditor jspTextEditor = jspEditor.getJspEditor();
StructuredTextViewer viewer = jspTextEditor.getTextViewer();
@@ -125,7 +126,7 @@
ICompletionProposal[] result= null;
String errorMessage = null;
- IContentAssistProcessor p= getProcessor(viewer, offsetToTest, contentAssistant);
+ IContentAssistProcessor p= JstJspTestUtil.getProcessor(viewer, offsetToTest, contentAssistant);
if (p != null) {
try {
result= p.computeCompletionProposals(viewer, offsetToTest);
@@ -160,44 +161,4 @@
.closeEditor(editorPart, false);
}
- private IContentAssistProcessor getProcessor(ITextViewer viewer, int offset, IContentAssistant ca) {
- try {
- IDocument document= viewer.getDocument();
- String type= TextUtilities.getContentType(document, ((IContentAssistantExtension)ca).getDocumentPartitioning(), offset, true);
-
- return ca.getContentAssistProcessor(type);
- } catch (BadLocationException x) {
- }
-
- return null;
- }
-
- /**
- * Process UI input but do not return for the specified time interval.
- *
- * @param waitTimeMillis
- * the number of milliseconds
- */
- protected void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
-
- // If this is the UI thread,
- // then process input.
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while (System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.update();
- }
- // Otherwise, perform a simple sleep.
- else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored.
- }
- }
- }
}
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java 2008-01-23 14:48:17 UTC (rev 5909)
@@ -0,0 +1,136 @@
+package org.jboss.tools.jst.jsp.test.ca;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.jst.jsp.contentassist.RedHatCustomCompletionProposal;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.jst.jsp.test.JstJspTestUtil;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class StrutsJspJbide1648Test extends TestCase {
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "StrutsJbide1648Test";
+ private static final String[] PAGE_NAMES = {
+ "/WebContent/pages/a.jsp",
+ "/WebContent/pages/a.xhtml"
+ };
+
+ public static Test suite() {
+ return new TestSuite(StrutsJspJbide1648Test.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.jst.jsp.test", null, PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ Throwable exception = null;
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ public void testStrutsJspJbide1648() {
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+
+ for (int i = 0; i < PAGE_NAMES.length; i++) {
+ doTestOnPage(PAGE_NAMES[i]);
+ }
+
+ }
+
+ private void doTestOnPage(String pageName) {
+ IFile jspFile = project.getFile(pageName);
+
+ assertTrue("The file \"" + pageName + "\" is not found", (jspFile != null));
+ assertTrue("The file \"" + pageName + "\" is not found", (jspFile.exists()));
+
+ FileEditorInput editorInput = new FileEditorInput(jspFile);
+ Throwable exception = null;
+ IEditorPart editorPart = null;
+ try {
+ editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput, "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor");
+ } catch (PartInitException ex) {
+ exception = ex;
+ ex.printStackTrace();
+ assertTrue("The JSP Visual Editor couln'd be initialized.", false);
+ }
+
+ JSPMultiPageEditor jspEditor = null;
+
+ if (editorPart instanceof JSPMultiPageEditor)
+ jspEditor = (JSPMultiPageEditor)editorPart;
+
+ // Delay for 3 seconds so that
+ // the Favorites view can be seen.
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.", false);
+ }
+ JstJspTestUtil.delay(3000);
+
+ JSPTextEditor jspTextEditor = jspEditor.getJspEditor();
+ StructuredTextViewer viewer = jspTextEditor.getTextViewer();
+ IDocument document = viewer.getDocument();
+ IContentAssistant contentAssistant = jspTextEditor.getSVConfiguration().getContentAssistant(viewer);
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ try {
+ IContentAssistProcessor p= JstJspTestUtil.getProcessor(viewer, 0, contentAssistant);
+ if (p != null) {
+ result= p.computeCompletionProposals(viewer, 0);
+ errorMessage= p.getErrorMessage();
+ }
+
+ // if (errorMessage != null && errorMessage.trim().length() > 0) {
+ // System.out.println("#" + offsetToTest + ": ERROR MESSAGE: " + errorMessage);
+ // }
+ } catch (Throwable x) {
+ x.printStackTrace();
+ if (x instanceof NullPointerException) {
+ assertTrue("Content Assistant failed with NullPointerException", false);
+ } else {
+ assertTrue("Content Assistant failed with exception: \n" + x.getLocalizedMessage(), false);
+ }
+ }
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeEditor(editorPart, false);
+
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/StrutsJspJbide1648Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
18 years, 2 months