JBoss Tools SVN: r5988 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-01-28 06:50:26 -0500 (Mon, 28 Jan 2008)
New Revision: 5988
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1684
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2008-01-28 09:22:14 UTC (rev 5987)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesMessageTemplate.java 2008-01-28 11:50:26 UTC (rev 5988)
@@ -29,486 +29,276 @@
*/
public class RichFacesMessageTemplate extends VpeAbstractTemplate {
- protected static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
- protected static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
- protected static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
- protected static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
+ private static String VALIDATION_MESSAGE = "Validation message";
- protected static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
- protected static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
- protected static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
+ protected static String PASSED_LABEL_ATTRIBUTE_NAME = "passedLabel";
+ protected static String LABEL_CLASS_ATTRIBUTE_NAME = "labelClass";
+ protected static String MARKER_CLASS_ATTRIBUTE_NAME = "markerClass";
+ protected static String MARKER_STYLE_ATTRIBUTE_NAME = "markerStyle";
- protected static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
- protected static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
- protected static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
+ protected static String ERROR_MARKER_CLASS_ATTRIBUTE_NAME = "errorMarkerClass";
+ protected static String ERROR_LABEL_CLASS_ATTRIBUTE_NAME = "errorLabelClass";
+ protected static String ERROR_CLASS_ATTRIBUTE_NAME = "errorClass";
- protected static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
- protected static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
- protected static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
+ protected static String FATAL_MARKER_CLASS_ATTRIBUTE_NAME = "fatalMarkerClass";
+ protected static String FATAL_LABEL_CLASS_ATTRIBUTE_NAME = "fatalLabelClass";
+ protected static String FATAL_CLASS_ATTRIBUTE_NAME = "fatalClass";
- protected static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
- protected static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
- protected static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
+ protected static String INFO_MARKER_CLASS_ATTRIBUTE_NAME = "infoMarkerClass";
+ protected static String INFO_LABEL_CLASS_ATTRIBUTE_NAME = "infoLabelClass";
+ protected static String INFO_CLASS_ATTRIBUTE_NAME = "infoClass";
- protected static String ERROR_MESSAGE = "Error message";
- protected static String FATAL_MESSAGE = "Fatal message";
- protected static String INFO_MESSAGE = "Info message";
- protected static String WARNING_MESSAGE = "Warning message";
+ protected static String WARN_MARKER_CLASS_ATTRIBUTE_NAME = "warnMarkerClass";
+ protected static String WARN_LABEL_CLASS_ATTRIBUTE_NAME = "warnLabelClass";
+ protected static String WARN_CLASS_ATTRIBUTE_NAME = "warnClass";
- protected String passedLabelValue;
- protected String labelClassValue;
- protected String markerClassValue;
- protected String markerStyleValue;
- protected String errorMarkerClassValue;
- protected String errorLabelClassValue;
- protected String errorClassValue;
- protected String fatalMarkerClassValue;
- protected String fatalLabelClassValue;
- protected String fatalClassValue;
- protected String infoMarkerClassValue;
- protected String infoLabelClassValue;
- protected String infoClassValue;
- protected String warnMarkerClassValue;
- protected String warnLabelClassValue;
- protected String warnClassValue;
- protected String styleValue;
- protected String styleClassValue;
+ protected static String ERROR_MESSAGE = "Error message";
+ protected static String FATAL_MESSAGE = "Fatal message";
+ protected static String INFO_MESSAGE = "Info message";
+ protected static String WARNING_MESSAGE = "Warning message";
- protected static String[] markers = { "passedMarker", "errorMarker",
- "fatalMarker", "infoMarker", "warnMarker" };
+ protected String passedLabelValue;
+ protected String labelClassValue;
+ protected String markerClassValue;
+ protected String markerStyleValue;
+ protected String errorMarkerClassValue;
+ protected String errorLabelClassValue;
+ protected String errorClassValue;
+ protected String fatalMarkerClassValue;
+ protected String fatalLabelClassValue;
+ protected String fatalClassValue;
+ protected String infoMarkerClassValue;
+ protected String infoLabelClassValue;
+ protected String infoClassValue;
+ protected String warnMarkerClassValue;
+ protected String warnLabelClassValue;
+ protected String warnClassValue;
+ protected String styleValue;
+ protected String styleClassValue;
- protected static String FACET_TAG_NAME = "f:facet";
+ protected static String[] markers = { "passedMarker", "errorMarker",
+ "fatalMarker", "infoMarker", "warnMarker" };
- protected static String NAME_ATTRIBUTE_NAME = "name";
+ protected static String FACET_TAG_NAME = "f:facet";
- private nsIDOMElement td1; // passed marker
- private nsIDOMElement td2; // passed label
+ protected static String NAME_ATTRIBUTE_NAME = "name";
- private nsIDOMElement tr2; // error message
- private nsIDOMElement td3; // error marker
- private nsIDOMElement td4; // error label
+ private nsIDOMElement td1; // passed marker
+ private nsIDOMElement td2; // passed label
+ private final static String MESSAGE_STYLE = "padding-left: 1px;padding-right: 1px;padding-top: 1px;padding-bottom: 1px";
+ protected VpeCreationData creationData;
- private nsIDOMElement tr3; // fatal message
- private nsIDOMElement td5; // fatal marker
- private nsIDOMElement td6; // fatal label
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
- private nsIDOMElement tr4; // info message
- private nsIDOMElement td7; // info marker
- private nsIDOMElement td8; // info label
+ passedLabelValue = ((Element) sourceNode)
+ .getAttribute(PASSED_LABEL_ATTRIBUTE_NAME);
+ labelClassValue = ((Element) sourceNode)
+ .getAttribute(LABEL_CLASS_ATTRIBUTE_NAME);
+ markerClassValue = ((Element) sourceNode)
+ .getAttribute(MARKER_CLASS_ATTRIBUTE_NAME);
+ markerStyleValue = ((Element) sourceNode)
+ .getAttribute(MARKER_STYLE_ATTRIBUTE_NAME);
- private nsIDOMElement tr5; // warn message
- private nsIDOMElement td9; // warn marker
- private nsIDOMElement td10; // warn label
+ errorMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_MARKER_CLASS_ATTRIBUTE_NAME);
+ errorLabelClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_LABEL_CLASS_ATTRIBUTE_NAME);
+ errorClassValue = ((Element) sourceNode)
+ .getAttribute(ERROR_CLASS_ATTRIBUTE_NAME);
- protected VpeCreationData creationData;
+ fatalMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_MARKER_CLASS_ATTRIBUTE_NAME);
+ fatalLabelClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_LABEL_CLASS_ATTRIBUTE_NAME);
+ fatalClassValue = ((Element) sourceNode)
+ .getAttribute(FATAL_CLASS_ATTRIBUTE_NAME);
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
+ infoMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_MARKER_CLASS_ATTRIBUTE_NAME);
+ infoLabelClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_LABEL_CLASS_ATTRIBUTE_NAME);
+ infoClassValue = ((Element) sourceNode)
+ .getAttribute(INFO_CLASS_ATTRIBUTE_NAME);
- passedLabelValue = ((Element) sourceNode)
- .getAttribute(PASSED_LABEL_ATTRIBUTE_NAME);
- labelClassValue = ((Element) sourceNode)
- .getAttribute(LABEL_CLASS_ATTRIBUTE_NAME);
- markerClassValue = ((Element) sourceNode)
- .getAttribute(MARKER_CLASS_ATTRIBUTE_NAME);
- markerStyleValue = ((Element) sourceNode)
- .getAttribute(MARKER_STYLE_ATTRIBUTE_NAME);
+ warnMarkerClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_MARKER_CLASS_ATTRIBUTE_NAME);
+ warnLabelClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_LABEL_CLASS_ATTRIBUTE_NAME);
+ warnClassValue = ((Element) sourceNode)
+ .getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
- errorMarkerClassValue = ((Element) sourceNode)
- .getAttribute(ERROR_MARKER_CLASS_ATTRIBUTE_NAME);
- errorLabelClassValue = ((Element) sourceNode)
- .getAttribute(ERROR_LABEL_CLASS_ATTRIBUTE_NAME);
- errorClassValue = ((Element) sourceNode)
- .getAttribute(ERROR_CLASS_ATTRIBUTE_NAME);
+ styleValue = ((Element) sourceNode)
+ .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ styleClassValue = ((Element) sourceNode)
+ .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
- fatalMarkerClassValue = ((Element) sourceNode)
- .getAttribute(FATAL_MARKER_CLASS_ATTRIBUTE_NAME);
- fatalLabelClassValue = ((Element) sourceNode)
- .getAttribute(FATAL_LABEL_CLASS_ATTRIBUTE_NAME);
- fatalClassValue = ((Element) sourceNode)
- .getAttribute(FATAL_CLASS_ATTRIBUTE_NAME);
+ createRichMessage(visualDocument, sourceNode);
- infoMarkerClassValue = ((Element) sourceNode)
- .getAttribute(INFO_MARKER_CLASS_ATTRIBUTE_NAME);
- infoLabelClassValue = ((Element) sourceNode)
- .getAttribute(INFO_LABEL_CLASS_ATTRIBUTE_NAME);
- infoClassValue = ((Element) sourceNode)
- .getAttribute(INFO_CLASS_ATTRIBUTE_NAME);
+ return creationData;
+ }
- warnMarkerClassValue = ((Element) sourceNode)
- .getAttribute(WARN_MARKER_CLASS_ATTRIBUTE_NAME);
- warnLabelClassValue = ((Element) sourceNode)
- .getAttribute(WARN_LABEL_CLASS_ATTRIBUTE_NAME);
- warnClassValue = ((Element) sourceNode)
- .getAttribute(WARN_CLASS_ATTRIBUTE_NAME);
+ protected void createRichMessage(nsIDOMDocument visualDocument,
+ Node sourceNode) {
- styleValue = ((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- styleClassValue = ((Element) sourceNode)
- .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ NodeList nodeList = sourceNode.getChildNodes();
- createRichMessage(visualDocument, sourceNode);
+ for (int i = 0; i < nodeList.getLength(); i++) {
- return creationData;
- }
+ if (!(nodeList.item(i) instanceof Element))
+ continue;
- protected void createRichMessage(nsIDOMDocument visualDocument,
- Node sourceNode) {
+ Element elemFacet = (Element) nodeList.item(i);
+ if (elemFacet.getNodeName().equalsIgnoreCase(FACET_TAG_NAME)
+ && searchInMarker(elemFacet
+ .getAttribute(NAME_ATTRIBUTE_NAME))) {
- // -------------------create common table
- nsIDOMElement tableHeader = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ // if f:facet not empty
+ if (elemFacet.getChildNodes().getLength() != 0) {
+ nsIDOMElement tableHeader = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ tableHeader.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ MESSAGE_STYLE);
- creationData = new VpeCreationData(tableHeader);
+ creationData = new VpeCreationData(tableHeader);
- nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement tbody = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ tbody.setAttribute(HtmlComponentUtil.HTML_ATTR_VALIGN,
+ "top");
+ tableHeader.appendChild(tbody);
- // in this td append not f:facet
- nsIDOMElement td01 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMElement tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
- nsIDOMElement td02 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ if (styleValue != null && !styleValue.trim().equals(""))
+ tableHeader.setAttribute(
+ HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
+ if (styleClassValue != null
+ && !styleClassValue.trim().equals(""))
+ tableHeader.setAttribute(
+ HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClassValue);
- // ----------------create second table
- nsIDOMElement table = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ td1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
- if (styleValue != null && !styleValue.trim().equals(""))
- table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
- if (styleClassValue != null && !styleClassValue.trim().equals(""))
- table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- styleClassValue);
+ td2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
- // Create first row PASSED
- nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ // set labelClass
+ if (labelClassValue != null
+ && !labelClassValue.trim().equals(""))
+ td2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ labelClassValue);
- td1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMText passedText = visualDocument
+ .createTextNode(VALIDATION_MESSAGE);
+ createVisualFacet(td1, elemFacet);
+ tbody.appendChild(tr);
+ tr.appendChild(td1);
+ tr.appendChild(td2);
+ td2.appendChild(passedText);
+ return;
+ }
+ }
+ }
- td1.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
+ nsIDOMElement span = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_SPAN);
- // set markerClass
- if (markerClassValue != null && !markerClassValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- markerClassValue);
+ if (styleValue != null && !styleValue.trim().equals(""))
+ span.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, styleValue);
+ if (styleClassValue != null && !styleClassValue.trim().equals(""))
+ span.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ styleClassValue);
- // set markerStyle
- if (markerStyleValue != null && !markerStyleValue.trim().equals(""))
- td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- markerStyleValue);
+ creationData = new VpeCreationData(span);
- td2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ nsIDOMText passedText = visualDocument
+ .createTextNode(VALIDATION_MESSAGE);
+ span.appendChild(passedText);
- // set labelClass
- if (labelClassValue != null && !labelClassValue.trim().equals(""))
- td2
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- labelClassValue);
+ }
- nsIDOMText passedText = visualDocument
- .createTextNode(passedLabelValue == null ? ""
- : passedLabelValue);
- // ---------------------------------------------------------------------
+ /**
+ * Checks, whether it is necessary to re-create an element at change of
+ * attribute
+ *
+ * @param pageContext
+ * Contains the information on edited page.
+ * @param sourceElement
+ * The current element of the source tree.
+ * @param visualDocument
+ * The document of the visual tree.
+ * @param visualNode
+ * The current node of the visual tree.
+ * @param data
+ * The arbitrary data, built by a method <code>create</code>
+ * @param name
+ * Atrribute name
+ * @param value
+ * Attribute value
+ * @return <code>true</code> if it is required to re-create an element at
+ * a modification of attribute, <code>false</code> otherwise.
+ */
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
- // Create second row ERROR
- tr2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ /**
+ *
+ * @param td01
+ */
+ protected void addNotFacetComponent(nsIDOMElement td01, Node sourceNode) {
- // set errorClass
- if (errorClassValue != null && !errorClassValue.trim().equals(""))
- tr2
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorClassValue);
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td01);
+ creationData.addChildrenInfo(childrenInfo);
- td3 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td3.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
+ NodeList nodeList = sourceNode.getChildNodes();
+ for (int i = 0; i < nodeList.getLength(); i++)
+ if (!FACET_TAG_NAME.equalsIgnoreCase(nodeList.item(i).getNodeName()
+ .trim()))
+ childrenInfo.addSourceChild(nodeList.item(i));
- // set errorMarkerClass
- if (errorMarkerClassValue != null
- && !errorMarkerClassValue.trim().equals(""))
- td3.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorMarkerClassValue);
+ }
- td4 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ /**
+ *
+ * @param markerName
+ * Marker name
+ * @return True if marker name correct or false
+ */
+ protected boolean searchInMarker(String markerName) {
- // set errorLabelClass
- if (errorLabelClassValue != null
- && !errorLabelClassValue.trim().equals(""))
- td4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- errorLabelClassValue);
+ if (markerName == null)
+ return false;
- nsIDOMText errorText = visualDocument.createTextNode(ERROR_MESSAGE);
- // ---------------------------------------------------------------------
-
- // Create third row FATAL
- tr3 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
-
- // set fatalClass
- if (fatalClassValue != null && !fatalClassValue.trim().equals(""))
- tr3
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalClassValue);
-
- td5 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td5.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
-
- // set fatalMarkerClass
- if (fatalMarkerClassValue != null
- && !fatalMarkerClassValue.trim().equals(""))
- td5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalMarkerClassValue);
-
- td6 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
-
- // set fatalLabelClass
- if (fatalLabelClassValue != null
- && !fatalLabelClassValue.trim().equals(""))
- td6.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- fatalLabelClassValue);
-
- nsIDOMText fatalText = visualDocument.createTextNode(FATAL_MESSAGE);
- // ---------------------------------------------------------------------
-
- // Create four row INFO
- tr4 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
-
- // set infoClass
- if (infoClassValue != null && !infoClassValue.trim().equals(""))
- tr4.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, infoClassValue);
-
- td7 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td7.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
-
- // set infoMarkerClass
- if (infoMarkerClassValue != null
- && !infoMarkerClassValue.trim().equals(""))
- td7.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- infoMarkerClassValue);
-
- td8 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
-
- // set infoLabelClass
- if (infoLabelClassValue != null
- && !infoLabelClassValue.trim().equals(""))
- td8.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- infoLabelClassValue);
-
- nsIDOMText infoText = visualDocument.createTextNode(INFO_MESSAGE);
- // ---------------------------------------------------------------------
-
- // Create fifth row WARNING
- tr5 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
-
- // set warnClass
- if (warnClassValue != null && !warnClassValue.trim().equals(""))
- tr5.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, warnClassValue);
-
- td9 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
- td9.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- HtmlComponentUtil.HTML_ALIGN_RIGHT_VALUE);
-
- // set warnMarkerClass
- if (warnMarkerClassValue != null
- && !warnMarkerClassValue.trim().equals(""))
- td9.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- warnMarkerClassValue);
-
- td10 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
-
- // set warnLabelClass
- if (warnLabelClassValue != null
- && !warnLabelClassValue.trim().equals(""))
- td10.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- warnLabelClassValue);
-
- nsIDOMText warnText = visualDocument.createTextNode(WARNING_MESSAGE);
-
- NodeList nodeList = sourceNode.getChildNodes();
-
- for (int i = 0; i < nodeList.getLength(); i++) {
-
- if (!(nodeList.item(i) instanceof Element))
- continue;
-
- Element elemFacet = (Element) nodeList.item(i);
- if (elemFacet.getNodeName().equalsIgnoreCase(FACET_TAG_NAME)
- && searchInMarker(elemFacet
- .getAttribute(NAME_ATTRIBUTE_NAME))) {
-
- String markerName = elemFacet.getAttribute(NAME_ATTRIBUTE_NAME)
- .trim();
- // if f:facet not empty
- if (elemFacet.getChildNodes().getLength() != 0)
- if (markers[0].equalsIgnoreCase(markerName)) {
- createVisualFacet(td1, elemFacet);
- } else if (markers[1].equalsIgnoreCase(markerName)) {
- createVisualFacet(td3, elemFacet);
- } else if (markers[2].equalsIgnoreCase(markerName)) {
- createVisualFacet(td5, elemFacet);
- } else if (markers[3].equalsIgnoreCase(markerName)) {
- createVisualFacet(td7, elemFacet);
- } else if (markers[4].equalsIgnoreCase(markerName)) {
- createVisualFacet(td9, elemFacet);
- }
- }
- }
-
- addNotFacetComponent(td01, sourceNode);
-
- tableHeader.appendChild(tr);
- tr.appendChild(td01);
- tr.appendChild(td02);
- td02.appendChild(table);
-
- table.appendChild(tr1);
- tr1.appendChild(td1);
- tr1.appendChild(td2);
- td2.appendChild(passedText);
-
- table.appendChild(tr2);
- tr2.appendChild(td3);
- tr2.appendChild(td4);
- td4.appendChild(errorText);
-
- table.appendChild(tr3);
- tr3.appendChild(td5);
- tr3.appendChild(td6);
- td6.appendChild(fatalText);
-
- table.appendChild(tr4);
- tr4.appendChild(td7);
- tr4.appendChild(td8);
- td8.appendChild(infoText);
-
- table.appendChild(tr5);
- tr5.appendChild(td9);
- tr5.appendChild(td10);
- td10.appendChild(warnText);
- }
-
- /**
- * Checks, whether it is necessary to re-create an element at change of
- * attribute
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceElement
- * The current element of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @param visualNode
- * The current node of the visual tree.
- * @param data
- * The arbitrary data, built by a method <code>create</code>
- * @param name
- * Atrribute name
- * @param value
- * Attribute value
- * @return <code>true</code> if it is required to re-create an element at
- * a modification of attribute, <code>false</code> otherwise.
- */
- public boolean isRecreateAtAttrChange(VpePageContext pageContext,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement visualNode, Object data, String name, String value) {
+ for (int i = 0; i < markers.length; i++)
+ if (markers[i].equalsIgnoreCase(markerName.trim()))
return true;
- }
+ return false;
+ }
- /**
- *
- * @param td01
- */
- protected void addNotFacetComponent(nsIDOMElement td01, Node sourceNode) {
+ /**
+ *
+ * @param td
+ * @param elemFacet
+ */
+ protected void createVisualFacet(nsIDOMElement td, Element elemFacet) {
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td);
+ creationData.addChildrenInfo(childrenInfo);
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td01);
- creationData.addChildrenInfo(childrenInfo);
+ NodeList nodeList = elemFacet.getChildNodes();
- NodeList nodeList = sourceNode.getChildNodes();
- for (int i = 0; i < nodeList.getLength(); i++)
- if (!FACET_TAG_NAME.equalsIgnoreCase(nodeList.item(i).getNodeName()
- .trim()))
- childrenInfo.addSourceChild(nodeList.item(i));
-
- }
-
- /**
- *
- * @param markerName
- * Marker name
- * @return True if marker name correct or false
- */
- protected boolean searchInMarker(String markerName) {
-
- if (markerName == null)
- return false;
-
- for (int i = 0; i < markers.length; i++)
- if (markers[i].equalsIgnoreCase(markerName.trim()))
- return true;
- return false;
- }
-
- /**
- *
- * @param td
- * @param elemFacet
- */
- protected void createVisualFacet(nsIDOMElement td, Element elemFacet) {
- VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td);
- creationData.addChildrenInfo(childrenInfo);
-
- NodeList nodeList = elemFacet.getChildNodes();
-
- for (int i = 0; i < nodeList.getLength(); i++)
- if (!(nodeList.item(i) instanceof Element))
- continue;
- else {
- childrenInfo.addSourceChild(nodeList.item(i));
- return;
- }
- }
+ for (int i = 0; i < nodeList.getLength(); i++)
+ if (!(nodeList.item(i) instanceof Element))
+ continue;
+ else {
+ childrenInfo.addSourceChild(nodeList.item(i));
+ return;
+ }
+ }
}
-
-// HTML code component
-// <html>
-// <body>
-//
-// <table border="1px" style="border: 2px solid black;">
-// <tr>
-// <td>
-// ssdfsd
-// <p/>
-// sdfsdf
-// </td>
-// <td>
-// <table border="1px" style="color: red; border: 2px solid blue;" >
-// <tr>
-// <td></td>
-// <td>Passed message</td>
-// </tr>
-// <tr>
-// <td><img/></td>
-// <td>Error message</td>
-// </tr>
-// <tr>
-// <td></td>
-// <td>Fatal message</td>
-// </tr>
-// <tr>
-// <td></td>
-// <td>Info message</td>
-// </tr>
-// <tr>
-// <td></td>
-// <td>Warn message</td>
-// </tr>
-// </table>
-// </td>
-// <tr>
-// </table>
-// </body>
-// </html>
16 years, 11 months
JBoss Tools SVN: r5987 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-01-28 04:22:14 -0500 (Mon, 28 Jan 2008)
New Revision: 5987
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1630
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2008-01-26 00:13:15 UTC (rev 5986)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2008-01-28 09:22:14 UTC (rev 5987)
@@ -250,6 +250,9 @@
<vpe:tag name="a4j:mediaOutput" case-sensitive="yes">
<vpe:template children="no" modify="no">
+ <div class="{@styleClass}" style="{@style}" size="{@size}">
+ mediaOutput
+ </div>
</vpe:template>
</vpe:tag>
16 years, 11 months
JBoss Tools SVN: r5986 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-25 19:13:15 -0500 (Fri, 25 Jan 2008)
New Revision: 5986
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1689
1. -plugincustomization plugin_customization.ini argument added to start tests script
2. fake test product removed from test feature and map file
3. plugin_customization.ini added
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-01-26 00:10:20 UTC (rev 5985)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-01-26 00:13:15 UTC (rev 5986)
@@ -345,13 +345,6 @@
version="0.0.0"/>
<plugin
- id="org.jboss.tools.test.product"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.jboss.tools.common.model.ui.test"
download-size="0"
install-size="0"
16 years, 11 months
JBoss Tools SVN: r5985 - trunk/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-25 19:10:20 -0500 (Fri, 25 Jan 2008)
New Revision: 5985
Removed:
trunk/tests/plugins/
Log:
not needed because we can use -plugincustomization commnd line argument and shut down intro by
org.eclipse.ui/showIntro = false property in it
16 years, 11 months
JBoss Tools SVN: r5984 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-25 18:28:31 -0500 (Fri, 25 Jan 2008)
New Revision: 5984
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
Log:
fix seam.ui tests compilation error
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java 2008-01-25 22:31:44 UTC (rev 5983)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1645Test.java 2008-01-25 23:28:31 UTC (rev 5984)
@@ -1,11 +1,12 @@
package org.jboss.tools.seam.ui.test.ca;
-import javax.crypto.SealedObject;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
@@ -17,17 +18,12 @@
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.TestUtil;
import org.jboss.tools.seam.ui.text.java.SeamELProposalProcessor;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
public class SeamELContentAssistJbide1645Test extends TestCase {
TestProjectProvider provider = null;
IProject project = null;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2008-01-25 22:31:44 UTC (rev 5983)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistJbide1676Test.java 2008-01-25 23:28:31 UTC (rev 5984)
@@ -1,7 +1,5 @@
package org.jboss.tools.seam.ui.test.ca;
-import java.lang.reflect.Method;
-import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
@@ -13,7 +11,6 @@
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
@@ -25,7 +22,6 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.jst.jsp.test.TestUtil;
16 years, 11 months
JBoss Tools SVN: r5983 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-25 17:31:44 -0500 (Fri, 25 Jan 2008)
New Revision: 5983
Modified:
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
fix test build error
BUILD FAILED
/home/hudson/jbds-build/clean-eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/build.xml:24: The following error occurred while executing this line:
/home/hudson/jbds-build/clean-eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/build.xml:64: The following error occurred while executing this line:
/home/hudson/hudson_workspace/workspace/Red_Hat_Dev_Studio/org.jboss.ide.eclipse.releng/builders/tests/customTargets.xml:13: The following error occurred while executing this line:
/home/hudson/hudson_workspace/workspace/Red_Hat_Dev_Studio/org.jboss.ide.eclipse.releng/builders/common/genericTargets.xml:126: Unable to find plug-in: org.jboss.tools.seam.ui.test_0.0.0. Please check the error log for more details.
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-01-25 22:26:24 UTC (rev 5982)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2008-01-25 22:31:44 UTC (rev 5983)
@@ -358,4 +358,10 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.jboss.tools.jst.jsp.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
16 years, 11 months
JBoss Tools SVN: r5982 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-25 17:26:24 -0500 (Fri, 25 Jan 2008)
New Revision: 5982
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
Log:
JBIDE-1657 - change for using WTP-friendly server-runtime classpath container path.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2008-01-25 22:25:24 UTC (rev 5981)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2008-01-25 22:26:24 UTC (rev 5982)
@@ -73,7 +73,7 @@
return Arrays.asList(entries);
} else {
String id = rc.getProperty("id");
- IPath containerPath = new Path("org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeInitializer");
+ IPath containerPath = new Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget");
path = containerPath.append(id);
}
16 years, 11 months
JBoss Tools SVN: r5981 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-25 17:25:24 -0500 (Fri, 25 Jan 2008)
New Revision: 5981
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
Log:
bug in ejb3 classpath page discovered while investigating JBIDE-1657
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2008-01-25 19:48:30 UTC (rev 5980)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2008-01-25 22:25:24 UTC (rev 5981)
@@ -5,7 +5,7 @@
point="org.eclipse.jdt.ui.classpathContainerPage">
<classpathContainerPage
class="org.jboss.ide.eclipse.as.classpath.ui.ejb3.JBossEJB3LibrariesPage"
- id="org.jboss.ide.eclipse.as.classpath.ui.ejb3.containerPage"
+ id="org.jboss.ide.eclipse.as.classpath.core.ejb3.classpathContainer"
name="JBoss EJB3 Libraries"/>
<!-- Cannot be enabled before resource change listening is implementd (max)
<classpathContainerPage
16 years, 11 months
JBoss Tools SVN: r5980 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-01-25 14:48:30 -0500 (Fri, 25 Jan 2008)
New Revision: 5980
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryPageViewer.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
Log:
fix for JBIDE-1465 show returned elements in property sheet for hql/criterias
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2008-01-25 19:13:18 UTC (rev 5979)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2008-01-25 19:48:30 UTC (rev 5980)
@@ -51,6 +51,14 @@
id = i;
}
+ public int getResultSize() {
+ if(list==null) {
+ return -1;
+ } else {
+ return list.size();
+ }
+ }
+
public AbstractQueryPage(ConsoleConfiguration cfg) {
this.cfg = cfg;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2008-01-25 19:13:18 UTC (rev 5979)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2008-01-25 19:48:30 UTC (rev 5980)
@@ -63,7 +63,8 @@
}
return list;
}
-
+
+
private void setupParameters(Query query2, QueryInputModel model) {
if(model.getMaxResults()!=null) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2008-01-25 19:13:18 UTC (rev 5979)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2008-01-25 19:48:30 UTC (rev 5980)
@@ -79,4 +79,6 @@
public void addException(Throwable he);
+ /** Return result size if known, -1 if not */
+ public int getResultSize();
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryPageViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryPageViewer.java 2008-01-25 19:13:18 UTC (rev 5979)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryPageViewer.java 2008-01-25 19:48:30 UTC (rev 5980)
@@ -176,6 +176,7 @@
composite.setLayoutData(new GridData(GridData.FILL_BOTH) );
this.tabItem.setText(this.queryPage.getQueryString().replace('\n', ' ').replace('\r', ' ') );
+ this.tabItem.setToolTipText(this.queryPage.getQueryString());
/* different icon dependent on java/hql etc.
if (this.queryPage.getEntity() == null) {
this.tabItem.setImage(ImageStore.getImage(ImageStore.SCRIPT) );
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java 2008-01-25 19:13:18 UTC (rev 5979)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/properties/QueryPagePropertySource.java 2008-01-25 19:48:30 UTC (rev 5980)
@@ -37,23 +37,32 @@
private static final Object CONFIGURATION_TEXT = "QueryPage.consoleConfiguration";
+ private static final String QUERY_SIZE = "QueryPage.size";
+
static {
- descriptors = new IPropertyDescriptor[2];
+ descriptors = new IPropertyDescriptor[3];
PropertyDescriptor descriptor;
// query string
descriptor = new TextPropertyDescriptor(QUERY_TEXT,
"Query string");
- descriptor.setAlwaysIncompatible(true);
+ descriptor.setAlwaysIncompatible(false);
//descriptor.setCategory(IResourcePropertyConstants.P_FILE_SYSTEM_CATEGORY);
descriptors[0] = descriptor;
// configuration name
descriptor = new TextPropertyDescriptor(CONFIGURATION_TEXT,
"Console configuration");
- descriptor.setAlwaysIncompatible(true);
+ descriptor.setAlwaysIncompatible(false);
//descriptor.setCategory(IResourcePropertyConstants.P_FILE_SYSTEM_CATEGORY);
descriptors[1] = descriptor;
+
+ // number of items
+ descriptor = new TextPropertyDescriptor(QUERY_SIZE,
+ "Query size");
+ descriptor.setAlwaysIncompatible(false);
+ //descriptor.setCategory(IResourcePropertyConstants.P_FILE_SYSTEM_CATEGORY);
+ descriptors[2] = descriptor;
}
public QueryPagePropertySource (QueryPage page) {
@@ -79,6 +88,10 @@
if(QUERY_TEXT.equals(id) ) {
return page.getQueryString();
}
+ if(QUERY_SIZE.equals(id) ) {
+ int resultSize = page.getResultSize();
+ return resultSize==-1?"(unknown)":resultSize;
+ }
return null;
}
16 years, 11 months
JBoss Tools SVN: r5979 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/xpl.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-01-25 14:13:18 -0500 (Fri, 25 Jan 2008)
New Revision: 5979
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/xpl/StringSubstitutionEngineClone.java
Log:
javadoc change
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/xpl/StringSubstitutionEngineClone.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/xpl/StringSubstitutionEngineClone.java 2008-01-25 18:48:33 UTC (rev 5978)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/xpl/StringSubstitutionEngineClone.java 2008-01-25 19:13:18 UTC (rev 5979)
@@ -115,7 +115,6 @@
* Performs recursive string validation to ensure that all of the variables
* contained in the expression exist
* @param expression expression to validate
- * @param manager registry of variables
* @exception CoreException if a referenced variable does not exist or if a cycle exists
* in referenced variables
*/
@@ -129,7 +128,6 @@
*
* @param expression source expression
* @param reportUndefinedVariables whether to report undefined variables as an error
- * @param resolveVariables whether to resolve the value of any variables
* @exception CoreException if unable to resolve a variable
*/
private HashSet substitute(String expression, boolean reportUndefinedVariables) throws CoreException {
16 years, 11 months