JBoss Tools SVN: r16511 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-07-09 05:41:36 -0400 (Thu, 09 Jul 2009)
New Revision: 16511
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3225, JUnit for RF InplaceInput template was fixed.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2009-07-09 08:38:47 UTC (rev 16510)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2009-07-09 09:41:36 UTC (rev 16511)
@@ -51,7 +51,7 @@
/** The Constant TEMPLATE_WITH_VALUE_ATTR. */
private static final String TEMPLATE_WITH_VALUE_ATTR = "components/inplaceInput/inplaceInputWithValueAttribute.xhtml"; //$NON-NLS-1$
- private static final String EMPTY_INPUT_STRING = "���"; //$NON-NLS-1$
+ private static final String EMPTY_INPUT_STRING = "\u00A0\u00A0\u00A0"; //$NON-NLS-1$
/**
* The Constructor.
16 years, 9 months
JBoss Tools SVN: r16510 - trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-07-09 04:38:47 -0400 (Thu, 09 Jul 2009)
New Revision: 16510
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java
Log:
JBIDE-2512 Test was wrong and has been fixed. This is a test that tests the getModuleURI debacle
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java 2009-07-09 07:53:28 UTC (rev 16509)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE2512bTest.java 2009-07-09 08:38:47 UTC (rev 16510)
@@ -36,6 +36,6 @@
String uri = enterpriseApplication.getURI(ejbModule);
assertNotNull("URI is null", uri);
- assertTrue("URI does not have the expected value", "JBIDE2512b-ejb.jar".equals(uri));
+ assertTrue("URI does not have the expected value", "lib/JBIDE2512b-ejb.jar".equals(uri));
}
}
16 years, 9 months
JBoss Tools SVN: r16509 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/toolbar/format/css and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-09 03:53:28 -0400 (Thu, 09 Jul 2009)
New Revision: 16509
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignLeftFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignRightFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/MultiPropertyValue.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleAttribute.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleProperty.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/BlockFormatHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/SimpleTagHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashForm.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignLeftFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignLeftFormatController.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignLeftFormatController.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -20,7 +20,7 @@
*/
public class AlignLeftFormatController extends ToolItemFormatController {
- public static String TYPE = "AlignLeftFormat";
+ public static String TYPE = "AlignLeftFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignRightFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignRightFormatController.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AlignRightFormatController.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -20,7 +20,7 @@
*/
public class AlignRightFormatController extends ToolItemFormatController {
- public static String TYPE = "AlignRightFormat";
+ public static String TYPE = "AlignRightFormat"; //$NON-NLS-1$
/**
* @param manager
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/AttributeFormatController.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -140,7 +140,7 @@
}
protected Attr getStyleAttributeFromSelectedNode(boolean ignoreCase) {
- return getAttributeFromSelectedNode("style", ignoreCase);
+ return getAttributeFromSelectedNode("style", ignoreCase); //$NON-NLS-1$
}
protected static Attr createAttribute(Node node, FormatAttributeData data) {
@@ -151,7 +151,7 @@
String message = "Wrong vpe template for tag " + node.getNodeName() + ". Attribute 'name' or 'type' of <vpe:formatAttribute> must be set.";
VpePlugin.getDefault().getLog().log(new Status(Status.ERROR, VpePlugin.PLUGIN_ID, Status.OK, message, new Exception(message)));
}
- element.setAttribute(name, "");
+ element.setAttribute(name, ""); //$NON-NLS-1$
return element.getAttributeNode(name);
}
return null;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/MultiPropertyValue.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/MultiPropertyValue.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/MultiPropertyValue.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -32,10 +32,10 @@
}
private void parse(String value) {
- StringTokenizer tokenizer = new StringTokenizer(value, " ", true);
+ StringTokenizer tokenizer = new StringTokenizer(value, " ", true); //$NON-NLS-1$
while(tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
- if(token.equals(" ")) {
+ if(token.equals(" ")) { //$NON-NLS-1$
tokens.add(new Token(token));
} else {
tokens.add(new SinglePropertyValue(token));
@@ -80,8 +80,8 @@
SinglePropertyValue propertyValue = getSinglePropertyValue(value);
if(propertyValue==null) {
String newValue = value;
- if(!((Token)tokens.get(tokens.size()-1)).getDirtyValue().endsWith(" ")) {
- newValue = " " + newValue;
+ if(!((Token)tokens.get(tokens.size()-1)).getDirtyValue().endsWith(" ")) { //$NON-NLS-1$
+ newValue = " " + newValue; //$NON-NLS-1$
}
return tokens.add(new SinglePropertyValue(newValue));
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleAttribute.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleAttribute.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleAttribute.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -40,10 +40,10 @@
private void parse(String value) {
tokens.clear();
- StringTokenizer tokenizer = new StringTokenizer(value, ";", true);
+ StringTokenizer tokenizer = new StringTokenizer(value, ";", true); //$NON-NLS-1$
while(tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
- if(token.equals(";")) {
+ if(token.equals(";")) { //$NON-NLS-1$
tokens.add(new Token(token));
} else {
tokens.add(new StyleProperty(token));
@@ -58,14 +58,14 @@
public boolean addStyleProperty(String name, String value) {
StyleProperty property = getProperty(name);
if(property==null) {
- String space = "";
+ String space = ""; //$NON-NLS-1$
if(tokens.size()>0) {
Token token = (Token)tokens.get(0);
- if(!token.toString().startsWith(" ")) {
- space = " ";
+ if(!token.toString().startsWith(" ")) { //$NON-NLS-1$
+ space = " "; //$NON-NLS-1$
}
}
- StyleProperty newProperty = new StyleProperty(name + ": " + value + ";" + space);
+ StyleProperty newProperty = new StyleProperty(name + ": " + value + ";" + space); //$NON-NLS-1$ //$NON-NLS-2$
tokens.add(0, newProperty);
} else {
SinglePropertyValue propertyValue = property.getSinglePropertyValue(value);
@@ -122,7 +122,7 @@
int index = tokens.indexOf(property) + 1;
if(index<tokens.size()) {
Token nextToken = (Token)tokens.get(index);
- if(nextToken.getDirtyValue().equals(";")) {
+ if(nextToken.getDirtyValue().equals(";")) { //$NON-NLS-1$
tokens.remove(index);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleProperty.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleProperty.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/css/StyleProperty.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -37,10 +37,10 @@
}
private void parse(String value) {
- StringTokenizer tokenizer = new StringTokenizer(value, ":", true);
+ StringTokenizer tokenizer = new StringTokenizer(value, ":", true); //$NON-NLS-1$
while(tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
- if(token.equals(":")) {
+ if(token.equals(":")) { //$NON-NLS-1$
tokens.add(new Token(token));
} else if(name==null) {
name = new Token(token);
@@ -124,7 +124,7 @@
if(singlePropertyValue==null) {
MultiPropertyValue propertyValue = getPropertyValue();
if(propertyValue==null) {
- MultiPropertyValue newPropertyValue = new MultiPropertyValue(" " + value);
+ MultiPropertyValue newPropertyValue = new MultiPropertyValue(" " + value); //$NON-NLS-1$
tokens.add(newPropertyValue);
return true;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/BlockFormatHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/BlockFormatHandler.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/BlockFormatHandler.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -44,7 +44,7 @@
}
boolean normal = false;
- if ("normal".equals(tagName)) {
+ if ("normal".equals(tagName)) { //$NON-NLS-1$
normal = true;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -107,19 +107,19 @@
Properties p = new Properties();
p.setProperty(PaletteInsertHelper.PROPOPERTY_TAG_NAME, elementName);
- p.setProperty(PaletteInsertHelper.PROPOPERTY_START_TEXT, "<" + elementName + ">");
- p.setProperty(PaletteInsertHelper.PROPOPERTY_END_TEXT, "</" + elementName + ">");
+ p.setProperty(PaletteInsertHelper.PROPOPERTY_START_TEXT, "<" + elementName + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.setProperty(PaletteInsertHelper.PROPOPERTY_END_TEXT, "</" + elementName + ">"); //$NON-NLS-1$ //$NON-NLS-2$
if(format) {
- p.setProperty(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, "yes");
+ p.setProperty(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, "yes"); //$NON-NLS-1$
}
- p.setProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, "http://www.w3.org/TR/REC-html40");
- p.setProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, "");
+ p.setProperty(PaletteInsertHelper.PROPOPERTY_TAGLIBRARY_URI, "http://www.w3.org/TR/REC-html40"); //$NON-NLS-1$
+ p.setProperty(PaletteInsertHelper.PROPOPERTY_DEFAULT_PREFIX, ""); //$NON-NLS-1$
ITextSelection sel = new TextSelection(startOffcet, length);
ISelectionProvider selProvider = viewer.getSelectionProvider();
selProvider.setSelection(sel);
- p.put("selectionProvider", selProvider);
+ p.put("selectionProvider", selProvider); //$NON-NLS-1$
PaletteInsertHelper.insertIntoEditor(viewer, p);
@@ -165,7 +165,7 @@
if(element!=selectedNode) {
newStartOffset = newStartOffset + body.indexOf(selectedSource);
}
- if(body.startsWith("\r\n") || body.startsWith("\n")) {
+ if(body.startsWith("\r\n") || body.startsWith("\n")) { //$NON-NLS-1$ //$NON-NLS-2$
//most probably, in this case white spaces were used
//for formatting inside parent tag, and this formatting must be removed
body = body.trim();
@@ -173,7 +173,7 @@
try {
document.replace(element.getStartOffset(), length, body);
} catch (BadLocationException e) {
- VpePlugin.getPluginLog().logError("Can't format text", e);
+ VpePlugin.getPluginLog().logError("Can't format text", e); //$NON-NLS-1$
}
viewer.setSelectedRange(newStartOffset, 0);
@@ -185,7 +185,7 @@
IDocument document = viewer.getDocument();
// Append start part - "<tag";
- StringBuffer resultNode = new StringBuffer("<").append(newName);
+ StringBuffer resultNode = new StringBuffer("<").append(newName); //$NON-NLS-1$
int endOffcet = element.getEndOffset() - element.getStartOffset();
int startEndOffcet = element.getStartEndOffset() - element.getStartOffset();
@@ -202,7 +202,7 @@
String endtagName = element.getEndTagName();
if(endtagName!=null) {
// Append - "</tag";
- resultNode.append("</").append(newName);
+ resultNode.append("</").append(newName); //$NON-NLS-1$
// Append - ">";
resultNode.append(source.substring(endStartOffcet + 2 + endtagName.length()));
}
@@ -216,7 +216,7 @@
try {
document.replace(element.getStartOffset(), length, newElement);
} catch (BadLocationException e) {
- VpePlugin.getPluginLog().logError("Can't format text", e);
+ VpePlugin.getPluginLog().logError("Can't format text", e); //$NON-NLS-1$
}
viewer.setSelectedRange(newStartOffset, 0);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/SimpleTagHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/SimpleTagHandler.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/SimpleTagHandler.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -62,9 +62,9 @@
return null;
if (parentNode instanceof ElementImpl) {
ElementImpl element = (ElementImpl) parentNode;
- String attr = element.getAttribute("style");
+ String attr = element.getAttribute("style"); //$NON-NLS-1$
if (attr != null) {
- attr = attr.replaceAll(" ", "");
+ attr = attr.replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
if(equalsWrappingTagStyle(attr)) {
return parentNode;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -19,7 +19,6 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchPage;
@@ -69,7 +68,7 @@
if(project != null && project.isOpen()) {
IModelNature modelNature = EclipseResourceUtil.getModelNature(project);
XModel model = (modelNature == null) ? null : modelNature.getModel();
- XModelObject webRoot = (model == null) ? null : model.getByPath("FileSystems/WEB-ROOT");
+ XModelObject webRoot = (model == null) ? null : model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
IResource webRootResource = (webRoot == null) ? null : EclipseResourceUtil.getResource(webRoot);
return (webRootResource instanceof IContainer) ? (IContainer)webRootResource : null;
}
@@ -100,7 +99,7 @@
return null;
}
IVirtualFolder webRootFolder = com.getRootFolder().getFolder(
- new Path("/"));
+ new Path("/")); //$NON-NLS-1$
IContainer folder = webRootFolder.getUnderlyingFolder();
IPath path = folder.getFullPath().append(fileName);
file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -24,7 +24,7 @@
private static final SimpleDateFormat formatter = new SimpleDateFormat();
static {
- formatter.applyPattern("hh:mm:ss.SSS");
+ formatter.applyPattern("hh:mm:ss.SSS"); //$NON-NLS-1$
}
/**
* Prints debug info on console
@@ -34,7 +34,7 @@
if(Platform.inDebugMode()) {
- System.out.print(formatter.format(new Date())+":"+ msg);
+ System.out.print(formatter.format(new Date())+":"+ msg); //$NON-NLS-1$
}
}
/**
@@ -43,7 +43,7 @@
public static void debugVPEDnDEvents(String msg) {
if(VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
- System.out.println(formatter.format(new Date())+":"+ msg);
+ System.out.println(formatter.format(new Date())+":"+ msg); //$NON-NLS-1$
}
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -800,9 +800,9 @@
Path path = new Path(resolvedValue);
- if (resolvedValue.startsWith("/")
+ if (resolvedValue.startsWith("/") //$NON-NLS-1$
&& path.segment(0).equals(file.getProject().getName())) {
- resolvedValue = "/"
+ resolvedValue = "/" //$NON-NLS-1$
+ path.removeFirstSegments(1).toPortableString();
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashForm.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashForm.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashForm.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -34,8 +34,8 @@
private Control[] controls = new Control[0];
private Control maxControl = null;
private Listener sashListener;
- private final static String LAYOUT_RATIO = "layout ratio";
- private final static String WEIGHTS = "weights";
+ private final static String LAYOUT_RATIO = "layout ratio"; //$NON-NLS-1$
+ private final static String WEIGHTS = "weights"; //$NON-NLS-1$
protected PropertyChangeSupport listeners = new PropertyChangeSupport(this);
public SashForm(Composite parent, int style) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/resref/VpeResourcesDialog.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -22,9 +22,9 @@
public static boolean run(IFile file) {
VpeResourcesDialog dialog = new VpeResourcesDialog();
Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("file", file);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeResourcesDialog"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("file", file); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel()); //$NON-NLS-1$
dialog.setObject(p);
int code = dialog.execute();
return code == 0;
@@ -33,9 +33,9 @@
public static boolean run(IPath path) {
VpeResourcesDialog dialog = new VpeResourcesDialog();
Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("path", path);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeResourcesDialog"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("path", path); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel()); //$NON-NLS-1$
dialog.setObject(p);
int code = dialog.execute();
return code == 0;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2009-07-09 07:46:26 UTC (rev 16508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2009-07-09 07:53:28 UTC (rev 16509)
@@ -475,11 +475,11 @@
}
public String toString() {
- StringBuffer st = new StringBuffer("CountItem: ");
+ StringBuffer st = new StringBuffer("CountItem: "); //$NON-NLS-1$
st.append(itemCount);
- st.append(" Parent Composite: " + cmpToolBar.getBounds().width);
- st.append(" Midle composite: " + cmpBar.getBounds().width);
- st.append(" Bar : " + selBar.getBounds().width);
+ st.append(" Parent Composite: " + cmpToolBar.getBounds().width); //$NON-NLS-1$
+ st.append(" Midle composite: " + cmpBar.getBounds().width); //$NON-NLS-1$
+ st.append(" Bar : " + selBar.getBounds().width); //$NON-NLS-1$
return st.toString();
}
}
16 years, 9 months
JBoss Tools SVN: r16508 - in trunk: common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model and 41 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-07-09 03:46:26 -0400 (Thu, 09 Jul 2009)
New Revision: 16508
Added:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/Messages.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/Messages.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/Messages.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/Messages.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/messages.properties
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBar.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBarListener.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MutableMultipleChoiceFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/HiddenPaletteTabsWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractListWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/HiddenFileSystemsWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/BundleLanguagesEditor.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelMessages.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/messages.properties
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/Messages.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerificationUIMessages.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerifyWizardView.java
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/messages.properties
trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime2/VerifyWizardView.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/links/HiddenLinksWizardView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/process/SelectWebProcessItemWizardView.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/EditProjectTemplateSupport.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/editproperties/StrutsEditPropertiesWizardView.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectModulesPage.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/sync/SyncProjectStepView.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/Messages.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidatorAttributeEditor.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FieldEditor.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FormsetsBar.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/global/ValidatorEditor.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/messages.properties
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/depends/ValidationPathView.java
trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/key/AbstractResourcePathView.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/StrutsUIMessages.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/messages.properties
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/GenBaseSupport.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/AbsoluteFolderReferenceList.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceList.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/RelativeFolderReferenceList.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ResourceReferencesDialogView.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceList.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCssReferencesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteDragSourceListener.java
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/LargeImageDescriptor.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/TextNodeSplitterImpl.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -21,13 +21,13 @@
import org.jboss.tools.common.meta.key.*;
public abstract class SpecialWizardSupport {
- public static final String OK = "OK"; //$NON-NLS-1$
- public static final String CANCEL = "Cancel"; //$NON-NLS-1$
- public static final String BACK = "<< Back"; //$NON-NLS-1$
- public static final String NEXT = "Next >>"; //$NON-NLS-1$
- public static final String FINISH = "Finish"; //$NON-NLS-1$
- public static final String HELP = "Help"; //$NON-NLS-1$
- public static final String CLOSE = "Close"; //$NON-NLS-1$
+ public static final String OK = Messages.SpecialWizardSupport_OK;
+ public static final String CANCEL = Messages.SpecialWizardSupport_Cancel;
+ public static final String BACK = Messages.SpecialWizardSupport_BackArrow;
+ public static final String NEXT = Messages.SpecialWizardSupport_NextArrow;
+ public static final String FINISH = Messages.SpecialWizardSupport_Finish;
+ public static final String HELP = Messages.SpecialWizardSupport_Help;
+ public static final String CLOSE = Messages.SpecialWizardSupport_Close;
static final Set<String> standardButtons = new HashSet<String>();
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,22 @@
+package org.jboss.tools.common.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.messages"; //$NON-NLS-1$
+ public static String ModelImages_NullImageName;
+ public static String SpecialWizardSupport_BackArrow;
+ public static String SpecialWizardSupport_Cancel;
+ public static String SpecialWizardSupport_Close;
+ public static String SpecialWizardSupport_Finish;
+ public static String SpecialWizardSupport_Help;
+ public static String SpecialWizardSupport_NextArrow;
+ public static String SpecialWizardSupport_OK;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,8 @@
+ModelImages_NullImageName=Image name cannot be null.
+SpecialWizardSupport_BackArrow=<< Back
+SpecialWizardSupport_Cancel=Cancel
+SpecialWizardSupport_Close=Close
+SpecialWizardSupport_Finish=Finish
+SpecialWizardSupport_Help=Help
+SpecialWizardSupport_NextArrow=Next >>
+SpecialWizardSupport_OK=OK
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelMessages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/ModelMessages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -25,6 +25,12 @@
public static String IS_A_RESERVED_WORD;
public static String ATTRIBUTE_REQUIRED;
+ public static String BrowserHelper_DialogTitleRun;
+
+ public static String BrowserHelper_EnterValidPath;
+
+ public static String BrowserHelper_InternetBrowserNotSet;
+
public static String OBJECT_CREATION_FAILURE;
public static String OBJECT_ADDING_FAILURE;
public static String CONTAINS_OBJECT_1;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/plugin/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -20,6 +20,9 @@
#DefaultCreateHandler
ATTRIBUTE_REQUIRED = Attribute {0} must be set.
+BrowserHelper_DialogTitleRun=Run
+BrowserHelper_EnterValidPath=Enter valid path for {0}
+BrowserHelper_InternetBrowserNotSet=External Program 'Internet Browser' is not set in Options.
OBJECT_CREATION_FAILURE = Cannot create model object.
OBJECT_ADDING_FAILURE = Cannot add new object to model.
CONTAINS_OBJECT_1 = {0} already contains {1}.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -30,7 +30,7 @@
public static void startExplorer(XModel model, String url) throws XModelException {
XModelObject editor = PreferenceModelUtilities.getPreferenceModel().getByPath("%Options%/Struts Studio/Running"); //$NON-NLS-1$
- if(editor == null) throw new XModelException("External Program 'Internet Browser' is not set in Options.");
+ if(editor == null) throw new XModelException(ModelMessages.BrowserHelper_InternetBrowserNotSet);
if(validatePath(PreferenceModelUtilities.getPreferenceModel().getService(), editor)) new OWEProcess(editor, url).start();
}
@@ -55,7 +55,7 @@
} catch (XModelException e) {
ModelPlugin.getPluginLog().logError("BrowserHelper:" + e.getMessage()); //$NON-NLS-1$
}
- int i = d.showDialog("Run", MessageFormat.format("Enter valid path for {0}", o.getPresentationString()),
+ int i = d.showDialog(ModelMessages.BrowserHelper_DialogTitleRun, MessageFormat.format(ModelMessages.BrowserHelper_EnterValidPath, o.getPresentationString()),
new String[]{ModelMessages.OK, ModelMessages.Cancel}, dt[0], ServiceDialog.QUESTION);
if(i != 0) return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ModelImages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -18,6 +18,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.commands.ICommandImageService;
+import org.jboss.tools.common.model.Messages;
import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.osgi.framework.Bundle;
@@ -68,7 +69,7 @@
}
private URL makeIconFileURL(URL url, String name) throws MalformedURLException {
- if (name == null) throw new MalformedURLException("Image name cannot be null.");
+ if (name == null) throw new MalformedURLException(Messages.ModelImages_NullImageName);
return new URL(url, name);
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/AbstractSectionEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.editor;
+import java.text.MessageFormat;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -115,8 +116,13 @@
private void setErroneousObject(XModelObject object) {
if(object == null) return;
String err = object.get("errors"); //$NON-NLS-1$
- if(err == null || err.length() == 0 && isWrongEntity(object.getModelEntity().getName()))
- err = "Warning: @ @0:0@" + "This editor is not intended for editing " + object.getAttributeValue("element type") + ". You can use source page, but its coloring may be inadequate."; //$NON-NLS-3$
+ if(err == null || err.length() == 0 && isWrongEntity(object.getModelEntity().getName())) {
+ err = "Warning: " +
+ "@ @0:0@" + //$NON-NLS-1$
+ MessageFormat.format(
+ "This editor is not intended for editing {0}. You can use source page, but its coloring may be inadequate.",
+ object.getAttributeValue("element type")); //$NON-NLS-1$
+ }
if(err == null) err = ""; //$NON-NLS-1$
errorMode.update(err);
}
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,33 @@
+package org.jboss.tools.common.model.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.model.ui.messages"; //$NON-NLS-1$
+ public static String AbstractQueryWizardView_Cancel;
+ public static String AbstractQueryWizardView_Close;
+ public static String AbstractQueryWizardView_Help;
+ public static String AbstractQueryWizardView_OK;
+ public static String BundleLanguagesEditor_Add;
+ public static String BundleLanguagesEditor_Delete;
+ public static String BundleLanguagesEditor_LanguageCountry;
+ public static String CommandBar_Finish;
+ public static String CommandBar_Next;
+ public static String CommandBar_NextArrow;
+ public static String CommandBar_OK;
+ public static String CommandBar_Run;
+ public static String HiddenFileSystemsWizardView_HideAllJars;
+ public static String HiddenFileSystemsWizardView_ShowAllJars;
+ public static String HiddenPaletteTabsWizardView_HideAll;
+ public static String HiddenPaletteTabsWizardView_ShowAll;
+ public static String MutableMultipleChoiceFieldEditor_DeselectAll;
+ public static String MutableMultipleChoiceFieldEditor_New;
+ public static String MutableMultipleChoiceFieldEditor_SelectAll;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBar.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBar.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBar.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -17,6 +17,7 @@
import org.eclipse.swt.graphics.*;
import org.jboss.tools.common.model.XModelException;
+import org.jboss.tools.common.model.ui.Messages;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
@@ -74,6 +75,10 @@
return control;
}
+ /**
+ *
+ * @param commands (translatable)
+ */
public void setCommands(String[] commands) {
ButtonDescriptor d = null;
for (int i = 0; i < commands.length; i++) {
@@ -85,7 +90,11 @@
}
d.command = commands[i];
// bugfix:Issue # 6167. Try find default button by name
- if ("OK".equalsIgnoreCase(commands[i]) || "FINISH".equalsIgnoreCase(commands[i]) || "NEXT".equalsIgnoreCase(commands[i])|| "NEXT >>".equalsIgnoreCase(commands[i]) || "Run".equalsIgnoreCase(commands[i])) {
+ if (Messages.CommandBar_OK.equalsIgnoreCase(commands[i]) ||
+ Messages.CommandBar_Finish.equalsIgnoreCase(commands[i]) ||
+ Messages.CommandBar_Next.equalsIgnoreCase(commands[i])||
+ Messages.CommandBar_NextArrow.equalsIgnoreCase(commands[i]) ||
+ Messages.CommandBar_Run.equalsIgnoreCase(commands[i])) {
this.defaultCommand = commands[i];
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBarListener.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBarListener.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/CommandBarListener.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -13,5 +13,10 @@
import org.jboss.tools.common.model.XModelException;
public interface CommandBarListener {
+ /**
+ *
+ * @param command (translatable)
+ * @throws XModelException
+ */
public void action(String command) throws XModelException;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MutableMultipleChoiceFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MutableMultipleChoiceFieldEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/MutableMultipleChoiceFieldEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -11,6 +11,8 @@
package org.jboss.tools.common.model.ui.attribute.editor;
import java.util.Properties;
+
+import org.jboss.tools.common.model.ui.Messages;
import org.jboss.tools.common.model.ui.action.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -22,9 +24,9 @@
import org.jboss.tools.common.model.ui.widgets.IWidgetSettings;
public class MutableMultipleChoiceFieldEditor extends MultipleChoiceFieldEditor implements CommandBarListener, IMutableFieldEditor {
- static String NEW = "New...";
- static String SELECT_ALL = "Select All";
- static String DESELECT_ALL = "Deselect All";
+ static String NEW = Messages.MutableMultipleChoiceFieldEditor_New;
+ static String SELECT_ALL = Messages.MutableMultipleChoiceFieldEditor_SelectAll;
+ static String DESELECT_ALL = Messages.MutableMultipleChoiceFieldEditor_DeselectAll;
CommandBar bar = new CommandBar();
String[] commands = {NEW, SELECT_ALL, DESELECT_ALL};
@@ -129,11 +131,11 @@
protected String changePressed() {
if(change == null) return null;
Properties p = new Properties();
- p.put("shell", bar.getControl().getShell());
+ p.put("shell", bar.getControl().getShell()); //$NON-NLS-1$
change.setObject(p);
int i = change.execute();
if(i != 0) return null;
- return p.getProperty("value");
+ return p.getProperty("value"); //$NON-NLS-1$
}
public Control[] getControls(Composite parent) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -1,3 +1,15 @@
+AbstractQueryWizardView_Cancel=Cancel
+AbstractQueryWizardView_Close=Close
+AbstractQueryWizardView_Help=Help
+AbstractQueryWizardView_OK=Ok
+BundleLanguagesEditor_Add=Add
+BundleLanguagesEditor_Delete=Delete
+BundleLanguagesEditor_LanguageCountry=Language/Country
+CommandBar_Finish=Finish
+CommandBar_Next=Next
+CommandBar_NextArrow=Next >>
+CommandBar_OK=OK
+CommandBar_Run=Run
DecoratorTextPreferencesPage_AddVariable=Add Variable...
DecoratorTextPreferencesPage_Decorator=Select decorator:
DecoratorTextPreferencesPage_DefaultLabel=?
@@ -36,5 +48,12 @@
Editor_Delete_image=
Editor_Delete_description=Delete
MainPreferencePage_Description=JBossTools preferences
+MutableMultipleChoiceFieldEditor_DeselectAll=Deselect All
+MutableMultipleChoiceFieldEditor_New=New...
+MutableMultipleChoiceFieldEditor_SelectAll=Select All
Form_CANNOT_LOAD_ATTRIBUTE= Cannot load attribute \"{0}\" from model.
+HiddenFileSystemsWizardView_HideAllJars=Hide All Jars
+HiddenFileSystemsWizardView_ShowAllJars=Show All Jars
+HiddenPaletteTabsWizardView_HideAll=Hide All
+HiddenPaletteTabsWizardView_ShowAll=Show All
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/reporting/ReportProblemWizard.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -189,7 +189,7 @@
* @see org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView#updateBar()
*/
public void updateBar() {
- getCommandBar().setEnabled("Ok", !isMessageEmpty());
+ getCommandBar().setEnabled(OK, !isMessageEmpty());
}
/* (non-Javadoc)
@@ -202,18 +202,15 @@
/* (non-Javadoc)
* @see org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView#getCommands()
*/
- /* (non-Javadoc)
- * @see org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView#getCommands()
- */
public String[] getCommands() {
- return new String[] { "Ok", CANCEL };
+ return new String[] { OK, CANCEL };
}
/* (non-Javadoc)
* @see org.jboss.tools.common.model.ui.wizards.query.AbstractQueryWizardView#action(java.lang.String)
*/
public void action(String command) {
- if (command.equals("Ok")) {
+ if (command.equals(OK)) {
submitProblems();
super.action(OK);
} else {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/HiddenPaletteTabsWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/HiddenPaletteTabsWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/editor/HiddenPaletteTabsWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.model.ui.views.palette.editor;
+import org.jboss.tools.common.model.ui.Messages;
import org.jboss.tools.common.model.ui.wizards.query.list.AbstractTreeWizardView;
public class HiddenPaletteTabsWizardView extends AbstractTreeWizardView {
@@ -18,13 +19,13 @@
}
protected String[] getActions() {
- return new String[]{"Show All", "Hide All"};
+ return new String[]{Messages.HiddenPaletteTabsWizardView_ShowAll, Messages.HiddenPaletteTabsWizardView_HideAll};
}
protected void internalAction(String command) {
- if("Hide All".equals(command)) {
+ if(Messages.HiddenPaletteTabsWizardView_HideAll.equals(command)) {
disableAll();
- } else if("Show All".equals(command)) {
+ } else if(Messages.HiddenPaletteTabsWizardView_ShowAll.equals(command)) {
enableAll();
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -24,10 +24,10 @@
import org.jboss.tools.common.model.ui.*;
public abstract class AbstractQueryWizardView implements CommandBarListener {
- public static String CANCEL = "Cancel";
- public static String CLOSE = "Close";
- public static String OK = "Ok";
- public static String HELP = "Help";
+ public static String CANCEL = Messages.AbstractQueryWizardView_Cancel;
+ public static String CLOSE = Messages.AbstractQueryWizardView_Close;
+ public static String OK = Messages.AbstractQueryWizardView_OK;
+ public static String HELP = Messages.AbstractQueryWizardView_Help;
private String helpkey = null;
private Dialog dialog;
private TitleAreaDialog titleDialog = null;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractListWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractListWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractListWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -108,7 +108,7 @@
}
protected void apply(int i) {
- vs[i][1] = (boxes[i].getSelection()) ? "no" : "yes";
+ vs[i][1] = (boxes[i].getSelection()) ? "no" : "yes"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/AbstractTreeWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -29,7 +29,7 @@
protected CheckTreeProvider provider = new CheckTreeProvider();
protected TreeItemSelectionManager treeSelectionManager;
protected String[][] vs = new String[0][];
- CheckObject object = new CheckObject(null, new String[]{"", "yes"}); //$NON-NLS-1$
+ CheckObject object = new CheckObject(null, new String[]{"", "yes"}); //$NON-NLS-1$ //$NON-NLS-2$
int expandingLevel = 2;
public AbstractTreeWizardView() {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/HiddenFileSystemsWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/HiddenFileSystemsWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/list/HiddenFileSystemsWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.model.ui.wizards.query.list;
import org.jboss.tools.common.meta.key.WizardKeys;
+import org.jboss.tools.common.model.ui.Messages;
public class HiddenFileSystemsWizardView extends AbstractListWizardView {
public HiddenFileSystemsWizardView() {
@@ -21,17 +22,17 @@
}
protected String[] getActions() {
- return new String[]{"Hide All Jars", "Show All Jars"};
+ return new String[]{Messages.HiddenFileSystemsWizardView_HideAllJars, Messages.HiddenFileSystemsWizardView_ShowAllJars};
}
protected void internalAction(String command) {
- if("Hide All Jars".equals(command)) {
+ if(Messages.HiddenFileSystemsWizardView_HideAllJars.equals(command)) {
for (int i = 0; i < boxes.length; i++)
if("true".equals(vs[i][2])) { //$NON-NLS-1$
boxes[i].setSelection(false);
apply(i);
}
- } else if("Show All Jars".equals(command)) {
+ } else if(Messages.HiddenFileSystemsWizardView_ShowAllJars.equals(command)) {
for (int i = 0; i < boxes.length; i++)
if("true".equals(vs[i][2])) { //$NON-NLS-1$
boxes[i].setSelection(true);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/BundleLanguagesEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/BundleLanguagesEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/propertieseditor/BundleLanguagesEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -17,6 +17,7 @@
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
import org.jboss.tools.common.propertieseditor.bundlemodel.*;
+import org.jboss.tools.common.model.ui.Messages;
import org.jboss.tools.common.model.ui.action.*;
import org.jboss.tools.common.meta.action.XActionInvoker;
@@ -25,8 +26,8 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
public class BundleLanguagesEditor implements CommandBarListener, SelectionListener {
- static String CREATE = "Add";
- static String DELETE = "Delete";
+ static String CREATE = Messages.BundleLanguagesEditor_Add;
+ static String DELETE = Messages.BundleLanguagesEditor_Delete;
public Image IMAGE_DELETE = EclipseResourceUtil.getImage("images/actions/delete.gif"); //$NON-NLS-1$
public Image IMAGE_EDIT = EclipseResourceUtil.getImage("images/actions/edit.gif"); //$NON-NLS-1$
public Image IMAGE_CREATE = EclipseResourceUtil.getImage("images/actions/new.gif"); //$NON-NLS-1$
@@ -65,7 +66,7 @@
Composite control = new Composite(parent, SWT.NONE);
control.setLayout(new GridLayout(2, false));
Label label = new Label(control, SWT.NONE);
- label.setText("Language/Country");
+ label.setText(Messages.BundleLanguagesEditor_LanguageCountry);
combo = new Combo(control, SWT.DROP_DOWN | SWT.READ_ONLY);
combomodel.setCombo(combo);
update();
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/Messages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -12,6 +12,9 @@
public static String SignificanceView_GreaterThanN;
public static String SignificanceView_OnlyTen;
public static String SignificanceView_VerificationLevelLabel;
+ public static String VerifyWizardView_Cancel;
+ public static String VerifyWizardView_Close;
+ public static String VerifyWizardView_Run;
public static String VerifyWizardView_VerifyTask;
static {
// initialize resource bundle
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -6,4 +6,7 @@
SignificanceView_GreaterThanN=greater than {0}
SignificanceView_OnlyTen=only 10
SignificanceView_VerificationLevelLabel=Verification Level\:
+VerifyWizardView_Cancel=Cancel
+VerifyWizardView_Close=Close
+VerifyWizardView_Run=Run
VerifyWizardView_VerifyTask=Verify {0}
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerificationUIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerificationUIMessages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerificationUIMessages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -22,4 +22,10 @@
public static String WARNING;
public static String LIMIT_OF_REPORTED_ERRORS_IS_REACHED;
public static String OK;
+ public static String VerifyWizardView_Close;
+ public static String VerifyWizardView_Pause;
+ public static String VerifyWizardView_Resume;
+ public static String VerifyWizardView_RunAll;
+ public static String VerifyWizardView_RunSelected;
+ public static String VerifyWizardView_Stop;
}
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerifyWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerifyWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/VerifyWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -47,12 +47,12 @@
import org.jboss.tools.common.verification.vrules.layer.VModelFactory;
public class VerifyWizardView extends AbstractQueryWizardView {
- private static final String COMMAND_RESUME = "Resume"; //$NON-NLS-1$
- private static final String COMMAND_PAUSE = "Pause"; //$NON-NLS-1$
- private static final String COMMAND_STOP = "Stop"; //$NON-NLS-1$
- private static final String COMMAND_RUN_SELECTED = "Run Selected"; //$NON-NLS-1$
- private static final String COMMAND_RUN_ALL = "Run All"; //$NON-NLS-1$
- static final String COMMAND_CLOSE = "Close"; //$NON-NLS-1$
+ private static final String COMMAND_RESUME = VerificationUIMessages.VerifyWizardView_Resume;
+ private static final String COMMAND_PAUSE = VerificationUIMessages.VerifyWizardView_Pause;
+ private static final String COMMAND_STOP = VerificationUIMessages.VerifyWizardView_Stop;
+ private static final String COMMAND_RUN_SELECTED = VerificationUIMessages.VerifyWizardView_RunSelected;
+ private static final String COMMAND_RUN_ALL = VerificationUIMessages.VerifyWizardView_RunAll;
+ static final String COMMAND_CLOSE = VerificationUIMessages.VerifyWizardView_Close;
static String[] INITIAL_COMMANDS = new String[]{COMMAND_RUN_ALL, COMMAND_RUN_SELECTED, COMMAND_CLOSE, HELP};
static String[] RUNNING_COMMANDS = new String[]{COMMAND_PAUSE, COMMAND_STOP, COMMAND_CLOSE, HELP};
static String[] PAUSE_COMMANDS = new String[]{COMMAND_RESUME, COMMAND_STOP, COMMAND_CLOSE, HELP};
@@ -178,6 +178,10 @@
}
}
+ /**
+ *
+ * @param commands (translatable)
+ */
public void changeControl(String[] commands) {
commandBar.setCommands(commands);
commandBar.setDefaultCommand(commands[0]);
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -1,3 +1,9 @@
WARNING = Warning
LIMIT_OF_REPORTED_ERRORS_IS_REACHED = Limit of {0} reported errors is reached.\nYou may change the limit in preferences.
-OK = OK
\ No newline at end of file
+OK = OK
+VerifyWizardView_Close=Close
+VerifyWizardView_Pause=Pause
+VerifyWizardView_Resume=Resume
+VerifyWizardView_RunAll=Run All
+VerifyWizardView_RunSelected=Run Selected
+VerifyWizardView_Stop=Stop
Modified: trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime2/VerifyWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime2/VerifyWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/common/plugins/org.jboss.tools.common.verification.ui/src/org/jboss/tools/common/verification/ui/vrules/wizard/runtime2/VerifyWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -29,9 +29,9 @@
import org.jboss.tools.common.verification.vrules.layer.VObjectImpl;
public class VerifyWizardView extends AbstractQueryWizardView {
- static final String COMMAND_CANCEL = "Cancel"; //$NON-NLS-1$
- static final String COMMAND_RUN = "Run"; //$NON-NLS-1$
- static final String COMMAND_CLOSE = "Close"; //$NON-NLS-1$
+ static final String COMMAND_CANCEL = Messages.VerifyWizardView_Cancel;
+ static final String COMMAND_RUN = Messages.VerifyWizardView_Run;
+ static final String COMMAND_CLOSE = Messages.VerifyWizardView_Close;
protected XModel model;
protected VObject vobject;
protected VTask task = null;
Added: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/Messages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/Messages.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,20 @@
+package org.jboss.tools.jsf.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jsf.ui.messages"; //$NON-NLS-1$
+ public static String DataTableWizardPage_BeanProperties;
+ public static String DataTableWizardPage_DeselectAll;
+ public static String DataTableWizardPage_Properties;
+ public static String DataTableWizardPage_SelectAll;
+ public static String DataTableWizardPage_ValueELNotCorrect;
+ public static String DataTableWizardPage_ValueMustBeSetWithEL;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,6 @@
+DataTableWizardPage_BeanProperties=Bean Properties
+DataTableWizardPage_DeselectAll=Deselect All
+DataTableWizardPage_Properties=Properties
+DataTableWizardPage_SelectAll=Select All
+DataTableWizardPage_ValueELNotCorrect=Expression Language in Value is not correct.
+DataTableWizardPage_ValueMustBeSetWithEL=Value must be set with Expression Language.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/palette/DataTableWizardPage.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -23,7 +23,6 @@
import org.eclipse.compare.Splitter;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.jboss.tools.common.model.ui.attribute.XAttributeSupport;
import org.jboss.tools.common.model.ui.attribute.editor.IPropertyEditor;
import org.jboss.tools.common.model.ui.objecteditor.XChildrenEditor;
@@ -41,6 +40,7 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.model.pv.JSFPromptingProvider;
import org.jboss.tools.jsf.ui.JsfUiPlugin;
+import org.jboss.tools.jsf.ui.Messages;
import org.jboss.tools.common.model.ui.editors.dnd.*;
import org.jboss.tools.common.model.ui.editors.dnd.composite.*;
import org.jboss.tools.common.model.ui.editors.dnd.composite.TagAttributesComposite.AttributeDescriptorValue;
@@ -59,7 +59,7 @@
IDropWizardModel fWizardModel;
XModelObject propertyListObject = PreferenceModelUtilities
- .getPreferenceModel().createModelObject("JSFDataTablePropertySet",
+ .getPreferenceModel().createModelObject("JSFDataTablePropertySet", //$NON-NLS-1$
null);
XChildrenEditorImpl propertyListEditor = new XChildrenEditorImpl();
@@ -72,8 +72,10 @@
public DataTableWizardPage() {
data = XEntityDataImpl.create(new String[][] {
- { "JSFDataTableWizard", "yes" }, { "var", "no" },
- { "value", "no" }, { "value bean class", "no" } });
+ { "JSFDataTableWizard", "yes" }, //$NON-NLS-1$ //$NON-NLS-2$
+ { "var", "no" }, //$NON-NLS-1$ //$NON-NLS-2$
+ { "value", "no" }, //$NON-NLS-1$ //$NON-NLS-2$
+ { "value bean class", "no" } }); //$NON-NLS-1$ //$NON-NLS-2$
}
public void setProperties(Properties p) {
@@ -148,11 +150,11 @@
TagProposal tagProposal = (TagProposal) getDropWizardModel()
.getTagProposal();
StringBuffer titleText = new StringBuffer();
- titleText.append("<");
+ titleText.append("<"); //$NON-NLS-1$
if (!TagProposal.EMPTY_PREFIX.equals(tagProposal.getPrefix())) {
- titleText.append(tagProposal.getPrefix()).append(":");
+ titleText.append(tagProposal.getPrefix()).append(":"); //$NON-NLS-1$
}
- titleText.append(tagProposal.getName()).append(">");
+ titleText.append(tagProposal.getName()).append(">"); //$NON-NLS-1$
setTitle(titleText.toString());
}
@@ -183,7 +185,7 @@
generalTabContent.setLayoutData(data);
Label properties = new Label(generalTabContent, SWT.NONE);
- properties.setText("Properties");
+ properties.setText(Messages.DataTableWizardPage_Properties);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 3;
properties.setLayoutData(data);
@@ -204,13 +206,13 @@
if(value != null) value = value.trim();
if(value != null && value.length() > 0) {
try {
- boolean b1 = value.matches("[#\\$]\\{[^#\\$\\}\\{]*\\}");
+ boolean b1 = value.matches("[#\\$]\\{[^#\\$\\}\\{]*\\}"); //$NON-NLS-1$
if(!b1) {
- throw new ValidationException("Value must be set with Expression Language.");
+ throw new ValidationException(Messages.DataTableWizardPage_ValueMustBeSetWithEL);
}
- boolean b2 = value.matches("[#\\$]\\{[^#\\$\\}\\{\\.]+(\\.[^#\\$\\}\\{\\.]+)*\\}");
+ boolean b2 = value.matches("[#\\$]\\{[^#\\$\\}\\{\\.]+(\\.[^#\\$\\}\\{\\.]+)*\\}"); //$NON-NLS-1$
if(!b2) {
- throw new ValidationException("Expression Language in Value is not correct.");
+ throw new ValidationException(Messages.DataTableWizardPage_ValueELNotCorrect);
}
} catch (PatternSyntaxException e) {
JsfUiPlugin.getPluginLog().logError(e);
@@ -227,7 +229,7 @@
if (!flag) {
flag = true;
if (IPropertyEditor.VALUE.equals(evt.getPropertyName())
- && evt.getSource() == support.getPropertyEditorAdapterByName("value bean class")) {
+ && evt.getSource() == support.getPropertyEditorAdapterByName("value bean class")) { //$NON-NLS-1$
onValueChanged((String) evt.getOldValue(), (String) evt.getNewValue());
}
@@ -245,13 +247,13 @@
flag = true;
AttributeDescriptorValue[] value = fWizardModel.getAttributeValueDescriptors();
for (int i = 0 ; i < 2; i++) {
- if (value[i].getName().equals("value")) {
+ if (value[i].getName().equals("value")) { //$NON-NLS-1$
support.store();
- support.getPropertyEditorAdapterByName("value").setValue((String)value[i].getValue());
+ support.getPropertyEditorAdapterByName("value").setValue((String)value[i].getValue()); //$NON-NLS-1$
}
- if (value[i].getName().equals("var")) {
+ if (value[i].getName().equals("var")) { //$NON-NLS-1$
support.store();
- support.getPropertyEditorAdapterByName("var").setValue((String)value[i].getValue());
+ support.getPropertyEditorAdapterByName("var").setValue((String)value[i].getValue()); //$NON-NLS-1$
}
}
flag = false;
@@ -278,7 +280,7 @@
}
protected String getAddActionPath() {
- return "CreateActions.AddProperties";
+ return "CreateActions.AddProperties"; //$NON-NLS-1$
}
public void action(String command) {
@@ -290,7 +292,7 @@
}
protected void add() {
- String[] ap = getAvailableProperties(data.getValue("value bean class"));
+ String[] ap = getAvailableProperties(data.getValue("value bean class")); //$NON-NLS-1$
String[] sp = getSelectedProperties();
Properties p = new Properties();
Set<String> set1 = new HashSet<String>(), set2 = new TreeSet<String>();
@@ -304,27 +306,27 @@
Iterator it = set1.iterator();
for (int i = 0; i < set1.size(); i++) {
vs[k][0] = it.next().toString();
- vs[k][1] = "no"; // "no" = selected
+ vs[k][1] = "no"; // "no" = selected //$NON-NLS-1$
++k;
}
it = set2.iterator();
for (int i = 0; i < set2.size(); i++) {
vs[k][0] = it.next().toString();
- vs[k][1] = "yes";
+ vs[k][1] = "yes"; //$NON-NLS-1$
++k;
}
- p.put("data", vs);
+ p.put("data", vs); //$NON-NLS-1$
SelectPropertiesWizard w = new SelectPropertiesWizard();
- p.setProperty("title", "Bean Properties");
+ p.setProperty("title", Messages.DataTableWizardPage_BeanProperties); //$NON-NLS-1$
w.setObject(p);
int r = w.execute();
if (r != 0)
return;
- vs = (String[][]) p.get("data");
+ vs = (String[][]) p.get("data"); //$NON-NLS-1$
List<String> list = new ArrayList<String>();
for (int i = 0; i < vs.length; i++) {
- if (vs[i][1].equals("no")) {
+ if (vs[i][1].equals("no")) { //$NON-NLS-1$
list.add(vs[i][0]);
}
}
@@ -334,7 +336,7 @@
protected void updateBar() {
super.updateBar();
- String[] ap = getAvailableProperties(data.getValue("value bean class"));
+ String[] ap = getAvailableProperties(data.getValue("value bean class")); //$NON-NLS-1$
boolean addflag = false;
if (ap.length > 0) addflag = true;
bar.setEnabled(ADD, addflag);
@@ -347,8 +349,8 @@
cs[i].removeFromParent();
for (int i = 0; i < s.length; i++) {
XModelObject c = propertyListObject.getModel().createModelObject(
- "JSFDataTableProperty", null);
- c.setAttributeValue("name", s[i]);
+ "JSFDataTableProperty", null); //$NON-NLS-1$
+ c.setAttributeValue("name", s[i]); //$NON-NLS-1$
propertyListObject.addChild(c);
}
propertyListEditor.update();
@@ -359,7 +361,7 @@
XModelObject[] cs = propertyListObject.getChildren();
String[] s = new String[cs.length];
for (int i = 0; i < cs.length; i++) {
- s[i] = cs[i].getAttributeValue("name");
+ s[i] = cs[i].getAttributeValue("name"); //$NON-NLS-1$
}
return s;
}
@@ -375,20 +377,20 @@
public void setTagAttributesValues() {
support.store();
- fWizardModel.setAttributeValue("value", data.getValue("value"));
- fWizardModel.setAttributeValue("var", data.getValue("var"));
+ fWizardModel.setAttributeValue("value", data.getValue("value")); //$NON-NLS-1$ //$NON-NLS-2$
+ fWizardModel.setAttributeValue("var", data.getValue("var")); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getVar() {
- return data.getValue("var");
+ return data.getValue("var"); //$NON-NLS-1$
}
public String getValue() {
- return data.getValue("value");
+ return data.getValue("value"); //$NON-NLS-1$
}
private XModel getXModel() {
- IFile file = (IFile) properties.get("file");
+ IFile file = (IFile) properties.get("file"); //$NON-NLS-1$
return file == null ? null :getXModel(file);
}
@@ -434,19 +436,19 @@
class SelectPropertiesWizardView extends AbstractListWizardView {
protected String[] getActions() {
- return new String[] { "Select All", "Deselect All" };
+ return new String[] { Messages.DataTableWizardPage_SelectAll, Messages.DataTableWizardPage_DeselectAll };
}
protected void internalAction(String command) {
- if (command.equals("Select All")) {
+ if (command.equals(Messages.DataTableWizardPage_SelectAll)) {
for (int i = 0; i < boxes.length; i++)
- if ("yes".equals(vs[i][1])) {
+ if ("yes".equals(vs[i][1])) { //$NON-NLS-1$
boxes[i].setSelection(true);
apply(i);
}
- } else if (command.equals("Deselect All")) {
+ } else if (command.equals(Messages.DataTableWizardPage_DeselectAll)) {
for (int i = 0; i < boxes.length; i++)
- if ("no".equals(vs[i][1])) {
+ if ("no".equals(vs[i][1])) { //$NON-NLS-1$
boxes[i].setSelection(false);
apply(i);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -87,6 +87,7 @@
VALUE_NOT_RESOLVED== Value Not Resolved
STRUTS=Struts
EDIT_FILTER=Edit Filter
+EditProjectTemplateSupport_Save=Save
ENTER_NEW_FILTER=Enter new filter
TILES_EDITOR=Tiles Editor
DIAGRAM=Diagram
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -104,6 +104,7 @@
public static String VALUE_NOT_RESOLVED;
public static String STRUTS;
public static String EDIT_FILTER;
+ public static String EditProjectTemplateSupport_Save;
public static String ENTER_NEW_FILTER;
public static String DELETE_REFERENCE_FROM_STRUTS_CONFIGURATION_FILE;
public static String YOU_WANT_TO_DELETE_LINK_TO;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/EditProjectTemplateSupport.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/EditProjectTemplateSupport.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/handlers/EditProjectTemplateSupport.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -56,14 +56,14 @@
}
public void action(String name) throws XModelException {
- if("Save".equals(name)) { //$NON-NLS-1$
+ if(WebUIMessages.EditProjectTemplateSupport_Save.equals(name)) {
name = FINISH;
}
super.action(name);
}
public String[] getActionNames(int stepId) {
- return new String[]{"Save", CANCEL}; //$NON-NLS-1$
+ return new String[]{WebUIMessages.EditProjectTemplateSupport_Save, CANCEL};
}
protected void execute() throws XModelException {
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,16 @@
+package org.jboss.tools.jst.web.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.ui.messages"; //$NON-NLS-1$
+ public static String HiddenLinksWizardView_HideAll;
+ public static String HiddenLinksWizardView_ShowAll;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,2 @@
+HiddenLinksWizardView_HideAll=Hide All
+HiddenLinksWizardView_ShowAll=Show All
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/links/HiddenLinksWizardView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/links/HiddenLinksWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/links/HiddenLinksWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -11,22 +11,23 @@
package org.jboss.tools.jst.web.ui.wizards.links;
import org.jboss.tools.common.model.ui.wizards.query.list.AbstractListWizardView;
+import org.jboss.tools.jst.web.ui.Messages;
public class HiddenLinksWizardView extends AbstractListWizardView {
public HiddenLinksWizardView() {}
protected String[] getActions() {
- return new String[]{"Hide All", "Show All"};
+ return new String[]{Messages.HiddenLinksWizardView_HideAll, Messages.HiddenLinksWizardView_ShowAll};
}
protected void internalAction(String command) {
- if("Hide All".equals(command)) {
+ if(Messages.HiddenLinksWizardView_HideAll.equals(command)) {
for (int i = 0; i < boxes.length; i++) {
boxes[i].setSelection(false);
apply(i);
}
- } else if("Show All".equals(command)) {
+ } else if(Messages.HiddenLinksWizardView_ShowAll.equals(command)) {
for (int i = 0; i < boxes.length; i++) {
boxes[i].setSelection(true);
apply(i);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/process/SelectWebProcessItemWizardView.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/process/SelectWebProcessItemWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/process/SelectWebProcessItemWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -51,10 +51,10 @@
public void setObject(Object data) {
super.setObject(data);
p = (Properties)data;
- process = (XModelObject)p.get("object");
- items = (XModelObject[])p.get("items");
+ process = (XModelObject)p.get("object"); //$NON-NLS-1$
+ items = (XModelObject[])p.get("items"); //$NON-NLS-1$
sortItems();
- this.setMessage(WizardKeys.getString("SelectItemWizardView.Message"));
+ this.setMessage(WizardKeys.getString("SelectItemWizardView.Message")); //$NON-NLS-1$
// this.setTitle(WizardKeys.getString("SelectItemWizardView.Title"));
// this.setWindowTitle(WizardKeys.getString("SelectItemWizardView.WindowTitle"));
}
@@ -65,8 +65,8 @@
public int compare(Object o1, Object o2) {
XModelObject oo1 = (XModelObject)o1;
XModelObject oo2 = (XModelObject)o2;
- String key1 = "" + getKey(oo1);
- String key2 = "" + getKey(oo2);
+ String key1 = "" + getKey(oo1); //$NON-NLS-1$
+ String key2 = "" + getKey(oo2); //$NON-NLS-1$
return key1.compareTo(key2);
}
@@ -105,9 +105,9 @@
sortItems();
}
provider.setObjects(items);
- provider.setPattern("");
+ provider.setPattern(""); //$NON-NLS-1$
tableViewer = new TableViewer(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- tableViewer.setColumnProperties(new String[]{"name"});
+ tableViewer.setColumnProperties(new String[]{"name"}); //$NON-NLS-1$
tableViewer.setContentProvider(provider);
tableViewer.setLabelProvider(provider);
tableViewer.setInput(this);
@@ -142,7 +142,7 @@
public void action(String command) {
stopEditing();
if(OK.equalsIgnoreCase(command)) {
- p.put("selected", selected);
+ p.put("selected", selected); //$NON-NLS-1$
}
super.action(command);
}
@@ -195,7 +195,7 @@
}
public void setPattern(String s) {
- s = s == null ? "" : s.toLowerCase();
+ s = s == null ? "" : s.toLowerCase(); //$NON-NLS-1$
items.clear();
for (int i = 0; i < l.length; i++) {
String key = getKey(l[i]);
@@ -227,15 +227,15 @@
}
public String getColumnText(Object element, int columnIndex) {
- if(!(element instanceof XModelObject)) return "";
- return (columnIndex == 0) ? getKey((XModelObject)element) : "-";
+ if(!(element instanceof XModelObject)) return ""; //$NON-NLS-1$
+ return (columnIndex == 0) ? getKey((XModelObject)element) : "-"; //$NON-NLS-1$
}
public void addListener(ILabelProviderListener listener) {
}
public boolean isLabelProperty(Object element, String property) {
- return ("name".equals(property));
+ return ("name".equals(property)); //$NON-NLS-1$
}
public void removeListener(ILabelProviderListener listener) {
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/StrutsUIMessages.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/StrutsUIMessages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/StrutsUIMessages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -48,6 +48,8 @@
public static String YES;
public static String NO;
public static String SOURCE_FOLDER_FOR_MODULE_ISNOT_FOUND;
+ public static String GenBaseSupport_Generate;
+ public static String GenBaseSupport_Stop;
public static String GENERATE_JAVABEAN_PROPERTIES;
public static String GENERATE_CONSTANTS_FOR_LOCAL_FORWARDS;
public static String GENERATE_CONSTANTS_FOR_GLOBAL_FORWARDS;
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/messages.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/messages/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -41,6 +41,8 @@
NO=No
SOURCE_FOLDER_FOR_MODULE_ISNOT_FOUND=Source folder for module "{0}" is not found. Please set it through ''Modules Configuration'' dialog.
ERROR=Error
+GenBaseSupport_Generate=Generate
+GenBaseSupport_Stop=Stop
GENERATE_JAVABEAN_PROPERTIES=Generate JavaBean properties
GENERATE_CONSTANTS_FOR_LOCAL_FORWARDS=Generate constants for local forwards
GENERATE_CONSTANTS_FOR_GLOBAL_FORWARDS=Generate constants for global forwards
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/GenBaseSupport.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/GenBaseSupport.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/GenBaseSupport.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -25,10 +25,11 @@
*/
public abstract class GenBaseSupport extends WebPrjSupport implements StrutsConstants {
- public static final String GENERATE = "Generate";
- public static final String STOP = "Stop";
+ public static final String GENERATE = StrutsUIMessages.GenBaseSupport_Generate;
+ public static final String STOP = StrutsUIMessages.GenBaseSupport_Stop;
- public static final String DEFAULT_ACTION_IMPORTS =
+ @SuppressWarnings("nls")
+ public static final String DEFAULT_ACTION_IMPORTS =
"java.io.*,"+
"javax.servlet.RequestDispatcher,"+
"javax.servlet.ServletException,"+
@@ -44,7 +45,8 @@
"org.apache.struts.action.ActionServlet,"+
"org.apache.struts.util.MessageResources";
- public static final String DEFAULT_FORMBEAN_IMPORTS =
+ @SuppressWarnings("nls")
+ public static final String DEFAULT_FORMBEAN_IMPORTS =
"javax.servlet.http.HttpServletRequest,"+
"org.apache.struts.action.ActionError,"+
"org.apache.struts.action.ActionErrors,"+
@@ -52,13 +54,13 @@
"org.apache.struts.action.ActionMapping";
public static final String DEFAULT_FORWARD_IMPORTS =
- "org.apache.struts.action.ActionForward";
+ "org.apache.struts.action.ActionForward"; //$NON-NLS-1$
public static final String DEFAULT_EXCEPTION_IMPORTS =
- "org.apache.struts.action.ActionError";
+ "org.apache.struts.action.ActionError"; //$NON-NLS-1$
public static final String DYNA_ACTION_FORM =
- "org.apache.struts.action.DynaActionForm";
+ "org.apache.struts.action.DynaActionForm"; //$NON-NLS-1$
protected Throwable exc = null;
protected Step[] steps = null;
@@ -84,7 +86,7 @@
protected String formbean_base = null;
protected String forward_base = null;
protected String exception_base = null;
- protected String message = "";
+ protected String message = ""; //$NON-NLS-1$
/** Creates a new instance of GenBaseSupport */
public GenBaseSupport() {
@@ -154,7 +156,7 @@
if(mod == null || mod.length() == 0) mod = "<default>"; //$NON-NLS-1$
ServiceDialog d = getTarget().getModel().getService();
- String msg = StrutsUIMessages.SOURCE_FOLDER_FOR_MODULE_ISNOT_FOUND + mod + ""; //$NON-NLS-2$
+ String msg = StrutsUIMessages.SOURCE_FOLDER_FOR_MODULE_ISNOT_FOUND + mod + ""; //$NON-NLS-1$
int q = d.showDialog(StrutsUIMessages.ERROR, msg, new String[]{OK, CANCEL}, null, ServiceDialog.ERROR);
if(q != 0) {
setFinished(true);
Added: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/Messages.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/Messages.java (rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,22 @@
+package org.jboss.tools.struts.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.struts.ui.messages"; //$NON-NLS-1$
+ public static String SyncProjectStepView_Add;
+ public static String SyncProjectStepView_Cancel;
+ public static String SyncProjectStepView_Confirmation;
+ public static String SyncProjectStepView_Delete;
+ public static String SyncProjectStepView_DeleteModule;
+ public static String SyncProjectStepView_DeleteURI;
+ public static String SyncProjectStepView_OK;
+ public static String SyncProjectStepView_Restore;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/messages.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/messages.properties (rev 0)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -0,0 +1,8 @@
+SyncProjectStepView_Add=Add
+SyncProjectStepView_Cancel=Cancel
+SyncProjectStepView_Confirmation=Confirmation
+SyncProjectStepView_Delete=Delete
+SyncProjectStepView_DeleteModule=Delete module {0}?
+SyncProjectStepView_DeleteURI=Delete URI {0}?
+SyncProjectStepView_OK=OK
+SyncProjectStepView_Restore=Restore
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/editproperties/StrutsEditPropertiesWizardView.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/editproperties/StrutsEditPropertiesWizardView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/editproperties/StrutsEditPropertiesWizardView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -61,11 +61,11 @@
public void setObject(Object data) {
super.setObject(data);
Properties properties = (Properties)data;
- context = (StrutsEditPropertiesContext)properties.get("context");
+ context = (StrutsEditPropertiesContext)properties.get("context"); //$NON-NLS-1$
editor.setContext(context);
if(context.getObject() != null) {
setModel(context.getObject().getModel());
- setHelpKey(context.getObject().getModelEntity().getName() + "_Properties");
+ setHelpKey(context.getObject().getModelEntity().getName() + "_Properties"); //$NON-NLS-1$
}
this.setTitle(WizardKeys.getTitle(getHelpKey()));
this.setWindowTitle(WizardKeys.getHeader(getHelpKey()));
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectModulesPage.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectModulesPage.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/project/ImportProjectModulesPage.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -44,7 +44,7 @@
private ImportWebDirProjectContext context;
public ImportProjectModulesPage(ImportWebDirProjectContext context) {
- super("");
+ super(""); //$NON-NLS-1$
this.context = context;
list.setAutoResize(true);
list.setTableProvider(listModel);
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/sync/SyncProjectStepView.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/sync/SyncProjectStepView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/wizard/sync/SyncProjectStepView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -11,6 +11,7 @@
package org.jboss.tools.struts.ui.wizard.sync;
import java.beans.PropertyChangeEvent;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Properties;
@@ -35,6 +36,7 @@
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.jst.web.project.WebModuleConstants;
+import org.jboss.tools.struts.ui.Messages;
import org.jboss.tools.struts.ui.StrutsUIPlugin;
import org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectContext;
@@ -143,8 +145,8 @@
public void update() {
lock = true;
- listmodel.setModelObject(objects = (ArrayList)support.getProperties().get("modules"));
- SyncProjectContext context = (SyncProjectContext)support.getProperties().get("context");
+ listmodel.setModelObject(objects = (ArrayList)support.getProperties().get("modules")); //$NON-NLS-1$
+ SyncProjectContext context = (SyncProjectContext)support.getProperties().get("context"); //$NON-NLS-1$
XModelObject webxml = context.getWebXML();
bar.addEnabled = (webxml != null && webxml.isObjectEditable());
if(webxml != null) {
@@ -240,7 +242,7 @@
class CL implements CommandBarListener {
public void action(String name) {
if(SyncBar.ADD.equals(name)) {
- XActionInvoker.invoke("WebPrjAddModuleHelper", "Add", support.getTarget(), support.getProperties());
+ XActionInvoker.invoke("WebPrjAddModuleHelper", "Add", support.getTarget(), support.getProperties()); //$NON-NLS-1$ //$NON-NLS-2$
list.update();
moduleTable.update();
bar.updateControl();
@@ -250,27 +252,27 @@
XModelObject s = getSelectedObject();
if(s == null) return;
if(SyncBar.RESTORE.equals(name)) {
- String uri = s.getAttributeValue("URI");
- String path = s.getAttributeValue("path on disk");
+ String uri = s.getAttributeValue("URI"); //$NON-NLS-1$
+ String path = s.getAttributeValue("path on disk"); //$NON-NLS-1$
if(uri.length() == 0 && path.length() > 0) {
int i = path.lastIndexOf('/');
- if(i >= 0) s.setAttributeValue("URI", "/WEB-INF/" + path.substring(i + 1));
+ if(i >= 0) s.setAttributeValue("URI", "/WEB-INF/" + path.substring(i + 1)); //$NON-NLS-1$ //$NON-NLS-2$
}
- s.set("state", "restored");
+ s.set("state", "restored"); //$NON-NLS-1$ //$NON-NLS-2$
} else if(SyncBar.DELETE.equals(name)) {
int si = list.getTable().getSelectionIndex();
if(si < 0) return;
XModelObject so = listmodel.getModelObject(si);
boolean isConfig = WebModuleConstants.ENTITY_WEB_CONFIG.equals(so.getModelEntity().getName());
String msg = (!isConfig) ?
- "Delete module " + listmodel.getValueAt(si, 0) + "?"
- : "Delete URI " + listmodel.getValueAt(si, 1) + "?";
- MessageDialog d = new MessageDialog(panel.getShell(), "Confirmation", null, msg, MessageDialog.QUESTION, new String[]{"OK", "Cancel"}, 0);
+ MessageFormat.format(Messages.SyncProjectStepView_DeleteModule, listmodel.getValueAt(si, 0))
+ : MessageFormat.format(Messages.SyncProjectStepView_DeleteURI, listmodel.getValueAt(si, 1));
+ MessageDialog d = new MessageDialog(panel.getShell(), Messages.SyncProjectStepView_Confirmation, null, msg, MessageDialog.QUESTION, new String[]{Messages.SyncProjectStepView_OK, Messages.SyncProjectStepView_Cancel}, 0);
int i = d.open();
if(i != 0) return;
- s.set("state", "deleted");
+ s.set("state", "deleted"); //$NON-NLS-1$ //$NON-NLS-2$
XModelObject[] sc = s.getChildren();
- for (int k = 0; k < sc.length; k++) sc[k].set("state", "deleted");
+ for (int k = 0; k < sc.length; k++) sc[k].set("state", "deleted"); //$NON-NLS-1$ //$NON-NLS-2$
}
list.update();
bar.updateControl();
@@ -296,10 +298,10 @@
public void validate() {
Properties p = new Properties();
- p.put("modules", objects);
+ p.put("modules", objects); //$NON-NLS-1$
XModelObject s = getSelectedObject();
- if(s == null) p.remove("selected");
- else p.put("selected", s);
+ if(s == null) p.remove("selected"); //$NON-NLS-1$
+ else p.put("selected", s); //$NON-NLS-1$
isDataChanged = true;
if(validator != null) {
validator.validate(p);
@@ -316,9 +318,9 @@
}
class SyncBar {
- static String ADD = "Add";
- static String DELETE = "Delete";
- static String RESTORE = "Restore";
+ static String ADD = Messages.SyncProjectStepView_Add;
+ static String DELETE = Messages.SyncProjectStepView_Delete;
+ static String RESTORE = Messages.SyncProjectStepView_Restore;
static String[] ADD_DELETE = new String[]{ADD, DELETE};
protected CommandBar bar = new CommandBar();
protected XModelObject selected = null;
@@ -356,7 +358,7 @@
bar.rename(RESTORE, DELETE);
bar.setEnabled(DELETE, false);
} else {
- boolean u = ("deleted".equals(selected.get("state")));
+ boolean u = ("deleted".equals(selected.get("state"))); //$NON-NLS-1$ //$NON-NLS-2$
if(u) {
bar.rename(DELETE, RESTORE);
bar.setEnabled(RESTORE, u);
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/Messages.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/Messages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -4,8 +4,22 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.struts.validator.ui.messages"; //$NON-NLS-1$
+ public static String AbstractResourcePathView_Browse;
+ public static String AbstractResourcePathView_Label;
public static String ActionNames_Default;
public static String ActionNames_Overwrite;
+ public static String FieldEditor_Default;
+ public static String FieldEditor_Edit;
+ public static String FieldEditor_IndexedListProperty;
+ public static String FieldEditor_Override;
+ public static String FieldEditor_Page;
+ public static String FormsetsBar_AddValidationRule;
+ public static String FormsetsBar_Create;
+ public static String FormsetsBar_CreateField;
+ public static String FormsetsBar_CreateForm;
+ public static String FormsetsBar_CreateFormset;
+ public static String FormsetsBar_DeleteFormset;
+ public static String FormsetsBar_Help;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidatorAttributeEditor.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidatorAttributeEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/ValidatorAttributeEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -25,10 +25,22 @@
protected String [] commands;
protected CommandBar bar = new CommandBar();
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public ValidatorAttributeEditor(String name, String displayName, String command) {
this(name, new String[]{displayName}, new String[]{command});
}
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayNames (translatable)
+ * @param commands (non-translatable)
+ */
public ValidatorAttributeEditor(String name, String[] displayNames, String[] commands) {
this.name = name;
this.displayNames = displayNames;
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FieldEditor.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FieldEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FieldEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -9,15 +9,16 @@
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.util.FindObjectHelper;
import org.jboss.tools.common.meta.action.impl.handlers.*;
+import org.jboss.tools.struts.validator.ui.Messages;
import org.jboss.tools.struts.validator.ui.ValidatorAttributeEditor;
import org.jboss.tools.struts.validator.ui.formset.model.*;
public class FieldEditor {
protected Composite control;
protected FieldAttributeEditor pageEditor =
- new PageAttributeEditor("page", "Page", "EditActions.EditPage");
+ new PageAttributeEditor("page", Messages.FieldEditor_Page, "EditActions.EditPage"); //$NON-NLS-1$ //$NON-NLS-2$
protected FieldAttributeEditor indexEditor =
- new PropertyIndexAttributeEditor("indexedListProperty", "Indexed List Property", "EditActions.EditIndex");
+ new PropertyIndexAttributeEditor("indexedListProperty", Messages.FieldEditor_IndexedListProperty, "EditActions.EditIndex"); //$NON-NLS-1$ //$NON-NLS-2$
public FieldEditor() {}
@@ -55,9 +56,9 @@
}
abstract class FieldAttributeEditor extends ValidatorAttributeEditor {
- static String EDIT = "Edit";
- static String OVERWRITE = "Override";
- static String DEFAULT = "Default";
+ static String EDIT = Messages.FieldEditor_Edit;
+ static String OVERWRITE = Messages.FieldEditor_Override;
+ static String DEFAULT = Messages.FieldEditor_Default;
protected FieldModel fmodel = null;
protected boolean enabled = true;
protected int status = 0;
@@ -65,6 +66,12 @@
Label label;
protected Text text;
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public FieldAttributeEditor(String name, String displayName, String command) {
super(name, new String[]{EDIT}, new String[]{command});
this.displayName = displayName;
@@ -161,12 +168,18 @@
class PageAttributeEditor extends FieldAttributeEditor {
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public PageAttributeEditor(String name, String displayName, String command) {
super(name, displayName, command);
}
protected String getText() {
- return (fmodel == null) ? "" : fmodel.getPage();
+ return (fmodel == null) ? "" : fmodel.getPage(); //$NON-NLS-1$
}
protected int getStatus() {
@@ -177,7 +190,7 @@
XModelObject o = getModelObject();
if(o != null) {
try {
- o.getModel().changeObjectAttribute(o, "page", "");
+ o.getModel().changeObjectAttribute(o, "page", ""); //$NON-NLS-1$ //$NON-NLS-2$
} catch (XModelException e) {
ModelPlugin.getPluginLog().logError(e);
}
@@ -187,11 +200,11 @@
protected void overwrite() {
XModelObject[] ts = FieldDataEditor.getTarget(fmodel);
if(ts == null || ts[0] == null) return;
- if(!ts[0].isActive()) ts[0].setAttributeValue("page", getText());
+ if(!ts[0].isActive()) ts[0].setAttributeValue("page", getText()); //$NON-NLS-1$
long t = ts[0].getTimeStamp();
- invoke("EditActions.EditPage", ts[0]);
+ invoke("EditActions.EditPage", ts[0]); //$NON-NLS-1$
if(t != ts[0].getTimeStamp() && ts[1] != null) {
- ts[0].setAttributeValue("indexedListProperty", "");
+ ts[0].setAttributeValue("indexedListProperty", ""); //$NON-NLS-1$ //$NON-NLS-2$
try {
DefaultCreateHandler.addCreatedObject(ts[1], ts[2], FindObjectHelper.IN_EDITOR_ONLY);
} catch (XModelException e) {
@@ -204,12 +217,18 @@
class PropertyIndexAttributeEditor extends FieldAttributeEditor {
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public PropertyIndexAttributeEditor(String name, String displayName, String command) {
super(name, displayName, command);
}
protected String getText() {
- return (fmodel == null) ? "" : fmodel.getIndex();
+ return (fmodel == null) ? "" : fmodel.getIndex(); //$NON-NLS-1$
}
protected int getStatus() {
@@ -220,7 +239,7 @@
XModelObject o = getModelObject();
if(o != null) {
try {
- o.getModel().changeObjectAttribute(o, "indexedListProperty", "");
+ o.getModel().changeObjectAttribute(o, "indexedListProperty", ""); //$NON-NLS-1$ //$NON-NLS-2$
} catch (XModelException e) {
ModelPlugin.getPluginLog().logError(e);
}
@@ -230,11 +249,11 @@
protected void overwrite() {
XModelObject[] ts = FieldDataEditor.getTarget(fmodel);
if(ts == null || ts[0] == null) return;
- if(!ts[0].isActive()) ts[0].setAttributeValue("indexedListProperty", getText());
+ if(!ts[0].isActive()) ts[0].setAttributeValue("indexedListProperty", getText()); //$NON-NLS-1$
long t = ts[0].getTimeStamp();
- invoke("EditActions.EditIndex", ts[0]);
+ invoke("EditActions.EditIndex", ts[0]); //$NON-NLS-1$
if(t != ts[0].getTimeStamp() && ts[1] != null) {
- ts[0].setAttributeValue("page", "");
+ ts[0].setAttributeValue("page", ""); //$NON-NLS-1$ //$NON-NLS-2$
try {
DefaultCreateHandler.addCreatedObject(ts[1], ts[2], FindObjectHelper.IN_EDITOR_ONLY);
} catch (XModelException e) {
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FormsetsBar.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FormsetsBar.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/formset/FormsetsBar.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -22,6 +22,7 @@
import org.jboss.tools.common.model.undo.XTransactionUndo;
import org.jboss.tools.common.model.undo.XUndoManager;
import org.jboss.tools.common.model.util.FindObjectHelper;
+import org.jboss.tools.struts.validator.ui.Messages;
import org.jboss.tools.struts.validator.ui.XStudioValidatorPlugin;
import org.jboss.tools.struts.validator.ui.formset.model.DependencyModel;
import org.jboss.tools.struts.validator.ui.formset.model.FModel;
@@ -32,14 +33,14 @@
import org.jboss.tools.struts.validators.model.XModelEntityResolver;
public class FormsetsBar implements CommandBarListener, ActionNames, FSelectionListener {
- static String CREATE = "Create";
- static String CREATE_FORMSET = "Create Formset";
- static String DELETE_FORMSET = "Delete Formset";
- static String CREATE_FORM = "Create Form";
- static String CREATE_FIELD = "Create Field";
- static String CREATE_DEPEN = "Add Validation Rule";
+ static String CREATE = Messages.FormsetsBar_Create;
+ static String CREATE_FORMSET = Messages.FormsetsBar_CreateFormset;
+ static String DELETE_FORMSET = Messages.FormsetsBar_DeleteFormset;
+ static String CREATE_FORM = Messages.FormsetsBar_CreateForm;
+ static String CREATE_FIELD = Messages.FormsetsBar_CreateField;
+ static String CREATE_DEPEN = Messages.FormsetsBar_AddValidationRule;
static String[] createActions = {CREATE, CREATE_FORM, CREATE_FIELD, CREATE_DEPEN, CREATE, CREATE};
- static String HELP = "Help";
+ static String HELP = Messages.FormsetsBar_Help;
protected Composite control;
protected CommandBar formBar = createBar();
@@ -208,7 +209,7 @@
}
private void createFormset() {
- invoke("CreateActions.AddFormset", root);
+ invoke("CreateActions.AddFormset", root); //$NON-NLS-1$
}
private void deleteFormset() {
@@ -218,7 +219,7 @@
private void createForm() {
XModelObject[] os = formsetsEditor.getFormsetsModel().getCurrentFormsets();
- if(os.length > 0) invoke("CreateActions.AddForm", os[0]);
+ if(os.length > 0) invoke("CreateActions.AddForm", os[0]); //$NON-NLS-1$
}
private void createField() {
@@ -228,7 +229,7 @@
for (int i = 0; i < os.length; i++) if(isCurrent(fs, os[i])) {
XModelObject o = getAncestor(os[i], ValidatorConstants.ENT_FORM);
if(o == null) continue;
- invoke("CreateActions.AddField", o);
+ invoke("CreateActions.AddField", o); //$NON-NLS-1$
return;
}
}
@@ -247,9 +248,9 @@
XModelObject o = getAncestor(os[i], ValidatorConstants.ENT_FIELD);
if(o == null) continue;
Properties p = new Properties();
- p.setProperty("help", "Wizard_Validation_Dependency");
- p.put("shell", formBar.getControl().getShell());
- XActionInvoker.invoke("ValidationDependencyHelper", "CreateActions.AddDependency", os[i], p);
+ p.setProperty("help", "Wizard_Validation_Dependency"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("shell", formBar.getControl().getShell()); //$NON-NLS-1$
+ XActionInvoker.invoke("ValidationDependencyHelper", "CreateActions.AddDependency", os[i], p); //$NON-NLS-1$ //$NON-NLS-2$
return;
}
}
@@ -278,7 +279,7 @@
private void deleteObject(XModelObject[] os, boolean isOverriding) {
if(os.length == 0) return;
- String action = (isOverriding) ? "DeleteActions.ResetDefault" : "DeleteActions.Delete";
+ String action = (isOverriding) ? "DeleteActions.ResetDefault" : "DeleteActions.Delete"; //$NON-NLS-1$ //$NON-NLS-2$
if(os.length == 1) {
invoke(action, os[0]);
return;
@@ -306,7 +307,7 @@
XModelObject[] fs = formsetsEditor.getFormsetsModel().getCurrentFormsets();
XModelObject[] os = selected.getModelObjects();
for (int i = 0; i < os.length; i++) if(isCurrent(fs, os[i])) {
- invoke("Properties.Properties", os[i]);
+ invoke("Properties.Properties", os[i]); //$NON-NLS-1$
return;
}
}
@@ -327,15 +328,15 @@
XModelObject[] os = f.getParent().getModelObjects();
if(os.length == 0) return;
Properties p = new Properties();
- p.setProperty("dependency name", f.getName());
- XActionInvoker.invoke("ValidationDependencyHelper", "DeleteActions.Delete", os[0], p);
+ p.setProperty("dependency name", f.getName()); //$NON-NLS-1$
+ XActionInvoker.invoke("ValidationDependencyHelper", "DeleteActions.Delete", os[0], p); //$NON-NLS-1$ //$NON-NLS-2$
}
private void invoke(String actionpath, XModelObject object) {
XActionInvoker.invoke(actionpath, object, null);
}
- static String SEPARATOR = "separator";
+ static String SEPARATOR = "separator"; //$NON-NLS-1$
public String[] getMenu() {
ArrayList<String> l = new ArrayList<String>();
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/global/ValidatorEditor.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/global/ValidatorEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/global/ValidatorEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -161,6 +161,12 @@
String displayName;
protected Text text;
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public TextAttributeEditor(String name, String displayName, String command) {
super(name, CHANGE, command);
this.displayName = displayName;
@@ -226,6 +232,11 @@
int lock = 0;
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ */
public TextAreaAttributeEditor(String name, String displayName) {
super(name, StrutsUIMessages.CHANGE, null);
this.displayName = displayName;
@@ -288,6 +299,12 @@
this("depends", StrutsUIMessages.DEPENDS, "EditActions.EditDepends"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
+ /**
+ *
+ * @param name (non-translatable)
+ * @param displayName (translatable)
+ * @param command (non-translatable)
+ */
public DependsAttributeEditor(String name, String displayName, String command) {
super(name, displayName, command);
}
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/messages.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -1,2 +1,16 @@
+AbstractResourcePathView_Browse=&Browse
+AbstractResourcePathView_Label={0}:
ActionNames_Default=Default
ActionNames_Overwrite=Override
+FieldEditor_Default=Default
+FieldEditor_Edit=Edit
+FieldEditor_IndexedListProperty=Indexed List Property
+FieldEditor_Override=Override
+FieldEditor_Page=Page
+FormsetsBar_AddValidationRule=Add Validation Rule
+FormsetsBar_Create=Create
+FormsetsBar_CreateField=Create Field
+FormsetsBar_CreateForm=Create Form
+FormsetsBar_CreateFormset=Create Formset
+FormsetsBar_DeleteFormset=Delete Formset
+FormsetsBar_Help=Help
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/depends/ValidationPathView.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/depends/ValidationPathView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/depends/ValidationPathView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -45,11 +45,11 @@
public void action(String name) {
XModelObject f = getSelectedFile();
- XModelObject o = model.createModelObject("ValidatorFileSelector", null);
+ XModelObject o = model.createModelObject("ValidatorFileSelector", null); //$NON-NLS-1$
if(f != null)
- o.setAttributeValue("file", "" + XModelObjectLoaderUtil.getResourcePath(f));
- XActionInvoker.invoke("Edit", o, null);
- String sp = o.getAttributeValue("file");
+ o.setAttributeValue("file", "" + XModelObjectLoaderUtil.getResourcePath(f)); //$NON-NLS-1$ //$NON-NLS-2$
+ XActionInvoker.invoke("Edit", o, null); //$NON-NLS-1$
+ String sp = o.getAttributeValue("file"); //$NON-NLS-1$
XModelObject fn = model.getByPath(sp);
if(fn == null || f == fn) return;
addValue(sp);
Modified: trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/key/AbstractResourcePathView.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/key/AbstractResourcePathView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/struts/plugins/org.jboss.tools.struts.validator.ui/src/org/jboss/tools/struts/validator/ui/wizard/key/AbstractResourcePathView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.struts.validator.ui.wizard.key;
+import java.text.MessageFormat;
import java.util.*;
import org.jboss.tools.common.model.ui.action.CommandBar;
import org.jboss.tools.common.model.ui.action.CommandBarListener;
@@ -25,6 +26,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.struts.validator.ui.Messages;
public abstract class AbstractResourcePathView implements CommandBarListener, SelectionListener {
protected CommandBar commandBar = new CommandBar();
@@ -51,7 +53,7 @@
composite.setLayout(layout);
Label label = new Label(composite, SWT.NONE);
- label.setText(getDisplayName() + ": ");
+ label.setText(MessageFormat.format(Messages.AbstractResourcePathView_Label, getDisplayName()));
combo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
GridData d = new GridData(GridData.FILL_HORIZONTAL);
@@ -62,7 +64,7 @@
combo.addSelectionListener(this);
commandBar.setMnemonicEnabled(true);
- commandBar.setCommands(new String[]{"&Browse"});
+ commandBar.setCommands(new String[]{Messages.AbstractResourcePathView_Browse});
commandBar.addCommandBarListener(this);
commandBar.getLayout().setMargins(0, 0, 0, 0);
commandBar.getLayout().buttonWidth = convertHorizontalDLUsToPixels(parent, IDialogConstants.BUTTON_WIDTH);
@@ -88,8 +90,8 @@
public void setObject(Object data) {
lock = true;
Properties p = (Properties)data;
- model = (XModel)p.get("model");
- object = (XModelObject)p.get("object");
+ model = (XModel)p.get("model"); //$NON-NLS-1$
+ object = (XModelObject)p.get("object"); //$NON-NLS-1$
lock = false;
updateSelection();
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/IVpeHelpContextIds.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -13,7 +13,7 @@
public interface IVpeHelpContextIds {
public static final String PREFIX = VpePlugin.PLUGIN_ID + '.';
- public static final String VISUAL_PAGE_EDITOR = PREFIX + "visual_page_editor";
+ public static final String VISUAL_PAGE_EDITOR = PREFIX + "visual_page_editor"; //$NON-NLS-1$
- public static final String REFERENCE_TO_RESOURCES = PREFIX + "references_to_resources";
+ public static final String REFERENCE_TO_RESOURCES = PREFIX + "references_to_resources"; //$NON-NLS-1$
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -65,10 +65,10 @@
VISUAL_DUMP_PRINT_HASH = "true".equals(Platform.getDebugOption(VpePlugin.PLUGIN_ID + "/debug/visual/dump_print_hash")); //$NON-NLS-1$ //$NON-NLS-2$
VISUAL_DUMP_IGNORED_ATTRIBUTES = Platform
.getDebugOption(VpePlugin.PLUGIN_ID
- + "/debug/visual/ignored_attributes") != null ? Arrays
+ + "/debug/visual/ignored_attributes") != null ? Arrays //$NON-NLS-1$
.asList(Platform.getDebugOption(
VpePlugin.PLUGIN_ID
- + "/debug/visual/ignored_attributes").split(
+ + "/debug/visual/ignored_attributes").split( //$NON-NLS-1$
Constants.COMMA)) : null;
VISUAL_CONTEXTMENU_TEST = "true".equals(Platform.getDebugOption(VpePlugin.PLUGIN_ID + "/debug/visual/contextmenu/show_test")); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -109,7 +109,7 @@
Bundle bundle = Platform.getBundle(PLUGIN_ID);
URL url = null;
try {
- url = bundle == null ? null : FileLocator.resolve(bundle.getEntry("/ve"));
+ url = bundle == null ? null : FileLocator.resolve(bundle.getEntry("/ve")); //$NON-NLS-1$
} catch (IOException e) {
VpePlugin.getPluginLog().logError(e);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/TextNodeSplitterImpl.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/TextNodeSplitterImpl.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/TextNodeSplitterImpl.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -84,7 +84,7 @@
}
private boolean isSpacing(String str){
- if("".endsWith(str.trim())) return true;
+ if("".endsWith(str.trim())) return true; //$NON-NLS-1$
else return false;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -549,7 +549,7 @@
job.cancel();
}
- job = new UIJob("NotifyChangedJob") {
+ job = new UIJob("NotifyChangedJob") { //$NON-NLS-1$
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
// we checks is job was canceled and if is it true we cancel job
@@ -684,7 +684,7 @@
if (switcher != null) {
switcher.stopActiveEditor();
} else {
- throw new VpeDisposeException("VpeController already disposed");
+ throw new VpeDisposeException("VpeController already disposed"); //$NON-NLS-1$
}
}
}
@@ -1059,7 +1059,8 @@
// nsIDOMElement visualDragElement = selectionBuilder
// .getDragElement(mouseEvent);
if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
- System.out.println("<<< mouseDown targetNode: " /* //$NON-NLS-1$
+ System.out.println("<<< mouseDown targetNode: " //$NON-NLS-1$
+ /*
* +visualNode.
* getNodeName()
* + " (" +
@@ -2023,7 +2024,9 @@
.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
- System.out.print(" x: " + visualDropInfo.getMouseX()
+ System.out.print(
+ " x: " //$NON-NLS-1$
+ + visualDropInfo.getMouseX()
+ " y: " //$NON-NLS-1$
+ visualDropInfo.getMouseY()
+ " container: " //$NON-NLS-1$
@@ -2076,10 +2079,10 @@
if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out
.print(" container: " + visualDropInfo.getDropContainer().getNodeName() + //$NON-NLS-1$
- "(" + visualDropInfo.getDropContainer()
- + ")" + //$NON-NLS-1$ //$NON-NLS-2$
- " offset: "
- + visualDropInfo.getDropOffset()); //$NON-NLS-1$
+ "(" + visualDropInfo.getDropContainer() //$NON-NLS-1$
+ + ")" + //$NON-NLS-1$
+ " offset: " //$NON-NLS-1$
+ + visualDropInfo.getDropOffset());
}
VpeSourceInnerDragInfo sourceInnerDragInfo = visualBuilder
@@ -2223,7 +2226,7 @@
IDropCommand dropCommand = DropCommandFactory.getInstance()
.getDropCommand(flavor, JSPTagProposalFactory.getInstance());
- boolean promptAttributes = "yes"
+ boolean promptAttributes = "yes" //$NON-NLS-1$
.equals(VpePreference.ALWAYS_REQUEST_FOR_ATTRIBUTE.getValue());
dropCommand.getDefaultModel().setPromptForTagAttributesRequired(
promptAttributes);
@@ -2264,7 +2267,7 @@
final DragTransferData dragTransferData = DndUtil.getDragTransferData();
final nsISupports aValue = dragTransferData.getValue();
- String aFlavor = "";
+ String aFlavor = ""; //$NON-NLS-1$
if (VpeDndUtil.isNsIFileInstance(aValue)) {
nsIFile aFile = (nsIFile) aValue.queryInterface(nsIFile.NS_IFILE_IID);
@@ -2499,7 +2502,7 @@
public VpeIncludeList getIncludeList() {
if (includeList == null)
- VpePlugin.getPluginLog().logError("includeList - NULL!!!");
+ VpePlugin.getPluginLog().logError("includeList - NULL!!!"); //$NON-NLS-1$
return includeList;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/Activator.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -9,7 +9,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.common.resref";
+ public static final String PLUGIN_ID = "org.jboss.tools.common.resref"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/AbsoluteFolderReferenceList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/AbsoluteFolderReferenceList.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/AbsoluteFolderReferenceList.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -14,7 +14,7 @@
import org.jboss.tools.common.resref.core.ResourceReferenceList;
public class AbsoluteFolderReferenceList extends ResourceReferenceList {
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.AbsoluteFolder");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.AbsoluteFolder"); //$NON-NLS-1$ //$NON-NLS-2$
static AbsoluteFolderReferenceList instance = new AbsoluteFolderReferenceList();
public static AbsoluteFolderReferenceList getInstance() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceList.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CSSReferenceList.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -14,7 +14,7 @@
import org.jboss.tools.common.resref.core.ResourceReferenceList;
public class CSSReferenceList extends ResourceReferenceList {
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.CSSList");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.CSSList"); //$NON-NLS-1$ //$NON-NLS-2$
static CSSReferenceList instance = new CSSReferenceList();
public static CSSReferenceList getInstance() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -45,23 +45,23 @@
}
public void setObject(Properties p) {
- file = (IFile)p.get("file");
- path = (IPath)p.get("path");
+ file = (IFile)p.get("file"); //$NON-NLS-1$
+ path = (IPath)p.get("path"); //$NON-NLS-1$
rs = (file != null) ? getReferenceList().getAllResources(file) :
(path != null) ? getReferenceList().getAllResources(path)
: new ResourceReference[0];
if(rs.length == 0) {
rs = new ResourceReference[1];
- rs[0] = new ResourceReference("", ResourceReference.FILE_SCOPE);
+ rs[0] = new ResourceReference("", ResourceReference.FILE_SCOPE); //$NON-NLS-1$
}
current = rs[0];
- object.setAttributeValue("location", current.getLocation());
- object.setAttributeValue("scope", current.getScopeName());
+ object.setAttributeValue("location", current.getLocation()); //$NON-NLS-1$
+ object.setAttributeValue("scope", current.getScopeName()); //$NON-NLS-1$
data = XEntityDataImpl.create(new String[][]{
- {getEntity(), "yes"},
- {"location", "no"},
- {"scope", "no"}
+ {getEntity(), "yes"}, //$NON-NLS-1$
+ {"location", "no"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"scope", "no"} //$NON-NLS-1$ //$NON-NLS-2$
});
data.getAttributeData()[0].setValue(current.getLocation());
@@ -75,7 +75,7 @@
}
protected String getEntity() {
- return (file != null) ? "VPEFolderReference" : "VPEFolderReferenceExt";
+ return (file != null) ? "VPEFolderReference" : "VPEFolderReferenceExt"; //$NON-NLS-1$ //$NON-NLS-2$
}
protected abstract ResourceReferenceList getReferenceList();
@@ -90,7 +90,7 @@
g.setText(getTitle());
Control c = support.createControl(g);
if(file != null) {
- DirectoryFieldEditorEx f = (DirectoryFieldEditorEx)support.getFieldEditorByName("location");
+ DirectoryFieldEditorEx f = (DirectoryFieldEditorEx)support.getFieldEditorByName("location"); //$NON-NLS-1$
f.setLastPath(file.getProject().getLocation().toString());
}
data = new GridData(GridData.FILL_BOTH);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -18,7 +18,7 @@
*
* @author Eugene Stherbin
*/
-public final class Messages {
+public final class Messages extends NLS {
/** The Constant BUNDLE_NAME. */
private static final String BUNDLE_NAME = "org.jboss.tools.vpe.resref.core.messages";//$NON-NLS-1$
@@ -42,4 +42,7 @@
public static String ACTUAL_RUN_TIME_RELATIVE_FOLDER;
public static String INVALID_EL_EXPRESSION;
public static String EL_EXPRESSION_ALREADY_EXISTS;
+ public static String ResourceReferencesDialogView_Add;
+ public static String ResourceReferencesDialogView_Edit;
+ public static String ResourceReferencesDialogView_Remove;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/RelativeFolderReferenceList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/RelativeFolderReferenceList.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/RelativeFolderReferenceList.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -14,7 +14,7 @@
import org.jboss.tools.common.resref.core.ResourceReferenceList;
public class RelativeFolderReferenceList extends ResourceReferenceList {
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.RelativeFolder");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.RelativeFolder"); //$NON-NLS-1$ //$NON-NLS-2$
static RelativeFolderReferenceList instance = new RelativeFolderReferenceList();
public static RelativeFolderReferenceList getInstance() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ResourceReferencesDialogView.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ResourceReferencesDialogView.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ResourceReferencesDialogView.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -33,9 +33,9 @@
import org.jboss.tools.common.resref.ui.ResourceReferencesTableProvider;
public abstract class ResourceReferencesDialogView extends AbstractQueryWizardView {
- static String ADD = "Add";
- static String EDIT = "Edit";
- static String REMOVE = "Remove";
+ static String ADD = Messages.ResourceReferencesDialogView_Add;
+ static String EDIT = Messages.ResourceReferencesDialogView_Edit;
+ static String REMOVE = Messages.ResourceReferencesDialogView_Remove;
protected XTable table = new XTable();
protected CommandBar bar = new CommandBar();
protected ResourceReferencesTableProvider tableProvider;// = new TemplatesTableProvider();
@@ -64,8 +64,8 @@
public void setObject(Object object) {
super.setObject(object);
Properties p = findProperties(object);
- file = (IFile)p.get("file");
- path = (IPath)p.get("path");
+ file = (IFile)p.get("file"); //$NON-NLS-1$
+ path = (IPath)p.get("path"); //$NON-NLS-1$
ResourceReference[] rs = (file != null) ? getReferenceList().getAllResources(file) :
(path != null) ? getReferenceList().getAllResources(path)
: new ResourceReference[0];
@@ -124,7 +124,7 @@
}
protected void add(int index) {
- ResourceReference css = new ResourceReference("", ResourceReference.FOLDER_SCOPE);
+ ResourceReference css = new ResourceReference("", ResourceReference.FOLDER_SCOPE); //$NON-NLS-1$
boolean ok = BaseAddReferenceSupport.add(file, css, getReferenceArray(), getEntity());
if(!ok) return;
dataList.add(css);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceList.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/TaglibReferenceList.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -14,7 +14,7 @@
import org.jboss.tools.common.resref.core.ResourceReferenceList;
public class TaglibReferenceList extends ResourceReferenceList {
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.TLDList");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.TLDList"); //$NON-NLS-1$ //$NON-NLS-2$
static TaglibReferenceList instance = new TaglibReferenceList();
public static TaglibReferenceList getInstance() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCssReferencesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCssReferencesDialog.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeCssReferencesDialog.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -25,9 +25,9 @@
public static boolean run(IFile file) {
VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
Properties p = new Properties();
- p.setProperty("help", "VpeCssReferencesDialog");
- p.put("file", file);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeCssReferencesDialog"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("file", file); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel()); //$NON-NLS-1$
dialog.setObject(p);
int code = dialog.execute();
return code == 0;
@@ -36,9 +36,9 @@
public static boolean run(IPath path) {
VpeCssReferencesDialog dialog = new VpeCssReferencesDialog();
Properties p = new Properties();
- p.setProperty("help", "VpeCssReferencesDialog");
- p.put("path", path);
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeCssReferencesDialog"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("path", path); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel()); //$NON-NLS-1$
dialog.setObject(p);
int code = dialog.execute();
return code == 0;
@@ -55,7 +55,7 @@
public VpeCssReferencesDialogView() {}
protected String getEntity() {
- return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
+ return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt"; //$NON-NLS-1$ //$NON-NLS-2$
}
protected ResourceReferencesTableProvider createTableProvider(List dataList) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties 2009-07-09 07:46:26 UTC (rev 16508)
@@ -6,3 +6,6 @@
ACTUAL_RUN_TIME_FOLDERS=Actual Run-Time Folders
INVALID_EL_EXPRESSION=Invalid EL Expression.
EL_EXPRESSION_ALREADY_EXISTS=EL expression already exists in the selected scope.
+ResourceReferencesDialogView_Add=Add
+ResourceReferencesDialogView_Edit=Edit
+ResourceReferencesDialogView_Remove=Remove
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -18,7 +18,6 @@
import org.eclipse.jface.action.Action;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.gef.ui.palette.PaletteContextMenuProvider;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
@@ -120,7 +119,7 @@
private class PaletteEditAction extends Action {
public PaletteEditAction() {
- super(PaletteUIMessages.PALETTE_EDITOR, PaletteAdapter.this.getImageDescriptor("palette_editor.gif")); //$NON-NLS-2$ //$NON-NLS-1$
+ super(PaletteUIMessages.PALETTE_EDITOR, PaletteAdapter.this.getImageDescriptor("palette_editor.gif")); //$NON-NLS-1$
setToolTipText(PaletteUIMessages.PALETTE_EDITOR);
}
@@ -131,7 +130,7 @@
private class ShowHideTabsAction extends Action {
public ShowHideTabsAction() {
- super(PaletteUIMessages.SHOW_HIDE_TABS, PaletteAdapter.this.getImageDescriptor("visibility.gif")); //$NON-NLS-2$ //$NON-NLS-1$
+ super(PaletteUIMessages.SHOW_HIDE_TABS, PaletteAdapter.this.getImageDescriptor("visibility.gif")); //$NON-NLS-1$
setToolTipText(PaletteUIMessages.SHOW_HIDE);
}
public void run() {
@@ -141,7 +140,7 @@
private class ImportTLDAction extends Action {
public ImportTLDAction() {
- super(PaletteUIMessages.IMPORT_TLD, PaletteAdapter.this.getImageDescriptor("tld_import.gif")); //$NON-NLS-2$ //$NON-NLS-1$
+ super(PaletteUIMessages.IMPORT_TLD, PaletteAdapter.this.getImageDescriptor("tld_import.gif")); //$NON-NLS-1$
setToolTipText(PaletteUIMessages.IMPORT);
}
public void run() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteDragSourceListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteDragSourceListener.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteDragSourceListener.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -56,18 +56,18 @@
XModelObject object = (list.size() == 0) ? null : getObject(list.get(0));
if(object != null) {
String[] d = new String[2];
- d[0] = object.getAttributeValue("start text");
- if(d[0] == null) d[0] = "";
- d[1] = object.getAttributeValue("end text");
- if(d[1] == null) d[1] = "";
+ d[0] = object.getAttributeValue("start text"); //$NON-NLS-1$
+ if(d[0] == null) d[0] = ""; //$NON-NLS-1$
+ d[1] = object.getAttributeValue("end text"); //$NON-NLS-1$
+ if(d[1] == null) d[1] = ""; //$NON-NLS-1$
- String defaultPrefix = object.getAttributeValue("default prefix");
- String tag = object.getAttributeValue("name");
+ String defaultPrefix = object.getAttributeValue("default prefix"); //$NON-NLS-1$
+ String tag = object.getAttributeValue("name"); //$NON-NLS-1$
if(defaultPrefix == null) {
- defaultPrefix = object.getParent().getAttributeValue("default prefix");
+ defaultPrefix = object.getParent().getAttributeValue("default prefix"); //$NON-NLS-1$
}
if(defaultPrefix != null && tag != null) {
- PaletteInsertHelper.applyPrefix(d, "", tag, "xxx", defaultPrefix);
+ PaletteInsertHelper.applyPrefix(d, "", tag, "xxx", defaultPrefix); //$NON-NLS-1$ //$NON-NLS-2$
}
int i = d[0].indexOf('|');
if(i >= 0) d[0] = d[0].substring(0, i) + d[0].substring(i + 1);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/LargeImageDescriptor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/LargeImageDescriptor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/model/LargeImageDescriptor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -38,7 +38,7 @@
public Image createImage(boolean returnMissingImageOnError, Device device) {
int code = xicon.getHash(object);
if (code == 0) return null;
- String key = "" + code;
+ String key = "" + code; //$NON-NLS-1$
Image img = (Image)imageCache.get(key);
if (img != null) return img;
img = xicon.getImage(object);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -44,7 +44,7 @@
}
if (BrowserPlugin.DEBUG_BROWSERSTART) {
- System.out.println("AppFileLocProvider.getFile(" + prop + ")=\"" + (resultFile == null ? "null" : resultFile.toString()) + "\"");
+ System.out.println("AppFileLocProvider.getFile(" + prop + ")=\"" + (resultFile == null ? "null" : resultFile.toString()) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
return resultFile;
@@ -60,11 +60,11 @@
if (resultFiles != null) {
int size = resultFiles.length;
- System.out.print("AppFileLocProvider.getFiles(" + prop + ")={\"");
+ System.out.print("AppFileLocProvider.getFiles(" + prop + ")={\""); //$NON-NLS-1$ //$NON-NLS-2$
for(int i=0; i<size; i++) {
- System.out.print((i > 0 ? ", " : "") + resultFiles[i].toString());
+ System.out.print((i > 0 ? ", " : "") + resultFiles[i].toString()); //$NON-NLS-1$ //$NON-NLS-2$
}
- System.out.println("\"}");
+ System.out.println("\"}"); //$NON-NLS-1$
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -69,19 +69,19 @@
* color which used for highlight parent elements for elements which user
* can't see.
*/
- public static final String flasherHiddentElementColor = "red";
+ public static final String flasherHiddentElementColor = "red"; //$NON-NLS-1$
/**
* Contains name of attribute for inIFLasher drawing
*/
- public static String VPEFLASHERCOLORATTRIBUTE="vpeFlasherColorAttribute";
+ public static String VPEFLASHERCOLORATTRIBUTE="vpeFlasherColorAttribute"; //$NON-NLS-1$
- public static final String TRANS_FLAVOR_kHTMLMime = "text/html";
- public static final String TRANS_FLAVOR_kURLDataMime = "text/x-moz-url-data";
- public static final String TRANS_FLAVOR_kFileMime = "application/x-moz-file";
- public static final String TRANS_FLAVOR_kURLMime = "text/x-moz-url";
- public static final String TRANS_FLAVOR_kUnicodeMime = "text/unicode";
- public static final String TRANS_FLAVOR_kNativeHTMLMime = "application/x-moz-nativehtml";
+ public static final String TRANS_FLAVOR_kHTMLMime = "text/html"; //$NON-NLS-1$
+ public static final String TRANS_FLAVOR_kURLDataMime = "text/x-moz-url-data"; //$NON-NLS-1$
+ public static final String TRANS_FLAVOR_kFileMime = "application/x-moz-file"; //$NON-NLS-1$
+ public static final String TRANS_FLAVOR_kURLMime = "text/x-moz-url"; //$NON-NLS-1$
+ public static final String TRANS_FLAVOR_kUnicodeMime = "text/unicode"; //$NON-NLS-1$
+ public static final String TRANS_FLAVOR_kNativeHTMLMime = "application/x-moz-nativehtml"; //$NON-NLS-1$
/**
* xpcom flasher component which used to draw lines
@@ -92,12 +92,12 @@
/**
* RegExp for find expression 'display : none' in style string
*/
- private static final Pattern PATTERN = Pattern.compile(".*\\s*(display)\\s*:\\s*(none)\\s*;.*",Pattern.CASE_INSENSITIVE+Pattern.DOTALL);
+ private static final Pattern PATTERN = Pattern.compile(".*\\s*(display)\\s*:\\s*(none)\\s*;.*",Pattern.CASE_INSENSITIVE+Pattern.DOTALL); //$NON-NLS-1$
/**
* Contains attribute name for style
*/
- private static final String STYLE_ATTR="style";
+ private static final String STYLE_ATTR="style"; //$NON-NLS-1$
// private nsIDOMElement lastSelectedElement;
private nsIDOMNode lastSelectedNode;
@@ -285,12 +285,12 @@
public void showDragCaret(nsIDOMNode node, long offcet) {
// TODO Sergey Vasilyev figure out with caret
- System.out.println("Show drag caret for " + node.getNodeName() + ":" + offcet);
+ System.out.println("Show drag caret for " + node.getNodeName() + ":" + offcet); //$NON-NLS-1$ //$NON-NLS-2$
}
public void hideDragCaret() {
// TODO Sergey Vasilyev figure out with caret
- System.out.println("Hide drag caret");
+ System.out.println("Hide drag caret"); //$NON-NLS-1$
}
public nsITransferable createTransferable() {
@@ -380,7 +380,7 @@
nsIBaseWindow.NS_IBASEWINDOW_IID)).repaint(true);
} catch (XPCOMException ex) {
// just ignore its
- BrowserPlugin.getDefault().logInfo("repaint failed", ex);
+ BrowserPlugin.getDefault().logInfo("repaint failed", ex); //$NON-NLS-1$
}
} else if (element != null) {
@@ -581,7 +581,7 @@
((nsIBaseWindow)getWebBrowser().queryInterface(nsIBaseWindow.NS_IBASEWINDOW_IID)).repaint(true);
} catch(XPCOMException ex) {
//just ignore its
- BrowserPlugin.getDefault().logInfo("repaint failed", ex);
+ BrowserPlugin.getDefault().logInfo("repaint failed", ex); //$NON-NLS-1$
}
}
}
@@ -678,7 +678,7 @@
private boolean hasSelectInParenNodes(nsIDOMNode domNode){
if(domNode==null) {
return false;
- }else if("select".equalsIgnoreCase(domNode.getNodeName())){
+ }else if("select".equalsIgnoreCase(domNode.getNodeName())){ //$NON-NLS-1$
return true;
} else {
return hasSelectInParenNodes(domNode.getParentNode());
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java 2009-07-09 03:38:04 UTC (rev 16507)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerVpeResizer.java 2009-07-09 07:46:26 UTC (rev 16508)
@@ -36,28 +36,28 @@
/** RESIZER_MARKER_STRING_TOPLEFT */
- final static private String RESIZER_MARKER_STRING_TOPLEFT = "nw";
+ final static private String RESIZER_MARKER_STRING_TOPLEFT = "nw"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_TOP */
- final static private String RESIZER_MARKER_STRING_TOP = "n";
+ final static private String RESIZER_MARKER_STRING_TOP = "n"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_TOPRIGHT */
- final static private String RESIZER_MARKER_STRING_TOPRIGHT = "ne";
+ final static private String RESIZER_MARKER_STRING_TOPRIGHT = "ne"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_LEFT */
- final static private String RESIZER_MARKER_STRING_LEFT = "w";
+ final static private String RESIZER_MARKER_STRING_LEFT = "w"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_BOTTOMLEFT */
- final static private String RESIZER_MARKER_STRING_RIGHT = "e";
+ final static private String RESIZER_MARKER_STRING_RIGHT = "e"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_BOTTOMLEFT */
- final static private String RESIZER_MARKER_STRING_BOTTOMLEFT = "sw";
+ final static private String RESIZER_MARKER_STRING_BOTTOMLEFT = "sw"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_BOTTOM */
- final static private String RESIZER_MARKER_STRING_BOTTOM = "s";
+ final static private String RESIZER_MARKER_STRING_BOTTOM = "s"; //$NON-NLS-1$
/** RESIZER_MARKER_STRING_BOTTOMRIGHT */
- final static private String RESIZER_MARKER_STRING_BOTTOMRIGHT = "se";
+ final static private String RESIZER_MARKER_STRING_BOTTOMRIGHT = "se"; //$NON-NLS-1$
/** MAX_SIZE */
final static private int MAX_SIZE = 20000000;
@@ -518,7 +518,7 @@
nsIDOMEventTarget eventTarget = (nsIDOMEventTarget) domDocument.queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
if (eventTarget == null) {
- throw new RuntimeException("nsIDOMEventTarget is null");
+ throw new RuntimeException("nsIDOMEventTarget is null"); //$NON-NLS-1$
}
return eventTarget;
@@ -703,7 +703,7 @@
* @param aValue
*/
private void setStylePropertyPixels(nsIDOMElement aElement, String aProperty, int aValue) {
- setStyle(aElement, aProperty, aValue + "px");
+ setStyle(aElement, aProperty, aValue + "px"); //$NON-NLS-1$
}
/**
16 years, 9 months
JBoss Tools SVN: r16507 - workspace/Denny/bpel/bpel-plugins.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-07-08 23:38:04 -0400 (Wed, 08 Jul 2009)
New Revision: 16507
Modified:
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.runtime_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.runtimes_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.validator_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.wsil.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.xpath10_0.4.0.jar
Log:
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.runtime_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.runtimes_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.validator_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.wsil.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.xpath10_0.4.0.jar
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Tools SVN: r16506 - workspace/Denny/bpel/bpel-plugins.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-07-08 23:05:59 -0400 (Wed, 08 Jul 2009)
New Revision: 16506
Modified:
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.runtime_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.runtimes_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.ui_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.validator_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.wsil.model_0.4.0.jar
workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.xpath10_0.4.0.jar
Log:
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.deploy.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.apache.ode.runtime_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.common.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.runtimes_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.ui_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.validator_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.wsil.model_0.4.0.jar
===================================================================
(Binary files differ)
Modified: workspace/Denny/bpel/bpel-plugins/org.eclipse.bpel.xpath10_0.4.0.jar
===================================================================
(Binary files differ)
16 years, 9 months
JBoss Tools SVN: r16505 - branches/jbosstools-3.1.0.M2/birt/features/org.jboss.tools.birt.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-07-08 17:38:53 -0400 (Wed, 08 Jul 2009)
New Revision: 16505
Modified:
branches/jbosstools-3.1.0.M2/birt/features/org.jboss.tools.birt.feature/feature.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-4587 site categories updated
Modified: branches/jbosstools-3.1.0.M2/birt/features/org.jboss.tools.birt.feature/feature.properties
===================================================================
--- branches/jbosstools-3.1.0.M2/birt/features/org.jboss.tools.birt.feature/feature.properties 2009-07-08 18:21:53 UTC (rev 16504)
+++ branches/jbosstools-3.1.0.M2/birt/features/org.jboss.tools.birt.feature/feature.properties 2009-07-08 21:38:53 UTC (rev 16505)
@@ -25,7 +25,7 @@
birtUpdateSiteName=Business Intelligence and Reporting Tools (BIRT) Updates
# "description" property - description of the feature
-description=JBoss BIRT Integration
+description=JBoss BIRT Integration (to install this feature you need to download and install BIRT Web Tools Integration 2.5.0 from http://download.eclipse.org/birt/downloads/build.php?build=R-R1-2_5_0-200...)
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
16 years, 9 months
JBoss Tools SVN: r16504 - branches/jbosstools-3.1.0.M2/as/features/org.jboss.ide.eclipse.as.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-07-08 14:21:53 -0400 (Wed, 08 Jul 2009)
New Revision: 16504
Modified:
branches/jbosstools-3.1.0.M2/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
Log:
plugins were removed from as feature:
org.jboss.ide.eclipse.as.wtp.override.core
org.jboss.ide.eclipse.as.wtp.override.ui
Modified: branches/jbosstools-3.1.0.M2/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
===================================================================
--- branches/jbosstools-3.1.0.M2/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2009-07-08 13:44:05 UTC (rev 16503)
+++ branches/jbosstools-3.1.0.M2/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2009-07-08 18:21:53 UTC (rev 16504)
@@ -518,18 +518,4 @@
install-size="0"
version="0.0.0"/>
- <plugin
- id="org.jboss.ide.eclipse.as.wtp.override.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.ide.eclipse.as.wtp.override.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
</feature>
16 years, 9 months
JBoss Tools SVN: r16503 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-07-08 09:44:05 -0400 (Wed, 08 Jul 2009)
New Revision: 16503
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4381, JUnit for rich:colorPicker template was added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml.xml 2009-07-08 13:44:05 UTC (rev 16503)
@@ -0,0 +1,49 @@
+<tests>
+ <test id="id1">
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ some text in color picker
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="rich-color-picker-span">
+ <INPUT TYPE="text" VALUE="#ffffff" READONLY="readonly" />
+
+ <IMG CLASS="rich-color-picker-icon" STYLE="background-color: rgb(255, 255, 255);"
+ SRC="/.*resources/colorPicker/colorPickerAngleArrow.gif/" />
+ </SPAN>
+ </SPAN>
+ </test>
+ <test id="id2">
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ some text in color picker
+ </SPAN>
+ </SPAN>
+ <SPAN CLASS="rich-color-picker-span">
+ <INPUT TYPE="text" VALUE="rgb(255, 255, 255)" READONLY="readonly" />
+
+ <IMG CLASS="rich-color-picker-icon" STYLE="background-color: rgb(255, 255, 255);"
+ SRC="/.*resources/colorPicker/colorPickerAngleArrow.gif/" />
+
+ </SPAN>
+ </SPAN>
+ </test>
+ <test id="id3">
+
+ <SPAN CLASS="vpe-text">
+ <SPAN CLASS="vpe-text">
+ </SPAN>
+ <SPAN CLASS="rich-color-picker-span">
+ <INPUT TYPE="text" VALUE="#ffffff" READONLY="readonly" />
+
+ <IMG CLASS="rich-color-picker-icon" STYLE="background-color: rgb(255, 255, 255);"
+ SRC="/.*resources/colorPicker/colorPickerAngleArrow.gif/" />
+
+ </SPAN>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/colorPicker.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-07-08 13:41:19 UTC (rev 16502)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-07-08 13:44:05 UTC (rev 16503)
@@ -364,6 +364,10 @@
performContentTest("components/page/pageWithWidthsDifferent.xhtml");//$NON-NLS-1$
}
+ public void testColorPicker() throws Throwable {
+ performContentTest("components/colorPicker.xhtml");//$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return RichFacesAllTests.IMPORT_PROJECT_NAME;
16 years, 9 months
JBoss Tools SVN: r16502 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/colorPicker and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-07-08 09:41:19 -0400 (Wed, 08 Jul 2009)
New Revision: 16502
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPicker.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPickerAngleArrow.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColorPickerTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4381, rich:colorPicker template was added.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPicker.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPicker.css (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPicker.css 2009-07-08 13:41:19 UTC (rev 16502)
@@ -0,0 +1,14 @@
+.rich-color-picker-span input {
+ border: 1px solid #C4C0B9;
+ vertical-align: middle;
+ width: 130px;
+}
+
+.rich-color-picker-icon {
+ border: 1px solid #C4C0B9;
+ cursor: pointer;
+ display: inline;
+ height: 16px;
+ vertical-align: middle;
+ width: 16px;
+}
\ No newline at end of file
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPicker.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPickerAngleArrow.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/colorPicker/colorPickerAngleArrow.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColorPickerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColorPickerTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColorPickerTemplate.java 2009-07-08 13:41:19 UTC (rev 16502)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+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.jboss.tools.vpe.editor.util.VisualDomUtil;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+/**
+ * Class for RichFaces' color picker component.
+ *
+ * @author dmaliarevich
+ */
+public class RichFacesColorPickerTemplate extends VpeAbstractTemplate {
+
+ private static final String COLOR_PICKER_CSS_STYLE_PATH = "colorPicker/colorPicker.css"; //$NON-NLS-1$
+ private static final String COLOR_PICKER_COMPONENT_NAME = "colorPicker"; //$NON-NLS-1$
+ private static final String COLOR_PICKER_ANGLE_ARROW_ICON_PATH = "/colorPicker/colorPickerAngleArrow.gif"; //$NON-NLS-1$
+ private static final String CSS_SPAN = "rich-color-picker-span"; //$NON-NLS-1$
+ private static final String CSS_ICON = "rich-color-picker-icon"; //$NON-NLS-1$
+ private static final String ATTR_COLOR_MODE = "colorMode"; //$NON-NLS-1$
+ private static final String VALUE_COLOR_MODE_RGB = "rgb"; //$NON-NLS-1$
+ private static final String DEFAULT_COLOR_PICKER_VALUE_HEX = "#ffffff"; //$NON-NLS-1$
+ private static final String DEFAULT_COLOR_PICKER_VALUE_RGB = "rgb(255, 255, 255)"; //$NON-NLS-1$
+ private static final String DEFAULT_COLOR_PICKER_ICON_STYLE = "background-color: rgb(255, 255, 255);"; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ */
+ public RichFacesColorPickerTemplate() {
+ super();
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ /*
+ * Adding colorPicker.css file to the page
+ */
+ ComponentUtil.setCSSLink(pageContext, COLOR_PICKER_CSS_STYLE_PATH,
+ COLOR_PICKER_COMPONENT_NAME);
+
+ /*
+ * Casting to Element
+ */
+ Element sourceElement = (Element) sourceNode;
+
+ /*
+ * Creating visual elements
+ */
+ nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
+
+ /*
+ * Nesting elements
+ */
+ span.appendChild(input);
+ span.appendChild(img);
+
+ /*
+ * Setting elements attributes for span, input and image
+ */
+ span.setAttribute(HTML.ATTR_CLASS, CSS_SPAN);
+
+ String defaultColorMode = DEFAULT_COLOR_PICKER_VALUE_HEX;
+ if ((sourceElement.hasAttribute(ATTR_COLOR_MODE))
+ && (VALUE_COLOR_MODE_RGB.equalsIgnoreCase(sourceElement
+ .getAttribute(ATTR_COLOR_MODE)))) {
+ defaultColorMode = DEFAULT_COLOR_PICKER_VALUE_RGB;
+ }
+ input.setAttribute(HTML.ATTR_VALUE, defaultColorMode);
+ input.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_TYPE_TEXT);
+ input.setAttribute(HTML.ATTR_READONLY, HTML.ATTR_READONLY);
+
+ img.setAttribute(HTML.ATTR_CLASS, CSS_ICON);
+ img.setAttribute(HTML.ATTR_STYLE, DEFAULT_COLOR_PICKER_ICON_STYLE);
+ ComponentUtil.setImg(img, COLOR_PICKER_ANGLE_ARROW_ICON_PATH);
+
+ /*
+ * Create VpeCreationData with additional container for rich:colorPicker children
+ */
+ VpeCreationData creationData = VisualDomUtil.createTemplateWithTextContainer(
+ sourceElement, span, HTML.TAG_SPAN, visualDocument);
+
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColorPickerTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-07-08 10:58:42 UTC (rev 16501)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-07-08 13:41:19 UTC (rev 16502)
@@ -775,4 +775,10 @@
</vpe:template>
</vpe:tag>
+ <vpe:tag name="rich:colorPicker" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColorPickerTemplate">
+ </vpe:template>
+ </vpe:tag>
+
</vpe:templates>
16 years, 9 months