aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Lenz2013-01-17 08:24:17 (EST)
committerOlav Lenz2013-01-21 03:32:02 (EST)
commit38520252f3bd6aebf7f19c612f573cf46ce31403 (patch)
tree97ff3b592e4fe9073e9d9ae015a2b952bda3a776
parent436184d74984bd0990a0115587328cdd24639b02 (diff)
downloadorg.eclipse.recommenders-38520252f3bd6aebf7f19c612f573cf46ce31403.zip
org.eclipse.recommenders-38520252f3bd6aebf7f19c612f573cf46ce31403.tar.gz
org.eclipse.recommenders-38520252f3bd6aebf7f19c612f573cf46ce31403.tar.bz2
[l10n] externalize strings in plugin *.extdoc.rcprefs/changes/27/9727/6
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/OSGI-INF/l10n/bundle.properties5
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/build.properties3
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/plugin.xml4
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/Messages.java42
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/messages.properties18
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/JavadocProvider.java20
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/OverridesProvider.java14
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/SelfCallsProvider.java10
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/StaticHooksFinder.java12
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocPreferences.java30
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocProviderTransfer.java2
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocUtils.java20
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocView.java8
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ProviderArea.java2
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SourceCodeArea.java4
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SubscriptionManager.java10
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocModule.java16
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocPlugin.java2
-rw-r--r--plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ManualModelStoreWiring.java18
20 files changed, 161 insertions, 83 deletions
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/META-INF/MANIFEST.MF b/plugins/org.eclipse.recommenders.extdoc.rcp/META-INF/MANIFEST.MF
index cc7ff79..4c2d9c0 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/META-INF/MANIFEST.MF
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Code Recommenders: Extended Documentation Platform
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.recommenders.extdoc.rcp;singleton:=true
Bundle-Version: 1.0.3.qualifier
Bundle-Activator: org.eclipse.recommenders.internal.extdoc.rcp.wiring.ExtdocPlugin
-Bundle-Vendor: Eclipse Code Recommenders
+Bundle-Vendor: %Bundle-Vendor
Export-Package: org.eclipse.recommenders.extdoc.rcp.providers,
org.eclipse.recommenders.internal.extdoc.rcp.ui
Require-Bundle: org.eclipse.recommenders.injection,
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/OSGI-INF/l10n/bundle.properties b/plugins/org.eclipse.recommenders.extdoc.rcp/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..39e1eb1
--- /dev/null
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,5 @@
+#Properties file for org.eclipse.recommenders.extdoc.rcp
+Bundle-Name = Code Recommenders: Extended Documentation Platform
+Bundle-Vendor = Eclipse Code Recommenders
+view.name = Extdoc
+extension-point.name = Extended Documentation Provider \ No newline at end of file
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/build.properties b/plugins/org.eclipse.recommenders.extdoc.rcp/build.properties
index 02eb5fd..0c70599 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/build.properties
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/build.properties
@@ -5,7 +5,8 @@ bin.includes = META-INF/,\
plugin.xml,\
icons/,\
about.html,\
- schema/
+ schema/,\
+ OSGI-INF/l10n/bundle.properties
src.includes = pom.xml,\
schema/,\
icons/,\
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/plugin.xml b/plugins/org.eclipse.recommenders.extdoc.rcp/plugin.xml
index 5ee316b..d2757d2 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/plugin.xml
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
- <extension-point id="org.eclipse.recommenders.extdoc.rcp.provider" name="Extended Documentation Provider" schema="schema/org.eclipse.recommenders.extdoc.rcp.provider.exsd"/>
+ <extension-point id="org.eclipse.recommenders.extdoc.rcp.provider" name="%extension-point.name" schema="schema/org.eclipse.recommenders.extdoc.rcp.provider.exsd"/>
<extension
point="org.eclipse.ui.views">
<view
@@ -9,7 +9,7 @@
class="org.eclipse.recommenders.injection.ExtensionFactory:org.eclipse.recommenders.internal.extdoc.rcp.ui.ExtdocView"
icon="icons/extdoc.png"
id="org.eclipse.recommenders.extdoc.rcp.ExtdocView"
- name="Extdoc"
+ name="%view.name"
restorable="true">
</view>
</extension>
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/Messages.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/Messages.java
new file mode 100644
index 0000000..2aefe0c
--- /dev/null
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/Messages.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2010, 2012 Darmstadt University of Technology.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Olav Lenz - initial API and implementation.
+ */
+package org.eclipse.recommenders.extdoc.rcp.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.recommenders.extdoc.rcp.l10n.messages"; //$NON-NLS-1$
+ public static String EXTDOC_OVERRIDES_INTRO;
+ public static String EXTDOC_OVERRIDES_INTRO_PATTERN;
+ public static String EXTDOC_OVERRIDES_PERCENTAGE;
+ public static String EXTDOC_OVERRIDES_PERCENTAGE_PATTERN;
+ public static String EXTDOC_OVERRIDES_OVERRIDE;
+ public static String EXTDOC_OVERRIDES_OVERRIDES;
+ public static String EXTDOC_SELFCALLS_CALLS;
+ public static String EXTDOC_SELFCALLS_INTRO_IMPLEMENTORS;
+ public static String EXTDOC_SELFCALLS_INTRO_SUBCLASSES;
+ public static String EXTDOC_STATICHOCKS_NO_PUBLIC_STATIC_METHOD_FOUND;
+ public static String EXTDOC_JAVADOC_NOT_FOUND;
+ public static String EXTDOC_UPDATE_JOB;
+ public static String EXTDOC_PERCENTAGE_TIMES;
+ public static String EXTDOC_ALWAYS;
+ public static String EXTDOC_USUALLY;
+ public static String EXTDOC_SOMETIMES;
+ public static String EXTDOC_OCCASIONALLY;
+ public static String EXTDOC_RARELY;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/messages.properties b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/messages.properties
new file mode 100644
index 0000000..e4a0ea1
--- /dev/null
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/extdoc/rcp/l10n/messages.properties
@@ -0,0 +1,18 @@
+EXTDOC_OVERRIDES_INTRO=Based on %1$d direct subclasses of %2$s, we created the following statistics:
+EXTDOC_OVERRIDES_INTRO_PATTERN=Based on the above examples, we identified the following patterns how this class is typically extended:
+EXTDOC_OVERRIDES_PERCENTAGE=- (%1$d %%)
+EXTDOC_OVERRIDES_PERCENTAGE_PATTERN=Pattern \#%1$d (%2$d%% - %3$d examples):
+EXTDOC_OVERRIDES_OVERRIDE=override
+EXTDOC_OVERRIDES_OVERRIDES=overrides
+EXTDOC_SELFCALLS_CALLS=calls
+EXTDOC_SELFCALLS_INTRO_IMPLEMENTORS=Based on %1$d direct implementors of %2$s, we created the following statistics. Implementors...
+EXTDOC_SELFCALLS_INTRO_SUBCLASSES=Based on %1$d direct subclasses of %2$s, we created the following statistics:
+EXTDOC_STATICHOCKS_NO_PUBLIC_STATIC_METHOD_FOUND=No public static method found in selected package (-root)
+EXTDOC_JAVADOC_NOT_FOUND=no Javadoc found
+EXTDOC_UPDATE_JOB=Update Extdoc
+EXTDOC_PERCENTAGE_TIMES=- (%1$d %% - %2$d times)
+EXTDOC_ALWAYS=always
+EXTDOC_USUALLY=usually
+EXTDOC_SOMETIMES=sometimes
+EXTDOC_OCCASIONALLY=occasionally
+EXTDOC_RARELY=rarely
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/JavadocProvider.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/JavadocProvider.java
index cfaca58..c2946db 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/JavadocProvider.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/JavadocProvider.java
@@ -9,6 +9,7 @@
* Stefan Henss - initial API and implementation.
* Sebastian Proksch - integrated into new eventbus system
* Marcel Bruch - changed to own browser-based implementation
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.providers;
@@ -35,6 +36,7 @@ import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jface.internal.text.html.HTMLPrinter;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.extdoc.rcp.providers.ExtdocProvider;
import org.eclipse.recommenders.extdoc.rcp.providers.JavaSelectionSubscriber;
import org.eclipse.recommenders.rcp.RecommendersPlugin;
@@ -118,12 +120,12 @@ public final class JavadocProvider extends ExtdocProvider {
@Override
public boolean handleExternalLink(final URL url, final Display display) {
try {
- if (url.getProtocol().equals("file")) {
+ if (url.getProtocol().equals("file")) { //$NON-NLS-1$
// sometimes we have /, sometimes we have ///
String path = url.getPath();
- path = StringUtils.removeStart(path, "///");
- path = StringUtils.removeStart(path, "/");
- final String type = "L" + StringUtils.substring(path, 0, -".html".length());
+ path = StringUtils.removeStart(path, "///"); //$NON-NLS-1$
+ path = StringUtils.removeStart(path, "/"); //$NON-NLS-1$
+ final String type = "L" + StringUtils.substring(path, 0, -".html".length()); //$NON-NLS-1$ //$NON-NLS-2$
final VmTypeName typeName = VmTypeName.get(type);
final Optional<IType> opt = resolver.toJdtType(typeName);
if (opt.isPresent()) {
@@ -134,13 +136,13 @@ public final class JavadocProvider extends ExtdocProvider {
} else {
try {
PlatformUI.getWorkbench().getBrowserSupport()
- .createBrowser("recommenders.javadoc").openURL(url);
+ .createBrowser("recommenders.javadoc").openURL(url); //$NON-NLS-1$
} catch (final PartInitException e) {
- RecommendersPlugin.logError(e, "Error during javadoc selection %s", url);
+ RecommendersPlugin.logError(e, "Error during javadoc selection %s", url); //$NON-NLS-1$
}
}
} catch (final Exception e) {
- RecommendersPlugin.logError(e, "Error during javadoc selection %s", url);
+ RecommendersPlugin.logError(e, "Error during javadoc selection %s", url); //$NON-NLS-1$
}
return true;
}
@@ -170,11 +172,11 @@ public final class JavadocProvider extends ExtdocProvider {
private String findJavadoc(final IMember element) throws JavaModelException {
String html = JavadocContentAccess2.getHTMLContent(element, true);
if (html == null) {
- html = "no javadoc found";
+ html = Messages.EXTDOC_JAVADOC_NOT_FOUND;
}
final int max = Math.min(100, html.length());
- if (html.substring(0, max).indexOf("<html>") != -1) {
+ if (html.substring(0, max).indexOf("<html>") != -1) { //$NON-NLS-1$
// there is already a header
return html;
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/OverridesProvider.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/OverridesProvider.java
index b56c87a..83ed96f 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/OverridesProvider.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/OverridesProvider.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Stefan Henss - initial API and implementation.
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.providers;
@@ -39,6 +40,7 @@ import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.recommenders.extdoc.ClassOverrideDirectives;
import org.eclipse.recommenders.extdoc.ClassOverridePatterns;
import org.eclipse.recommenders.extdoc.MethodPattern;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.extdoc.rcp.providers.ExtdocProvider;
import org.eclipse.recommenders.extdoc.rcp.providers.JavaSelectionSubscriber;
import org.eclipse.recommenders.internal.extdoc.rcp.ui.ExtdocUtils;
@@ -145,7 +147,7 @@ public final class OverridesProvider extends ExtdocProvider {
private void addHeader() {
final String message =
- format("Based on %d direct subclasses of %s, we created the following statistics:",
+ format(Messages.EXTDOC_OVERRIDES_INTRO,
directive.getNumberOfSubclasses(),
type.getElementName());
Label label = new Label(container, SWT.NONE);
@@ -162,7 +164,7 @@ public final class OverridesProvider extends ExtdocProvider {
numberOfSubclasses,
workspaceBus,
resolver,
- "overrides");
+ Messages.EXTDOC_OVERRIDES_OVERRIDES);
}
}
@@ -234,7 +236,7 @@ public final class OverridesProvider extends ExtdocProvider {
private void addHeader() {
new Label(container, SWT.None);
final String message =
- format("Based on the above examples, we identified the following patterns\nhow this class is typically extended:");
+ format(Messages.EXTDOC_OVERRIDES_INTRO_PATTERN);
createLabel(container, message, true);
}
@@ -243,7 +245,7 @@ public final class OverridesProvider extends ExtdocProvider {
final int patternPercentage =
(int) Math.rint(100 * pattern.getNumberOfObservations() / totalNumberOfExamples);
final String text =
- format("Pattern #%d (%d%% - %d examples):",
+ format(Messages.EXTDOC_OVERRIDES_PERCENTAGE_PATTERN,
index,
patternPercentage,
pattern.getNumberOfObservations());
@@ -270,11 +272,11 @@ public final class OverridesProvider extends ExtdocProvider {
for (final Entry<IMethodName, Double> entry : s) {
final int percentage = (int) Math.rint(entry.getValue() * 100);
final String phraseText = percentageToRecommendationPhrase(percentage);
- final String stats = format(" - (%d %%)", percentage);
+ final String stats = format(Messages.EXTDOC_OVERRIDES_PERCENTAGE, percentage);
final Link bar = createMethodLink(table, entry.getKey(), resolver, workspaceBus);
final TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] { phraseText, "override", bar.getText(), stats });
+ item.setText(new String[] { phraseText, Messages.EXTDOC_OVERRIDES_OVERRIDE, bar.getText(), stats });
item.setFont(0, JFaceResources.getBannerFont());
item.setForeground(createColor(COLOR_INFO_FOREGROUND));
final TableEditor editor = new TableEditor(table);
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/SelfCallsProvider.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/SelfCallsProvider.java
index 0c991e6..0eec21b 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/SelfCallsProvider.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/SelfCallsProvider.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Stefan Henss - initial API and implementation.
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.providers;
@@ -25,6 +26,7 @@ import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeRoot;
import org.eclipse.recommenders.extdoc.ClassSelfcallDirectives;
import org.eclipse.recommenders.extdoc.MethodSelfcallDirectives;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.extdoc.rcp.providers.ExtdocProvider;
import org.eclipse.recommenders.extdoc.rcp.providers.JavaSelectionSubscriber;
import org.eclipse.recommenders.internal.extdoc.rcp.wiring.ManualModelStoreWiring.ClassSelfcallsModelStore;
@@ -115,7 +117,7 @@ public final class SelfCallsProvider extends ExtdocProvider {
}
private void addHeader() {
- final String message = format("Based on %d direct subclasses of %s we created the following statistics:",
+ final String message = format(Messages.EXTDOC_SELFCALLS_INTRO_SUBCLASSES,
directive.getNumberOfSubclasses(), type.getElementName());
createLabel(container, message, true);
}
@@ -123,7 +125,7 @@ public final class SelfCallsProvider extends ExtdocProvider {
private void addDirectives() {
final int numberOfSubclasses = directive.getNumberOfSubclasses();
final TreeBag<IMethodName> b = newTreeBag(directive.getCalls());
- renderMethodDirectivesBlock(container, b, numberOfSubclasses, workspaceBus, resolver, "calls ");
+ renderMethodDirectivesBlock(container, b, numberOfSubclasses, workspaceBus, resolver, Messages.EXTDOC_SELFCALLS_CALLS);
}
}
@@ -157,7 +159,7 @@ public final class SelfCallsProvider extends ExtdocProvider {
private void addHeader() {
final String message = format(
- "Based on %d direct implementors of %s we created the following statistics. Implementors...",
+ Messages.EXTDOC_SELFCALLS_INTRO_IMPLEMENTORS,
directive.getNumberOfDefinitions(), method.getElementName());
createLabel(container, message, true);
}
@@ -165,7 +167,7 @@ public final class SelfCallsProvider extends ExtdocProvider {
private void addDirectives() {
final int numberOfSubclasses = directive.getNumberOfDefinitions();
final TreeBag<IMethodName> b = newTreeBag(directive.getCalls());
- renderMethodDirectivesBlock(container, b, numberOfSubclasses, workspaceBus, resolver, "calls ");
+ renderMethodDirectivesBlock(container, b, numberOfSubclasses, workspaceBus, resolver, Messages.EXTDOC_SELFCALLS_CALLS);
}
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/StaticHooksFinder.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/StaticHooksFinder.java
index 1d7f551..0a59481 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/StaticHooksFinder.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/providers/StaticHooksFinder.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2010, 2011 Darmstadt University of Technology.
+ * Copyright (c) 2010, 2012 Darmstadt University of Technology.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Marcel Bruch - initial API and implementation.
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.providers;
@@ -37,6 +38,7 @@ import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.util.JdtFlags;
import org.eclipse.jdt.ui.JavaElementLabels;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.extdoc.rcp.providers.ExtdocProvider;
import org.eclipse.recommenders.extdoc.rcp.providers.JavaSelectionSubscriber;
import org.eclipse.recommenders.rcp.RecommendersPlugin;
@@ -78,7 +80,7 @@ public class StaticHooksFinder extends ExtdocProvider {
public void run() {
final Composite container = createComposite(parent, 1);
if (index.isEmpty()) {
- createLabel(container, "No public static method found in selected package (-root)", true);
+ createLabel(container, Messages.EXTDOC_STATICHOCKS_NO_PUBLIC_STATIC_METHOD_FOUND, true);
}
final List<StyleRange> typeRanges = Lists.newLinkedList();
@@ -99,7 +101,7 @@ public class StaticHooksFinder extends ExtdocProvider {
typeRanges.add(styleRange);
sb.append(IOUtils.LINE_SEPARATOR);
for (final IMethod method : index.get(type)) {
- sb.append(" ");
+ sb.append(" "); //$NON-NLS-1$
final int methodLabelBegin = sb.length();
final String methodLabel = getElementLabel(method, M_APP_RETURNTYPE | M_PARAMETER_TYPES);
sb.append(methodLabel);
@@ -251,7 +253,7 @@ public class StaticHooksFinder extends ExtdocProvider {
}
}
} catch (final Exception x) {
- RecommendersPlugin.logError(x, "Failed to determine static members for %s", root.getElementName());
+ RecommendersPlugin.logError(x, "Failed to determine static members for %s", root.getElementName()); //$NON-NLS-1$
}
runSyncInUiThread(new HooksRendererRunnable(index, parent));
}
@@ -265,7 +267,7 @@ public class StaticHooksFinder extends ExtdocProvider {
try {
findStaticHooks(pkg, index);
} catch (final Exception e) {
- RecommendersPlugin.logError(e, "Failed to determine static members for package %s", pkg.getElementName());
+ RecommendersPlugin.logError(e, "Failed to determine static members for package %s", pkg.getElementName()); //$NON-NLS-1$
}
runSyncInUiThread(new HooksRendererRunnable(index, parent));
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocPreferences.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocPreferences.java
index 1cbe2ce..38a6373 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocPreferences.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocPreferences.java
@@ -26,9 +26,9 @@ import org.osgi.service.prefs.Preferences;
public class ExtdocPreferences {
- public static final String PROVIDER_RANKING = "providerRanking";
- private static final String DISABLED_PROVIDERS = "disabledProviders";
- private static final String SASH_WEIGHTS = "sashWeights";
+ public static final String PROVIDER_RANKING = "providerRanking"; //$NON-NLS-1$
+ private static final String DISABLED_PROVIDERS = "disabledProviders"; //$NON-NLS-1$
+ private static final String SASH_WEIGHTS = "sashWeights"; //$NON-NLS-1$
private final IEclipsePreferences pluginPreferences;
private final Preferences providerRankingPreferences;
@@ -56,7 +56,7 @@ public class ExtdocPreferences {
if (tmp != null) {
providerIds.add(tmp);
} else {
- RecommendersPlugin.logWarning("Loading entry for key " + i + " failed. No such entry.");
+ RecommendersPlugin.logWarning("Loading entry for key " + i + " failed. No such entry."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return providerIds;
@@ -67,7 +67,7 @@ public class ExtdocPreferences {
try {
keys = node.keys();
} catch (BackingStoreException e) {
- RecommendersPlugin.logError(e, "Exception during loading the keys of: " + node.absolutePath());
+ RecommendersPlugin.logError(e, "Exception during loading the keys of: " + node.absolutePath()); //$NON-NLS-1$
}
return keys;
}
@@ -77,26 +77,26 @@ public class ExtdocPreferences {
prefs.clear();
return true;
} catch (BackingStoreException e) {
- RecommendersPlugin.logError(e, "Caught exception while clearing the preferences : " + prefs.absolutePath());
+ RecommendersPlugin.logError(e, "Caught exception while clearing the preferences : " + prefs.absolutePath()); //$NON-NLS-1$
return false;
}
}
private String createString(final String[] names) {
if (names.length > 0) {
- String out = "";
+ String out = ""; //$NON-NLS-1$
for (final String name : names) {
- out += "," + name;
+ out += "," + name; //$NON-NLS-1$
}
return out.substring(1);
} else {
- return "";
+ return ""; //$NON-NLS-1$
}
}
public boolean isProviderEnabled(final ExtdocProvider p) {
- final String arrayString = pluginPreferences.get(DISABLED_PROVIDERS, "");
- final String[] deactivatedProviders = arrayString.split(",");
+ final String arrayString = pluginPreferences.get(DISABLED_PROVIDERS, ""); //$NON-NLS-1$
+ final String[] deactivatedProviders = arrayString.split(","); //$NON-NLS-1$
final String providerName = p.getDescription().getName();
for (final String deactivatedName : deactivatedProviders) {
if (deactivatedName.equals(providerName)) {
@@ -124,13 +124,13 @@ public class ExtdocPreferences {
}
public int[] loadSashWeights() {
- final String weightString = pluginPreferences.get(SASH_WEIGHTS, "1,3");
- final String[] weights = weightString.split(",");
+ final String weightString = pluginPreferences.get(SASH_WEIGHTS, "1,3"); //$NON-NLS-1$
+ final String[] weights = weightString.split(","); //$NON-NLS-1$
return new int[] { parseInt(weights[0]), parseInt(weights[1]) };
}
public void storeSashWeights(final int[] weights) {
- final String toSave = weights[0] + "," + weights[1];
+ final String toSave = weights[0] + "," + weights[1]; //$NON-NLS-1$
pluginPreferences.put(SASH_WEIGHTS, toSave);
flush();
}
@@ -140,7 +140,7 @@ public class ExtdocPreferences {
pluginPreferences.flush();
return true;
} catch (BackingStoreException e) {
- RecommendersPlugin.logError(e, "Caught exception while saving the order of ExtdocProviders");
+ RecommendersPlugin.logError(e, "Caught exception while saving the order of ExtdocProviders"); //$NON-NLS-1$
return false;
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocProviderTransfer.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocProviderTransfer.java
index 5df7013..76bb487 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocProviderTransfer.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocProviderTransfer.java
@@ -21,7 +21,7 @@ import org.eclipse.swt.dnd.TransferData;
public class ExtdocProviderTransfer extends ByteArrayTransfer {
- private static final String TYPE_NAME = "extdoc-provider-transfer-format";
+ private static final String TYPE_NAME = "extdoc-provider-transfer-format"; //$NON-NLS-1$
private static final int TYPEID = registerType(TYPE_NAME);
private static final ExtdocProviderTransfer INSTANCE = new ExtdocProviderTransfer();
private ExtdocProvider extDocProvider;
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocUtils.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocUtils.java
index a65d4b8..626499d 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocUtils.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocUtils.java
@@ -7,6 +7,7 @@
*
* Contributors:
* Stefan Henss - initial API and implementation.
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.ui;
@@ -23,6 +24,7 @@ import org.eclipse.jdt.ui.JavaElementLabels;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.rcp.events.JavaSelectionEvent;
import org.eclipse.recommenders.utils.Names;
import org.eclipse.recommenders.utils.TreeBag;
@@ -128,7 +130,7 @@ public final class ExtdocUtils {
continue;
}
final String phraseText = percentageToRecommendationPhrase(percentage);
- final String stats = format(" - (%d %% - %d times)", percentage, frequency);
+ final String stats = format(Messages.EXTDOC_PERCENTAGE_TIMES, percentage, frequency);
final Link bar = createMethodLink(table, method, resolver, bus);
final TableItem item = new TableItem(table, SWT.NONE);
@@ -147,9 +149,9 @@ public final class ExtdocUtils {
public static Link createMethodLink(final Composite parent, final IMethod method, final EventBus workspaceBus) {
final String text =
- "<a>"
+ "<a>" //$NON-NLS-1$
+ JavaElementLabels.getElementLabel(method, JavaElementLabels.M_APP_RETURNTYPE
- | JavaElementLabels.M_PARAMETER_TYPES) + "</a>";
+ | JavaElementLabels.M_PARAMETER_TYPES) + "</a>"; //$NON-NLS-1$
final String tooltip = JavaElementLabels.getElementLabel(method, JavaElementLabels.DEFAULT_QUALIFIED);
final Link link = new Link(parent, SWT.NONE);
@@ -169,7 +171,7 @@ public final class ExtdocUtils {
public static Link createMethodLink(final Composite parent, final IMethodName method,
final JavaElementResolver resolver, final EventBus workspaceBus) {
- final String text = "<a>" + Names.vm2srcSimpleMethod(method) + "</a>";
+ final String text = "<a>" + Names.vm2srcSimpleMethod(method) + "</a>"; //$NON-NLS-1$ //$NON-NLS-2$
final String tooltip = Names.vm2srcQualifiedMethod(method);
final Link link = new Link(parent, SWT.NONE);
@@ -347,15 +349,15 @@ public final class ExtdocUtils {
public static String percentageToRecommendationPhrase(final int percentage) {
if (percentage >= 95) {
- return "always";
+ return Messages.EXTDOC_ALWAYS;
} else if (percentage >= 65) {
- return "usually";
+ return Messages.EXTDOC_USUALLY;
} else if (percentage >= 25) {
- return "sometimes";
+ return Messages.EXTDOC_SOMETIMES;
} else if (percentage >= 10) {
- return "occasionally";
+ return Messages.EXTDOC_OCCASIONALLY;
} else {
- return "rarely";
+ return Messages.EXTDOC_RARELY;
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocView.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocView.java
index fd4c81c..b547340 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocView.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ExtdocView.java
@@ -8,6 +8,7 @@
* Contributors:
* Sebastian Proksch - initial API and implementation
* Patrick Gottschaemmer, Olav Lenz - add Drag'n'Drop support
+ * Olav Lenz - externalize Strings.
*/
package org.eclipse.recommenders.internal.extdoc.rcp.ui;
@@ -41,6 +42,7 @@ import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.recommenders.extdoc.rcp.l10n.Messages;
import org.eclipse.recommenders.extdoc.rcp.providers.ExtdocProvider;
import org.eclipse.recommenders.rcp.RecommendersPlugin;
import org.eclipse.recommenders.rcp.events.JavaSelectionEvent;
@@ -75,7 +77,7 @@ import com.google.inject.Inject;
public class ExtdocView extends ViewPart {
- public static final String ID = "org.eclipse.recommenders.extdoc.rcp.ExtdocView";
+ public static final String ID = "org.eclipse.recommenders.extdoc.rcp.ExtdocView"; //$NON-NLS-1$
private final EventBus workspaceBus;
private final SubscriptionManager subscriptionManager;
@@ -202,7 +204,7 @@ public class ExtdocView extends ViewPart {
return;
}
activeProvider = newProvider;
- Job job = new Job("Update Extdoc") {
+ Job job = new Job(Messages.EXTDOC_UPDATE_JOB) {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -369,7 +371,7 @@ public class ExtdocView extends ViewPart {
runProvider(selection);
refreshAndEnableDrawContentArea();
} catch (Exception e) {
- RecommendersPlugin.logError(e, "Exception during view update." + selection);
+ RecommendersPlugin.logError(e, "Exception during view update." + selection); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ProviderArea.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ProviderArea.java
index 4312562..49ca402 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ProviderArea.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/ProviderArea.java
@@ -127,7 +127,7 @@ public class ProviderArea {
// }
// d.setLayoutData(gridData);
} else {
- throwUnsupportedOperation("layout of provided composite not supported");
+ throwUnsupportedOperation("layout of provided composite not supported"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SourceCodeArea.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SourceCodeArea.java
index bd3389a..8d48fd8 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SourceCodeArea.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SourceCodeArea.java
@@ -33,7 +33,7 @@ import org.eclipse.text.edits.TextEdit;
@SuppressWarnings({ "restriction", "unchecked" })
public final class SourceCodeArea extends JavaSourceViewer {
- private static final String LINE_SEPARATOR = System.getProperty("line.separator");
+ private static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
private static final IPreferenceStore store = JavaPlugin.getDefault().getCombinedPreferenceStore();
private static final IColorManager colorManager = JavaPlugin.getDefault().getJavaTextTools().getColorManager();
@@ -45,7 +45,7 @@ public final class SourceCodeArea extends JavaSourceViewer {
static {
options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
- options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "120");
+ options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "120"); //$NON-NLS-1$
formatter = ToolFactory.createCodeFormatter(options);
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SubscriptionManager.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SubscriptionManager.java
index 8911f29..a36cca2 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SubscriptionManager.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/ui/SubscriptionManager.java
@@ -53,7 +53,7 @@ public class SubscriptionManager {
final Set<Tuple<Method, JavaSelectionSubscriber>> annotatedMethods = findAnnotatedMethods(provider);
if (annotatedMethods.isEmpty()) {
- throwIllegalArgumentException("no listeners found");
+ throwIllegalArgumentException("no listeners found"); //$NON-NLS-1$
}
for (final Tuple<Method, JavaSelectionSubscriber> t : annotatedMethods) {
@@ -87,27 +87,27 @@ public class SubscriptionManager {
private static void ensureParameterLengthIsThree(final Class<?>[] params, final Method m) {
if (params.length != 3) {
- throwIllegalArgumentException("error in %s: at least 3 parameters expected", m.toGenericString());
+ throwIllegalArgumentException("error in %s: at least 3 parameters expected", m.toGenericString()); //$NON-NLS-1$
}
}
private static void ensureFirstParameterTypeIsJavaElement(final Class<?>[] params, final Method m) {
if (!IJavaElement.class.isAssignableFrom(params[0])) {
- throwIllegalArgumentException("error in %s: first parameter needs to be %s or a subclass",
+ throwIllegalArgumentException("error in %s: first parameter needs to be %s or a subclass", //$NON-NLS-1$
m.toGenericString(), IJavaElement.class.getName());
}
}
private static void ensureSecondParameterTypeIsJavaSelectionEvent(final Class<?>[] params, final Method m) {
if (!JavaSelectionEvent.class.isAssignableFrom(params[1])) {
- throwIllegalArgumentException("error in %s: second parameter needs to be %s or a subclass",
+ throwIllegalArgumentException("error in %s: second parameter needs to be %s or a subclass", //$NON-NLS-1$
m.toGenericString(), JavaSelectionEvent.class.getName());
}
}
private static void ensureThirdParameterTypeIsComposite(final Class<?>[] params, final Method m) {
if (!Composite.class.isAssignableFrom(params[2])) {
- throwIllegalArgumentException("error in %s: third parameter needs to be %s or a subclass",
+ throwIllegalArgumentException("error in %s: third parameter needs to be %s or a subclass", //$NON-NLS-1$
m.toGenericString(), Composite.class.getName());
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocModule.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocModule.java
index 110488f..cfa6b2f 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocModule.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocModule.java
@@ -70,7 +70,7 @@ public class ExtdocModule extends AbstractModule {
static List<ExtdocProvider> instantiateProvidersFromRegistry() {
final IConfigurationElement[] elements =
Platform.getExtensionRegistry()
- .getConfigurationElementsFor("org.eclipse.recommenders.extdoc.rcp.provider");
+ .getConfigurationElementsFor("org.eclipse.recommenders.extdoc.rcp.provider"); //$NON-NLS-1$
final List<ExtdocProvider> providers = Lists.newLinkedList();
for (final IConfigurationElement element : elements) {
@@ -86,9 +86,9 @@ public class ExtdocModule extends AbstractModule {
public int compare(ExtdocProvider o1, ExtdocProvider o2) {
String n1 = o1.getDescription().getName();
String n2 = o2.getDescription().getName();
- if (n1.equals("Javadoc")) {
+ if (n1.equals("Javadoc")) { //$NON-NLS-1$
return -1;
- } else if (n2.equals("Javadoc")) {
+ } else if (n2.equals("Javadoc")) { //$NON-NLS-1$
return 1;
} else {
return n1.compareTo(n2);
@@ -101,18 +101,18 @@ public class ExtdocModule extends AbstractModule {
static Optional<ExtdocProvider> createProvider(final IConfigurationElement element) {
final String pluginId = element.getContributor().getName();
try {
- final String imagePath = element.getAttribute("image");
- final String name = element.getAttribute("name");
+ final String imagePath = element.getAttribute("image"); //$NON-NLS-1$
+ final String name = element.getAttribute("name"); //$NON-NLS-1$
final Image image = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imagePath).createImage();
- final ExtdocProvider provider = (ExtdocProvider) element.createExecutableExtension("class");
+ final ExtdocProvider provider = (ExtdocProvider) element.createExecutableExtension("class"); //$NON-NLS-1$
final ExtdocProviderDescription description = new ExtdocProviderDescription(name, image);
provider.setDescription(description);
return Optional.of(provider);
} catch (final Exception e) {
RecommendersPlugin.logError(e,
- "failed to instantiate provider %s:%s",
+ "failed to instantiate provider %s:%s", //$NON-NLS-1$
pluginId,
- element.getAttribute("class"));
+ element.getAttribute("class")); //$NON-NLS-1$
return Optional.absent();
}
}
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocPlugin.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocPlugin.java
index 2368144..d047d95 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocPlugin.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ExtdocPlugin.java
@@ -14,7 +14,7 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
public class ExtdocPlugin extends AbstractUIPlugin {
- public static final String PLUGIN_ID = "org.eclipse.recommenders.extdoc.rcp";
+ public static final String PLUGIN_ID = "org.eclipse.recommenders.extdoc.rcp"; //$NON-NLS-1$
private static ExtdocPlugin INSTANCE;
public static ExtdocPlugin getDefault() {
diff --git a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ManualModelStoreWiring.java b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ManualModelStoreWiring.java
index ecd39b0..5875c34 100644
--- a/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ManualModelStoreWiring.java
+++ b/plugins/org.eclipse.recommenders.extdoc.rcp/src/org/eclipse/recommenders/internal/extdoc/rcp/wiring/ManualModelStoreWiring.java
@@ -40,7 +40,7 @@ import com.google.inject.Inject;
@SuppressWarnings({ "unchecked", "rawtypes" })
public class ManualModelStoreWiring {
- private static String VERSION = "v0.5-";
+ private static String VERSION = "v0.5-"; //$NON-NLS-1$
static File store(String filename) {
Bundle bundle = FrameworkUtil.getBundle(ManualModelStoreWiring.class);
@@ -52,13 +52,13 @@ public class ManualModelStoreWiring {
public static class ClassOverridesPatternsModelStore extends DefaultModelArchiveStore<IType, ClassOverridePatterns> {
static final Class gson = ClassOverridePatterns.class;
- static final String classifier = "ovrp";
+ static final String classifier = "ovrp"; //$NON-NLS-1$
@Inject
public ClassOverridesPatternsModelStore(final IModelRepository repository,
final JavaElementResolver jdtResolver, final IClasspathEntryInfoProvider cpeInfoProvider,
final IModelRepositoryIndex searchindex) {
- super(store("class-overrides-patterns.json"), classifier, repository, new IDependenciesFactory() {
+ super(store("class-overrides-patterns.json"), classifier, repository, new IDependenciesFactory() { //$NON-NLS-1$
@Override
public ModelArchiveResolutionJob newResolutionJob(ModelArchiveMetadata metadata, String classifier) {
@@ -79,12 +79,12 @@ public class ManualModelStoreWiring {
public static class ClassOverridesModelStore extends DefaultModelArchiveStore<IType, ClassOverrideDirectives> {
static final Class gson = ClassOverrideDirectives.class;
- static final String classifier = "ovrd";
+ static final String classifier = "ovrd"; //$NON-NLS-1$
@Inject
public ClassOverridesModelStore(final IModelRepository repository, final JavaElementResolver jdtResolver,
final IClasspathEntryInfoProvider cpeInfoProvider, final IModelRepositoryIndex searchindex) {
- super(store("class-overrides.json"), classifier, repository, new IDependenciesFactory() {
+ super(store("class-overrides.json"), classifier, repository, new IDependenciesFactory() { //$NON-NLS-1$
@Override
public ModelArchiveResolutionJob newResolutionJob(ModelArchiveMetadata metadata, String classifier) {
@@ -105,14 +105,14 @@ public class ManualModelStoreWiring {
public static class ClassSelfcallsModelStore extends DefaultModelArchiveStore<IType, ClassSelfcallDirectives> {
static final Class gson = ClassSelfcallDirectives.class;
- static final String classifier = "selfc";
+ static final String classifier = "selfc"; //$NON-NLS-1$
// XXX static final String classifier = "selfm";
@Inject
public ClassSelfcallsModelStore(final IModelRepository repository, final JavaElementResolver jdtResolver,
final IClasspathEntryInfoProvider cpeInfoProvider, final IModelRepositoryIndex searchindex) {
- super(store("class-selfcalls.json"), classifier, repository, new IDependenciesFactory() {
+ super(store("class-selfcalls.json"), classifier, repository, new IDependenciesFactory() { //$NON-NLS-1$
@Override
public ModelArchiveResolutionJob newResolutionJob(final ModelArchiveMetadata metadata, String classifier) {
@@ -133,12 +133,12 @@ public class ManualModelStoreWiring {
public static class MethodSelfcallsModelStore extends DefaultModelArchiveStore<IMethod, MethodSelfcallDirectives> {
static final Class gson = MethodSelfcallDirectives.class;
- static final String classifier = "selfm";
+ static final String classifier = "selfm"; //$NON-NLS-1$
@Inject
public MethodSelfcallsModelStore(final IModelRepository repository, final JavaElementResolver jdtResolver,
final IClasspathEntryInfoProvider cpeInfoProvider, final IModelRepositoryIndex searchindex) {
- super(store("method-selfcalls.json"), classifier, repository, new IDependenciesFactory() {
+ super(store("method-selfcalls.json"), classifier, repository, new IDependenciesFactory() { //$NON-NLS-1$
@Override
public ModelArchiveResolutionJob newResolutionJob(final ModelArchiveMetadata metadata, String classifier) {