summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-02-01 04:30:29 (EST)
committer Stephan Born2012-04-24 04:30:00 (EDT)
commitc1093ac4d8209000c1176cce4239d6d433080eea (patch)
tree81b09898b0b93bbded4d8b8669fbf780bef3d731
parentd3c96205cdd9c3e2d28558c1c24216eb67a3b10b (diff)
downloadorg.eclipse.stardust.ide-c1093ac4d8209000c1176cce4239d6d433080eea.zip
org.eclipse.stardust.ide-c1093ac4d8209000c1176cce4239d6d433080eea.tar.gz
org.eclipse.stardust.ide-c1093ac4d8209000c1176cce4239d6d433080eea.tar.bz2
Jira-ID: CRNT-22383 Merge changes done on b_dev_6_0_x after 6.0.2.GA (6.0.2.2-r49368) through 6.0.3.GA (6.0.3.6-r50668) and beyond (6.0.x HEAD) to 7.0 (trunk) - moonglow / simulation / tate / tds (org.eclipse.stardust.modeling.javascript.editor)
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@53289 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/CancelableJSProblemFactory.java2
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorCompletionProcessor.java132
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorContentAssistant.java2
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorUtils.java16
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JSCompilationUnitEditor.java14
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptEditorPlugin.java2
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptValidator.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/SwitchToModeAction.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/controller/JavaScriptEditorController.java24
9 files changed, 100 insertions, 104 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/CancelableJSProblemFactory.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/CancelableJSProblemFactory.java
index ba52173..a085879 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/CancelableJSProblemFactory.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/CancelableJSProblemFactory.java
@@ -53,7 +53,7 @@ public class CancelableJSProblemFactory extends DefaultProblemFactory {
{
return ProblemSeverities.Warning;
}
- if (message.indexOf("Duplicate") > -1) {
+ if (message.indexOf("Duplicate") > -1) { //$NON-NLS-1$
return ProblemSeverities.Warning;
}
return ProblemSeverities.Error;
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorCompletionProcessor.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorCompletionProcessor.java
index e90bc28..25d6e07 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorCompletionProcessor.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorCompletionProcessor.java
@@ -34,19 +34,19 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
private Map<String, Object> typeMap;
private static final Image primitiveImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/primitive_data.JPG").createImage();
+ .getImageDescriptor("icons/primitive_data.JPG").createImage(); //$NON-NLS-1$
private static final Image legoImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/lego_icon.JPG").createImage();
+ .getImageDescriptor("icons/lego_icon.JPG").createImage(); //$NON-NLS-1$
private static final Image primitiveBpImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/primitive_data_bp.JPG").createImage();
+ .getImageDescriptor("icons/primitive_data_bp.JPG").createImage(); //$NON-NLS-1$
private static final Image legoBpImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/lego_icon_bp.JPG").createImage();
+ .getImageDescriptor("icons/lego_icon_bp.JPG").createImage(); //$NON-NLS-1$
private static final Image serializableImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/serializable_data.JPG").createImage();
+ .getImageDescriptor("icons/serializable_data.JPG").createImage(); //$NON-NLS-1$
private static final Image entityImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/entity_data.JPG").createImage();
+ .getImageDescriptor("icons/entity_data.JPG").createImage(); //$NON-NLS-1$
private static final Image libraryImage = JavaScriptEditorPlugin.getDefault()
- .getImageDescriptor("icons/jarlibrary.JPG").createImage();
+ .getImageDescriptor("icons/jarlibrary.JPG").createImage(); //$NON-NLS-1$
public EditorCompletionProcessor(IEditorPart editor, ContentAssistant assistant, String partition) {
super(editor, assistant, partition);
@@ -66,7 +66,7 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
if (isProposalValid(proposal))
{
if (proposal instanceof JavaMethodCompletionProposal) {
- Reflect.setFieldValue(proposal, "fProposalInfoComputed", true);
+ Reflect.setFieldValue(proposal, "fProposalInfoComputed", true); //$NON-NLS-1$
}
if (!root || isIppProposal(proposal))
{
@@ -87,10 +87,10 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
private void setLabelProvider(ContentAssistInvocationContext context) {
JavaContentAssistInvocationContext invocationContext = (JavaContentAssistInvocationContext)context;
Object actLabelProvider = invocationContext.getLabelProvider();
- Object fContext = Reflect.getFieldValue(actLabelProvider, "fContext");
+ Object fContext = Reflect.getFieldValue(actLabelProvider, "fContext"); //$NON-NLS-1$
JSCompletionProposalLabelProvider lp = new JSCompletionProposalLabelProvider();
- Reflect.setFieldValue(lp, "fContext", fContext);
- Reflect.setFieldValue(invocationContext, "fLabelProvider", lp);
+ Reflect.setFieldValue(lp, "fContext", fContext); //$NON-NLS-1$
+ Reflect.setFieldValue(invocationContext, "fLabelProvider", lp); //$NON-NLS-1$
}
private boolean isIppProposal(AbstractJavaCompletionProposal proposal) {
@@ -150,8 +150,8 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
String displayString = proposal.getDisplayString();
String ippTypeId = ((AccessPointType)ippType).getId();
String ippTypeName = ((AccessPointType)ippType).getMetaType().getName();
- displayString = displayString.replace("any", ippTypeName);
- Reflect.setFieldValue(proposal, "fDisplayString", displayString);
+ displayString = displayString.replace("any", ippTypeName); //$NON-NLS-1$
+ Reflect.setFieldValue(proposal, "fDisplayString", displayString); //$NON-NLS-1$
proposal.setImage(getImageByType(ippType, proposal));
}
if (ippType instanceof DataType) {
@@ -159,11 +159,11 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
String ippTypeId = ((DataType)ippType).getType().getId();
String ippTypeName = ((DataType)ippType).getType().getName();
if (CodeCompletionHelper.getInstance().getExternalTypeMap().containsKey(((DataType)ippType).getId())) {
- displayString = displayString.replace("any", "External Class");
+ displayString = displayString.replace("any", "External Class"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- displayString = displayString.replace("any", ippTypeName);
+ displayString = displayString.replace("any", ippTypeName); //$NON-NLS-1$
}
- Reflect.setFieldValue(proposal, "fDisplayString", displayString);
+ Reflect.setFieldValue(proposal, "fDisplayString", displayString); //$NON-NLS-1$
proposal.setImage(getImageByType(ippType, proposal));
}
}
@@ -174,14 +174,14 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
if (ippType instanceof AccessPointType)
{
AccessPointType apt = (AccessPointType)ippType;
- if (apt.getType().getId().equalsIgnoreCase("struct")) {
+ if (apt.getType().getId().equalsIgnoreCase("struct")) { //$NON-NLS-1$
image = legoImage;
} else {
image = primitiveImage;
}
} else {
String ippTypeId = ((DataType)ippType).getType().getId();
- if (ippTypeId.equalsIgnoreCase("serializable"))
+ if (ippTypeId.equalsIgnoreCase("serializable")) //$NON-NLS-1$
{
if (CodeCompletionHelper.getInstance().getExternalTypeMap().containsKey(((DataType)ippType).getId())) {
image = libraryImage;
@@ -189,15 +189,15 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
image = serializableImage;
}
}
- if (ippTypeId.equalsIgnoreCase("primitive"))
+ if (ippTypeId.equalsIgnoreCase("primitive")) //$NON-NLS-1$
{
image = primitiveImage;
}
- if (ippTypeId.equalsIgnoreCase("entity"))
+ if (ippTypeId.equalsIgnoreCase("entity")) //$NON-NLS-1$
{
image = entityImage;
}
- if (ippTypeId.startsWith("struct"))
+ if (ippTypeId.startsWith("struct")) //$NON-NLS-1$
{
image = legoImage;
}
@@ -207,53 +207,53 @@ public class EditorCompletionProcessor extends JavaCompletionProcessor {
private String[] badGlobalProposals = new String[]{
- "Window",
- "ippInitialize",
- "ippImport",
- "Global",
- "[ECMA",
- "[JavaScript",
- "[Common",
- "debugger",
- "prototype"
+ "Window", //$NON-NLS-1$
+ "ippInitialize", //$NON-NLS-1$
+ "ippImport", //$NON-NLS-1$
+ "Global", //$NON-NLS-1$
+ "[ECMA", //$NON-NLS-1$
+ "[JavaScript", //$NON-NLS-1$
+ "[Common", //$NON-NLS-1$
+ "debugger", //$NON-NLS-1$
+ "prototype" //$NON-NLS-1$
};
private String[] badProposals = new String[]{
- "Class String - Object",
- "constructor Function - Object",
- "prototype - String",
- "Value Number - Object",
- "CanPut(String property) Boolean - Object",
- "charAt(Number pos) String - String",
- "charCodeAt(Number pos) Number - String",
- "DefaultValue() void - Object",
- "Delete(String property) void - Object",
- "Get(String property) Object - Object",
- "hasOwnProperty(Object V) Boolean - Object",
- "HasProperty(String property) Boolean - Object",
- "indexOf(String searchString, Number position) Number - String",
- "isPrototypeOf(Object V) Boolean - Object",
- "lastIndexOf(String searchString, Number position) Number - String",
- "localeCompare(String otherString) Number - String",
- "match(String regexp) any[] - String",
- "Match(String value, String index) Object - Object",
- "propertyIsEnumerable(Object V) Boolean - Object",
- "Put(String property, String value) void - Object",
- "replace(String searchValue, String replaceValue) String - String",
- "search(String regexp) Number - String",
- "slice(Number start, Number end) String - String",
- "split(String separator, Number limit) any[] - String",
- "valueOf() Object - Object",
- "fromCharCode(Number charCode) - String",
- "concat(Array args) any[] - Array",
- "join(String seperator) any[] - Array",
- "pop() Object - Array",
- "push(Array args) void - Array",
- "reverse() any[] - Array",
- "shift() Object - Array",
- "slice(Number start, Number end) any[] - Array",
- "sort(Function funct) any[] - Array",
- "splice(Number start, Number deletecount, Array items) any[] - Array",
- "unshift(Array start) any[] - Array"
+ "Class String - Object", //$NON-NLS-1$
+ "constructor Function - Object", //$NON-NLS-1$
+ "prototype - String", //$NON-NLS-1$
+ "Value Number - Object", //$NON-NLS-1$
+ "CanPut(String property) Boolean - Object", //$NON-NLS-1$
+ "charAt(Number pos) String - String", //$NON-NLS-1$
+ "charCodeAt(Number pos) Number - String", //$NON-NLS-1$
+ "DefaultValue() void - Object", //$NON-NLS-1$
+ "Delete(String property) void - Object", //$NON-NLS-1$
+ "Get(String property) Object - Object", //$NON-NLS-1$
+ "hasOwnProperty(Object V) Boolean - Object", //$NON-NLS-1$
+ "HasProperty(String property) Boolean - Object", //$NON-NLS-1$
+ "indexOf(String searchString, Number position) Number - String", //$NON-NLS-1$
+ "isPrototypeOf(Object V) Boolean - Object", //$NON-NLS-1$
+ "lastIndexOf(String searchString, Number position) Number - String", //$NON-NLS-1$
+ "localeCompare(String otherString) Number - String", //$NON-NLS-1$
+ "match(String regexp) any[] - String", //$NON-NLS-1$
+ "Match(String value, String index) Object - Object", //$NON-NLS-1$
+ "propertyIsEnumerable(Object V) Boolean - Object", //$NON-NLS-1$
+ "Put(String property, String value) void - Object", //$NON-NLS-1$
+ "replace(String searchValue, String replaceValue) String - String", //$NON-NLS-1$
+ "search(String regexp) Number - String", //$NON-NLS-1$
+ "slice(Number start, Number end) String - String", //$NON-NLS-1$
+ "split(String separator, Number limit) any[] - String", //$NON-NLS-1$
+ "valueOf() Object - Object", //$NON-NLS-1$
+ "fromCharCode(Number charCode) - String", //$NON-NLS-1$
+ "concat(Array args) any[] - Array", //$NON-NLS-1$
+ "join(String seperator) any[] - Array", //$NON-NLS-1$
+ "pop() Object - Array", //$NON-NLS-1$
+ "push(Array args) void - Array", //$NON-NLS-1$
+ "reverse() any[] - Array", //$NON-NLS-1$
+ "shift() Object - Array", //$NON-NLS-1$
+ "slice(Number start, Number end) any[] - Array", //$NON-NLS-1$
+ "sort(Function funct) any[] - Array", //$NON-NLS-1$
+ "splice(Number start, Number deletecount, Array items) any[] - Array", //$NON-NLS-1$
+ "unshift(Array start) any[] - Array" //$NON-NLS-1$
};
}
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorContentAssistant.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorContentAssistant.java
index c0e1b9d..185a171 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorContentAssistant.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorContentAssistant.java
@@ -26,7 +26,7 @@ public class EditorContentAssistant extends ContentAssistant {
} catch (Throwable t){
t.printStackTrace();
}
- return "";
+ return ""; //$NON-NLS-1$
}
}
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorUtils.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorUtils.java
index 0b03780..580832f 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorUtils.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/EditorUtils.java
@@ -31,7 +31,7 @@ public class EditorUtils
{
public static IFile createFileStructure(IProject project, ModelType model, String jsFileName)
{
- String id = "." + model.getId();
+ String id = "." + model.getId(); //$NON-NLS-1$
File tempFile;
IFile tempFileResource = null;
try
@@ -42,7 +42,7 @@ public class EditorUtils
kwFolder.create(true, true, null);
}
// ?
- String filePath = kwFolder.getLocation().toString() + "/" + jsFileName;
+ String filePath = kwFolder.getLocation().toString() + "/" + jsFileName; //$NON-NLS-1$
tempFileResource = null;
tempFile = new File(filePath);
if (!tempFile.exists())
@@ -66,19 +66,19 @@ public class EditorUtils
public static void addJSSupport(IProject project, ModelType model) throws CoreException
{
//deleteFileStructure(project, model);
- if (null != project && !project.hasNature("org.eclipse.wst.jsdt.core.jsNature"))
+ if (null != project && !project.hasNature("org.eclipse.wst.jsdt.core.jsNature")) //$NON-NLS-1$
{
IProjectDescription description = project.getDescription();
String[] natures = description.getNatureIds();
String[] newNatures = new String[natures.length + 1];
System.arraycopy(natures, 0, newNatures, 0, natures.length);
- newNatures[newNatures.length - 1] = "org.eclipse.wst.jsdt.core.jsNature";
+ newNatures[newNatures.length - 1] = "org.eclipse.wst.jsdt.core.jsNature"; //$NON-NLS-1$
description.setNatureIds(newNatures);
project.setDescription(description, null);
}
- Bundle bundle = Platform.getBundle("org.eclipse.stardust.modeling.javascript.editor");
- URL url = (URL) BundleUtility.find(bundle, "lib/.jsdtscope");
- IFile systemJSResource = project.getFile(".jsdtscope");
+ Bundle bundle = Platform.getBundle("org.eclipse.stardust.modeling.javascript.editor"); //$NON-NLS-1$
+ URL url = (URL) BundleUtility.find(bundle, "lib/.jsdtscope"); //$NON-NLS-1$
+ IFile systemJSResource = project.getFile(".jsdtscope"); //$NON-NLS-1$
if (!systemJSResource.exists())
{
try
@@ -99,7 +99,7 @@ public class EditorUtils
public static void deleteFileStructure(IProject project, ModelType model)
{
- String id = "." + model.getId();
+ String id = "." + model.getId(); //$NON-NLS-1$
IFolder modelFolder = project.getFolder(id);
if (modelFolder.exists())
{
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JSCompilationUnitEditor.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JSCompilationUnitEditor.java
index 8833c8d..4017b99 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JSCompilationUnitEditor.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JSCompilationUnitEditor.java
@@ -155,7 +155,6 @@ public class JSCompilationUnitEditor extends JavaEditor implements IJavaReconcil
private ToggleCommentAction toggleCommentAction;
private AbstractJavaScanner codeScanner;
private AdjustableLineNumberRuler adjustableLineNumberRuler;
- private SwitchToModeAction switchToModeAction;
/**
* Text operation code for requesting common prefix completion.
@@ -1247,7 +1246,7 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
private void addPopupAction(IMenuManager manager) {
//manager.add(switchToModeAction);
- manager.add(new Separator("EditorActions"));
+ manager.add(new Separator("EditorActions")); //$NON-NLS-1$
// manager.add(toggleCommentAction);
// manager.add(contentAssistAction);
// manager.add(addBlockCommentAction);
@@ -1362,7 +1361,7 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
* Missing resources.
*/
Shell shell= getSite().getShell();
- MessageDialog.openError(shell, EditorMessages.CompilationUnitEditor_error_saving_title1, EditorMessages.CompilationUnitEditor_error_saving_message1);
+ MessageDialog.openError(shell, "Error", "Error"); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
@@ -1396,7 +1395,7 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
protected Control createDialogArea(Composite parent) {
parent= (Composite)super.createDialogArea(parent);
Link link= new Link(parent, SWT.NONE);
- link.setText(EditorMessages.CompilationUnitEditor_error_saving_saveParticipant);
+ link.setText("Error"); //$NON-NLS-1$
link.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
PreferencesUtil.createPreferenceDialogOn(getShell(), "org.eclipse.wst.jsdt.ui.preferences.SaveParticipantPreferencePage", null, null).open(); //$NON-NLS-1$
@@ -1867,7 +1866,7 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
UndoRedoObject undoRedo = (UndoRedoObject)undoStack.remove(0);
String text = undoRedo.getText();
if (undoRedo.isAdded()) {
- adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), undoRedo.getEnd() - undoRedo.getStart(), "");
+ adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), undoRedo.getEnd() - undoRedo.getStart(), ""); //$NON-NLS-1$
} else {
adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), 0, text);
}
@@ -1883,7 +1882,7 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
UndoRedoObject undoRedo = (UndoRedoObject)redoStack.remove(0);
String text = undoRedo.getText();
if (undoRedo.isAdded()) {
- adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), undoRedo.getEnd() - undoRedo.getStart(), "");
+ adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), undoRedo.getEnd() - undoRedo.getStart(), ""); //$NON-NLS-1$
} else {
adaptedSourceViewer.getTextWidget().replaceTextRange(undoRedo.getStart(), 0, text);
}
@@ -1931,9 +1930,6 @@ private EditorSourceViewerConfiguration sourceViewerConfiguration;
this.setSourceViewerConfiguration(this.createJavaSourceViewerConfiguration());
}
- public boolean isBasicMapping() {
- return switchToModeAction.isBasicMapping();
- }
public void setLineOffset(int lineOffset)
{
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptEditorPlugin.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptEditorPlugin.java
index 3d99b6e..fe15db4 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptEditorPlugin.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptEditorPlugin.java
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleContext;
public class JavaScriptEditorPlugin extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.stardust.modeling.javascript.editor";
+ public static final String PLUGIN_ID = "org.eclipse.stardust.modeling.javascript.editor"; //$NON-NLS-1$
// The shared instance
private static JavaScriptEditorPlugin plugin;
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptValidator.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptValidator.java
index 03216f5..c58ab59 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptValidator.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/JavaScriptValidator.java
@@ -79,7 +79,7 @@ public class JavaScriptValidator
IBuffer buffer;
try
{
- BasicCompilationUnit bcu = new BasicCompilationUnit(code.toCharArray(), this.getPackageName("com.test.validation.class"), "");
+ BasicCompilationUnit bcu = new BasicCompilationUnit(code.toCharArray(), this.getPackageName("com.test.validation.class"), ""); //$NON-NLS-1$ //$NON-NLS-2$
CompilationUnitDeclaration result = problemFinder.resolve(bcu, true, true, true);
IProblem[] problems = result.compilationResult.getErrors();
//rp: Workaround
@@ -103,7 +103,7 @@ public class JavaScriptValidator
for (int i = 0; i < problems.length; i++)
{
IProblem problem = problems[i];
- if (!(problem.getMessage().indexOf("The return type is incompatible") > -1))
+ if (!(problem.getMessage().indexOf("The return type is incompatible") > -1)) //$NON-NLS-1$
{
filteredProblems.add(problem);
}
@@ -129,7 +129,7 @@ public class JavaScriptValidator
}
public char[][] getPackageName(String className) {
- StringTokenizer izer = new StringTokenizer(className, ".");
+ StringTokenizer izer = new StringTokenizer(className, "."); //$NON-NLS-1$
char[][] result = new char[izer.countTokens() - 1][];
for (int i = 0; i < result.length; i++) {
String tok = izer.nextToken();
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/SwitchToModeAction.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/SwitchToModeAction.java
index 75b7c3e..879f781 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/SwitchToModeAction.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/SwitchToModeAction.java
@@ -19,7 +19,7 @@ public class SwitchToModeAction extends TextEditorAction
{
private boolean basicMapping = true;
- private String menuText = "Switch To Advanced Mapping Mode";
+ private String menuText = "Switch To Advanced Mapping Mode"; //$NON-NLS-1$
protected SwitchToModeAction(ResourceBundle bundle, String prefix, ITextEditor editor)
{
@@ -37,9 +37,9 @@ public class SwitchToModeAction extends TextEditorAction
{
basicMapping = !basicMapping;
if (basicMapping) {
- menuText = "Switch To Advanced Mapping Mode";
+ menuText = "Switch To Advanced Mapping Mode"; //$NON-NLS-1$
} else {
- menuText = "Switch To Basic Mapping Mode";
+ menuText = "Switch To Basic Mapping Mode"; //$NON-NLS-1$
}
this.setText(menuText);
super.run();
diff --git a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/controller/JavaScriptEditorController.java b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/controller/JavaScriptEditorController.java
index c5c8dc8..744cff6 100644
--- a/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/controller/JavaScriptEditorController.java
+++ b/modeling/org.eclipse.stardust.modeling.javascript.editor/src/org/eclipse/stardust/modeling/javascript/editor/controller/JavaScriptEditorController.java
@@ -30,9 +30,9 @@ public class JavaScriptEditorController
protected String masterDocument;
- protected String fieldsDocument = "//Fields\n";
- protected String expressionDocument = "//Expressions\n";
- protected String statementsDocument = "//Statements\n";
+ protected String fieldsDocument = "//Fields\n"; //$NON-NLS-1$
+ protected String expressionDocument = "//Expressions\n"; //$NON-NLS-1$
+ protected String statementsDocument = "//Statements\n"; //$NON-NLS-1$
protected Region fieldsRegion;
protected Region statementsRegion;
@@ -42,18 +42,18 @@ protected String masterDocument;
public void intializeModel(ModelType model)
{
- jScript = "function ippInitialize(e) {return null}\n";
- jScript = jScript + "function ippImport(e) {return null}\n";
+ jScript = "function ippInitialize(e) {return null}\n"; //$NON-NLS-1$
+ jScript = jScript + "function ippImport(e) {return null}\n"; //$NON-NLS-1$
List modelDatas = model.getData();
for(int i = 0; i < modelDatas.size(); i++)
{
DataType data = (DataType) modelDatas.get(i);
- jScript = jScript + "var " + data.getId() + " = ippInitialize(\"" + data.getId() + "\");\n";
+ jScript = jScript + "var " + data.getId() + " = ippInitialize(\"" + data.getId() + "\");\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- jScript = jScript + "var " + PredefinedConstants.ACTIVITY_INSTANCE_ACCESSPOINT +
- " = ippInitialize(\"" + PredefinedConstants.ACTIVITY_INSTANCE_ACCESSPOINT + "\");\n";
- fieldsDocument = "//Fields\n" + jScript;
+ jScript = jScript + "var " + PredefinedConstants.ACTIVITY_INSTANCE_ACCESSPOINT + //$NON-NLS-1$
+ " = ippInitialize(\"" + PredefinedConstants.ACTIVITY_INSTANCE_ACCESSPOINT + "\");\n"; //$NON-NLS-1$ //$NON-NLS-2$
+ fieldsDocument = "//Fields\n" + jScript; //$NON-NLS-1$
}
public String getJScript()
@@ -75,12 +75,12 @@ protected String masterDocument;
// constructor, etc.
IRegion region = document.getLineInformation(i);
String content = document.get(region.getOffset(), document.getLineLength(i));
- if (content.startsWith("//Fields"))
+ if (content.startsWith("//Fields")) //$NON-NLS-1$
{
fo = document.getLineOffset(i + 1);
}
// functions
- if (content.startsWith("//Statements"))
+ if (content.startsWith("//Statements")) //$NON-NLS-1$
{
fl = (document.getLineOffset(i - 1) + document.getLineLength(i - 1)) - fo;
so = document.getLineOffset(i + 1);
@@ -88,7 +88,7 @@ protected String masterDocument;
document.get(eo, el);
}
// expression for boolean
- if (content.startsWith("//Expression"))
+ if (content.startsWith("//Expression")) //$NON-NLS-1$
{
sl = document.getLineOffset(i - 1) + document.getLineLength(i - 1) - so;
eo = document.getLineOffset(i + 1);