JBoss Tools SVN: r9500 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 13:22:47 -0400 (Mon, 04 Aug 2008)
New Revision: 9500
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Done D. Golovin comments.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-08-04 17:22:25 UTC (rev 9499)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-08-04 17:22:47 UTC (rev 9500)
@@ -29,7 +29,6 @@
import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
16 years, 5 months
JBoss Tools SVN: r9499 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 13:22:25 -0400 (Mon, 04 Aug 2008)
New Revision: 9499
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Done D. Golovin comments.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-08-04 15:53:18 UTC (rev 9498)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-08-04 17:22:25 UTC (rev 9499)
@@ -47,40 +47,40 @@
public class RichFacesComboBoxTemplate extends AbstractEditableRichFacesTemplate implements VpeToggableTemplate {
/** CSS_FILE_NAME. */
- private static final String CSS_FILE_NAME = "comboBox/comboBox.css";
+ private static final String CSS_FILE_NAME = "comboBox/comboBox.css"; //$NON-NLS-1$
/** The Constant DEFAULT_ALIGN. */
- private static final String DEFAULT_ALIGN = "left";
+ private static final String DEFAULT_ALIGN = "left"; //$NON-NLS-1$
/** DEFAULT_INPUT_SIZE. */
- private static final String DEFAULT_INPUT_SIZE = "10";
+ private static final String DEFAULT_INPUT_SIZE = "10"; //$NON-NLS-1$
/** DEFAULT_INPUT_STYLE. */
- private static final String DEFAULT_INPUT_STYLE = "rich-combobox-default-input";
+ private static final String DEFAULT_INPUT_STYLE = "rich-combobox-default-input"; //$NON-NLS-1$
/** The Constant DEFAULT_LIST_WIDTH. */
- private static final String DEFAULT_LIST_WIDTH = "150px";
+ private static final String DEFAULT_LIST_WIDTH = "150px"; //$NON-NLS-1$
/** The Constant DEFAULT_WIDTH. */
- private static final String DEFAULT_WIDTH = "width : 150px";
+ private static final String DEFAULT_WIDTH = "width : 150px"; //$NON-NLS-1$
/** IMAGE_NAME_DOWN. */
- private static final String IMAGE_NAME_DOWN = "/comboBox/down.gif";
+ private static final String IMAGE_NAME_DOWN = "/comboBox/down.gif"; //$NON-NLS-1$
/** The Constant RICH_COMBOBOX_BUTTON_STYLE_CLASS. */
- private static final String RICH_COMBOBOX_BUTTON_STYLE_CLASS = "rich-combobox-button";
+ private static final String RICH_COMBOBOX_BUTTON_STYLE_CLASS = "rich-combobox-button"; //$NON-NLS-1$
/** The Constant RICH_COMBOBOX_IMAGE_STYLE_CLASS. */
- private static final String RICH_COMBOBOX_IMAGE_STYLE_CLASS = "rich-combobox-image";
+ private static final String RICH_COMBOBOX_IMAGE_STYLE_CLASS = "rich-combobox-image"; //$NON-NLS-1$
/** The Constant RICH_COMBOBOX_INPUT_CELL_STYLE. */
- private static final String RICH_COMBOBOX_INPUT_CELL_STYLE = "rich-combobox-inputCell";
+ private static final String RICH_COMBOBOX_INPUT_CELL_STYLE = "rich-combobox-inputCell"; //$NON-NLS-1$
/** The Constant SECOND_INPUT. */
- private static final String SECOND_INPUT = "secondInput";
+ private static final String SECOND_INPUT = "secondInput"; //$NON-NLS-1$
/** The Constant STYLE_EXT. */
- private static final String STYLE_EXT = "richFacesComboBox";
+ private static final String STYLE_EXT = "richFacesComboBox"; //$NON-NLS-1$
private static final int LIST_ITEM_HEIGHT_DEFAULT_VALUE=18;
@@ -88,7 +88,7 @@
private Map<String, String> styleClasess = new HashMap<String, String>();
/** The Constant ZERO_STRING. */
- private static final String ZERO_STRING = "0";
+ private static final String ZERO_STRING = "0"; //$NON-NLS-1$
/** The source align. */
private String sourceAlign;
@@ -155,12 +155,12 @@
private String calculateWithForDiv(String with, int minus) {
try {
Integer intValue = 0;
- if (with.endsWith("px")) {
+ if (with.endsWith("px")) { //$NON-NLS-1$
intValue = Integer.parseInt(with.substring(0, with.length() - 2));
} else {
intValue = Integer.parseInt(with);
}
- return String.valueOf((intValue - minus)) + "px";
+ return String.valueOf((intValue - minus)) + "px"; //$NON-NLS-1$
} catch (NumberFormatException e) {
return with;
}
@@ -185,29 +185,29 @@
final nsIDOMElement rootDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
//Fix https://jira.jboss.org/jira/browse/JBIDE-2430 issue with resizement.
- rootDiv.setAttribute("style", "width : "+sourceWidth);
+ rootDiv.setAttribute("style", "width : "+sourceWidth); //$NON-NLS-1$ //$NON-NLS-2$
final nsIDOMElement secondDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- secondDiv.setAttribute("align", this.sourceAlign);
- secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv"));
- String secondDivSubStyle = "; position: {0}; z-index: {1} ;";
+ secondDiv.setAttribute("align", this.sourceAlign); //$NON-NLS-1$
+ secondDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("secondDiv")); //$NON-NLS-1$
+ String secondDivSubStyle = "; position: {0}; z-index: {1} ;"; //$NON-NLS-1$
if (isToggle) {
- secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "relative", "2");
+ secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "relative", "2"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "static", "0");
+ secondDivSubStyle = MessageFormat.format(secondDivSubStyle, "static", "0"); //$NON-NLS-1$ //$NON-NLS-2$
}
// TODO add ATTR_STYLE.
secondDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING + this.sourceListWidth
+ VpeStyleUtil.SEMICOLON_STRING + secondDivSubStyle + sourceStyle);
final nsIDOMElement thirdDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- thirdDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdDiv"));
+ thirdDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdDiv")); //$NON-NLS-1$
thirdDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING + this.sourceWidth
- + "; z-index: 1;");
+ + "; z-index: 1;"); //$NON-NLS-1$
final nsIDOMElement firstInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- firstInput.setAttribute(HTML.ATTR_TYPE, "text");
+ firstInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
;
- firstInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("firstInput") + " " + sourceInputClass);
- firstInput.setAttribute("autocomplete", "off");
- firstInput.setAttribute(HTML.ATTR_STYLE, "width: " + calculateWithForDiv(this.sourceWidth, 17) + VpeStyleUtil.SEMICOLON_STRING
+ firstInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("firstInput") + " " + sourceInputClass); //$NON-NLS-1$ //$NON-NLS-2$
+ firstInput.setAttribute("autocomplete", "off"); //$NON-NLS-1$ //$NON-NLS-2$
+ firstInput.setAttribute(HTML.ATTR_STYLE, "width: " + calculateWithForDiv(this.sourceWidth, 17) + VpeStyleUtil.SEMICOLON_STRING //$NON-NLS-1$
+ sourceInputStyle);
String value = null;
if (ComponentUtil.isNotBlank(this.sourceDefaultLabel)) {
@@ -220,20 +220,20 @@
firstInput.setAttribute(RichFaces.ATTR_VALUE, value);
}
final nsIDOMElement secondInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- secondInput.setAttribute(HTML.ATTR_TYPE, "text");
+ secondInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
;
secondInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get(SECOND_INPUT));
- secondInput.setAttribute("readonly", String.valueOf(Boolean.TRUE));
+ secondInput.setAttribute("readonly", String.valueOf(Boolean.TRUE)); //$NON-NLS-1$
secondInput.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
if (this.sourceButtonStyle != null) {
secondInput.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
}
//
final nsIDOMElement thirdInput = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
- thirdInput.setAttribute(HTML.ATTR_TYPE, "text");
+ thirdInput.setAttribute(HTML.ATTR_TYPE, "text"); //$NON-NLS-1$
;
- thirdInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdInput"));
- thirdInput.setAttribute("readonly", String.valueOf(Boolean.TRUE));
+ thirdInput.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdInput")); //$NON-NLS-1$
+ thirdInput.setAttribute("readonly", String.valueOf(Boolean.TRUE)); //$NON-NLS-1$
thirdInput.setAttribute(RichFacesAbstractInplaceTemplate.VPE_USER_TOGGLE_ID_ATTR, String.valueOf(0));
if (this.sourceButtonStyle != null) {
thirdInput.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
@@ -245,10 +245,10 @@
// + this.sourceButtonIcon + ")");
// }
final nsIDOMElement forthEmptyDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- forthEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("forthEmptyDiv"));
+ forthEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("forthEmptyDiv")); //$NON-NLS-1$
forthEmptyDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH + VpeStyleUtil.COLON_STRING
+ calculateWithForDiv(this.sourceWidth, 10));
- forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts"));
+ forthEmptyDiv.appendChild(visualDocument.createTextNode("Struts")); //$NON-NLS-1$
rootDiv.appendChild(secondDiv);
@@ -282,24 +282,24 @@
final nsIDOMElement thirdEmptyDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, this.sourceListStyle + VpeStyleUtil.SEMICOLON_STRING
- + " z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;");
- thirdEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdEmptyDiv") + " " + this.sourceListClass);
- thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, "z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;");
+ + " z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;"); //$NON-NLS-1$
+ thirdEmptyDiv.setAttribute(HTML.ATTR_CLASS, styleClasess.get("thirdEmptyDiv") + " " + this.sourceListClass); //$NON-NLS-1$ //$NON-NLS-2$
+ thirdEmptyDiv.setAttribute(HTML.ATTR_STYLE, "z-index: 3; position: absolute; visibility: visible; top: 16px; left: 0px;"); //$NON-NLS-1$
final nsIDOMElement shadovDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
final nsIDOMElement positionDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- positionDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-position");
+ positionDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-position"); //$NON-NLS-1$
final nsIDOMElement decorationDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- decorationDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-decoration");
+ decorationDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-decoration"); //$NON-NLS-1$
// decorationDiv.setAttribute(HTML.ATTR_STYLE,
// "height: 54px; width: 208px;");
final nsIDOMElement scrollDiv = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
- scrollDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-scroll");
+ scrollDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-list-scroll"); //$NON-NLS-1$
final List<Element> items = ComponentUtil.getSelectItems(source.getChildNodes());
int defaultHeight = LIST_ITEM_HEIGHT_DEFAULT_VALUE;
@@ -308,8 +308,8 @@
}
final String listHeight = ComponentUtil.isNotBlank(this.sourceListHeight) ? this.sourceListHeight : String.valueOf(defaultHeight)
- + "px";
- scrollDiv.setAttribute(HTML.ATTR_STYLE, "height: "+listHeight+"; width: " + calculateWithForDiv(sourceListWidth, 2));
+ + "px"; //$NON-NLS-1$
+ scrollDiv.setAttribute(HTML.ATTR_STYLE, "height: "+listHeight+"; width: " + calculateWithForDiv(sourceListWidth, 2)); //$NON-NLS-1$ //$NON-NLS-2$
final List<Element> selectItems = ComponentUtil.getSelectItems(source.getChildNodes());
@@ -319,22 +319,22 @@
}
}
- shadovDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow");
+ shadovDiv.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow"); //$NON-NLS-1$
final nsIDOMElement table = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
- table.setAttribute(HTML.ATTR_CELLPADDING, "0");
- table.setAttribute(HTML.ATTR_CELLSPACING, "0");
- table.setAttribute(HTML.ATTR_BORDER, "0");
- String width = "";
+ table.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
+ table.setAttribute(HTML.ATTR_BORDER, "0"); //$NON-NLS-1$
+ String width = ""; //$NON-NLS-1$
try {
int w = ComponentUtil.parseWidthHeightValue(sourceListWidth);
w += 7;
width = String.valueOf(w);
} catch (ParseException e) {
- width = "217";
+ width = "217"; //$NON-NLS-1$
}
- table.setAttribute(HTML.ATTR_STYLE, "width: " + width + "px ; height: 63px;");
+ table.setAttribute(HTML.ATTR_STYLE, "width: " + width + "px ; height: 63px;"); //$NON-NLS-1$ //$NON-NLS-2$
final nsIDOMElement tr1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
final nsIDOMElement tr2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
@@ -351,16 +351,16 @@
final nsIDOMElement tr2_td1_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
final nsIDOMElement tr2_td2_img = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
- tr1_td1.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tl");
- tr1_td2.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tr");
+ tr1_td1.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tl"); //$NON-NLS-1$
+ tr1_td2.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-tr"); //$NON-NLS-1$
- tr2_td1.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-bl");
- tr2_td2.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-br");
+ tr2_td1.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-bl"); //$NON-NLS-1$
+ tr2_td2.setAttribute(HTML.ATTR_CLASS, "rich-combobox-shadow-br"); //$NON-NLS-1$
- setUpImg(tr1_td1_img, 10, 1, 0, "comboBox/spacer.gif");
- setUpImg(tr1_td2_img, 1, 10, 0, "comboBox/spacer.gif");
- setUpImg(tr2_td1_img, 1, 10, 0, "comboBox/spacer.gif");
- setUpImg(tr2_td2_img, 10, 1, 0, "comboBox/spacer.gif");
+ setUpImg(tr1_td1_img, 10, 1, 0, "comboBox/spacer.gif"); //$NON-NLS-1$
+ setUpImg(tr1_td2_img, 1, 10, 0, "comboBox/spacer.gif"); //$NON-NLS-1$
+ setUpImg(tr2_td1_img, 1, 10, 0, "comboBox/spacer.gif"); //$NON-NLS-1$
+ setUpImg(tr2_td2_img, 10, 1, 0, "comboBox/spacer.gif"); //$NON-NLS-1$
thirdEmptyDiv.appendChild(shadovDiv);
shadovDiv.appendChild(table);
@@ -402,7 +402,7 @@
private nsIDOMNode createSelectItem(Element e, nsIDOMDocument visualDocument) {
final nsIDOMElement item = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_SPAN);
- item.setAttribute(HTML.ATTR_CLASS, "rich-combobox-item " + sourceItemClass);
+ item.setAttribute(HTML.ATTR_CLASS, "rich-combobox-item " + sourceItemClass); //$NON-NLS-1$
item.appendChild(visualDocument.createTextNode(ComponentUtil.getSelectItemValue(e)));
return item;
}
@@ -557,13 +557,13 @@
* Inits the default classes.
*/
private void initDefaultClasses() {
- styleClasess.put("secondDiv", "rich-combobox-font rich-combobox");
- styleClasess.put("thirdDiv", "rich-combobox-font rich-combobox-shell");
- styleClasess.put("thirdEmptyDiv", "rich-combobox-list-cord");
- styleClasess.put("firstInput", "rich-combobox-font-disabled rich-combobox-input-inactive");
- styleClasess.put(SECOND_INPUT, "rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive");
- styleClasess.put("thirdInput", "rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive");
- styleClasess.put("forthEmptyDiv", "rich-combobox-strut rich-combobox-font");
+ styleClasess.put("secondDiv", "rich-combobox-font rich-combobox"); //$NON-NLS-1$ //$NON-NLS-2$
+ styleClasess.put("thirdDiv", "rich-combobox-font rich-combobox-shell"); //$NON-NLS-1$ //$NON-NLS-2$
+ styleClasess.put("thirdEmptyDiv", "rich-combobox-list-cord"); //$NON-NLS-1$ //$NON-NLS-2$
+ styleClasess.put("firstInput", "rich-combobox-font-disabled rich-combobox-input-inactive"); //$NON-NLS-1$ //$NON-NLS-2$
+ styleClasess.put(SECOND_INPUT, "rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"); //$NON-NLS-1$
+ styleClasess.put("thirdInput", "rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"); //$NON-NLS-1$ //$NON-NLS-2$
+ styleClasess.put("forthEmptyDiv", "rich-combobox-strut rich-combobox-font"); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -592,19 +592,19 @@
* @param source the source
*/
private void prepareData(Element source) {
- this.sourceAlign = source.getAttribute("align");
+ this.sourceAlign = source.getAttribute("align"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.sourceAlign)) {
this.sourceAlign = DEFAULT_ALIGN;
}
- this.sourceListWidth = source.getAttribute("listWidth");
+ this.sourceListWidth = source.getAttribute("listWidth"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.sourceListWidth)) {
this.sourceListWidth = DEFAULT_LIST_WIDTH;
}
- this.sourceListHeight = source.getAttribute("listHeight");
+ this.sourceListHeight = source.getAttribute("listHeight"); //$NON-NLS-1$
- this.sourceWidth = source.getAttribute("width");
+ this.sourceWidth = source.getAttribute("width"); //$NON-NLS-1$
if (ComponentUtil.isBlank(this.sourceWidth)) {
this.sourceWidth = DEFAULT_LIST_WIDTH;
@@ -613,35 +613,35 @@
}
if (ComponentUtil.isNotBlank(this.sourceWidth) && (this.sourceWidth != DEFAULT_LIST_WIDTH)) {
- if(!this.sourceWidth.endsWith("px")){
+ if(!this.sourceWidth.endsWith("px")){ //$NON-NLS-1$
try {
int intValue = Integer.parseInt(this.sourceWidth);
- this.sourceWidth = String.valueOf(intValue)+"px";
- } catch (Exception e) {
-
+ this.sourceWidth = String.valueOf(intValue)+"px"; //$NON-NLS-1$
+ } catch (NumberFormatException e) {
+ this.sourceListWidth = DEFAULT_LIST_WIDTH;
}
}
}
- this.sourceDefaultLabel = ComponentUtil.getAttribute(source, "defaultLabel");
- this.sourceValue = ComponentUtil.getAttribute(source, "value");
+ this.sourceDefaultLabel = ComponentUtil.getAttribute(source, "defaultLabel"); //$NON-NLS-1$
+ this.sourceValue = ComponentUtil.getAttribute(source, "value"); //$NON-NLS-1$
- this.sourceButtonStyle = ComponentUtil.getAttribute(source, "buttonStyle");
+ this.sourceButtonStyle = ComponentUtil.getAttribute(source, "buttonStyle"); //$NON-NLS-1$
final String sourceStyleClasess = ComponentUtil.getAttribute(source, RichFaces.ATTR_STYLE_CLASS);
if (ComponentUtil.isNotBlank(sourceStyleClasess)) {
- styleClasess.put("secondDiv", styleClasess.get("secondDiv") + " " + sourceStyleClasess);
+ styleClasess.put("secondDiv", styleClasess.get("secondDiv") + " " + sourceStyleClasess); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
this.sourceStyle = ComponentUtil.getAttribute(source, HTML.ATTR_STYLE);
- this.sourceInputStyle = ComponentUtil.getAttribute(source, "inputStyle");
- this.sourceInputClass = ComponentUtil.getAttribute(source, "inputClass");
- this.sourceListClass = ComponentUtil.getAttribute(source, "listClass");
- this.sourceListStyle = ComponentUtil.getAttribute(source, "listStyle");
- this.sourceItemClass = ComponentUtil.getAttribute(source, "itemClass");
+ this.sourceInputStyle = ComponentUtil.getAttribute(source, "inputStyle"); //$NON-NLS-1$
+ this.sourceInputClass = ComponentUtil.getAttribute(source, "inputClass"); //$NON-NLS-1$
+ this.sourceListClass = ComponentUtil.getAttribute(source, "listClass"); //$NON-NLS-1$
+ this.sourceListStyle = ComponentUtil.getAttribute(source, "listStyle"); //$NON-NLS-1$
+ this.sourceItemClass = ComponentUtil.getAttribute(source, "itemClass"); //$NON-NLS-1$
- this.sourceButtonIcon = ComponentUtil.getAttribute(source, "buttonIcon");
+ this.sourceButtonIcon = ComponentUtil.getAttribute(source, "buttonIcon"); //$NON-NLS-1$
if(ComponentUtil.isBlank(this.sourceButtonIcon)){
this.sourceButtonIcon = IMAGE_NAME_DOWN;
16 years, 5 months
JBoss Tools SVN: r9498 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 11:53:18 -0400 (Mon, 04 Aug 2008)
New Revision: 9498
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
Fix JBIDE-2582 issue.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-08-04 15:29:34 UTC (rev 9497)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-08-04 15:53:18 UTC (rev 9498)
@@ -87,18 +87,6 @@
int start = NodesManagingUtil.getStartOffsetNode(node);
- //added by estherbin fix bug JBIDE-2010 with selection.
- if (start == 0 || start == 1) {
- final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
-
- if (file != null) {
- final String findString = ElService.getInstance().reverseReplace(file, node.getNodeValue());
-
- if ((findString != null) && (pageContext.getSourceBuilder().getStructuredTextViewer().getTextWidget().getText() != null)) {
- start = pageContext.getSourceBuilder().getStructuredTextViewer().getTextWidget().getText().indexOf(findString);
- }
- }
- }
pageContext.getSourceBuilder().getStructuredTextViewer().setSelectedRange(start + offset, length);
pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(
start + offset, length);
@@ -204,8 +192,11 @@
//gets visual selection range
Point sourceRange = new Point(0, 0);
//converts to source selection
- sourceRange.x = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getFocusOffset());
- sourceRange.y = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getAnchorOffset())-sourceRange.x;
+ if (sourceNode != null) {
+ sourceRange.x = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getFocusOffset());
+ sourceRange.y = TextUtil.sourcePosition(sourceNode.getNodeValue(), focusedNode.getNodeValue(), selection.getAnchorOffset())
+ - sourceRange.x;
+ }
return sourceRange;
}
16 years, 5 months
JBoss Tools SVN: r9497 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 11:29:34 -0400 (Mon, 04 Aug 2008)
New Revision: 9497
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
Log:
Fix 2582 issue.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractEditableJsfTemplate.java 2008-08-04 15:29:34 UTC (rev 9497)
@@ -14,32 +14,49 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.IEditableTemplate;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Attr;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
/**
- * general class for jsf templates
+ * general class for jsf templates.
*
* @author Sergey Dzmitrovich
- *
*/
-public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate {
+public abstract class AbstractEditableJsfTemplate extends VpeAbstractTemplate implements IEditableTemplate {
- // general jsf attributes
- static private Map<String, String> attributes = new HashMap<String, String>();
+ /**
+ * Gets the output attribute node.
+ *
+ * @param element the element
+ *
+ * @return the output attribute node
+ */
+ public Attr getOutputAttributeNode(Element element) {
+ return null;
+ }
+ // general jsf attributes
+ /** The attributes. */
+ static private Map<String, String> attributes = new HashMap<String, String>();
+
static {
attributes.put("style", HTML.ATTR_STYLE); //$NON-NLS-1$
attributes.put("styleClass", HTML.ATTR_CLASS); //$NON-NLS-1$
}
/**
- * copy general
+ * copy general.
*
- * @param visualElement
- * @param sourceElement
+ * @param sourceElement the source element
+ * @param visualElement the visual element
*/
protected void copyGeneralJsfAttributes(nsIDOMElement visualElement,
Element sourceElement) {
@@ -55,12 +72,12 @@
}
/**
- * copy attribute
+ * copy attribute.
*
- * @param visualElement
- * @param sourceElement
- * @param sourceAttributeName
- * @param targetAtttributeName
+ * @param sourceElement the source element
+ * @param targetAtttributeName the target atttribute name
+ * @param sourceAttributeName the source attribute name
+ * @param visualElement the visual element
*/
protected void copyAttribute(nsIDOMElement visualElement,
Element sourceElement, String sourceAttributeName,
@@ -71,5 +88,7 @@
.getAttribute(sourceAttributeName));
}
+
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-08-04 15:29:34 UTC (rev 9497)
@@ -42,7 +42,7 @@
* @param element
* @return
*/
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_VALUE))
return element.getAttributeNode(JSF.ATTR_VALUE);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfCheckboxSelectItemTemplate.java 2008-08-04 15:29:34 UTC (rev 9497)
@@ -151,7 +151,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfOptionSelectItemTemplate.java 2008-08-04 15:29:34 UTC (rev 9497)
@@ -199,7 +199,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-08-04 15:29:34 UTC (rev 9497)
@@ -168,7 +168,7 @@
}
@Override
- protected Attr getOutputAttributeNode(Element element) {
+ public Attr getOutputAttributeNode(Element element) {
if (element.hasAttribute(JSF.ATTR_ITEM_LABEL))
return element.getAttributeNode(JSF.ATTR_ITEM_LABEL);
16 years, 5 months
JBoss Tools SVN: r9496 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 11:28:29 -0400 (Mon, 04 Aug 2008)
New Revision: 9496
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
Fix 2582 issue.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-08-04 14:13:23 UTC (rev 9495)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-08-04 15:28:29 UTC (rev 9496)
@@ -23,7 +23,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.core.resources.IFile;
@@ -49,14 +48,15 @@
import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.dnd.VpeDnD;
-import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.CSSReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeElementData;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.template.IEditableTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
@@ -494,10 +494,27 @@
setTooltip((Element) sourceNode, (nsIDOMElement)visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
}
if (registerFlag) {
- VpeElementMapping elementMapping = new VpeElementMapping(
+
+ final VpeElementData data = creationData.getElementData();
+
+ if ((sourceNodeClone != null) && (data != null) && (data.getNodesData() != null) && (data.getNodesData().size() > 0)) {
+
+ if (template instanceof IEditableTemplate) {
+ final IEditableTemplate editableTemplate = (IEditableTemplate) template;
+
+ for (org.jboss.tools.vpe.editor.mapping.NodeData nodeData : data.getNodesData()) {
+ Attr attr = editableTemplate.getOutputAttributeNode((Element) sourceNode);
+ if(attr!=null){
+ nodeData.setSourceNode(attr);
+ }
+ }
+ }
+
+ }
+ VpeElementMapping elementMapping = new VpeElementMapping(
sourceNode, visualNewNode, border,
template, ifDependencySet, creationData.getData(),
- creationData.getElementData());
+ data);
registerNodes(elementMapping);
}
if (template.isChildren()) {
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java 2008-08-04 15:28:29 UTC (rev 9496)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.editor.template;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+/**
+ * The Interface IEditableTemplate.
+ *
+ * @author Evgenij Stherbin
+ */
+public interface IEditableTemplate {
+
+ /**
+ * Gets the output attribute node.
+ *
+ * @param element the element
+ *
+ * @return the output attribute node
+ */
+ public abstract Attr getOutputAttributeNode(Element element);
+}
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/IEditableTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 5 months
JBoss Tools SVN: r9495 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-08-04 10:13:23 -0400 (Mon, 04 Aug 2008)
New Revision: 9495
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2592
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-08-04 14:12:29 UTC (rev 9494)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-08-04 14:13:23 UTC (rev 9495)
@@ -36,7 +36,9 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter2;
+import org.hibernate.console.ImageConstants;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.utils.EclipseImages;
/**
* LabelProvider based on WorkBenchLabelProvider that is not limited to WorkBench elements.
@@ -161,10 +163,13 @@
public final Image getImage(Object element) {
//obtain the base image by querying the element
IWorkbenchAdapter adapter = getAdapter(element);
+ ImageDescriptor descriptor = null;
if (adapter == null) {
- return null;
+ descriptor = EclipseImages.getImageDescriptor(ImageConstants.ERROR);
}
- ImageDescriptor descriptor = adapter.getImageDescriptor(element);
+ else {
+ descriptor = adapter.getImageDescriptor(element);
+ }
if (descriptor == null) {
return null;
}
16 years, 5 months
JBoss Tools SVN: r9494 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-08-04 10:12:29 -0400 (Mon, 04 Aug 2008)
New Revision: 9494
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2592
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java 2008-08-04 14:10:30 UTC (rev 9493)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageMap.java 2008-08-04 14:12:29 UTC (rev 9494)
@@ -29,9 +29,9 @@
*/
public abstract class ImageMap implements ImageConstants {
-
-
+
+
protected void declareImages() {
declareRegistryImage(MAPPEDCLASS, MAPPEDCLASS_PATH);
declareRegistryImage(UNMAPPEDCLASS, UNMAPPEDCLASS_PATH);
@@ -74,7 +74,8 @@
declareRegistryImage(CHECKBOX_EMPTY, "images/xpl/incomplete_tsk.gif"); //$NON-NLS-1$
declareRegistryImage(CHECKBOX_FULL, "images/xpl/complete_tsk.gif"); //$NON-NLS-1$
declareRegistryImage(RELOAD, "images/reload.gif"); //$NON-NLS-1$
-
+ declareRegistryImage(ERROR, "images/error.gif"); //$NON-NLS-1$
+
}
protected abstract void declareRegistryImage(String key, String path);
16 years, 5 months
JBoss Tools SVN: r9493 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-08-04 10:10:30 -0400 (Mon, 04 Aug 2008)
New Revision: 9493
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2592
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java 2008-08-04 14:06:56 UTC (rev 9492)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ImageConstants.java 2008-08-04 14:10:30 UTC (rev 9493)
@@ -23,14 +23,14 @@
/**
* @author max
- *
+ *
*/
public interface ImageConstants {
-
+
public static final String HIBERNATE_LOGO = "images/hibernate.gif"; //$NON-NLS-1$
public static final String MINI_HIBERNATE = "images/hicon.gif"; //$NON-NLS-1$
public static final String JBOSS_LOGO = "images/jboss.gif"; //$NON-NLS-1$
-
+
public static final String FORMAT_QL = "images/format.gif"; //$NON-NLS-1$
public static final String MAPPEDCLASS_PATH = "images/mapped_class.gif"; //$NON-NLS-1$
@@ -57,7 +57,7 @@
public static final String CLOSE_PATH = "images/close.gif"; //$NON-NLS-1$
public static final String CLOSE_DISABLED_PATH = "images/close_disabled.gif"; //$NON-NLS-1$
-
+
public static final String CLOSE_ALL_PATH = "images/xpl/removeall.gif"; //$NON-NLS-1$
public static final String CLOSE_ALL_DISABLED_PATH = "images/xpl/removeall_disabled.gif"; //$NON-NLS-1$
@@ -91,7 +91,7 @@
public static final String CLOSE = "CLOSE"; //$NON-NLS-1$
public static final String CLOSE_DISABLED = "CLOSE_DISABLED"; //$NON-NLS-1$
-
+
public static final String CLOSE_ALL = "CLOSE_ALL"; //$NON-NLS-1$
public static final String CLOSE_ALL_DISABLED = "CLOSE_ALL_DISABLED"; //$NON-NLS-1$
@@ -103,9 +103,9 @@
public static final String UNKNOWNPROPERTY = "UNKNOWNPROPERTY"; //$NON-NLS-1$
public static final String EXECUTE = "EXECUTE"; //$NON-NLS-1$
-
+
public static final String NEW_WIZARD = "NEW_WIZARD"; //$NON-NLS-1$
-
+
public static final String COLUMN = "COLUMN"; //$NON-NLS-1$
public static final String TABLE = "TABLE"; //$NON-NLS-1$
public static final String SCHEMA = "SCHEMA"; //$NON-NLS-1$
@@ -119,9 +119,10 @@
public static final String LAYOUT_DISABLED = "LAYOUT_DISABLED"; //$NON-NLS-1$
public static final String CRITERIA_EDITOR = "images/criteria_editor.gif"; //$NON-NLS-1$
public static final String FUNCTION = "FUNCTION"; //$NON-NLS-1$
-
+
public static final String CHECKBOX_FULL = "images/xpl/complete_tsk.gif"; //$NON-NLS-1$
public static final String CHECKBOX_EMPTY = "images/xpl/incomplete_tsk.gif"; //$NON-NLS-1$
public static final String RELOAD = "images/reload.gif"; //$NON-NLS-1$
-
+ public static final String ERROR = "images/error.gif"; //$NON-NLS-1$
+
}
\ No newline at end of file
16 years, 5 months
JBoss Tools SVN: r9492 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/icons/images.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-08-04 10:06:56 -0400 (Mon, 04 Aug 2008)
New Revision: 9492
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/icons/images/error.gif
Log:
https://jira.jboss.org/jira/browse/JBIDE-2592
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/icons/images/error.gif
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/icons/images/error.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 5 months
JBoss Tools SVN: r9491 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-04 09:45:31 -0400 (Mon, 04 Aug 2008)
New Revision: 9491
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
Log:
Move isContains to the TextUtil
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-08-04 12:51:47 UTC (rev 9490)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-08-04 13:45:31 UTC (rev 9491)
@@ -14,13 +14,11 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Assert;
-import org.jboss.tools.common.meta.action.impl.handlers.ReplaceSignificanceMessageImpl;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.ELReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -178,7 +176,7 @@
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
textValue = sourceNode.getNodeValue();
- if ((textValue != null) && isContainsEl(textValue)) {
+ if ((textValue != null) && TextUtil.isContainsEl(textValue)) {
final String newValue = bundleMap.getBundleValue(textValue, 0);
if (!textValue.equals(newValue)) {
@@ -198,7 +196,7 @@
final Attr attr = (Attr) nodeMap.item(i);
final String value = attr.getValue();
- if (value != null && isContainsEl(value)) {
+ if (value != null && TextUtil.isContainsEl(value)) {
final String value2 = bundleMap.getBundleValue(value, 0);
if (!value2.equals(value)) {
@@ -214,16 +212,7 @@
}
- /**
- * @param value
- * @return
- */
- //TODO E Sherbin It's shouldn't bee here
- private boolean isContainsEl(final String value) {
- return (value.contains("#{") || value.contains("${")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
/**
* Checks if is available for node.
*
@@ -321,9 +310,8 @@
*/
public String reverseReplace(IFile resourceFile, String replacedString) {
String str = replacedString;
-
final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
-
+
if ((str != null) && (references != null) && (references.length > 0)) {
for (ResourceReference rf : references) {
if (replacedString.contains(rf.getProperties())) {
@@ -331,6 +319,7 @@
}
}
}
+
return str;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2008-08-04 12:51:47 UTC (rev 9490)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2008-08-04 13:45:31 UTC (rev 9491)
@@ -367,4 +367,14 @@
return str;
}
+
+
+ /**
+ * @param value
+ * @return
+ */
+ public static boolean isContainsEl(final String value) {
+ return (value.contains("#{") || value.contains("${")); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
}
16 years, 5 months