Author: sflanigan
Date: 2009-05-25 02:54:13 -0400 (Mon, 25 May 2009)
New Revision: 15478
Added:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.settings/
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Messages.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Plugin.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/DirectiveScanner.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/actions/AddMacroLibrary.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/DirectiveRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/GenericDirectiveRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/InterpolationRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRuleEnd.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/StringRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/XmlRule.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/linetracker/ConsoleLineTracker.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/messages.properties
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractItem.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AssignmentDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDefaultDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionInterpolation.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ElseIfDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FtlDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FunctionDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/GenericNestableDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfElseDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/Interpolation.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ItemFactory.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/LibraryMacroDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ListDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroDirective.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroInstance.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NameFragment.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NullFragment.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlinePage.java
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/preferences/ContextProperties.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English Strings
Added:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/.settings/org.eclipse.jdt.core.prefs 2009-05-25
06:54:13 UTC (rev 15478)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Messages.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Messages.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Messages.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -4,8 +4,20 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME =
"org.jboss.ide.eclipse.freemarker.messages"; //$NON-NLS-1$
+ public static String AddMacroLibrary_Error;
+ public static String AddMacroLibrary_ErrorDesc;
+ public static String AddMacroLibrary_Message;
+ public static String AddMacroLibrary_Title;
public static String ConfigurationManager_CHOOSE_NAMESPACE_FOR;
public static String ConfigurationManager_TITLE_CHOOSE_NAMESPACE;
+ public static String ContextProperties_ConfirmationTitle;
+ public static String ContextProperties_DeleteButton;
+ public static String ContextProperties_DeleteValueConfirmation;
+ public static String ContextProperties_Description;
+ public static String ContextProperties_EditButton;
+ public static String ContextProperties_KeyColumn;
+ public static String ContextProperties_NewButton;
+ public static String ContextProperties_ValueColumn;
public static String ContextValueDialog_BUTTON_BROWSE;
public static String ContextValueDialog_ERROR;
public static String ContextValueDialog_JAVA_PROJECT_ERROR;
@@ -27,6 +39,7 @@
public static String FreemarkerMultiPageEditor_PAGE_TEXT_CONTEXT;
public static String FreemarkerMultiPageEditor_PAGE_TEXT_SOURCE;
public static String MacroHyperlink_TYPELABEL_MACRO_DEFINITION;
+ public static String OutlinePage_SetContextClassEntryAction;
public static String PreferencePage_DESCRIPTION_FREEMARKER_SETTINGS;
public static String PreferencePage_FIELD_COMMENT;
public static String PreferencePage_FIELD_DIRECTIVE;
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Plugin.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Plugin.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/Plugin.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -157,7 +157,7 @@
private URL getImageURL(String key) {
Bundle bundle = getBundle();
- IPath path = new Path("icons").append(key);
+ IPath path = new Path("icons").append(key); //$NON-NLS-1$
if (FileLocator.find(bundle,path,null) == null)
return null;
try {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/DirectiveScanner.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/DirectiveScanner.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/DirectiveScanner.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -45,9 +45,9 @@
Vector rules = new Vector();
// Add rule for double quotes
- rules.add(new SingleLineRule("\"", "\"",
string,'\\'));
+ rules.add(new SingleLineRule("\"", "\"",
string,'\\')); //$NON-NLS-1$ //$NON-NLS-2$
// Add rule for single quotes
- rules.add(new SingleLineRule("'", "'",
string,'\\'));
+ rules.add(new SingleLineRule("'", "'",
string,'\\')); //$NON-NLS-1$ //$NON-NLS-2$
// Add generic whitespace rule.
rules.add(new WhitespaceRule(new WhitespaceDetector()));
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/actions/AddMacroLibrary.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/actions/AddMacroLibrary.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/actions/AddMacroLibrary.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -44,6 +44,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
+import org.jboss.ide.eclipse.freemarker.Messages;
import org.jboss.ide.eclipse.freemarker.Plugin;
import org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager;
@@ -91,15 +92,15 @@
projects.add(p[i]);
}
ProjectSelectionDialog dialog = new
ProjectSelectionDialog(Display.getCurrent().getActiveShell(), projects);
- dialog.setTitle("Please choose the associated Java
project");
- dialog.setMessage("Please choose the Java project that will use
the FreeMarker libraries");
+ dialog.setTitle(Messages.AddMacroLibrary_Title);
+ dialog.setMessage(Messages.AddMacroLibrary_Message);
int rtn = dialog.open();
if (rtn == IDialogConstants.OK_ID) {
if (dialog.getFirstResult() instanceof IJavaProject) {
project = ((IJavaProject) dialog.getFirstResult()).getProject();
}
else {
- MessageDialog.openError(Display.getCurrent().getActiveShell(),
"Java Project Required", "You must choose a Java project");
+ MessageDialog.openError(Display.getCurrent().getActiveShell(),
Messages.AddMacroLibrary_Error, Messages.AddMacroLibrary_ErrorDesc);
}
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/DirectiveRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/DirectiveRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/DirectiveRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -50,7 +50,7 @@
}
public DirectiveRule(String name, IToken token, boolean nameOnly) {
- super("!", "!", token);
+ super("!", "!", token); //$NON-NLS-1$ //$NON-NLS-2$
this.sequence = name.toCharArray();
this.nameOnly = nameOnly;
}
@@ -110,26 +110,26 @@
}
}
else if (c == '\"') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
keyStack.pop();
}
else {
- keyStack.push("\"");
+ keyStack.push("\""); //$NON-NLS-1$
}
}
else if (c == '(') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
else {
- keyStack.push("(");
+ keyStack.push("("); //$NON-NLS-1$
}
}
else if (c == ')') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
- else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
+ else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
//$NON-NLS-1$
keyStack.pop();
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/GenericDirectiveRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/GenericDirectiveRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/GenericDirectiveRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -44,7 +44,7 @@
}
public GenericDirectiveRule(IToken token) {
- super("!", "!", token);
+ super("!", "!", token); //$NON-NLS-1$ //$NON-NLS-2$
}
protected boolean sequenceDetected(
@@ -70,26 +70,26 @@
}
}
else if (c == '\"') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
keyStack.pop();
}
else {
- keyStack.push("\"");
+ keyStack.push("\""); //$NON-NLS-1$
}
}
else if (c == '(') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
else {
- keyStack.push("(");
+ keyStack.push("("); //$NON-NLS-1$
}
}
else if (c == ')') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
- else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
+ else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
//$NON-NLS-1$
keyStack.pop();
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/InterpolationRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/InterpolationRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/InterpolationRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -33,7 +33,7 @@
public class InterpolationRule extends SingleLineRule {
public InterpolationRule(char startChar, IToken token) {
- super(startChar + "{", "}", token);
+ super(startChar + "{", "}", token); //$NON-NLS-1$
//$NON-NLS-2$
}
protected boolean endSequenceDetected(ICharacterScanner scanner) {
@@ -51,26 +51,26 @@
}
}
else if (c == '\"') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
keyStack.pop();
}
else {
- keyStack.push("\"");
+ keyStack.push("\""); //$NON-NLS-1$
}
}
else if (c == '(') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
else {
- keyStack.push("(");
+ keyStack.push("("); //$NON-NLS-1$
}
}
else if (c == ')') {
- if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
+ if (keyStack.size() > 0 && keyStack.peek().equals("\"")) {
//$NON-NLS-1$
// string... don't add to stack
}
- else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
+ else if (keyStack.size() > 0 && keyStack.peek().equals("(")) {
//$NON-NLS-1$
keyStack.pop();
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -29,7 +29,7 @@
public class MacroInstanceRule extends DirectiveRule {
public MacroInstanceRule(IToken token) {
- super("", token, false);
+ super("", token, false); //$NON-NLS-1$
}
protected char getIdentifierChar() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRuleEnd.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRuleEnd.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/MacroInstanceRuleEnd.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -29,7 +29,7 @@
public class MacroInstanceRuleEnd extends DirectiveRuleEnd {
public MacroInstanceRuleEnd(IToken token) {
- super("", token, false);
+ super("", token, false); //$NON-NLS-1$
}
protected char getIdentifierChar() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/StringRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/StringRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/StringRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -33,7 +33,7 @@
private String rule;
public StringRule(String rule, IToken token) {
- super(rule, "", token);
+ super(rule, "", token); //$NON-NLS-1$
this.rule = rule;
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/XmlRule.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/XmlRule.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/editor/rules/XmlRule.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -33,7 +33,7 @@
public class XmlRule extends MultiLineRule {
public XmlRule(IToken token) {
- super("<", ">", token);
+ super("<", ">", token); //$NON-NLS-1$ //$NON-NLS-2$
}
protected boolean sequenceDetected(
ICharacterScanner scanner,
@@ -88,7 +88,7 @@
}
}
else if (c == '\"') {
- if (stack.size() > 0 && stack.peek().equals("\""))
+ if (stack.size() > 0 && stack.peek().equals("\""))
//$NON-NLS-1$
stack.pop();
}
else if (c == LT || c == LB) {
@@ -104,7 +104,7 @@
if (stack.size() == 0) break;
}
else if (c == '}') {
- if (stack.size() > 0 && stack.peek().equals("{"))
+ if (stack.size() > 0 && stack.peek().equals("{")) //$NON-NLS-1$
stack.pop();
}
previousWasEscapeCharacter = (c == fEscapeCharacter);
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/linetracker/ConsoleLineTracker.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/linetracker/ConsoleLineTracker.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/linetracker/ConsoleLineTracker.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -46,11 +46,12 @@
public class ConsoleLineTracker implements IConsoleLineTracker {
private IConsole console;
- private static final String CHECK = "freemarker";
- private static final String CHECK_LINE = "line:";
- private static final String CHECK_LINE2 = "on line ";
- private static final String CHECK_TEMPLATE = "template:";
- private static final String CHECK_TEMPLATE2 = " in ";
+ // This assumes console parsing in English only
+ private static final String CHECK = "freemarker"; //$NON-NLS-1$
+ private static final String CHECK_LINE = "line:"; //$NON-NLS-1$
+ private static final String CHECK_LINE2 = "on line "; //$NON-NLS-1$
+ private static final String CHECK_TEMPLATE = "template:"; //$NON-NLS-1$
+ private static final String CHECK_TEMPLATE2 = " in "; //$NON-NLS-1$
public void init(IConsole console) {
this.console = console;
@@ -74,13 +75,13 @@
int linkOffset = i1 + 10;
int linkLength = text.length() - linkOffset;
String fileName = text.substring(linkOffset, text.length()).trim();
- if (fileName.endsWith(".")) fileName = fileName.substring(0,
fileName.length()-1);
+ if (fileName.endsWith(".")) fileName = fileName.substring(0,
fileName.length()-1); //$NON-NLS-1$
int lineNumber = -1;
try {
int i2 = text.lastIndexOf(CHECK_LINE);
if (i2 > 0) {
i2 += CHECK_LINE.length();
- int i3 = text.indexOf(",", i2);
+ int i3 = text.indexOf(",", i2); //$NON-NLS-1$
if (i3 > 0) {
lineNumber = Integer.parseInt(text.substring(i2, i3).trim());
}
@@ -89,7 +90,7 @@
i2 = text.lastIndexOf(CHECK_LINE2);
if (i2 > 0) {
i2 += CHECK_LINE2.length();
- int i3 = text.indexOf(",", i2);
+ int i3 = text.indexOf(",", i2); //$NON-NLS-1$
if (i3 > 0) {
lineNumber = Integer.parseInt(text.substring(i2, i3).trim());
}
@@ -109,7 +110,7 @@
IJavaProject javaProject = JavaCore.create(project);
fileName = fileName.replace('\\', '/');
try {
- populateMatchingFiles(project, files, fileName.split("/"));
+ populateMatchingFiles(project, files, fileName.split("/"));
//$NON-NLS-1$
}
catch (CoreException e) {
// TODO log this exception
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/messages.properties
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/messages.properties 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/messages.properties 2009-05-25
06:54:13 UTC (rev 15478)
@@ -1,5 +1,17 @@
+AddMacroLibrary_Error=Java Project Required
+AddMacroLibrary_ErrorDesc=You must choose a Java project
+AddMacroLibrary_Message=Please choose the Java project that will use the FreeMarker
libraries
+AddMacroLibrary_Title=Please choose the associated Java project
ConfigurationManager_CHOOSE_NAMESPACE_FOR=Please choose the namespace for
''{0}''
ConfigurationManager_TITLE_CHOOSE_NAMESPACE=Choose Macro Library Namespace
+ContextProperties_ConfirmationTitle=Confirmation
+ContextProperties_DeleteButton=Delete
+ContextProperties_DeleteValueConfirmation=Are you sure you want to delete this context
value?
+ContextProperties_Description=Create pre-determined Velocity context variables for all
files under this resource
+ContextProperties_EditButton=Edit
+ContextProperties_KeyColumn=Name
+ContextProperties_NewButton=New
+ContextProperties_ValueColumn=Type
ContextValueDialog_BUTTON_BROWSE=Browse
ContextValueDialog_ERROR=Error
ContextValueDialog_JAVA_PROJECT_ERROR=Java Project Error
@@ -21,6 +33,7 @@
FreemarkerMultiPageEditor_PAGE_TEXT_CONTEXT=Context
FreemarkerMultiPageEditor_PAGE_TEXT_SOURCE=Source
MacroHyperlink_TYPELABEL_MACRO_DEFINITION=Macro Definition
+OutlinePage_SetContextClassEntryAction=Set context class entry
PreferencePage_DESCRIPTION_FREEMARKER_SETTINGS=FreeMarker Settings
PreferencePage_FIELD_COMMENT=Comment:
PreferencePage_FIELD_DIRECTIVE=Directive:
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -50,11 +50,11 @@
}
public static String[] directives = new String[] {
- "if", "else", "elseif", "switch",
"case", "default", "break", "list",
- "break", "include", "import", "noparse",
"compress", "escape", "noescape",
- "assign", "global", "local", "setting",
"macro", "nested", "return", "flush",
"function",
- "stop", "ftl", "t", "lt", "rt",
"nt", "attempt", "recover", "visit",
"recurse",
- "fallback"
+ "if", "else", "elseif", "switch",
"case", "default", "break", "list", //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
//$NON-NLS-8$
+ "break", "include", "import", "noparse",
"compress", "escape", "noescape", //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+ "assign", "global", "local", "setting",
"macro", "nested", "return", "flush",
"function", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ "stop", "ftl", "t", "lt", "rt",
"nt", "attempt", "recover", "visit",
"recurse", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
//$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+ "fallback" //$NON-NLS-1$
};
public ICompletionProposal[] getCompletionProposals(int offset, Map context) {
if (offset < 2) return null;
@@ -69,7 +69,7 @@
if (contents.length == 1) {
// first param
CompletionInterpolation completionInterpolation = new CompletionInterpolation(
- "${" , offset - contentWithOffset.getOffsetInIndex() - 2, getItemSet(),
getResource());
+ "${" , offset - contentWithOffset.getOffsetInIndex() - 2, getItemSet(),
getResource()); //$NON-NLS-1$
return completionInterpolation.getCompletionProposals(offset, context);
}
else {
@@ -88,13 +88,13 @@
return completionProposals(l);
}
else if (index == 1 && !contentWithOffset.wasLastCharSpace()) {
- String value = "";
+ String value = ""; //$NON-NLS-1$
try {
value = contentWithOffset.getContents()[index].substring(0,
contentWithOffset.getOffsetInIndex());
}
catch (Exception e) {}
CompletionInterpolation completionInterpolation = new CompletionInterpolation(
- "${" + value , offset - contentWithOffset.getOffsetInIndex() - 2,
getItemSet(), getResource());
+ "${" + value , offset - contentWithOffset.getOffsetInIndex() - 2,
getItemSet(), getResource()); //$NON-NLS-1$
return completionInterpolation.getCompletionProposals(offset, context);
}
return null;
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractItem.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractItem.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AbstractItem.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -76,7 +76,7 @@
}
public boolean isNestable() {
- return (null != getContents() && !getContents().endsWith("/"));
+ return (null != getContents() && !getContents().endsWith("/"));
//$NON-NLS-1$
}
public ITypedRegion getRegion() {
@@ -172,7 +172,7 @@
current = new StringBuffer();
offsetCount = 0;
if (c == '=') {
- arr.add("=");
+ arr.add("="); //$NON-NLS-1$
current = new StringBuffer();
}
else {
@@ -190,27 +190,27 @@
if (!escape) {
if (c == '\"') {
if (currentStack.size() > 0) {
- if (currentStack.peek() == "\"")
+ if (currentStack.peek() == "\"") //$NON-NLS-1$
currentStack.pop();
else
- currentStack.push("\"");
+ currentStack.push("\""); //$NON-NLS-1$
}
else
- currentStack.push("\"");
+ currentStack.push("\""); //$NON-NLS-1$
}
else if (c == '(') {
- currentStack.push("(");
+ currentStack.push("("); //$NON-NLS-1$
}
else if (c == ')') {
- if (currentStack.size() > 0 &&
currentStack.peek().equals(")"))
+ if (currentStack.size() > 0 && currentStack.peek().equals(")"))
//$NON-NLS-1$
currentStack.pop();
}
else if (c == '{') {
- currentStack.push("{");
+ currentStack.push("{"); //$NON-NLS-1$
}
else if (c == '}') {
- if (currentStack.size() > 0 &&
currentStack.peek().equals("}"))
+ if (currentStack.size() > 0 && currentStack.peek().equals("}"))
//$NON-NLS-1$
currentStack.pop();
}
else if (c == '\\') {
@@ -242,7 +242,7 @@
}
}
else if (arr.size() == 0) {
- arr.add("");
+ arr.add(""); //$NON-NLS-1$
}
if (totalOffsetCount == cursorPos) {
actualIndex = arr.size()-1;
@@ -363,7 +363,7 @@
public String getTreeDisplay() {
if (null == treeDisplay) {
treeDisplay = getContents();
- if (null != treeDisplay && treeDisplay.endsWith("/"))
+ if (null != treeDisplay && treeDisplay.endsWith("/")) //$NON-NLS-1$
treeDisplay = treeDisplay.substring(0, treeDisplay.length()-1);
}
return treeDisplay;
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AssignmentDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AssignmentDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/AssignmentDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -54,7 +54,7 @@
}
public boolean isNestable() {
- return (null != getContents() && !getContents().endsWith("/"));
+ return (null != getContents() && !getContents().endsWith("/"));
//$NON-NLS-1$
}
public AssignmentEndDirective getEndDirective() {
@@ -73,7 +73,7 @@
private Item[] relatedItems;
public String getTreeImage() {
- return "assign.png";
+ return "assign.png"; //$NON-NLS-1$
}
Map contextValues;
@@ -90,7 +90,7 @@
else if (Character.isDigit(value.charAt(0))) valueClass = Number.class;
else {
CompletionInterpolation completionInterpolation =
- new CompletionInterpolation("${" + value, 2, getItemSet(),
getResource());
+ new CompletionInterpolation("${" + value, 2, getItemSet(),
getResource()); //$NON-NLS-1$
valueClass = completionInterpolation.getReturnClass(context);
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDefaultDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDefaultDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDefaultDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -47,7 +47,7 @@
}
public String getTreeImage() {
- return "default.png";
+ return "default.png"; //$NON-NLS-1$
}
public void relateItem(Item directive) {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CaseDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -47,7 +47,7 @@
}
public String getTreeImage() {
- return "case.png";
+ return "case.png"; //$NON-NLS-1$
}
public void relateItem(Item directive) {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -41,21 +41,21 @@
public CompletionDirective (int offset, int length, ItemSet itemSet, ISourceViewer
viewer, IResource resource) throws BadLocationException {
this.contents = viewer.getDocument().get(offset, length);
- ITypedRegion region = new TypedRegion(offset, this.contents.length(),
"default");
+ ITypedRegion region = new TypedRegion(offset, this.contents.length(),
"default"); //$NON-NLS-1$
this.offset = offset;
this.length = length;
String[] arr = splitContents();
if (null != arr || arr.length > 0) {
String s = arr[0];
try {
- if (s.equals("list")) {
+ if (s.equals("list")) { //$NON-NLS-1$
directive = new ListDirective();
- directive.load(new TypedRegion(offset, this.contents.length(), "list"),
viewer, resource);
+ directive.load(new TypedRegion(offset, this.contents.length(), "list"),
viewer, resource); //$NON-NLS-1$
directive.setItemSet(itemSet);
}
- else if (s.equals("if")) {
+ else if (s.equals("if")) { //$NON-NLS-1$
directive = new IfDirective();
- directive.load(new TypedRegion(offset, this.contents.length(), "if"),
viewer, resource);
+ directive.load(new TypedRegion(offset, this.contents.length(), "if"),
viewer, resource); //$NON-NLS-1$
directive.setItemSet(itemSet);
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionInterpolation.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionInterpolation.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/CompletionInterpolation.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -29,7 +29,7 @@
private int offset;
public CompletionInterpolation (String contents, int offset, ItemSet itemSet, IResource
resource) {
- this.contents = contents + "}";
+ this.contents = contents + "}"; //$NON-NLS-1$
this.offset = offset;
setItemSet(itemSet);
setResource(resource);
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ElseIfDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ElseIfDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ElseIfDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -66,7 +66,7 @@
}
public String getTreeImage() {
- return "elseif.png";
+ return "elseif.png"; //$NON-NLS-1$
}
public boolean isStartAndEndItem() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FtlDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FtlDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FtlDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -40,6 +40,6 @@
private Item[] relatedItems = new Item[0];
public String getTreeImage() {
- return "element.png";
+ return "element.png"; //$NON-NLS-1$
}
}
\ No newline at end of file
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FunctionDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FunctionDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/FunctionDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -57,7 +57,7 @@
}
public String getTreeImage() {
- return "element.png";
+ return "element.png"; //$NON-NLS-1$
}
public void addToContext(Map context) {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/GenericNestableDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/GenericNestableDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/GenericNestableDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -48,7 +48,7 @@
}
public boolean isNestable() {
- return !getContents().trim().endsWith("/");
+ return !getContents().trim().endsWith("/"); //$NON-NLS-1$
}
public boolean isStartItem() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -89,7 +89,7 @@
private Item[] relatedItems;
public String getTreeImage() {
- return "if.png";
+ return "if.png"; //$NON-NLS-1$
}
public Item getEndItem() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfElseDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfElseDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/IfElseDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -69,7 +69,7 @@
}
public String getTreeImage() {
- return "else.png";
+ return "else.png"; //$NON-NLS-1$
}
public boolean isStartAndEndItem() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/Interpolation.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/Interpolation.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/Interpolation.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -48,7 +48,7 @@
}
public String getTreeImage() {
- return "interpolation.png";
+ return "interpolation.png"; //$NON-NLS-1$
}
public synchronized ICompletionProposal[] getCompletionProposals(int offset, Map
context) {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ItemFactory.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ItemFactory.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ItemFactory.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -60,9 +60,9 @@
else if (region.getType().equals(PartitionScanner.FTL_MACRO_INSTANCE_END))
directive = new MacroEndInstance();
else if (region.getType().equals(PartitionScanner.FTL_INCLUDE))
- directive = new GenericDirective("include.png");
+ directive = new GenericDirective("include.png"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_IMPORT))
- directive = new GenericDirective("import.png");
+ directive = new GenericDirective("import.png"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_ASSIGN)
|| region.getType().equals(PartitionScanner.FTL_LOCAL)
|| region.getType().equals(PartitionScanner.FTL_GLOBAL))
@@ -72,15 +72,15 @@
|| region.getType().equals(PartitionScanner.FTL_GLOBAL_END))
directive = new AssignmentEndDirective(region.getType());
else if (region.getType().equals(PartitionScanner.FTL_BREAK))
- directive = new GenericDirective("break.png");
+ directive = new GenericDirective("break.png"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_STOP))
- directive = new GenericDirective("stop.png");
+ directive = new GenericDirective("stop.png"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_RETURN))
- directive = new GenericDirective("return.png");
+ directive = new GenericDirective("return.png"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_SWITCH_DIRECTIVE_START))
- directive = new GenericNestableDirective("switch",
"switch.png");
+ directive = new GenericNestableDirective("switch", "switch.png");
//$NON-NLS-1$ //$NON-NLS-2$
else if (region.getType().equals(PartitionScanner.FTL_SWITCH_DIRECTIVE_END))
- directive = new GenericNestableEndDirective("switch");
+ directive = new GenericNestableEndDirective("switch"); //$NON-NLS-1$
else if (region.getType().equals(PartitionScanner.FTL_CASE_DIRECTIVE_START))
directive = new CaseDirective();
else if (region.getType().equals(PartitionScanner.FTL_CASE_DEFAULT_START))
@@ -91,7 +91,7 @@
directive = new FtlDirective();
else if (region.getType().equals(PartitionScanner.FTL_DIRECTIVE)) {
String name = getDirectiveName(region, viewer);
- directive = new GenericNestableDirective(name, "element.png");
+ directive = new GenericNestableDirective(name, "element.png");
//$NON-NLS-1$
}
else if (region.getType().equals(PartitionScanner.FTL_DIRECTIVE_END)) {
String name = getDirectiveName(region, viewer);
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/LibraryMacroDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/LibraryMacroDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/LibraryMacroDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -31,10 +31,10 @@
public static void main (String[] args) {
try {
- String content = "#macro entries startIndex=1\r\n" +
- "data=\"data\" headerUrls=[] sortIndex=-1";
+ String content = "#macro entries startIndex=1\r\n" + //$NON-NLS-1$
+ "data=\"data\" headerUrls=[] sortIndex=-1"; //$NON-NLS-1$
- LibraryMacroDirective lmd = new LibraryMacroDirective("lib", content, 0,
content.length());
+ LibraryMacroDirective lmd = new LibraryMacroDirective("lib", content, 0,
content.length()); //$NON-NLS-1$
String[] attributes = lmd.getAttributes();
for (int i=0; i<attributes.length; i++) {
System.out.println(attributes[i]);
@@ -55,7 +55,7 @@
private String name;
public String getName() {
if (null == name)
- name = namespace + "." + super.getName();
+ name = namespace + "." + super.getName(); //$NON-NLS-1$
return name;
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ListDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ListDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/ListDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -62,7 +62,7 @@
}
public String getTreeImage() {
- return "list.png";
+ return "list.png"; //$NON-NLS-1$
}
public ICompletionProposal[] getCompletionProposals(int offset, Map context) {
@@ -71,11 +71,11 @@
ContentWithOffset contentWithOffset = splitContents(offset);
int index = contentWithOffset.getIndex();
if (index == 1 || (index == 0 && contentWithOffset.wasLastCharSpace())) {
- String value = "";
+ String value = ""; //$NON-NLS-1$
if (contentWithOffset.getContents().length >= 2)
value = contentWithOffset.getContents()[1];
CompletionInterpolation completionInterpolation = new CompletionInterpolation(
- "${" + value, offset - contentWithOffset.getOffsetInIndex() - 2,
getItemSet(), getResource());
+ "${" + value, offset - contentWithOffset.getOffsetInIndex() - 2,
getItemSet(), getResource()); //$NON-NLS-1$
proposals = completionInterpolation.getCompletionProposals(offset, context);
}
}
@@ -86,7 +86,7 @@
String[] contents = splitContents();
if (contents.length == 4) {
String key = contents[3];
- CompletionInterpolation completionInterpolation = new
CompletionInterpolation("${" + contents[1], 0, getItemSet(), getResource());
+ CompletionInterpolation completionInterpolation = new
CompletionInterpolation("${" + contents[1], 0, getItemSet(), getResource());
//$NON-NLS-1$
context.put(key, completionInterpolation.getSingularReturnClass(context));
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroDirective.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroDirective.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroDirective.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -76,7 +76,7 @@
private Item[] relatedItems;
public String getTreeImage() {
- return "macro.png";
+ return "macro.png"; //$NON-NLS-1$
}
public String getTreeDisplay() {
@@ -91,10 +91,10 @@
int i = 2;
while (i<contents.length) {
String att = contents[i];
- int index = att.indexOf("=");
+ int index = att.indexOf("="); //$NON-NLS-1$
if (index < 0) {
att = att.trim();
- if (att.endsWith("]") || att.endsWith(">")) att =
att.substring(0, att.length()-1);
+ if (att.endsWith("]") || att.endsWith(">")) att =
att.substring(0, att.length()-1); //$NON-NLS-1$ //$NON-NLS-2$
l.add(att);
i++;
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroInstance.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroInstance.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/MacroInstance.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -79,7 +79,7 @@
private Item[] relatedItems;
public String getTreeImage() {
- return "macro_instance.png";
+ return "macro_instance.png"; //$NON-NLS-1$
}
public String getName() {
@@ -116,7 +116,7 @@
return completionProposals(l);
}
else if ((contentWithOffset.wasLastCharSpace())
- || !contents[index-1].equals("=")) {
+ || !contents[index-1].equals("=")) { //$NON-NLS-1$
String name = contents[0];
// see if we can find a macro match
MacroDirective match = null;
@@ -143,14 +143,14 @@
if (null != match) {
String prefix = null;
if (contentWithOffset.wasLastCharSpace() || contents.length < index+1)
- prefix = "";
+ prefix = ""; //$NON-NLS-1$
else
prefix = contents[index].substring(0, subOffset);
List l = new ArrayList();
for (int i=0; i<match.getAttributes().length; i++) {
if (match.getAttributes()[i].startsWith(prefix)) {
l.add(getCompletionProposal(offset, subOffset,
- match.getAttributes()[i], (contentWithOffset.isNextCharSpace() || contents.length
< index+1) ? "" : contents[index]));
+ match.getAttributes()[i], (contentWithOffset.isNextCharSpace() || contents.length
< index+1) ? "" : contents[index])); //$NON-NLS-1$
}
}
return completionProposals(l);
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/BuiltInFragment.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -49,99 +49,99 @@
static {
addToMap (OBJECT_BUILT_INS,
new Object[]{
- "is_collection", Boolean.class, null,
- "is_macro", Boolean.class, null,
- "is_transform", Boolean.class, null,
- "string", String.class, null,
- "namespace", String.class, null,
- "default", String.class, new String[]{"value "},
- "is_number", Boolean.class, null,
- "is_directive", String.class, null,
- "is_boolean", Boolean.class, null,
- "is_hash_ex", Boolean.class, null,
- "is_enumerable", Boolean.class, null,
- "is_date", Boolean.class, null,
- "is_node", Boolean.class, null,
- "exists", Boolean.class, null,
- "is_indexable", Boolean.class, null,
- "is_string", Boolean.class, null,
- "is_hash", Boolean.class, null,
- "is_sequence", Boolean.class, null,
- "if_exists", Boolean.class, null,
- "has_content", Boolean.class, null,
- "is_method", Boolean.class, null,
+ "is_collection", Boolean.class, null, //$NON-NLS-1$
+ "is_macro", Boolean.class, null, //$NON-NLS-1$
+ "is_transform", Boolean.class, null, //$NON-NLS-1$
+ "string", String.class, null, //$NON-NLS-1$
+ "namespace", String.class, null, //$NON-NLS-1$
+ "default", String.class, new String[]{"value "}, //$NON-NLS-1$
//$NON-NLS-2$
+ "is_number", Boolean.class, null, //$NON-NLS-1$
+ "is_directive", String.class, null, //$NON-NLS-1$
+ "is_boolean", Boolean.class, null, //$NON-NLS-1$
+ "is_hash_ex", Boolean.class, null, //$NON-NLS-1$
+ "is_enumerable", Boolean.class, null, //$NON-NLS-1$
+ "is_date", Boolean.class, null, //$NON-NLS-1$
+ "is_node", Boolean.class, null, //$NON-NLS-1$
+ "exists", Boolean.class, null, //$NON-NLS-1$
+ "is_indexable", Boolean.class, null, //$NON-NLS-1$
+ "is_string", Boolean.class, null, //$NON-NLS-1$
+ "is_hash", Boolean.class, null, //$NON-NLS-1$
+ "is_sequence", Boolean.class, null, //$NON-NLS-1$
+ "if_exists", Boolean.class, null, //$NON-NLS-1$
+ "has_content", Boolean.class, null, //$NON-NLS-1$
+ "is_method", Boolean.class, null, //$NON-NLS-1$
});
addToMap (STRING_BUILT_INS,
new Object[]{
- "interpret", String.class, null,
- "matches", Boolean.class, new String[]{"expression"},
- "html", String.class, null,
- "index_of", Number.class, new String[]{"substr"},
- "right_pad", String.class, new String[]{"padAmount"},
- "xml", String.class, null,
- "web_safe", String.class, null,
- "eval", null, null,
- "size", Number.class, null,
- "cap_first", String.class, null,
- "j_string", String.class, null,
- "first", String.class, null,
- "split", Collection.class, null,
- "upper_case", String.class, null,
- "last_index_of", String.class, null,
- "long", Number.class, null,
- "last", String.class, null,
- "starts_with", Boolean.class, null,
- "capitalize", String.class, null,
- "short", String.class, null,
- "ends_with", String.class, null,
- "chunk", Collection.class, null,
- "byte", String.class, null,
- "trim", String.class, null,
- "c", String.class, null,
- "chop_linebreak", String.class, null,
- "double", Number.class, null,
- "url", String.class, null,
- "replace", String.class, null,
- "uncap_first", String.class, null,
- "contains", Boolean.class, null,
- "left_pad", String.class, new String[]{"param"},
- "length", Number.class, null,
- "rtf", String.class, null,
- "lower_case", String.class, null,
- "js_string", String.class, null,
- "word_list", String.class, null,
+ "interpret", String.class, null, //$NON-NLS-1$
+ "matches", Boolean.class, new String[]{"expression"},
//$NON-NLS-1$ //$NON-NLS-2$
+ "html", String.class, null, //$NON-NLS-1$
+ "index_of", Number.class, new String[]{"substr"}, //$NON-NLS-1$
//$NON-NLS-2$
+ "right_pad", String.class, new String[]{"padAmount"},
//$NON-NLS-1$ //$NON-NLS-2$
+ "xml", String.class, null, //$NON-NLS-1$
+ "web_safe", String.class, null, //$NON-NLS-1$
+ "eval", null, null, //$NON-NLS-1$
+ "size", Number.class, null, //$NON-NLS-1$
+ "cap_first", String.class, null, //$NON-NLS-1$
+ "j_string", String.class, null, //$NON-NLS-1$
+ "first", String.class, null, //$NON-NLS-1$
+ "split", Collection.class, null, //$NON-NLS-1$
+ "upper_case", String.class, null, //$NON-NLS-1$
+ "last_index_of", String.class, null, //$NON-NLS-1$
+ "long", Number.class, null, //$NON-NLS-1$
+ "last", String.class, null, //$NON-NLS-1$
+ "starts_with", Boolean.class, null, //$NON-NLS-1$
+ "capitalize", String.class, null, //$NON-NLS-1$
+ "short", String.class, null, //$NON-NLS-1$
+ "ends_with", String.class, null, //$NON-NLS-1$
+ "chunk", Collection.class, null, //$NON-NLS-1$
+ "byte", String.class, null, //$NON-NLS-1$
+ "trim", String.class, null, //$NON-NLS-1$
+ "c", String.class, null, //$NON-NLS-1$
+ "chop_linebreak", String.class, null, //$NON-NLS-1$
+ "double", Number.class, null, //$NON-NLS-1$
+ "url", String.class, null, //$NON-NLS-1$
+ "replace", String.class, null, //$NON-NLS-1$
+ "uncap_first", String.class, null, //$NON-NLS-1$
+ "contains", Boolean.class, null, //$NON-NLS-1$
+ "left_pad", String.class, new String[]{"param"}, //$NON-NLS-1$
//$NON-NLS-2$
+ "length", Number.class, null, //$NON-NLS-1$
+ "rtf", String.class, null, //$NON-NLS-1$
+ "lower_case", String.class, null, //$NON-NLS-1$
+ "js_string", String.class, null, //$NON-NLS-1$
+ "word_list", String.class, null, //$NON-NLS-1$
});
addToMap (NUMBER_BUILT_INS,
new Object[]{
- "string.currency", Boolean.class, new String[]{"format"},
- "string", String.class, null,
- "number", Number.class, null,
- "new", String.class, null,
- "long", Number.class, null,
- "short", String.class, null,
- "double", Number.class, null,
- "int", Number.class, null,
+ "string.currency", Boolean.class, new String[]{"format"},
//$NON-NLS-1$ //$NON-NLS-2$
+ "string", String.class, null, //$NON-NLS-1$
+ "number", Number.class, null, //$NON-NLS-1$
+ "new", String.class, null, //$NON-NLS-1$
+ "long", Number.class, null, //$NON-NLS-1$
+ "short", String.class, null, //$NON-NLS-1$
+ "double", Number.class, null, //$NON-NLS-1$
+ "int", Number.class, null, //$NON-NLS-1$
});
addToMap (DATE_BUILT_INS,
new Object[]{
- "date", Date.class, null,
- "time", Date.class, null,
- "datetime", Date.class, null,
- "string", String.class, new String[]{"format"},
- "string.short", String.class, null,
- "string.medium", String.class, null,
- "string.long", String.class, null,
+ "date", Date.class, null, //$NON-NLS-1$
+ "time", Date.class, null, //$NON-NLS-1$
+ "datetime", Date.class, null, //$NON-NLS-1$
+ "string", String.class, new String[]{"format"}, //$NON-NLS-1$
//$NON-NLS-2$
+ "string.short", String.class, null, //$NON-NLS-1$
+ "string.medium", String.class, null, //$NON-NLS-1$
+ "string.long", String.class, null, //$NON-NLS-1$
});
addToMap (LIST_BUILT_INS,
new Object[]{
- "seq_contains", Boolean.class, new String[]{"value"},
- "reverse", Collection.class, null,
- "size", Number.class, null,
- "last", Object.class, null,
+ "seq_contains", Boolean.class, new String[]{"value"},
//$NON-NLS-1$ //$NON-NLS-2$
+ "reverse", Collection.class, null, //$NON-NLS-1$
+ "size", Number.class, null, //$NON-NLS-1$
+ "last", Object.class, null, //$NON-NLS-1$
});
addToMap (MAP_BUILT_INS,
new Object[]{
- "keys", Collection.class, null,
+ "keys", Collection.class, null, //$NON-NLS-1$
});
}
@@ -164,7 +164,7 @@
public Class getReturnClass (Class parentClass, List fragments, Map context, IResource
resource, IProject project) {
if (null == subContent) {
subContent = getContent();
- int index = subContent.indexOf("(");
+ int index = subContent.indexOf("("); //$NON-NLS-1$
if (index > 0) subContent = subContent.substring(0, index);
}
ParameterSet parameterSet = (ParameterSet) STRING_BUILT_INS.get(subContent);
@@ -231,7 +231,7 @@
key, getContent());
}
else {
- String replacementString = key + "()";
+ String replacementString = key + "()"; //$NON-NLS-1$
return new CompletionProposal (
replacementString, offset-subOffset+1,
getContent().length(), replacementString.length()-1);
@@ -245,12 +245,12 @@
else {
StringBuffer sb = new StringBuffer();
sb.append(key);
- sb.append("(");
+ sb.append("("); //$NON-NLS-1$
// for (int i=0; i<values.getParameters().length; i++) {
// if (i > 0) sb.append(", ");
// sb.append(values.getParameters()[i]);
// }
- sb.append(")");
+ sb.append(")"); //$NON-NLS-1$
return sb.toString();
}
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NameFragment.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NameFragment.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NameFragment.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -85,7 +85,7 @@
}
else {
content = Character.toUpperCase(content.charAt(1)) + content.substring(2,
getContent().length());
- String getcontent = "get" + content;
+ String getcontent = "get" + content; //$NON-NLS-1$
for (int i=0; i<parentClass.getMethods().length; i++) {
Method m = parentClass.getMethods()[i];
if (m.getName().equals(content) || m.getName().equals(getcontent)) {
@@ -116,7 +116,7 @@
}
else {
content = Character.toUpperCase(content.charAt(1)) + content.substring(2,
getContent().length());
- String getcontent = "get" + content;
+ String getcontent = "get" + content; //$NON-NLS-1$
for (int i=0; i<parentClass.getMethods().length; i++) {
Method m = parentClass.getMethods()[i];
if (m.getName().equals(content) || m.getName().equals(getcontent)) {
@@ -139,11 +139,11 @@
}
public boolean isStartFragment () {
- return !getContent().startsWith(".");
+ return !getContent().startsWith("."); //$NON-NLS-1$
}
public static final String[] invalidMethods = {
- "clone", "equals", "finalize", "getClass",
"hashCode", "notify", "notifyAll", "toString",
"wait"};
+ "clone", "equals", "finalize", "getClass",
"hashCode", "notify", "notifyAll", "toString",
"wait"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
//$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
public ICompletionProposal[] getMethodCompletionProposals (int subOffset, int offset,
Class parentClass, IResource file) {
if (instanceOf(parentClass, String.class)
|| instanceOf(parentClass, Number.class)
@@ -161,33 +161,33 @@
for (int i=0; i<pds.length; i++) {
PropertyDescriptor pd = pds[i];
String propertyName = pd.getName();
- if (!propertyName.equals("class") &&
propertyName.toUpperCase().startsWith(pUpper)) {
+ if (!propertyName.equals("class") &&
propertyName.toUpperCase().startsWith(pUpper)) { //$NON-NLS-1$
proposals.add(new CompletionProposal(
propertyName,
offset - subOffset + 1,
getContent().length()-1,
propertyName.length(),
- null, propertyName + " - " +
pd.getReadMethod().getReturnType().getName(), null, null));
+ null, propertyName + " - " +
pd.getReadMethod().getReturnType().getName(), null, null)); //$NON-NLS-1$
}
}
for (int i=0; i<parentClass.getMethods().length; i++) {
Method m = parentClass.getMethods()[i];
String mName = m.getName();
- if (m.getParameterTypes().length > 0 && mName.startsWith("get")
&& mName.toUpperCase().startsWith(pUpper)) {
+ if (m.getParameterTypes().length > 0 && mName.startsWith("get")
&& mName.toUpperCase().startsWith(pUpper)) { //$NON-NLS-1$
StringBuffer display = new StringBuffer();
display.append(mName);
- display.append("(");
+ display.append("("); //$NON-NLS-1$
for (int j=0; j<m.getParameterTypes().length; j++) {
- if (j > 0) display.append(", ");
+ if (j > 0) display.append(", "); //$NON-NLS-1$
display.append(m.getParameterTypes()[j].getName());
}
- display.append(")");
- String actual = mName + "()";
+ display.append(")"); //$NON-NLS-1$
+ String actual = mName + "()"; //$NON-NLS-1$
int tLength = actual.length();
if (m.getParameterTypes().length > 0) tLength--;
proposals.add(new CompletionProposal(actual,
offset - subOffset + 1, getContent().length()-1, tLength,
- null, display.toString() + " - " + m.getReturnType().getName(), null,
null));
+ null, display.toString() + " - " + m.getReturnType().getName(), null,
null)); //$NON-NLS-1$
}
}
return completionProposals(proposals);
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NullFragment.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NullFragment.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/model/interpolation/NullFragment.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -28,7 +28,7 @@
public class NullFragment extends NameFragment {
public NullFragment() {
- super(0, "");
+ super(0, ""); //$NON-NLS-1$
}
public boolean isStartFragment() {
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlinePage.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlinePage.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/outline/OutlinePage.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -46,6 +46,7 @@
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.dialogs.SelectionDialog;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.jboss.ide.eclipse.freemarker.Messages;
import org.jboss.ide.eclipse.freemarker.Plugin;
import org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager;
import org.jboss.ide.eclipse.freemarker.configuration.ContextValue;
@@ -161,7 +162,7 @@
public SetContextEntryAction (OutlinePage outlinePage) {
this.outlinePage = outlinePage;
- this.setText("Set context class entry");
+ this.setText(Messages.OutlinePage_SetContextClassEntryAction);
this.setEnabled(true);
}
Modified:
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/preferences/ContextProperties.java
===================================================================
---
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/preferences/ContextProperties.java 2009-05-25
05:22:00 UTC (rev 15477)
+++
trunk/freemarker/plugins/org.jboss.ide.eclipse.freemarker/src/org/jboss/ide/eclipse/freemarker/preferences/ContextProperties.java 2009-05-25
06:54:13 UTC (rev 15478)
@@ -48,6 +48,7 @@
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.dialogs.PropertyPage;
+import org.jboss.ide.eclipse.freemarker.Messages;
import org.jboss.ide.eclipse.freemarker.Plugin;
import org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager;
import org.jboss.ide.eclipse.freemarker.configuration.ContextValue;
@@ -57,7 +58,7 @@
public ContextProperties() {
super();
- setDescription("Create pre-determined Velocity context variables for all files
under this resource");
+ setDescription(Messages.ContextProperties_Description);
}
protected Control createContents(Composite parent) {
@@ -112,8 +113,8 @@
// create the columns
TableColumn keyColumn = new TableColumn(contextValuesTable, SWT.LEFT);
TableColumn valueColumn = new TableColumn(contextValuesTable, SWT.LEFT);
- keyColumn.setText("Name");
- valueColumn.setText("Type");
+ keyColumn.setText(Messages.ContextProperties_KeyColumn);
+ valueColumn.setText(Messages.ContextProperties_ValueColumn);
ColumnLayoutData keyColumnLayout = new ColumnWeightData(30, false);
ColumnLayoutData valueColumnLayout = new ColumnWeightData(70, false);
@@ -138,7 +139,7 @@
buttonComposite.setLayout(gl);
buttonComposite.setVisible(true);
addContextValueButton = new Button(buttonComposite, SWT.NATIVE);
- addContextValueButton.setText("New");
+ addContextValueButton.setText(Messages.ContextProperties_NewButton);
addContextValueButton.setVisible(true);
addContextValueButton
.addSelectionListener(new AddContextValueButtonListener());
@@ -147,7 +148,7 @@
data.grabExcessHorizontalSpace = true;
addContextValueButton.setLayoutData(data);
editContextValueButton = new Button(buttonComposite, SWT.NATIVE);
- editContextValueButton.setText("Edit");
+ editContextValueButton.setText(Messages.ContextProperties_EditButton);
editContextValueButton
.addSelectionListener(new EditContextValueButtonListener());
data = new GridData();
@@ -155,7 +156,7 @@
data.grabExcessHorizontalSpace = true;
editContextValueButton.setLayoutData(data);
deleteContextValueButton = new Button(buttonComposite, SWT.NATIVE);
- deleteContextValueButton.setText("Delete");
+ deleteContextValueButton.setText(Messages.ContextProperties_DeleteButton);
deleteContextValueButton
.addSelectionListener(new ContextValueDeleteKeyListener());
data = new GridData();
@@ -269,8 +270,8 @@
if (index >= 0) {
try {
boolean confirm = MessageDialog
- .openConfirm(new Shell(), "Confirmation",
- "Are you sure you want to delete this context
value?");
+ .openConfirm(new Shell(),
Messages.ContextProperties_ConfirmationTitle,
+ Messages.ContextProperties_DeleteValueConfirmation);
if (confirm) {
String key = contextValuesTable.getSelection()[0]
.getText(0);