JBoss Tools SVN: r14529 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-04-06 22:40:06 -0400 (Mon, 06 Apr 2009)
New Revision: 14529
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties
Log:
Restored missing string and added parameter placeholder expected by NLS.bind().
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties 2009-04-06 17:50:57 UTC (rev 14528)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/messages/JBossFacetCore.properties 2009-04-07 02:40:06 UTC (rev 14529)
@@ -1,4 +1,4 @@
-
+Error_Copy=Exception while copying runtime jars: {0}
# START NON-TRANSLATABLE
ESB_Location=jbossesbruntimelocation
# END NON-TRANSLATABLE
15 years, 8 months
JBoss Tools SVN: r14528 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-04-06 13:50:57 -0400 (Mon, 06 Apr 2009)
New Revision: 14528
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4103, size attribute was added.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2009-04-06 17:03:09 UTC (rev 14527)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/templates/vpe-templates-seam.xml 2009-04-06 17:50:57 UTC (rev 14528)
@@ -161,7 +161,8 @@
<vpe:tag name="s:fileUpload" case-sensitive="yes">
<vpe:template children="no" modify="no">
- <input type="file" style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
+ <input type="file" style="{@style}" class="{@styleClass}"
+ title="{tagstring()}" size="{@size}" />
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
15 years, 8 months
JBoss Tools SVN: r14527 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-04-06 13:03:09 -0400 (Mon, 06 Apr 2009)
New Revision: 14527
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
Log:
JUNIT AJUSTED - issue JBIDE-2594: Move configuration for EL to jboss tools preferensis, that it's can be used not only by visual page editor.
https://jira.jboss.org/jira/browse/JBIDE-2594
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java 2009-04-06 17:00:23 UTC (rev 14526)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java 2009-04-06 17:03:09 UTC (rev 14527)
@@ -30,10 +30,8 @@
*/
public class JBIDE2594Test extends CommonJBIDE2010Test {
- /**
- *
- */
protected static final String KEY_6 = "global.value1"; //$NON-NLS-1$
+ private static final String KEY_1_POSTFIX = "images/smalle.gif"; //$NON-NLS-1$
protected Map<String, String> globalElMap = new HashMap<String, String>();
/**
@@ -43,9 +41,30 @@
super(name);
}
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ IPath path = Platform.getLocation();
+
+ assertNotNull("Path can't be null",path); //$NON-NLS-1$
+
+ globalElMap.put(KEY_1, "/override/global/value/"); //$NON-NLS-1$
+ globalElMap.put(KEY_6, "/global/value1/"); //$NON-NLS-1$
+
+ ResourceReference[] entries = new ResourceReference[globalElMap.size()];
+ int i = 0;
+ for (Entry<String, String> string : globalElMap.entrySet()) {
+ entries[i] = new ResourceReference(string.getKey(), ResourceReference.GLOBAL_SCOPE);
+ entries[i].setProperties(string.getValue());
+ i++;
+ }
+ setGlobalValues(entries, path);
+ }
-
-
+ protected void setGlobalValues(ResourceReference[] entries,IPath path) {
+ GlobalELReferenceList.getInstance().setAllResources(path, entries);
+ }
+
public void testReplaceGlobalElVariable(){
String replaceString= "#{"+KEY_6+"}"+"images/test.gif"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String replacedString = ElService.getInstance().replaceEl(file, replaceString);
@@ -60,45 +79,13 @@
* @throws CoreException the core exception
*/
public void testOverrideLocalVariable() throws CoreException {
- String string1 = "${"+KEY_1+"}"+"/images/smalle.gif"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String string1 = "${" + KEY_1 + "}" + KEY_1_POSTFIX; //$NON-NLS-1$ //$NON-NLS-2$
String replacedValue = ElService.getInstance().replaceEl(file, string1);
- assertEquals("Should be equals " + globalElMap.get(KEY_1) + "/images/smalle.gif", replacedValue, globalElMap.get(KEY_1) //$NON-NLS-1$ //$NON-NLS-2$
- + "/images/smalle.gif"); //$NON-NLS-1$
-
+ assertEquals(elValuesMap.get(KEY_1) + KEY_1_POSTFIX, replacedValue);
}
@Override
- protected void setUp() throws Exception {
- super.setUp();
- IPath path = Platform.getLocation();
-
- assertNotNull("Path can't be null",path); //$NON-NLS-1$
-
- globalElMap.put(KEY_1, "/override/global/value/"); //$NON-NLS-1$
- globalElMap.put(KEY_6, "/global/value1/"); //$NON-NLS-1$
-
- ResourceReference[] entries = new ResourceReference[globalElMap.size()];
- int i = 0;
- for (Entry<String, String> string : globalElMap.entrySet()) {
-
- entries[i] = new ResourceReference(string.getKey(), ResourceReference.GLOBAL_SCOPE);
- entries[i].setProperties(string.getValue());
- i++;
- }
- setGlobalValues(entries, path);
-
-
- }
-
-
- protected void setGlobalValues(ResourceReference[] entries,IPath path) {
- GlobalELReferenceList.getInstance().setAllResources(path, entries);
- }
-
-
-
- @Override
protected void tearDown() throws Exception {
//clear global resources
GlobalELReferenceList.getInstance().setAllResources(Platform.getLocation(), new ResourceReference[0]);
15 years, 8 months
JBoss Tools SVN: r14526 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-04-06 13:00:23 -0400 (Mon, 06 Apr 2009)
New Revision: 14526
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3810
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2009-04-06 16:33:58 UTC (rev 14525)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2009-04-06 17:00:23 UTC (rev 14526)
@@ -227,6 +227,7 @@
return false;
boolean editable = false;
+ Node visibleSourceNode = null;
// if selected node is element
if (selectedNodeMapping instanceof VpeElementMapping) {
@@ -268,7 +269,7 @@
SelectionUtil
.getSourceSelectionRange(getSourceEditor()),
delete);
-
+ visibleSourceNode = nodeData.getSourceNode();
}
// if template can't give necessary information
else {
@@ -281,11 +282,22 @@
}
// if node is simple text
else {
+ visibleSourceNode = selectedNodeMapping.getSourceNode();
editable = true;
}
if (editable) {
+ Point range = SelectionUtil
+ .getSourceSelectionRange(getSourceEditor());
+
+ if (range.y == 0) {
+ int offset = getEscOffset(visibleSourceNode, range, delete);
+ if (offset != 0)
+ SelectionUtil.setSourceSelection(pageContext, range.x,
+ offset);
+
+ }
sourceEditor.getTextViewer().getTextWidget().invokeAction(delete);
}
@@ -446,4 +458,22 @@
}
return false;
}
+
+ private int getEscOffset(Node visibleNode, Point selectionRange, int delete) {
+
+ int offset = 0;
+
+ if (delete == ST.DELETE_NEXT) {
+ offset = TextUtil.checkEscToRight(NodesManagingUtil
+ .getSourceText(visibleNode), selectionRange.x
+ - NodesManagingUtil.getStartOffsetNode(visibleNode));
+ } else {
+ offset = TextUtil.checkEscToLeft(NodesManagingUtil
+ .getSourceText(visibleNode), selectionRange.x
+ - NodesManagingUtil.getStartOffsetNode(visibleNode));
+ }
+
+ return offset;
+
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2009-04-06 16:33:58 UTC (rev 14525)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2009-04-06 17:00:23 UTC (rev 14526)
@@ -14,6 +14,7 @@
import org.eclipse.swt.graphics.Point;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
@@ -71,8 +72,8 @@
*/
public static int getNodeLength(Node node) {
- if ( (node instanceof IDOMAttr)
- && (((IDOMAttr) node).getValueSource()!=null) ) {
+ if ((node instanceof IDOMAttr)
+ && (((IDOMAttr) node).getValueSource() != null)) {
return ((IDOMAttr) node).getValueSource().length();
} else if (node instanceof IndexedRegion) {
return ((IndexedRegion) node).getEndOffset()
@@ -177,4 +178,16 @@
.getTextWidget().getText(startPosition, endPosition);
}
+ /**
+ *
+ * @param pageContext
+ * @param startPosition
+ * @param endPosition
+ * @return
+ */
+ public static String getSourceText(Node node) {
+
+ return ((IDOMNode) node).getSource();
+ }
+
}
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 2009-04-06 16:33:58 UTC (rev 14525)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2009-04-06 17:00:23 UTC (rev 14526)
@@ -7,7 +7,7 @@
*
* Contributors:
* Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.vpe.editor.util;
import java.io.InputStream;
@@ -20,31 +20,32 @@
import org.mozilla.interfaces.nsIDOMKeyEvent;
public class TextUtil {
-
- // ISO codes are contained in interval [0,2^31 -1]
+ // ISO codes are contained in interval [0,2^31 -1]
private final static int MIN_ISO_CODE_RANGE = 0;
private final static int MAX_ISO_CODE_RANGE = Integer.MAX_VALUE;
-
- private final static String CODES_FILE = "htmlCodes.properties"; //$NON-NLS-1$
-
- private final static String SOURCE_BREAK = "\r\n"; //$NON-NLS-1$
- private final static String VISUAL_BREAK = "\n"; //$NON-NLS-1$
- private final static char SOURCE_SPACE = ' ';
- private final static char VISUAL_SPACE = 160;
+
+ private final static String CODES_FILE = "htmlCodes.properties"; //$NON-NLS-1$
+
+ private final static String SOURCE_BREAK = "\r\n"; //$NON-NLS-1$
+ private final static String VISUAL_BREAK = "\n"; //$NON-NLS-1$
+ private final static char SOURCE_SPACE = ' ';
+ private final static char VISUAL_SPACE = 160;
private final static char CHR_ESC_START = '&';
private final static char CHR_SHARP = '#';
private final static char CHR_ESC_STOP = ';';
private final static char CHR_HEX_FLAG = 'x';
private final static String SPCHARS = "\f\n\r\t\u0020\u2028\u2029"; //$NON-NLS-1$
- private final static Map<Character,String> textSet = new HashMap<Character,String>();
- static{
+ private final static Map<Character, String> textSet = new HashMap<Character, String>();
+ static {
try {
- InputStream is = VpePlugin.getDefault().getBundle().getResource(CODES_FILE).openStream();
+ InputStream is = VpePlugin.getDefault().getBundle().getResource(
+ CODES_FILE).openStream();
Properties prop = new Properties();
prop.load(is);
for (Entry<Object, Object> e : prop.entrySet()) {
- textSet.put((char)Integer.parseInt((String) e.getKey()), (String) e.getValue());
+ textSet.put((char) Integer.parseInt((String) e.getKey()),
+ (String) e.getValue());
}
is.close();
@@ -52,66 +53,185 @@
e.printStackTrace();
}
}
-
- public static boolean containsKey(char key){
-
+
+ public static boolean containsKey(char key) {
+
return textSet.containsKey(new Character(key));
}
- public static String getValue(char key){
- return (String)textSet.get(new Character(key));
+ public static String getValue(char key) {
+ return (String) textSet.get(new Character(key));
}
-
+
+ /**
+ * @deprecated
+ * @param sourceText
+ * @param sourcePosition
+ * @return
+ */
public static String isEcsToLeft(String sourceText, int sourcePosition) {
String s1 = sourceText;
-
+
String s2 = s1.substring(0, Math.min(sourcePosition, s1.length()));
int startIndex = s2.lastIndexOf(CHR_ESC_START);
int endIndex = s2.lastIndexOf(CHR_ESC_STOP);
- if(startIndex >= 0 && endIndex >= 0 && endIndex == s2.length()-1){
- String value = s2.substring(startIndex, endIndex+1);
- if(textSet.containsValue(value)) return value;
+ if (startIndex >= 0 && endIndex >= 0 && endIndex == s2.length() - 1) {
+ String value = s2.substring(startIndex, endIndex + 1);
+ if (textSet.containsValue(value))
+ return value;
}
-
+
return null;
}
+ /**
+ * @deprecated
+ * @param sourceText
+ * @param sourcePosition
+ * @return
+ */
public static String isEcsToRight(String sourceText, int sourcePosition) {
String s1 = sourceText;
-
+
String s2 = s1.substring(sourcePosition, s1.length());
int startIndex = s2.indexOf(CHR_ESC_START);
int endIndex = s2.indexOf(CHR_ESC_STOP);
- if(startIndex >= 0 && endIndex >= 0 && startIndex == 0){
- String value = s2.substring(startIndex, endIndex+1);
- if(textSet.containsValue(value)) return value;
+ if (startIndex >= 0 && endIndex >= 0 && startIndex == 0) {
+ String value = s2.substring(startIndex, endIndex + 1);
+ if (textSet.containsValue(value))
+ return value;
}
-
+
return null;
}
-
- public static boolean isEcs(String sourceText, String visualText, int visualPosition) {
+
+ /**
+ * check if text to the right of sourcePosition is escape sequence and
+ * return offset to the end of the escape sequence
+ *
+ * @param sourceText
+ * @param sourcePosition
+ * @return offset to the end of the escape sequence or 0 if it as not found
+ */
+ public static int checkEscToRight(String sourceText, int sourcePosition) {
+
+ if ((sourceText != null) && (sourceText.length() > sourcePosition)
+ && (sourceText.charAt(sourcePosition) == CHR_ESC_START)) {
+ int end = sourceText.indexOf(CHR_ESC_STOP, sourcePosition);
+ if ((end != -1)
+ && (isEsc(sourceText.substring(sourcePosition, end + 1))))
+ return end - sourcePosition + 1;
+ }
+
+ return 0;
+ }
+
+ /**
+ * check if text to the left of sourcePosition is escape sequence and return
+ * offset to the start of the escape sequence
+ *
+ * @param sourceText
+ * @param sourcePosition
+ * @return offset to the start of the escape sequence or 0 if it as not
+ * found
+ */
+ public static int checkEscToLeft(String sourceText, int sourcePosition) {
+
+ if ((sourceText != null) && (sourceText.length() > sourcePosition)
+ && (sourceText.charAt(sourcePosition - 1) == CHR_ESC_STOP)) {
+ String cuttedString = sourceText.substring(0, sourcePosition);
+ int start = cuttedString.lastIndexOf(CHR_ESC_START);
+ if ((start != -1)
+ && (isEsc(sourceText.substring(start, sourcePosition)))) {
+
+ return start - sourcePosition;
+
+ }
+
+ }
+
+ return 0;
+ }
+
+ /**
+ * check if text is escape sequence
+ *
+ * @param text
+ * @return
+ */
+ public static boolean isEsc(String text) {
+
+ if (text.charAt(0) == CHR_ESC_START
+ && text.charAt(text.length() - 1) == CHR_ESC_STOP) {
+ // find index of the escape sequence's end
+
+ int end = text.length() - 1;
+
+ // if next symbol is '#' then escape sequence may be iso code
+ if ((text.length() > 2) && text.charAt(1) == CHR_SHARP) {
+
+ // convert string to number
+
+ int isoCode = MIN_ISO_CODE_RANGE - 1;
+
+ // if number has prefix 'x' means that it is hex number
+ int radix = text.charAt(2) == CHR_HEX_FLAG ? 16 : 10;
+ int offcet = text.charAt(2) == CHR_HEX_FLAG ? 3 : 2;
+
+ try {
+ isoCode = Integer.parseInt(text.substring(offcet, end),
+ radix);
+ } catch (NumberFormatException exception) {
+ }
+
+ // if escape sequence is iso code
+ if (isoCode >= MIN_ISO_CODE_RANGE
+ && isoCode <= MAX_ISO_CODE_RANGE) {
+ return true;
+ }
+
+ } else if (textSet.containsValue(text.substring(0, end + 1))) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @deprecated
+ * @param sourceText
+ * @param visualText
+ * @param visualPosition
+ * @return
+ */
+ public static boolean isEcs(String sourceText, String visualText,
+ int visualPosition) {
String s1 = visualText;
-
- String s3 = s1.substring(0, Math.min(visualPosition+1, s1.length()));
+
+ String s3 = s1.substring(0, Math.min(visualPosition + 1, s1.length()));
s3 = sourceText(s3);
-
+
Character ch;
int sourceIndex = 0;
int visualIndex = 0;
- for(visualIndex=0;visualIndex<s3.length();visualIndex++){
+ for (visualIndex = 0; visualIndex < s3.length(); visualIndex++) {
ch = new Character(s3.charAt(visualIndex));
-
- String value = (String)textSet.get(ch);
+
+ String value = (String) textSet.get(ch);
char sourceChar = sourceText.charAt(sourceIndex);
- if(value != null){
- if(sourceChar != ch.charValue() || (ch.charValue() == '&' && sourceText.indexOf("&",sourceIndex) >= 0)){ //$NON-NLS-1$
- if(visualIndex == visualPosition) return true;
- sourceIndex += value.length()-1;
+ if (value != null) {
+ if (sourceChar != ch.charValue()
+ || (ch.charValue() == '&' && sourceText.indexOf(
+ "&", sourceIndex) >= 0)) { //$NON-NLS-1$
+ if (visualIndex == visualPosition)
+ return true;
+ sourceIndex += value.length() - 1;
}
- }else if(s3.charAt(visualIndex) == 160){
- if(sourceChar != ' ' && sourceChar != 160){
- if(visualIndex == visualPosition) return true;
+ } else if (s3.charAt(visualIndex) == 160) {
+ if (sourceChar != ' ' && sourceChar != 160) {
+ if (visualIndex == visualPosition)
+ return true;
sourceIndex += 5;
}
}
@@ -120,37 +240,41 @@
return false;
}
-// public static int sourcePosition(String sourceText, String visualText, int visualPosition) {
-// String s1 = visualText;
-//
-// String s3 = s1.substring(0, Math.min(visualPosition, s1.length()));
-// s3 = sourceText(s3);
-//
-// Character ch;
-// int sourceIndex = 0;
-// int visualIndex = 0;
-// for(visualIndex=0;visualIndex<s3.length();visualIndex++){
-// ch = new Character(s3.charAt(visualIndex));
-//
-// String value = (String)textSet.get(ch);
-// char sourceChar = sourceText.charAt(sourceIndex);
-// if(value != null){
-// if(sourceChar != ch.charValue() || (ch.charValue() == '&' && sourceText.indexOf("&",sourceIndex) >= 0)){
-// sourceIndex += value.length()-1;
-// }
-// }else if(s3.charAt(visualIndex) == 160){
-// if(sourceChar != ' ' && sourceChar != 160){
-// sourceIndex += 5;
-// }
-// }
-// sourceIndex++;
-// }
-// return s3.length()+(sourceIndex-visualIndex);
-// }
- public static int sourcePosition(String sourceText, String visualText, int visualPosition) {
+ // public static int sourcePosition(String sourceText, String visualText,
+ // int visualPosition) {
+ // String s1 = visualText;
+ //
+ // String s3 = s1.substring(0, Math.min(visualPosition, s1.length()));
+ // s3 = sourceText(s3);
+ //
+ // Character ch;
+ // int sourceIndex = 0;
+ // int visualIndex = 0;
+ // for(visualIndex=0;visualIndex<s3.length();visualIndex++){
+ // ch = new Character(s3.charAt(visualIndex));
+ //
+ // String value = (String)textSet.get(ch);
+ // char sourceChar = sourceText.charAt(sourceIndex);
+ // if(value != null){
+ // if(sourceChar != ch.charValue() || (ch.charValue() == '&' &&
+ // sourceText.indexOf("&",sourceIndex) >= 0)){
+ // sourceIndex += value.length()-1;
+ // }
+ // }else if(s3.charAt(visualIndex) == 160){
+ // if(sourceChar != ' ' && sourceChar != 160){
+ // sourceIndex += 5;
+ // }
+ // }
+ // sourceIndex++;
+ // }
+ // return s3.length()+(sourceIndex-visualIndex);
+ // }
+ public static int sourcePosition(String sourceText, String visualText,
+ int visualPosition) {
int sourceIndex = 0;
int visualIndex = 0;
- while (sourceIndex < sourceText.length() && visualIndex < visualPosition) {
+ while (sourceIndex < sourceText.length()
+ && visualIndex < visualPosition) {
char sourceChar = sourceText.charAt(sourceIndex);
if (sourceChar == '\r') {
if (visualText.charAt(visualIndex) == '\r') {
@@ -158,47 +282,19 @@
}
sourceIndex++;
} else if (sourceChar == CHR_ESC_START) {
- // find index of the escape sequence's end
+ // find index of the escape sequence's end
int end = sourceText.indexOf(CHR_ESC_STOP, sourceIndex + 1);
-
- // if next symbol is '#' then escape sequence may be iso code
- if (end != -1 && (sourceIndex + 2 < sourceText.length())
- && sourceText.charAt(sourceIndex + 1) == CHR_SHARP) {
-
- //convert string to number
-
- int isoCode = MIN_ISO_CODE_RANGE - 1;
-
- // if number has prefix 'x' means that it is hex number
- int radix = sourceText.charAt(sourceIndex + 2) == CHR_HEX_FLAG ? 16
- : 10;
- int offcet = sourceText.charAt(sourceIndex + 2) == CHR_HEX_FLAG ? 3
- : 2;
- try {
- isoCode = Integer.parseInt(sourceText.substring(
- sourceIndex + offcet, end), radix);
- } catch (NumberFormatException exception) {
- }
-
- // if escape sequence is iso code
- if (isoCode >= MIN_ISO_CODE_RANGE
- && isoCode <= MAX_ISO_CODE_RANGE) {
- sourceIndex += end - sourceIndex;
- }
+ // if it is escape sequence
+ if ((end != -1)
+ && isEsc(sourceText.substring(sourceIndex, end + 1))) {
- }
- // check is escape sequence is contained in the list
- else if (end != -1
- && textSet.containsValue(sourceText.substring(
- sourceIndex, end + 1))) {
sourceIndex += end - sourceIndex;
}
sourceIndex++;
visualIndex++;
- }
- else {
+ } else {
sourceIndex++;
visualIndex++;
}
@@ -207,30 +303,33 @@
}
public static int sourceInnerPosition(String visualText, long visualPosition) {
- visualText = visualText.substring(0, (int)Math.min(visualPosition, visualText.length()));
+ visualText = visualText.substring(0, (int) Math.min(visualPosition,
+ visualText.length()));
String sourceText = visualText.replaceAll(VISUAL_BREAK, SOURCE_BREAK);
return sourceText.length();
}
-
+
public static int visualPosition(String sourceText, int sourcePosition) {
int calcPosition = sourcePosition;
- if(sourceText==null) {
+ if (sourceText == null) {
return 0;
}
int start = sourceText.indexOf(CHR_ESC_START);
- while (start != -1 && start < sourcePosition && start + 1 < sourceText.length()) {
+ while (start != -1 && start < sourcePosition
+ && start + 1 < sourceText.length()) {
int stop = sourceText.indexOf(CHR_ESC_STOP, start + 1);
if (stop == -1) {
break;
} else if (stop < sourcePosition) {
- if (textSet.containsValue(sourceText.substring(start, stop + 1))) {
+ if (textSet
+ .containsValue(sourceText.substring(start, stop + 1))) {
calcPosition -= stop - start;
}
if (stop + 1 < sourceText.length()) {
start = sourceText.indexOf(CHR_ESC_START, stop + 1);
} else {
break;
- }
+ }
} else {
calcPosition -= sourcePosition - start;
break;
@@ -240,76 +339,84 @@
String s2 = s1.replaceAll(SOURCE_BREAK, VISUAL_BREAK);
return calcPosition - (s1.length() - s2.length());
}
-
+
public static int visualInnerPosition(String sourceText, int sourcePosition) {
- sourceText = sourceText.substring(0, Math.min(sourcePosition, sourceText.length()));
+ sourceText = sourceText.substring(0, Math.min(sourcePosition,
+ sourceText.length()));
String visualText = sourceText.replaceAll(SOURCE_BREAK, VISUAL_BREAK);
return visualText.length();
}
-
+
public static int _visualPosition(String sourceText, int sourcePosition) {
int delta = 7;
- if(sourcePosition+delta > sourceText.length()) delta = sourceText.length()-sourcePosition;
- int position = Math.min(sourcePosition+delta, sourceText.length());
-
+ if (sourcePosition + delta > sourceText.length())
+ delta = sourceText.length() - sourcePosition;
+ int position = Math.min(sourcePosition + delta, sourceText.length());
+
String s1 = sourceText.substring(0, position);
- int start1 = s1.length()-delta;
- if(position < sourceText.length()){
- while(position > sourcePosition){
+ int start1 = s1.length() - delta;
+ if (position < sourceText.length()) {
+ while (position > sourcePosition) {
int ampersandPosition = s1.lastIndexOf("&"); //$NON-NLS-1$
int semicolonPosition = s1.lastIndexOf(";"); //$NON-NLS-1$
- if(ampersandPosition > 0 && semicolonPosition > 0 && ampersandPosition < semicolonPosition && (semicolonPosition+1) > sourcePosition){
- String value = s1.substring(ampersandPosition, semicolonPosition+1);
- if(textSet.containsValue(value))
+ if (ampersandPosition > 0 && semicolonPosition > 0
+ && ampersandPosition < semicolonPosition
+ && (semicolonPosition + 1) > sourcePosition) {
+ String value = s1.substring(ampersandPosition,
+ semicolonPosition + 1);
+ if (textSet.containsValue(value))
position = ampersandPosition;
- else
+ else
position--;
- }else if(ampersandPosition > 0 && semicolonPosition > 0 && semicolonPosition > sourcePosition){
- position = semicolonPosition+1;
- }else{
+ } else if (ampersandPosition > 0 && semicolonPosition > 0
+ && semicolonPosition > sourcePosition) {
+ position = semicolonPosition + 1;
+ } else {
position--;
}
s1 = s1.substring(0, position);
}
- }else{
+ } else {
position -= delta;
s1 = s1.substring(0, position);
}
int start2 = s1.length();
int startLength = s1.length();
-
- String[] strings = (String[]) textSet.values().toArray(new String[]{});
- for(int i=0;i<strings.length;i++){
- s1 = s1.replaceAll(strings[i]," "); //$NON-NLS-1$
+
+ String[] strings = (String[]) textSet.values().toArray(new String[] {});
+ for (int i = 0; i < strings.length; i++) {
+ s1 = s1.replaceAll(strings[i], " "); //$NON-NLS-1$
}
s1 = visualText(s1);
- return sourcePosition-(startLength - s1.length())-(start1-start2);
+ return sourcePosition - (startLength - s1.length()) - (start1 - start2);
}
-
+
public static String visualText(String sourceText) {
return sourceText.replaceAll(SOURCE_BREAK, VISUAL_BREAK);
}
-
+
public static String sourceText(String visualText) {
- return visualText.replaceAll(VISUAL_BREAK, SOURCE_BREAK).replace(VISUAL_SPACE, SOURCE_SPACE);
+ return visualText.replaceAll(VISUAL_BREAK, SOURCE_BREAK).replace(
+ VISUAL_SPACE, SOURCE_SPACE);
}
public static boolean isWhitespace(char sourceString) {
- String visualString = visualText((new Character(sourceString)).toString());
+ String visualString = visualText((new Character(sourceString))
+ .toString());
return SPCHARS.indexOf(sourceString) != -1;
}
-
+
public static boolean isWhitespaceText(String sourceString) {
if (sourceString != null && sourceString.length() > 0) {
char[] chars = sourceString.toCharArray();
for (int i = 0; i < sourceString.length(); i++) {
- if (!TextUtil.isWhitespace(sourceString.charAt(i)))
+ if (!TextUtil.isWhitespace(sourceString.charAt(i)))
return false;
}
}
return true;
}
-
+
public static String getChar(nsIDOMKeyEvent keyEvent) {
// get inserted string
long charCode = keyEvent.getCharCode();
@@ -322,14 +429,13 @@
return str;
}
-
- /**
- * @param value
- * @return
- */
- public static boolean isContainsEl(final String value) {
- return (value.contains("#{") || value.contains("${")); //$NON-NLS-1$//$NON-NLS-2$
- }
+ /**
+ * @param value
+ * @return
+ */
+ public static boolean isContainsEl(final String value) {
+ return (value.contains("#{") || value.contains("${")); //$NON-NLS-1$//$NON-NLS-2$
+ }
}
15 years, 8 months
JBoss Tools SVN: r14525 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-04-06 12:33:58 -0400 (Mon, 06 Apr 2009)
New Revision: 14525
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
Log:
JBIDE-4044 Review unused strings as reported by "Find Broken Externalized Strings"
The unused property JSPMultiPageEditor.TabLabel.Visual is commented out from org.jboss.tools.jst.jsp.jspeditor.JSPEditorMessages bundle.
The property is subject to remove.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2009-04-06 16:30:21 UTC (rev 14524)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPEditorMessages.properties 2009-04-06 16:33:58 UTC (rev 14525)
@@ -1,7 +1,7 @@
# used in org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor
JSPMultiPageEditor.TabLabel.VisualSource = Visual/Source
# apparently unused
-JSPMultiPageEditor.TabLabel.Visual = Visual
+#JSPMultiPageEditor.TabLabel.Visual = Visual
JSPMultiPageEditor.TabLabel.Source = Source
JSPMultiPageEditor.TabLabel.Preview = Preview
15 years, 8 months
JBoss Tools SVN: r14524 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-04-06 12:30:21 -0400 (Mon, 06 Apr 2009)
New Revision: 14524
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
Log:
RESOLVED - issue JBIDE-3576: EL expression overriding
https://jira.jboss.org/jira/browse/JBIDE-3576
- fixed behavior of the dialog if it is called from Window->Preferences
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2009-04-06 15:48:52 UTC (rev 14523)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2009-04-06 16:30:21 UTC (rev 14524)
@@ -59,7 +59,15 @@
} else {
// yradtsevich: JBIDE-3576: EL expression overriding
// check if there is no another EL reference in the same scope with the same name
- final int selectedScope = ((BaseAddReferenceSupport)support).getSelectedScope(data);
+
+ int selectedScope = ((BaseAddReferenceSupport)support).getSelectedScope(data);
+
+ /* XXX yradtsevich: BaseAddReferenceSupport.getSelectedScope(...) returns an
+ * incorrect scope if the scope is global. So we need to fix it. */
+ if (editingReference.isGlobal()) {
+ selectedScope = ResourceReference.GLOBAL_SCOPE;
+ }
+
for (ResourceReference listItemReference : currentReferenceList) {
if (editingReference != listItemReference
&& listItemReference.getScope() == selectedScope
15 years, 8 months
JBoss Tools SVN: r14523 - in workspace/dart/smooksConfigurationsEditor: org.jboss.tools.smooks.core/model and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-06 11:48:52 -0400 (Mon, 06 Apr 2009)
New Revision: 14523
Modified:
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/smooks.ecore
workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.model.edit/src/common/provider/AbstractAnyTypeItemProvider.java
Log:
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-06 15:42:17 UTC (rev 14522)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.configuration/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-06 15:48:52 UTC (rev 14523)
@@ -292,13 +292,14 @@
resource.save(options);
monitor.worked(1);
}
+ ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
+ textEditor.doRevertToSaved();
+ firePropertyChange(PROP_DIRTY);
} catch (IOException e) {
SmooksConfigurationActivator.getDefault().log(e);
} finally {
monitor.done();
}
- ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
- firePropertyChange(PROP_DIRTY);
}
}
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/smooks.ecore
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/smooks.ecore 2009-04-06 15:42:17 UTC (rev 14522)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.core/model/smooks.ecore 2009-04-06 15:48:52 UTC (rev 14523)
@@ -3,13 +3,14 @@
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="smooks"
nsURI="http://www.milyn.org/xsd/smooks-1.0.xsd" nsPrefix="smooks">
- <eClassifiers xsi:type="ecore:EClass" name="AbstractResourceConfig" abstract="true">
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractResourceConfig" abstract="true"
+ eSuperTypes="#//AbstractType">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="abstract-resource-config"/>
<details key="kind" value="empty"/>
</eAnnotations>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ConditionType">
+ <eClassifiers xsi:type="ecore:EClass" name="ConditionType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Resource Targetting Condition"/>
</eAnnotations>
@@ -159,7 +160,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ParamType" eSuperTypes="http://www.eclipse.org/emf/2003/XMLType#//AnyType">
+ <eClassifiers xsi:type="ecore:EClass" name="ParamType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Resource Parameter"/>
</eAnnotations>
@@ -180,7 +181,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ProfilesType">
+ <eClassifiers xsi:type="ecore:EClass" name="ProfilesType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="List of Profiles"/>
</eAnnotations>
@@ -197,7 +198,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ProfileType">
+ <eClassifiers xsi:type="ecore:EClass" name="ProfileType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Profile Configuration. Basically allows you to specify the name of a
 base profile along with a list of its sub-profiles.
 "/>
</eAnnotations>
@@ -276,7 +277,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ResourceType" eSuperTypes="http://www.eclipse.org/emf/2003/XMLType#//AnyType">
+ <eClassifiers xsi:type="ecore:EClass" name="ResourceType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="Resource Configuration Resource Type (xsl, class etc)"/>
</eAnnotations>
@@ -291,7 +292,7 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="SmooksResourceListType">
+ <eClassifiers xsi:type="ecore:EClass" name="SmooksResourceListType" eSuperTypes="#//AbstractType">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="List of Smooks Resource Configuration."/>
</eAnnotations>
@@ -345,4 +346,5 @@
</eAnnotations>
</eStructuralFeatures>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AbstractType" abstract="true" eSuperTypes="http://www.eclipse.org/emf/2003/XMLType#//AnyType"/>
</ecore:EPackage>
Modified: workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.model.edit/src/common/provider/AbstractAnyTypeItemProvider.java
===================================================================
--- workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.model.edit/src/common/provider/AbstractAnyTypeItemProvider.java 2009-04-06 15:42:17 UTC (rev 14522)
+++ workspace/dart/smooksConfigurationsEditor/org.jboss.tools.smooks.model.edit/src/common/provider/AbstractAnyTypeItemProvider.java 2009-04-06 15:48:52 UTC (rev 14523)
@@ -153,145 +153,145 @@
(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
"")));
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
- "")));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
- XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
- "")));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XslPackage.Literals.DOCUMENT_ROOT__XSL,
- XslFactory.eINSTANCE.createXsl())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
- SmooksFactory.eINSTANCE.createConditionsType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
- SmooksFactory.eINSTANCE.createFeaturesType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
- SmooksFactory.eINSTANCE.createHandlerType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
- SmooksFactory.eINSTANCE.createHandlersType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
- SmooksFactory.eINSTANCE.createImportType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
- SmooksFactory.eINSTANCE.createParamType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
- SmooksFactory.eINSTANCE.createParamsType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
- SmooksFactory.eINSTANCE.createProfileType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
- SmooksFactory.eINSTANCE.createProfilesType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
- SmooksFactory.eINSTANCE.createReaderType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
- SmooksFactory.eINSTANCE.createResourceType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
- SmooksFactory.eINSTANCE.createResourceConfigType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
- SmooksFactory.eINSTANCE.createSetOffType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
- SmooksFactory.eINSTANCE.createSetOnType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
- SmooksFactory.eINSTANCE.createSmooksResourceListType())));
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
+// XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XslPackage.Literals.DOCUMENT_ROOT__XSL,
+// XslFactory.eINSTANCE.createXsl())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
+// SmooksFactory.eINSTANCE.createConditionType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
+// SmooksFactory.eINSTANCE.createConditionsType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
+// SmooksFactory.eINSTANCE.createFeaturesType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
+// SmooksFactory.eINSTANCE.createHandlerType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
+// SmooksFactory.eINSTANCE.createHandlersType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
+// SmooksFactory.eINSTANCE.createImportType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
+// SmooksFactory.eINSTANCE.createParamType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
+// SmooksFactory.eINSTANCE.createParamsType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
+// SmooksFactory.eINSTANCE.createProfileType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
+// SmooksFactory.eINSTANCE.createProfilesType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
+// SmooksFactory.eINSTANCE.createReaderType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
+// SmooksFactory.eINSTANCE.createResourceType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
+// SmooksFactory.eINSTANCE.createResourceConfigType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
+// SmooksFactory.eINSTANCE.createSetOffType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
+// SmooksFactory.eINSTANCE.createSetOnType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
+// SmooksFactory.eINSTANCE.createSmooksResourceListType())));
}
/**
15 years, 8 months
JBoss Tools SVN: r14522 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-06 11:42:17 -0400 (Mon, 06 Apr 2009)
New Revision: 14522
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditor.java
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.properties
Log:
JBIDE-4044
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditor.java 2009-04-06 15:32:12 UTC (rev 14521)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditor.java 2009-04-06 15:42:17 UTC (rev 14522)
@@ -356,14 +356,12 @@
List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
ToolEntry tool = new SelectionToolEntry();
- tool.setDescription(TilesEditorMessages
- .getString("TilesDiagram.select")); //$NON-NLS-1$
+ tool.setDescription(TilesEditorMessages.TilesDiagram_select);
entries.add(tool);
root.setDefaultEntry(tool);
tool = new MarqueeToolEntry();
- tool.setDescription(TilesEditorMessages
- .getString("TilesDiagram.marquee")); //$NON-NLS-1$
+ tool.setDescription(TilesEditorMessages.TilesDiagram_marquee);
entries.add(tool);
PaletteSeparator sep = new PaletteSeparator("separator"); //$NON-NLS-1$
@@ -372,10 +370,8 @@
entries.add(sep); //$NON-NLS-1$
connectionCreationTool = new GEFConnectionCreationToolEntry(
- TilesEditorMessages
- .getString("TilesDiagram.create-new-connection"), //$NON-NLS-1$
- TilesEditorMessages
- .getString("TilesDiagram.create-new-connection"), //$NON-NLS-1$
+ TilesEditorMessages.TilesDiagram_create_new_connection,
+ TilesEditorMessages.TilesDiagram_create_new_connection,
null, ImageDescriptor.createFromFile(TilesEditor.class,
"icons/new_transition.gif"),//$NON-NLS-1$
null//$NON-NLS-1$
@@ -390,10 +386,8 @@
entries.add(sep);
CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
- TilesEditorMessages
- .getString("TilesDiagram.defenition-template"), //$NON-NLS-1$
- TilesEditorMessages
- .getString("TilesDiagram.defenition-template"), //$NON-NLS-1$
+ TilesEditorMessages.TilesDiagram_defenition_template,
+ TilesEditorMessages.TilesDiagram_defenition_template,
TemplateConstants.TEMPLATE_DEFINITION, new SimpleFactory(
String.class), ImageDescriptor.createFromFile(
TilesEditor.class, "icons/new_definition.gif"), //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.java 2009-04-06 15:32:12 UTC (rev 14521)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.java 2009-04-06 15:42:17 UTC (rev 14522)
@@ -13,6 +13,7 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.jst.web.tiles.ui.TilesUIPlugin;
/**
@@ -23,22 +24,20 @@
*/
public class TilesEditorMessages {
- private static final String RESOURCE_BUNDLE= "org.jboss.tools.jst.web.tiles.ui.editor.TilesEditorMessages";
+ private static final String BUNDLE_NAME= "org.jboss.tools.jst.web.tiles.ui.editor.TilesEditorMessages";
+
+ public static String TilesDiagram_select;
+
+ public static String TilesDiagram_marquee;
+
+ public static String TilesDiagram_create_new_connection;
+
+ public static String TilesDiagram_defenition_template;
- private static ResourceBundle resourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
- private TilesEditorMessages() {}
-
- public static String getString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- TilesUIPlugin.getPluginLog().logError(e);
- return "%" + key + "%";
- }
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, TilesEditorMessages.class);
}
-
- public static ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.properties 2009-04-06 15:32:12 UTC (rev 14521)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesEditorMessages.properties 2009-04-06 15:42:17 UTC (rev 14522)
@@ -1,174 +1,8 @@
#####
# TilesDiagram
#####
-TilesDiagram.select = Select
-TilesDiagram.marquee = Marquee
-TilesDiagram.create-new-connection = Create New Connection
-TilesDiagram.defenition-template = Definition Template
+TilesDiagram_select = Select
+TilesDiagram_marquee = Marquee
+TilesDiagram_create_new_connection = Create New Connection
+TilesDiagram_defenition_template = Definition Template
-#####
-# TilesConfigDescriptionForm
-#####
-
-TilesConfigDescriptionForm.description = Description description description
-TilesConfigDescriptionForm.header = Tiles Config Description
-
-TilesConfigDescriptionForm.name.label = Name
-TilesConfigDescriptionForm.name.attribute = name
-
-TilesConfigDescriptionForm.encoding.label = Encoding
-TilesConfigDescriptionForm.encoding.attribute = encoding
-
-#####
-# TilesDefinitionsForm
-#####
-
-TilesDefinitionsForm.description = Description description description
-TilesDefinitionsForm.header = Definitions
-
-#####
-# BasicDefinitionForm
-#####
-
-BasicDefinitionForm.description = Description description description
-BasicDefinitionForm.header = Basic
-
-BasicDefinitionForm.name.label = Name
-BasicDefinitionForm.name.attribute = name
-
-BasicDefinitionForm.extends.label = Extends
-BasicDefinitionForm.extends.attribute = extends
-
-BasicDefinitionForm.path.label = Path
-BasicDefinitionForm.path.attribute = path
-
-BasicDefinitionForm.controllerClass.label = Controller Class
-BasicDefinitionForm.controllerClass.attribute = controllerClass
-
-BasicDefinitionForm.controllerUrl.label = Controller URL
-BasicDefinitionForm.controllerUrl.attribute = controllerUrl
-
-#####
-# AdvancedDefinitionForm
-#####
-
-AdvancedDefinitionForm.description = Description description description
-AdvancedDefinitionForm.header = Advanced
-
-AdvancedDefinitionForm.id.label = Id
-AdvancedDefinitionForm.id.attribute = id
-
-AdvancedDefinitionForm.displayname.label = Display Name
-AdvancedDefinitionForm.displayname.attribute = display-name
-
-AdvancedDefinitionForm.description.label = Description
-AdvancedDefinitionForm.description.attribute = description
-
-AdvancedDefinitionForm.role.label = Role
-AdvancedDefinitionForm.role.attribute = role
-
-AdvancedDefinitionForm.smallicon.label = Small Icon
-AdvancedDefinitionForm.smallicon.attribute = small-icon
-
-AdvancedDefinitionForm.largeicon.label = Large Icon
-AdvancedDefinitionForm.largeicon.attribute = large-icon
-
-#####
-# DeprecatedDefinitionForm
-#####
-
-DeprecatedDefinitionForm.description = Description description description
-DeprecatedDefinitionForm.header = Deprecated
-
-DeprecatedDefinitionForm.page.label = Page
-DeprecatedDefinitionForm.page.attribute = page
-
-DeprecatedDefinitionForm.template.label = Template
-DeprecatedDefinitionForm.template.attribute = template
-
-#####
-# PutsForm
-#####
-
-PutsForm.description = Description description description
-PutsForm.header = Put
-
-#####
-# PutListsForm
-#####
-
-PutListsForm.description = Description description description
-PutListsForm.header = Put List
-
-#####
-# BasicPutForm
-#####
-
-BasicPutForm.description = Description description description
-BasicPutForm.header = Basic
-
-BasicPutForm.name.label = Name
-BasicPutForm.name.attribute = name
-
-BasicPutForm.type.label = Type
-BasicPutForm.type.attribute = type
-
-BasicPutForm.value.label = Value
-BasicPutForm.value.attribute = value
-
-BasicPutForm.content.label = Content
-BasicPutForm.content.attribute = save value as 'content' attr
-
-#####
-# AdvancedPutForm
-#####
-
-AdvancedPutForm.description = Description description description
-AdvancedPutForm.header = Advanced
-
-AdvancedPutForm.id.label = Id
-AdvancedPutForm.id.attribute = id
-
-#####
-# DeprecatedPutForm
-#####
-
-DeprecatedPutForm.description = Description description description
-DeprecatedPutForm.header = Deprecated
-
-DeprecatedPutForm.direct.label = Direct
-DeprecatedPutForm.direct.attribute = direct
-
-#####
-# PutListForm
-#####
-
-PutListForm.description = Description description description
-PutListForm.header = Attributes
-
-PutListForm.name.label = Name
-PutListForm.name.attribute = name
-
-PutListForm.id.label = Id
-PutListForm.id.attribute = id
-
-#####
-# AddForm
-#####
-
-AddForm.description = Description description description
-AddForm.header = Add
-
-#####
-# ItemForm
-#####
-
-ItemForm.description = Description description description
-ItemForm.header = Item
-
-#####
-# BeanForm
-#####
-
-BeanForm.description = Description description description
-BeanForm.header = Bean
\ No newline at end of file
15 years, 8 months
JBoss Tools SVN: r14521 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-04-06 11:32:12 -0400 (Mon, 06 Apr 2009)
New Revision: 14521
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-04-06 15:16:17 UTC (rev 14520)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/RenameComponentWizard.java 2009-04-06 15:32:12 UTC (rev 14521)
@@ -20,6 +20,7 @@
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.internal.core.refactoring.RenameComponentProcessor;
+import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
@@ -63,7 +64,7 @@
layout.numColumns = 2;
String defaultName = component.getName();
- editor = IFieldEditorFactory.INSTANCE.createTextEditor(componentName, "Seam component name:", defaultName);
+ editor = IFieldEditorFactory.INSTANCE.createTextEditor(componentName, SeamUIMessages.SEAM_WIZARD_FACTORY_SEAM_COMPONENT_NAME, defaultName);
editor.doFillIntoGrid(container);
setControl(container);
15 years, 8 months