NEW - bug 261582: [i18n] Preferences node "Usage Data Collector" has unexternalised strings: run Externalize Strings wizards
https://bugs.eclipse.org/bugs/show_bug.cgi?id=261582
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/META-INF/MANIFEST.MF b/plugins/org.eclipse.epp.usagedata.gathering/META-INF/MANIFEST.MF
index 8023c62..f54c738 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.epp.usagedata.gathering/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Usage Data Gathering Plug-in
+Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.epp.usagedata.gathering;singleton:=true
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.epp.usagedata.internal.gathering.UsageDataCaptureActivator
@@ -13,4 +13,4 @@
org.eclipse.epp.usagedata.internal.gathering.services;x-friends:="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.ui",
org.eclipse.epp.usagedata.internal.gathering.settings;x-friends:="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.ui"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/OSGI-INF/l10n/bundle.properties b/plugins/org.eclipse.epp.usagedata.gathering/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..0f0affa
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.gathering/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.epp.usagedata.gathering
+Bundle-Vendor.0 = Eclipse.org
+Bundle-Name.0 = Usage Data Gathering Plug-in
\ No newline at end of file
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/build.properties b/plugins/org.eclipse.epp.usagedata.gathering/build.properties
index 786b1df..570364f 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/build.properties
+++ b/plugins/org.eclipse.epp.usagedata.gathering/build.properties
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- about.html
+ about.html,\
+ OSGI-INF/l10n/bundle.properties
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/UsageDataCaptureActivator.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/UsageDataCaptureActivator.java
index 8cbdb12..94e1905 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/UsageDataCaptureActivator.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/UsageDataCaptureActivator.java
@@ -30,7 +30,7 @@
public class UsageDataCaptureActivator extends AbstractUIPlugin implements IStartup {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.gathering";
+ public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.gathering"; //$NON-NLS-1$
// The shared instance
private static UsageDataCaptureActivator plugin;
@@ -96,7 +96,7 @@
* In spite of the fact that the problem no longer exists, we're keeping
* the UIJob as this is a potentially expensive operation.
*/
- UIJob job = new UIJob("Usage Data Service Starter") {
+ UIJob job = new UIJob("Usage Data Service Starter") { //$NON-NLS-1$
public IStatus runInUIThread(IProgressMonitor monitor) {
if (settings.isEnabled()) {
service.startMonitoring();
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/BundleUsageMonitor.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/BundleUsageMonitor.java
index c5525fe..3da1ef9 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/BundleUsageMonitor.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/BundleUsageMonitor.java
@@ -27,6 +27,19 @@
*/
public class BundleUsageMonitor implements UsageMonitor {
+ private static final String BUNDLE_VERSION = "Bundle-Version"; //$NON-NLS-1$
+ private static final String UNKNOWN = "unknown"; //$NON-NLS-1$
+ private static final String UPDATED = "updated"; //$NON-NLS-1$
+ private static final String UNRESOLVED = "unresolved"; //$NON-NLS-1$
+ private static final String UNINSTALLED = "uninstalled"; //$NON-NLS-1$
+ private static final String STOPPING = "stopping"; //$NON-NLS-1$
+ private static final String STOPPED = "stopped"; //$NON-NLS-1$
+ private static final String STARTING = "starting"; //$NON-NLS-1$
+ private static final String RESOLVED = "resolved"; //$NON-NLS-1$
+ private static final String LAZY_ACTIVATION = "lazy_activation"; //$NON-NLS-1$
+ private static final String INSTALLED = "installed"; //$NON-NLS-1$
+ private static final String STARTED = "started"; //$NON-NLS-1$
+ private static final String BUNDLE = "bundle"; //$NON-NLS-1$
private BundleListener bundleUsageListener;
public void startMonitoring(final UsageDataService usageDataService) {
@@ -36,7 +49,7 @@
// Create an install a listener on the bundle context.
bundleUsageListener = new BundleListener() {
public void bundleChanged(BundleEvent event) {
- usageDataService.recordEvent(getWhatHappenedString(event), "bundle", event.getBundle().getSymbolicName(), event.getBundle().getSymbolicName(), getBundleVersion(event));
+ usageDataService.recordEvent(getWhatHappenedString(event), BUNDLE, event.getBundle().getSymbolicName(), event.getBundle().getSymbolicName(), getBundleVersion(event));
}
};
getBundleContext().addBundleListener(bundleUsageListener);
@@ -47,7 +60,7 @@
for (Bundle bundle : getBundleContext().getBundles()) {
if (bundle.getState() != Bundle.ACTIVE) continue;
String bundleId = bundle.getSymbolicName();
- usageDataService.recordEvent("started", "bundle", bundleId, bundleId, getBundleVersion(bundle));
+ usageDataService.recordEvent(STARTED, BUNDLE, bundleId, bundleId, getBundleVersion(bundle));
}
}
@@ -61,17 +74,17 @@
*/
protected String getWhatHappenedString(BundleEvent event) {
switch (event.getType()) {
- case BundleEvent.INSTALLED: return "installed";
- case BundleEvent.LAZY_ACTIVATION: return "lazy_activation";
- case BundleEvent.RESOLVED: return "resolved";
- case BundleEvent.STARTED: return "started";
- case BundleEvent.STARTING: return "starting";
- case BundleEvent.STOPPED: return "stopped";
- case BundleEvent.STOPPING: return "stopping";
- case BundleEvent.UNINSTALLED: return "uninstalled";
- case BundleEvent.UNRESOLVED: return "unresolved";
- case BundleEvent.UPDATED: return "updated";
- default: return "unknown";
+ case BundleEvent.INSTALLED: return INSTALLED;
+ case BundleEvent.LAZY_ACTIVATION: return LAZY_ACTIVATION;
+ case BundleEvent.RESOLVED: return RESOLVED;
+ case BundleEvent.STARTED: return STARTED;
+ case BundleEvent.STARTING: return STARTING;
+ case BundleEvent.STOPPED: return STOPPED;
+ case BundleEvent.STOPPING: return STOPPING;
+ case BundleEvent.UNINSTALLED: return UNINSTALLED;
+ case BundleEvent.UNRESOLVED: return UNRESOLVED;
+ case BundleEvent.UPDATED: return UPDATED;
+ default: return UNKNOWN;
}
}
@@ -80,7 +93,7 @@
}
private String getBundleVersion(Bundle bundle) {
- return (String)bundle.getHeaders().get("Bundle-Version");
+ return (String)bundle.getHeaders().get(BUNDLE_VERSION);
}
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/CommandUsageMonitor.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/CommandUsageMonitor.java
index ad4b7fd..3f02d2a 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/CommandUsageMonitor.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/CommandUsageMonitor.java
@@ -24,6 +24,12 @@
* @author Wayne Beaton
*/
public class CommandUsageMonitor implements UsageMonitor {
+ private static final String COMMANDS_EXTENSION_POINT = "org.eclipse.ui.commands"; //$NON-NLS-1$
+
+ private static final String COMMAND = "command"; //$NON-NLS-1$
+ private static final String EXECUTED = "executed"; //$NON-NLS-1$
+ private static final String FAILED = "failed"; //$NON-NLS-1$
+ private static final String NO_HANDLER = "no handler"; //$NON-NLS-1$
/**
* The {@link #executionListener} is installed into the {@link ICommandService}
@@ -36,15 +42,15 @@
public void startMonitoring(final UsageDataService usageDataService) {
executionListener = new IExecutionListener() {
public void notHandled(String commandId, NotHandledException exception) {
- recordEvent("no handler", usageDataService, commandId);
+ recordEvent(NO_HANDLER, usageDataService, commandId);
}
public void postExecuteFailure(String commandId, ExecutionException exception) {
- recordEvent("failed", usageDataService, commandId);
+ recordEvent(FAILED, usageDataService, commandId);
}
public void postExecuteSuccess(String commandId, Object returnValue) {
- recordEvent("executed", usageDataService, commandId);
+ recordEvent(EXECUTED, usageDataService, commandId);
}
public void preExecute(String commandId, ExecutionEvent event) {
@@ -52,7 +58,7 @@
}
};
getCommandService().addExecutionListener(executionListener);
- commandToBundleIdMapper = new ExtensionIdToBundleMapper("org.eclipse.ui.commands");
+ commandToBundleIdMapper = new ExtensionIdToBundleMapper(COMMANDS_EXTENSION_POINT);
}
private ICommandService getCommandService() {
@@ -67,7 +73,7 @@
private void recordEvent(String what,
final UsageDataService usageDataService, String commandId) {
- usageDataService.recordEvent(what, "command", commandId, getBundleId(commandId));
+ usageDataService.recordEvent(what, COMMAND, commandId, getBundleId(commandId));
}
/**
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/ExtensionIdToBundleMapper.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/ExtensionIdToBundleMapper.java
index 3e8262e..b1e04f7 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/ExtensionIdToBundleMapper.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/ExtensionIdToBundleMapper.java
@@ -95,7 +95,7 @@
map = new HashMap<String, String>();
IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(extensionPointId);
for (IConfigurationElement element : elements) {
- map.put(element.getAttribute("id"), element.getContributor().getName());
+ map.put(element.getAttribute("id"), element.getContributor().getName()); //$NON-NLS-1$
}
}
}
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/LogMonitor.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/LogMonitor.java
index e9718df..2d3c51f 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/LogMonitor.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/LogMonitor.java
@@ -25,8 +25,8 @@
*/
public class LogMonitor implements UsageMonitor {
- private static final String WHAT_ERROR = "error";
- private static final String KIND_LOG = "log";
+ private static final String WHAT_ERROR = "error"; //$NON-NLS-1$
+ private static final String KIND_LOG = "log"; //$NON-NLS-1$
private UsageDataService usageDataService;
ILogListener listener = new ILogListener() {
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/PartUsageMonitor.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/PartUsageMonitor.java
index 7d2ccbf..5b93af8 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/PartUsageMonitor.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/PartUsageMonitor.java
@@ -45,25 +45,40 @@
*
*/
public class PartUsageMonitor implements UsageMonitor {
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ private static final String WORKBENCH_BUNDLE_ID = "org.eclipse.ui.workbench"; //$NON-NLS-1$
+ private static final String PERSPECTIVES_EXTENSION_POINT = "org.eclipse.ui.perspectives"; //$NON-NLS-1$
+
+ private static final String WORKBENCH = "workbench"; //$NON-NLS-1$
+ private static final String PERSPECTIVE = "perspective"; //$NON-NLS-1$
+ private static final String DEACTIVATED = "deactivated"; //$NON-NLS-1$
+ private static final String ACTIVATED = "activated"; //$NON-NLS-1$
+ private static final String CLOSED = "closed"; //$NON-NLS-1$
+ private static final String OPENED = "opened"; //$NON-NLS-1$
+ private static final String PART = "part"; //$NON-NLS-1$
+ private static final String VIEW = "view"; //$NON-NLS-1$
+ private static final String EDITOR = "editor"; //$NON-NLS-1$
+
private UsageDataService usageDataService;
private IWindowListener windowListener = new IWindowListener() {
public void windowOpened(IWorkbenchWindow window) {
- recordEvent("opened", window);
+ recordEvent(OPENED, window);
hookListener(window);
}
public void windowClosed(IWorkbenchWindow window) {
- recordEvent("closed", window);
+ recordEvent(CLOSED, window);
unhookListeners(window);
}
public void windowActivated(IWorkbenchWindow window) {
- recordEvent("activated", window);
+ recordEvent(ACTIVATED, window);
}
public void windowDeactivated(IWorkbenchWindow window) {
- recordEvent("deactivated", window);
+ recordEvent(DEACTIVATED, window);
}
};
@@ -84,7 +99,7 @@
private IPartListener partListener = new IPartListener() {
public void partActivated(IWorkbenchPart part) {
- recordEvent("activated", part);
+ recordEvent(ACTIVATED, part);
}
public void partDeactivated(IWorkbenchPart part) {
@@ -96,17 +111,17 @@
}
public void partClosed(IWorkbenchPart part) {
- recordEvent("closed", part);
+ recordEvent(CLOSED, part);
}
public void partOpened(IWorkbenchPart part) {
- recordEvent("opened", part);
+ recordEvent(OPENED, part);
}
};
private IPerspectiveListener perspectiveListener = new IPerspectiveListener() {
public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
- recordEvent("activated", perspective);
+ recordEvent(ACTIVATED, perspective);
}
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
@@ -124,7 +139,7 @@
public void startMonitoring(UsageDataService usageDataService) {
this.usageDataService = usageDataService;
IWorkbench workbench = PlatformUI.getWorkbench();
- perspectiveToBundleIdMapper = new ExtensionIdToBundleMapper("org.eclipse.ui.perspectives");
+ perspectiveToBundleIdMapper = new ExtensionIdToBundleMapper(PERSPECTIVES_EXTENSION_POINT);
hookListeners(workbench);
}
@@ -201,7 +216,7 @@
private void hookListeners(IWorkbenchPage page) {
IPerspectiveDescriptor perspective = page.getPerspective();
if (perspective != null) {
- recordEvent("activated", perspective);
+ recordEvent(ACTIVATED, perspective);
}
page.addPartListener(partListener);
}
@@ -213,12 +228,12 @@
protected void recordEvent(String event, IWorkbenchWindow window) {
// TODO Hardcoding bundle id for now.
// TODO Does an IWorkbenchWindow have an id?
- usageDataService.recordEvent(event, "workbench", "", "org.eclipse.ui.workbench");
+ usageDataService.recordEvent(event, WORKBENCH, EMPTY_STRING, WORKBENCH_BUNDLE_ID);
}
protected void recordEvent(String event, IPerspectiveDescriptor perspective) {
String id = perspective.getId();
- usageDataService.recordEvent(event, "perspective", id, perspectiveToBundleIdMapper.getBundleId(id));
+ usageDataService.recordEvent(event, PERSPECTIVE, id, perspectiveToBundleIdMapper.getBundleId(id));
}
private void recordEvent(String event, IWorkbenchPart part) {
@@ -239,9 +254,9 @@
*/
private String getKind(IWorkbenchPartSite site) {
if (site instanceof IEditorSite)
- return "editor";
+ return EDITOR;
else if (site instanceof IViewSite)
- return "view";
- return "part";
+ return VIEW;
+ return PART;
}
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/SystemInfoMonitor.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/SystemInfoMonitor.java
index 3707339..9d7a3e1 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/SystemInfoMonitor.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/SystemInfoMonitor.java
@@ -28,13 +28,13 @@
*/
public class SystemInfoMonitor implements UsageMonitor {
- private static final String SYSINFO = "sysinfo";
+ private static final String SYSINFO = "sysinfo"; //$NON-NLS-1$
- private static final String INFO_PROCESSORS = "processors";
- private static final String INFO_LOCALE = "locale";
- private static final String INFO_WS = "ws";
- private static final String INFO_ARCH = "arch";
- private static final String INFO_OS = "os";
+ private static final String INFO_PROCESSORS = "processors"; //$NON-NLS-1$
+ private static final String INFO_LOCALE = "locale"; //$NON-NLS-1$
+ private static final String INFO_WS = "ws"; //$NON-NLS-1$
+ private static final String INFO_ARCH = "arch"; //$NON-NLS-1$
+ private static final String INFO_OS = "os"; //$NON-NLS-1$
/**
* This property contains a list of system properties that
@@ -48,20 +48,20 @@
* of a personal nature.
*/
private static final String[] SYSTEM_PROPERTIES = {
- "java.runtime.name",
- "java.runtime.version",
- "java.specification.name",
- "java.specification.vendor",
- "java.specification.version",
- "java.vendor",
- "java.version",
- "java.vm.info",
- "java.vm.name",
- "java.vm.specification.name",
- "java.vm.specification.vendor",
- "java.vm.specification.version",
- "java.vm.vendor",
- "java.vm.version"
+ "java.runtime.name", //$NON-NLS-1$
+ "java.runtime.version", //$NON-NLS-1$
+ "java.specification.name", //$NON-NLS-1$
+ "java.specification.vendor", //$NON-NLS-1$
+ "java.specification.version", //$NON-NLS-1$
+ "java.vendor", //$NON-NLS-1$
+ "java.version", //$NON-NLS-1$
+ "java.vm.info", //$NON-NLS-1$
+ "java.vm.name", //$NON-NLS-1$
+ "java.vm.specification.name", //$NON-NLS-1$
+ "java.vm.specification.vendor", //$NON-NLS-1$
+ "java.vm.specification.version", //$NON-NLS-1$
+ "java.vm.vendor", //$NON-NLS-1$
+ "java.vm.version" //$NON-NLS-1$
};
public void startMonitoring(UsageDataService usageDataService) {
@@ -76,7 +76,7 @@
usageDataService.recordEvent(INFO_WS, SYSINFO, Platform.getWS(), null);
usageDataService.recordEvent(INFO_LOCALE, SYSINFO, Platform.getNL(), null);
} catch (Exception e) {
- UsageDataCaptureActivator.getDefault().logException("Exception occurred while obtaining platform properties.", e);
+ UsageDataCaptureActivator.getDefault().logException("Exception occurred while obtaining platform properties.", e); //$NON-NLS-1$
}
usageDataService.recordEvent(INFO_PROCESSORS, SYSINFO, String.valueOf(Runtime.getRuntime().availableProcessors()), null);
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/services/UsageDataService.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/services/UsageDataService.java
index 3dce388..be8d874 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/services/UsageDataService.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/services/UsageDataService.java
@@ -53,7 +53,7 @@
*/
@SuppressWarnings("restriction")
public class UsageDataService {
- private static final String MONITORS_EXTENSION_POINT = UsageDataCaptureActivator.PLUGIN_ID + ".monitors";
+ private static final String MONITORS_EXTENSION_POINT = UsageDataCaptureActivator.PLUGIN_ID + ".monitors"; //$NON-NLS-1$
private boolean monitoring = false;
@@ -148,7 +148,7 @@
// TODO Decide if the job is more trouble than it's worth.
if (eventConsumerJob != null) return;
- eventConsumerJob = new Job("Usage Data Event consumer") {
+ eventConsumerJob = new Job("Usage Data Event consumer") { //$NON-NLS-1$
boolean cancelled = false;
public IStatus run(IProgressMonitor monitor) {
@@ -309,7 +309,7 @@
listener.accept(event);
} catch (Throwable e) {
// TODO Add some logic to remove repeat offenders.
- UsageDataCaptureActivator.getDefault().logException("The listener (" + listener.getClass() + ") threw an exception", e);
+ UsageDataCaptureActivator.getDefault().logException("The listener (" + listener.getClass() + ") threw an exception", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -337,8 +337,8 @@
* events will be relatively rare for the kinds of bundles we actually
* care about.
*/
- if (!("bundle".equals(event.kind))) return;
- if (!("started".equals(event.what))) return;
+ if (!("bundle".equals(event.kind))) return; //$NON-NLS-1$
+ if (!("started".equals(event.what))) return; //$NON-NLS-1$
synchronized (bundleVersionMap) {
bundleVersionMap.put(event.bundleId, event.bundleVersion);
@@ -370,10 +370,10 @@
.getConfigurationElementsFor(
MONITORS_EXTENSION_POINT);
for (IConfigurationElement element : elements) {
- if ("monitor".equals(element.getName())) {
+ if ("monitor".equals(element.getName())) { //$NON-NLS-1$
try {
- Object monitor = element.createExecutableExtension("class");
+ Object monitor = element.createExecutableExtension("class"); //$NON-NLS-1$
if (monitor instanceof UsageMonitor) {
startMonitor((UsageMonitor) monitor);
}
diff --git a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/settings/UsageDataCaptureSettings.java b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/settings/UsageDataCaptureSettings.java
index 34b4721..ae4e503 100644
--- a/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/settings/UsageDataCaptureSettings.java
+++ b/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/settings/UsageDataCaptureSettings.java
@@ -15,12 +15,12 @@
public class UsageDataCaptureSettings {
- public static final String CAPTURE_ENABLED_KEY = UsageDataCaptureActivator.PLUGIN_ID + ".enabled";
- public static final String USER_ACCEPTED_TERMS_OF_USE_KEY = UsageDataCaptureActivator.PLUGIN_ID + ".terms_accepted";
+ public static final String CAPTURE_ENABLED_KEY = UsageDataCaptureActivator.PLUGIN_ID + ".enabled"; //$NON-NLS-1$
+ public static final String USER_ACCEPTED_TERMS_OF_USE_KEY = UsageDataCaptureActivator.PLUGIN_ID + ".terms_accepted"; //$NON-NLS-1$
public boolean isEnabled() {
if (System.getProperties().containsKey(CAPTURE_ENABLED_KEY)) {
- return "true".equals(System.getProperty(CAPTURE_ENABLED_KEY));
+ return "true".equals(System.getProperty(CAPTURE_ENABLED_KEY)); //$NON-NLS-1$
} else if (getPreferencesStore().contains(CAPTURE_ENABLED_KEY)) {
return getPreferencesStore().getBoolean(CAPTURE_ENABLED_KEY);
} else {
diff --git a/plugins/org.eclipse.epp.usagedata.recording/META-INF/MANIFEST.MF b/plugins/org.eclipse.epp.usagedata.recording/META-INF/MANIFEST.MF
index b4818c6..1ca6b4c 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.epp.usagedata.recording/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Usage Data Recording Plug-in
+Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.epp.usagedata.recording;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.eclipse.epp.usagedata.internal.recording.UsageDataRecordingActivator
@@ -14,4 +14,4 @@
org.eclipse.epp.usagedata.internal.recording.filtering;x-friends:="org.eclipse.epp.usagedata.ui",
org.eclipse.epp.usagedata.internal.recording.settings;x-friends:="org.eclipse.epp.usagedata.ui",
org.eclipse.epp.usagedata.internal.recording.uploading;x-friends:="org.eclipse.epp.usagedata.ui"
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/plugins/org.eclipse.epp.usagedata.recording/OSGI-INF/l10n/bundle.properties b/plugins/org.eclipse.epp.usagedata.recording/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..3afe414
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.recording/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.epp.usagedata.recording
+Bundle-Vendor.0 = Eclipse.org
+Bundle-Name.0 = Usage Data Recording Plug-in
\ No newline at end of file
diff --git a/plugins/org.eclipse.epp.usagedata.recording/build.properties b/plugins/org.eclipse.epp.usagedata.recording/build.properties
index 786b1df..570364f 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/build.properties
+++ b/plugins/org.eclipse.epp.usagedata.recording/build.properties
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- about.html
+ about.html,\
+ OSGI-INF/l10n/bundle.properties
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorder.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorder.java
index 7a6aff4..f0ad8cb 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorder.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorder.java
@@ -149,7 +149,7 @@
}
events.clear();
} catch (IOException e) {
- handleException(e, "Error writing events to file.");
+ handleException(e, "Error writing events to file."); //$NON-NLS-1$
} finally {
close(writer);
}
@@ -157,7 +157,7 @@
private void handleException(IOException e, String message) {
if (exceptionCount++ > EXCEPTION_THRESHOLD) {
- UsageDataRecordingActivator.getDefault().log(IStatus.INFO, e, "The UsageDataRecorder has been stopped because it has caused too many exceptions");
+ UsageDataRecordingActivator.getDefault().log(IStatus.INFO, e, "The UsageDataRecorder has been stopped because it has caused too many exceptions"); //$NON-NLS-1$
stop();
}
UsageDataRecordingActivator.getDefault().log(IStatus.ERROR, e, message);
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorderUtils.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorderUtils.java
index 88eb0fd..6c06f5e 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorderUtils.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecorderUtils.java
@@ -29,18 +29,18 @@
* if writing to the {@link Writer} fails.
*/
public static void writeHeader(Writer writer) throws IOException {
- writer.write("what");
- writer.write(",");
- writer.write("kind");
- writer.write(",");
- writer.write("bundleId");
- writer.write(",");
- writer.write("bundleVersion");
- writer.write(",");
- writer.write("description");
- writer.write(",");
- writer.write("time");
- writer.write("\n");
+ writer.write("what"); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write("kind"); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write("bundleId"); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write("bundleVersion"); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write("description"); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write("time"); //$NON-NLS-1$
+ writer.write("\n"); //$NON-NLS-1$
}
/**
@@ -58,17 +58,17 @@
*/
public static void writeEvent(Writer writer, UsageDataEvent event) throws IOException {
writer.write(event.what);
- writer.write(",");
+ writer.write(","); //$NON-NLS-1$
writer.write(event.kind);
- writer.write(",");
- writer.write(event.bundleId != null ? event.bundleId : "");
- writer.write(",");
- writer.write(event.bundleVersion != null ? event.bundleVersion : "");
- writer.write(",");
- writer.write(event.description != null ? encode(event.description) : "");
- writer.write(",");
+ writer.write(","); //$NON-NLS-1$
+ writer.write(event.bundleId != null ? event.bundleId : ""); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write(event.bundleVersion != null ? event.bundleVersion : ""); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
+ writer.write(event.description != null ? encode(event.description) : ""); //$NON-NLS-1$
+ writer.write(","); //$NON-NLS-1$
writer.write(String.valueOf(event.when));
- writer.write("\n");
+ writer.write("\n"); //$NON-NLS-1$
}
/**
@@ -98,22 +98,22 @@
builder.append(next);
break;
case '\\' :
- builder.append("\\\\");
+ builder.append("\\\\"); //$NON-NLS-1$
break;
case '\n' :
- builder.append("\\n");
+ builder.append("\\n"); //$NON-NLS-1$
break;
case '\r' :
- builder.append("\\r");
+ builder.append("\\r"); //$NON-NLS-1$
break;
case '\b' :
- builder.append("\\b");
+ builder.append("\\b"); //$NON-NLS-1$
break;
case '\t' :
- builder.append("\\t");
+ builder.append("\\t"); //$NON-NLS-1$
break;
case '\f' :
- builder.append("\\f");
+ builder.append("\\f"); //$NON-NLS-1$
break;
default :
builder.append(next);
@@ -146,15 +146,15 @@
*/
public static String[] splitLine(String line) {
List<String> strings = new java.util.ArrayList<String>();
- Matcher matcher = Pattern.compile("(\"([^\"]|\"\")*\"|[^,]*)(,|$)").matcher(line);
+ Matcher matcher = Pattern.compile("(\"([^\"]|\"\")*\"|[^,]*)(,|$)").matcher(line); //$NON-NLS-1$
while (matcher.find()) {
String string = matcher.group();
// Remove leading commas.
- string = string.replaceAll(",$", "");
+ string = string.replaceAll(",$", ""); //$NON-NLS-1$ //$NON-NLS-2$
// Remove optional leading and trailing double-quotes.
- string = string.replaceAll("^?\"(.*)\"$", "$1");
+ string = string.replaceAll("^?\"(.*)\"$", "$1"); //$NON-NLS-1$ //$NON-NLS-2$
// Replace double double-quotes with a single double-quote
- string = string.replaceAll("\"\"", "\"");
+ string = string.replaceAll("\"\"", "\""); //$NON-NLS-1$ //$NON-NLS-2$
strings.add( string );
}
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
index 480a088..463f04c 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/UsageDataRecordingActivator.java
@@ -25,7 +25,7 @@
public class UsageDataRecordingActivator extends AbstractUIPlugin implements IStartup {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.recording";
+ public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.recording"; //$NON-NLS-1$
// The shared instance
private static UsageDataRecordingActivator plugin;
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/AbstractUsageDataEventFilter.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/AbstractUsageDataEventFilter.java
index 3947c54..d166117 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/AbstractUsageDataEventFilter.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/AbstractUsageDataEventFilter.java
@@ -41,8 +41,8 @@
StringBuilder builder = new StringBuilder();
for(int index=0;index<filter.length();index++) {
char next = filter.charAt(index);
- if (next == '*') builder.append(".*");
- else if (next == '.') builder.append("\\.");
+ if (next == '*') builder.append(".*"); //$NON-NLS-1$
+ else if (next == '.') builder.append("\\."); //$NON-NLS-1$
else builder.append(next);
}
return builder.toString();
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/FilterUtils.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/FilterUtils.java
index ffb404e..d52e9d0 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/FilterUtils.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/FilterUtils.java
@@ -34,16 +34,16 @@
index++;
}
if (builder.length() == 0) return getDefaultFilterSuggestion();
- builder.append("*");
+ builder.append("*"); //$NON-NLS-1$
return builder.toString();
}
public static String getDefaultFilterSuggestion() {
- return "com.*";
+ return "com.*"; //$NON-NLS-1$
}
public static boolean isValidBundleIdPattern(String pattern) {
- return pattern.matches("[a-zA-Z0-9\\*]+?(\\.[a-zA-Z0-9\\*]+?)*?");
+ return pattern.matches("[a-zA-Z0-9\\*]+?(\\.[a-zA-Z0-9\\*]+?)*?"); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/PreferencesBasedFilter.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/PreferencesBasedFilter.java
index a871560..77c23c1 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/PreferencesBasedFilter.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/filtering/PreferencesBasedFilter.java
@@ -67,7 +67,7 @@
public boolean includes(UsageDataEvent event) {
if (includeOnlyEclipseDotOrgBundles()) {
- return event.bundleId.startsWith("org.eclipse.");
+ return event.bundleId.startsWith("org.eclipse."); //$NON-NLS-1$
}
for (String filter : getFilterPatterns()) {
if (matches(filter, event.bundleId)) return false;
@@ -77,8 +77,8 @@
public String[] getFilterPatterns() {
String patternString = getPreferenceStore().getString(UsageDataRecordingSettings.FILTER_PATTERNS_KEY);
- if ("".equals(patternString)) return new String[0];
- return patternString.split("\n");
+ if ("".equals(patternString)) return new String[0]; //$NON-NLS-1$
+ return patternString.split("\n"); //$NON-NLS-1$
}
private boolean includeOnlyEclipseDotOrgBundles() {
@@ -94,7 +94,7 @@
if (patternString.trim().length() == 0) {
patternString = value;
} else {
- patternString += "\n" + value;
+ patternString += "\n" + value; //$NON-NLS-1$
}
getPreferenceStore().setValue(UsageDataRecordingSettings.FILTER_PATTERNS_KEY, patternString);
UsageDataRecordingActivator.getDefault().savePluginPreferences();
@@ -109,14 +109,14 @@
public void removeFilterPatterns(Object[] toRemove) {
String patternString = getPreferenceStore().getString(UsageDataRecordingSettings.FILTER_PATTERNS_KEY);
- String[] patterns = patternString.split("\n");
+ String[] patterns = patternString.split("\n"); //$NON-NLS-1$
StringBuilder builder = new StringBuilder();
- String separator = "";
+ String separator = ""; //$NON-NLS-1$
for (String pattern : patterns) {
if (!shouldRemovePattern(pattern, toRemove)) {
builder.append(separator);
builder.append(pattern);
- separator = "\n";
+ separator = "\n"; //$NON-NLS-1$
}
}
getPreferenceStore().setValue(UsageDataRecordingSettings.FILTER_PATTERNS_KEY, builder.toString());
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/settings/UsageDataRecordingSettings.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/settings/UsageDataRecordingSettings.java
index 4403722..053c66f 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/settings/UsageDataRecordingSettings.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/settings/UsageDataRecordingSettings.java
@@ -38,23 +38,23 @@
*/
public class UsageDataRecordingSettings implements UploadSettings {
- private static final String DEFAULT_ID = "unknown";
+ private static final String DEFAULT_ID = "unknown"; //$NON-NLS-1$
- private static final String UPLOAD_FILE_PREFIX = "upload";
+ private static final String UPLOAD_FILE_PREFIX = "upload"; //$NON-NLS-1$
- public static final String UPLOAD_PERIOD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".period";
- public static final String LAST_UPLOAD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".last-upload";
- public static final String ASK_TO_UPLOAD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".ask";
- public static final String LOG_SERVER_ACTIVITY_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".log-server";
- public static final String FILTER_ECLIPSE_BUNDLES_ONLY_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".filter-eclipse-only";
- public static final String FILTER_PATTERNS_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".filter-patterns";
+ public static final String UPLOAD_PERIOD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".period"; //$NON-NLS-1$
+ public static final String LAST_UPLOAD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".last-upload"; //$NON-NLS-1$
+ public static final String ASK_TO_UPLOAD_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".ask"; //$NON-NLS-1$
+ public static final String LOG_SERVER_ACTIVITY_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".log-server"; //$NON-NLS-1$
+ public static final String FILTER_ECLIPSE_BUNDLES_ONLY_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".filter-eclipse-only"; //$NON-NLS-1$
+ public static final String FILTER_PATTERNS_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".filter-patterns"; //$NON-NLS-1$
- static final String UPLOAD_URL_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".upload-url";
+ static final String UPLOAD_URL_KEY = UsageDataRecordingActivator.PLUGIN_ID + ".upload-url"; //$NON-NLS-1$
public static final int PERIOD_REASONABLE_MINIMUM = 60000;
// TODO 15 * 60 * 1000; // 15 minutes
static final int UPLOAD_PERIOD_DEFAULT = 5 * 24 * 60 * 60 * 1000; // five days
- static final String UPLOAD_URL_DEFAULT = "http://udc.eclipse.org/upload.php";
+ static final String UPLOAD_URL_DEFAULT = "http://udc.eclipse.org/upload.php"; //$NON-NLS-1$
static final boolean ASK_TO_UPLOAD_DEFAULT = true;
private PreferencesBasedFilter filter = new PreferencesBasedFilter();
@@ -79,7 +79,7 @@
// If we can't get it from this source, we'll pick it up some
// other way. Long the problem and move on.
UsageDataRecordingActivator.getDefault().log(IStatus.WARNING,
- e, "The UsageDataUploader cannot parse the %1$s system property (\"%2$s\"", UPLOAD_PERIOD_KEY, value);
+ e, "The UsageDataUploader cannot parse the %1$s system property (\"%2$s\"", UPLOAD_PERIOD_KEY, value); //$NON-NLS-1$
}
} else if (getPreferencesStore().contains(UPLOAD_PERIOD_KEY)) {
period = getPreferencesStore().getLong(UPLOAD_PERIOD_KEY);
@@ -134,7 +134,7 @@
* @return the {@link File} where usage data events are persisted.
*/
public File getEventFile() {
- return new File(getWorkingDirectory(), "usagedata.csv");
+ return new File(getWorkingDirectory(), "usagedata.csv"); //$NON-NLS-1$
}
/**
@@ -152,7 +152,7 @@
File file = null;
// TODO Unlikely (impossible?), but what if this spins forever.
while (true) {
- file = new File(parent, UPLOAD_FILE_PREFIX + index++ + ".csv");
+ file = new File(parent, UPLOAD_FILE_PREFIX + index++ + ".csv"); //$NON-NLS-1$
if (!file.exists())
return file;
}
@@ -168,8 +168,8 @@
* @return an identifier for the workstation.
*/
public String getUserId() {
- return getExistingOrGenerateId(new File(System.getProperty("user.home")), "." + UsageDataRecordingActivator.PLUGIN_ID
- + ".userId");
+ return getExistingOrGenerateId(new File(System.getProperty("user.home")), "." + UsageDataRecordingActivator.PLUGIN_ID //$NON-NLS-1$ //$NON-NLS-2$
+ + ".userId"); //$NON-NLS-1$
}
/**
@@ -181,8 +181,8 @@
* @return an identifier for the workspace.
*/
public String getWorkspaceId() {
- return getExistingOrGenerateId(getWorkingDirectory(), "."
- + UsageDataRecordingActivator.PLUGIN_ID + ".workspaceId");
+ return getExistingOrGenerateId(getWorkingDirectory(), "." //$NON-NLS-1$
+ + UsageDataRecordingActivator.PLUGIN_ID + ".workspaceId"); //$NON-NLS-1$
}
@@ -197,7 +197,7 @@
* @see UploadSettings#isLoggingServerActivity()
*/
public boolean isLoggingServerActivity() {
- return "true".equals(System.getProperty(LOG_SERVER_ACTIVITY_KEY));
+ return "true".equals(System.getProperty(LOG_SERVER_ACTIVITY_KEY)); //$NON-NLS-1$
}
/**
@@ -278,7 +278,7 @@
}
private void handleCannotReadFileException(File file, IOException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Cannot read the existing id from %1$s; using the default.", file.toString());
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Cannot read the existing id from %1$s; using the default.", file.toString()); //$NON-NLS-1$
}
private IPreferenceStore getPreferencesStore() {
@@ -325,7 +325,7 @@
public boolean shouldAskBeforeUploading() {
if (System.getProperties().containsKey(ASK_TO_UPLOAD_KEY)) {
- return "true".equals(System.getProperty(ASK_TO_UPLOAD_KEY));
+ return "true".equals(System.getProperty(ASK_TO_UPLOAD_KEY)); //$NON-NLS-1$
} else if (getPreferencesStore().contains(ASK_TO_UPLOAD_KEY)) {
return getPreferencesStore().getBoolean(ASK_TO_UPLOAD_KEY);
} else {
@@ -378,7 +378,7 @@
}
public String getUserAgent() {
- return "Eclipse UDC/" + UsageDataRecordingActivator.getDefault().getBundle().getHeaders().get("Bundle-Version");
+ return "Eclipse UDC/" + UsageDataRecordingActivator.getDefault().getBundle().getHeaders().get("Bundle-Version"); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getUploadUrl() {
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/AbstractUploader.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/AbstractUploader.java
index 336a2cc..a513da3 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/AbstractUploader.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/AbstractUploader.java
@@ -43,6 +43,6 @@
}
protected void checkValues() {
- if (uploadParameters == null) throw new RuntimeException("The UploadParameters must be set.");
+ if (uploadParameters == null) throw new RuntimeException("The UploadParameters must be set."); //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/BasicUploader.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/BasicUploader.java
index 4b49c09..f43a2c3 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/BasicUploader.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/BasicUploader.java
@@ -55,7 +55,7 @@
* This value identifies the user's workstation (which may
* include multiple Eclipse workspaces).
*/
- private static final String HTTP_USERID = "USERID";
+ private static final String HTTP_USERID = "USERID"; //$NON-NLS-1$
/**
* The HTTP_WORKSPACE constant is the key for the HTTP header
@@ -64,7 +64,7 @@
* A user may have more than one workspace and each will have
* a different workspace id.
*/
- private static final String HTTP_WORKSPACEID = "WORKSPACEID";
+ private static final String HTTP_WORKSPACEID = "WORKSPACEID"; //$NON-NLS-1$
/**
* The HTTP_TIME constant is the key for the HTTP header
@@ -73,9 +73,9 @@
* server, if desired, can account for differences in the clock
* between the user's workstation and the server.
*/
- private static final String HTTP_TIME = "TIME";
+ private static final String HTTP_TIME = "TIME"; //$NON-NLS-1$
- private static final String USER_AGENT = "User-Agent";
+ private static final String USER_AGENT = "User-Agent"; //$NON-NLS-1$
private boolean uploadInProgress = false;
@@ -99,7 +99,7 @@
checkValues();
if (uploadInProgress) return;
uploadInProgress = true;
- Job job = new Job("Uploading usage data...") {
+ Job job = new Job("Uploading usage data...") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
UploadResult result = upload(monitor);
@@ -130,21 +130,21 @@
long duration = System.currentTimeMillis() - start;
if (result.isSuccess()) {
- UsageDataRecordingActivator.getDefault().log(IStatus.INFO, "Usage data uploaded to %1$s in %2$s milliseconds.", getUploadUrl(), duration);
+ UsageDataRecordingActivator.getDefault().log(IStatus.INFO, "Usage data uploaded to %1$s in %2$s milliseconds.", getUploadUrl(), duration); //$NON-NLS-1$
} else {
- UsageDataRecordingActivator.getDefault().log(IStatus.INFO, "Usage data upload to %1$s failed with error code %2$s.", getUploadUrl(), result.getReturnCode());
+ UsageDataRecordingActivator.getDefault().log(IStatus.INFO, "Usage data upload to %1$s failed with error code %2$s.", getUploadUrl(), result.getReturnCode()); //$NON-NLS-1$
}
} catch (IllegalStateException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "The URL provided for usage data upload, %1$s, is invalid.", getUploadUrl());
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "The URL provided for usage data upload, %1$s, is invalid.", getUploadUrl()); //$NON-NLS-1$
} catch (UnknownHostException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "The usage data upload server at %1$s could not be found.", getUploadUrl());
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "The usage data upload server at %1$s could not be found.", getUploadUrl()); //$NON-NLS-1$
} catch (ConnectException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Could not connect to the usage data upload server at %1$s.", getUploadUrl());
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Could not connect to the usage data upload server at %1$s.", getUploadUrl()); //$NON-NLS-1$
} catch (InterruptedIOException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "A socket timeout occurred while trying to upload usage data.");
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "A socket timeout occurred while trying to upload usage data."); //$NON-NLS-1$
} catch (Exception e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "An exception occurred while trying to upload usage data.");
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "An exception occurred while trying to upload usage data."); //$NON-NLS-1$
}
return result;
@@ -167,7 +167,7 @@
* @throws Exception
*/
UploadResult doUpload(IProgressMonitor monitor) throws Exception {
- monitor.beginTask("Upload", getUploadParameters().getFiles().length + 3);
+ monitor.beginTask("Upload", getUploadParameters().getFiles().length + 3); //$NON-NLS-1$
/*
* The files that we have been provided with were determined while the recorder
* was suspended. We should be safe to work with these files without worrying
@@ -177,7 +177,7 @@
*/
// TODO Does it make sense to create a custom exception for this?
- if (!hasUserAuthorizedUpload()) throw new Exception("User has not authorized upload.");
+ if (!hasUserAuthorizedUpload()) throw new Exception("User has not authorized upload."); //$NON-NLS-1$
/*
* There appears to be some mechanism on some versions of HttpClient that
@@ -193,7 +193,7 @@
boolean loggingServerActivity = getSettings().isLoggingServerActivity();
if (loggingServerActivity) {
- post.setRequestHeader("LOGGING", "true");
+ post.setRequestHeader("LOGGING", "true"); //$NON-NLS-1$ //$NON-NLS-2$
}
post.setRequestEntity(new MultipartRequestEntity(getFileParts(monitor), post.getParams()));
@@ -247,7 +247,7 @@
response = post.getResponseBodyAsStream();
handleServerResponse(new BufferedReader(new InputStreamReader(response)));
} catch (IOException e) {
- UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Exception raised while parsing the server response");
+ UsageDataRecordingActivator.getDefault().log(IStatus.WARNING, e, "Exception raised while parsing the server response"); //$NON-NLS-1$
} finally {
try {
response.close();
@@ -277,7 +277,7 @@
String value = line.substring(colon + 1);
handleServerResponse(key, value);
} else {
- handleServerResponse("", line);
+ handleServerResponse("", line); //$NON-NLS-1$
}
}
}
@@ -311,7 +311,7 @@
for (File file : getUploadParameters().getFiles()) {
try {
// TODO Hook in a custom FilePart that filters contents.
- fileParts.add(new FilteredFilePart(monitor, "uploads[]", file));
+ fileParts.add(new FilteredFilePart(monitor, "uploads[]", file)); //$NON-NLS-1$
} catch (FileNotFoundException e) {
// If an exception occurs while creating the FilePart,
// ignore the error and move on. If this has happened,
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UploadManager.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UploadManager.java
index d0ed686..d9f21a5 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UploadManager.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UploadManager.java
@@ -127,11 +127,11 @@
*/
private Uploader getUploader() {
IConfigurationElement[] elements = Platform.getExtensionRegistry()
- .getConfigurationElementsFor(UsageDataRecordingActivator.PLUGIN_ID + ".uploader");
+ .getConfigurationElementsFor(UsageDataRecordingActivator.PLUGIN_ID + ".uploader"); //$NON-NLS-1$
for (IConfigurationElement element : elements) {
- if ("uploader".equals(element.getName())) {
+ if ("uploader".equals(element.getName())) { //$NON-NLS-1$
try {
- Object uploader = element.createExecutableExtension("class");
+ Object uploader = element.createExecutableExtension("class"); //$NON-NLS-1$
if (uploader instanceof Uploader) {
return (Uploader) uploader;
}
diff --git a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UsageDataFileReader.java b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UsageDataFileReader.java
index 7b15998..1b1063d 100644
--- a/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UsageDataFileReader.java
+++ b/plugins/org.eclipse.epp.usagedata.recording/src/org/eclipse/epp/usagedata/internal/recording/uploading/UsageDataFileReader.java
@@ -75,7 +75,7 @@
}
public void iterate(IProgressMonitor monitor, Iterator iterator) throws Exception {
- monitor.beginTask("Iterate over usage data file", IProgressMonitor.UNKNOWN);
+ monitor.beginTask("Iterate over usage data file", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
try {
// The first line is the header.
iterator.header(reader.readLine());
diff --git a/plugins/org.eclipse.epp.usagedata.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.epp.usagedata.ui/META-INF/MANIFEST.MF
index 01d5cdb..7a8551f 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.epp.usagedata.ui/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Usage Data UI Plug-in
+Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.epp.usagedata.ui;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.eclipse.epp.usagedata.internal.ui.Activator
@@ -18,4 +18,4 @@
org.eclipse.epp.usagedata.internal.ui.preview;x-internal:=true,
org.eclipse.epp.usagedata.internal.ui.uploaders;x-internal:=true,
org.eclipse.epp.usagedata.internal.ui.wizards;x-internal:=true
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor.0
diff --git a/plugins/org.eclipse.epp.usagedata.ui/OSGI-INF/l10n/bundle.properties b/plugins/org.eclipse.epp.usagedata.ui/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..8fe896c
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,7 @@
+#Properties file for org.eclipse.epp.usagedata.ui
+Bundle-Vendor.0 = Eclipse.org
+Bundle-Name.0 = Usage Data UI Plug-in
+page.name.0 = Usage Data Collector
+page.name.1 = Uploading
+page.name.2 = Terms of Use
+page.name.3 = Preview
\ No newline at end of file
diff --git a/plugins/org.eclipse.epp.usagedata.ui/build.properties b/plugins/org.eclipse.epp.usagedata.ui/build.properties
index 7ddb2be..022a170 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/build.properties
+++ b/plugins/org.eclipse.epp.usagedata.ui/build.properties
@@ -9,4 +9,5 @@
intro/,\
terms.html,\
toc.xml,\
- tocgettingstarted.xml
+ tocgettingstarted.xml,\
+ OSGI-INF/l10n/bundle.properties
diff --git a/plugins/org.eclipse.epp.usagedata.ui/plugin.xml b/plugins/org.eclipse.epp.usagedata.ui/plugin.xml
index a58ca9c..dbeab87 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/plugin.xml
+++ b/plugins/org.eclipse.epp.usagedata.ui/plugin.xml
@@ -6,25 +6,25 @@
<page
class="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataCapturePreferencesPage"
id="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataCapturePreferencesPage"
- name="Usage Data Collector">
+ name="%page.name.0">
</page>
<page
category="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataCapturePreferencesPage"
class="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingPreferencesPage"
id="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingPreferencesPage"
- name="Uploading">
+ name="%page.name.1">
</page>
<page
category="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataCapturePreferencesPage"
class="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingTermsOfUsePage"
id="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingTermsOfUsePage"
- name="Terms of Use">
+ name="%page.name.2">
</page>
<page
category="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataCapturePreferencesPage"
class="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingPreviewPage"
id="org.eclipse.epp.usagedata.internal.ui.preferences.UsageDataUploadingPreviewPage"
- name="Preview">
+ name="%page.name.3">
</page>
</extension>
<extension
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/Activator.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/Activator.java
index dcd4184..abafb51 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/Activator.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/Activator.java
@@ -21,7 +21,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.ui";
+ public static final String PLUGIN_ID = "org.eclipse.epp.usagedata.ui"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java
new file mode 100644
index 0000000..310bd52
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/Messages.java
@@ -0,0 +1,22 @@
+package org.eclipse.epp.usagedata.internal.ui.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.epp.usagedata.internal.ui.preferences.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataCapturePreferencesPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataCapturePreferencesPage.java
index 911c7f7..9df9ac8 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataCapturePreferencesPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataCapturePreferencesPage.java
@@ -44,7 +44,7 @@
};
public UsageDataCapturePreferencesPage() {
- setDescription("The Usage Data Collector collects information about how individuals are using the Eclipse platform. The intent is to use this data to help committers and organizations better understand how developers are using Eclipse.");
+ setDescription(Messages.getString("UsageDataCapturePreferencesPage.0")); //$NON-NLS-1$
setPreferenceStore(UsageDataCaptureActivator.getDefault().getPreferenceStore());
}
@@ -103,7 +103,7 @@
composite.setLayout(new GridLayout());
captureEnabledCheckbox = new Button(composite, SWT.CHECK | SWT.LEFT);
- captureEnabledCheckbox.setText("Enable capture");
+ captureEnabledCheckbox.setText(Messages.getString("UsageDataCapturePreferencesPage.1")); //$NON-NLS-1$
}
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
index d7f5905..9de20af 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingPreferencesPage.java
@@ -102,7 +102,7 @@
};
public UsageDataUploadingPreferencesPage() {
- setDescription("Information gathered by the Usage Data Collector is periodically uploaded to servers hosted by The Eclipse Foundation. ");
+ setDescription(Messages.getString("UsageDataUploadingPreferencesPage.0")); //$NON-NLS-1$
setPreferenceStore(UsageDataRecordingActivator.getDefault().getPreferenceStore());
}
@@ -230,7 +230,7 @@
composite.setLayout(new GridLayout());
askBeforeUploadingCheckbox = new Button(composite, SWT.CHECK | SWT.LEFT);
- askBeforeUploadingCheckbox.setText("Ask before uploading");
+ askBeforeUploadingCheckbox.setText(Messages.getString("UsageDataUploadingPreferencesPage.1")); //$NON-NLS-1$
}
@@ -239,7 +239,7 @@
*/
private void createUploadingArea(Composite parent) {
Group group = new Group(parent, SWT.NONE);
- group.setText("Uploading");
+ group.setText(Messages.getString("UsageDataUploadingPreferencesPage.2")); //$NON-NLS-1$
group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
group.setLayout(new GridLayout(3, false));
@@ -257,7 +257,7 @@
*/
private void createUploadPeriodField(Group composite) {
Label label = new Label(composite, SWT.NONE);
- label.setText("Upload Period:");
+ label.setText(Messages.getString("UsageDataUploadingPreferencesPage.3")); //$NON-NLS-1$
uploadPeriodText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.RIGHT);
uploadPeriodText.setTextLimit(2);
@@ -270,10 +270,10 @@
gc.dispose();
uploadPeriodText.setLayoutData(gridData);
- new Label(composite, SWT.NONE).setText("days");
+ new Label(composite, SWT.NONE).setText(Messages.getString("UsageDataUploadingPreferencesPage.4")); //$NON-NLS-1$
final ControlDecoration rangeErrorDecoration = new ControlDecoration(uploadPeriodText, SWT.LEFT | SWT.TOP);
- rangeErrorDecoration.setDescriptionText(MessageFormat.format("Enter a period between {0} and {1} days.", MINIMUM_PERIOD_IN_DAYS, MAXIMUM_PERIOD_IN_DAYS));
+ rangeErrorDecoration.setDescriptionText(MessageFormat.format(Messages.getString("UsageDataUploadingPreferencesPage.5"), MINIMUM_PERIOD_IN_DAYS, MAXIMUM_PERIOD_IN_DAYS)); //$NON-NLS-1$
rangeErrorDecoration.setImage(getErrorImage());
rangeErrorDecoration.hide();
@@ -316,7 +316,7 @@
*/
private void createLastUploadField(Group composite) {
label = new Label(composite, SWT.NONE);
- label.setText("Last Upload:");
+ label.setText(Messages.getString("UsageDataUploadingPreferencesPage.6")); //$NON-NLS-1$
lastUploadText = new Text(composite, SWT.SINGLE | SWT.BORDER);
lastUploadText.setEnabled(false);
@@ -356,7 +356,7 @@
*/
private void createUploadNowButton(Composite composite) {
uploadNowButton = new Button(composite, SWT.PUSH);
- uploadNowButton.setText("Upload Now");
+ uploadNowButton.setText(Messages.getString("UsageDataUploadingPreferencesPage.7")); //$NON-NLS-1$
uploadNowButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -372,7 +372,7 @@
FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
ControlDecoration warning = new ControlDecoration(control, SWT.BOTTOM | SWT.LEFT);
warning.setImage(decoration.getImage());
- warning.setDescriptionText("This value is being overridden by a System property.");
+ warning.setDescriptionText(Messages.getString("UsageDataUploadingPreferencesPage.8")); //$NON-NLS-1$
}
private String getLastUploadDateAsString() {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingTermsOfUsePage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingTermsOfUsePage.java
index 9e91204..ff80a25 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingTermsOfUsePage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/UsageDataUploadingTermsOfUsePage.java
@@ -54,7 +54,7 @@
browser.setUrl(getTermsOfUseUrl());
acceptTermsButton = new Button(composite, SWT.CHECK);
- acceptTermsButton.setText("I accept the Terms of Use");
+ acceptTermsButton.setText(Messages.getString("UsageDataUploadingTermsOfUsePage.0")); //$NON-NLS-1$
GridData gridData = new GridData(SWT.BEGINNING, SWT.FILL, true, false);
acceptTermsButton.setLayoutData(gridData);
@@ -71,7 +71,7 @@
}
private String getTermsOfUseUrl() {
- URL terms = FileLocator.find(Activator.getDefault().getBundle(), new Path("terms.html"), null);
+ URL terms = FileLocator.find(Activator.getDefault().getBundle(), new Path("terms.html"), null); //$NON-NLS-1$
try {
return FileLocator.toFileURL(terms).toString();
} catch (IOException e) {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties
new file mode 100644
index 0000000..4774792
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preferences/messages.properties
@@ -0,0 +1,12 @@
+UsageDataCapturePreferencesPage.0=The Usage Data Collector collects information about how individuals are using the Eclipse platform. The intent is to use this data to help committers and organizations better understand how developers are using Eclipse.
+UsageDataCapturePreferencesPage.1=Enable capture
+UsageDataUploadingPreferencesPage.0=Information gathered by the Usage Data Collector is periodically uploaded to servers hosted by The Eclipse Foundation.
+UsageDataUploadingPreferencesPage.1=Ask before uploading
+UsageDataUploadingPreferencesPage.2=Uploading
+UsageDataUploadingPreferencesPage.3=Upload Period:
+UsageDataUploadingPreferencesPage.4=days
+UsageDataUploadingPreferencesPage.5=Enter a period between {0} and {1} days.
+UsageDataUploadingPreferencesPage.6=Last Upload:
+UsageDataUploadingPreferencesPage.7=Upload Now
+UsageDataUploadingPreferencesPage.8=This value is being overridden by a System property.
+UsageDataUploadingTermsOfUsePage.0=I accept the Terms of Use
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/AddFilterDialog.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/AddFilterDialog.java
index d2d478f..a75ba9e 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/AddFilterDialog.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/AddFilterDialog.java
@@ -25,7 +25,7 @@
}
public void prompt(Shell shell, String suggestion) {
- InputDialog dialog = new InputDialog(shell, "New filter", "Provide a bundle name pattern. Bundles ids that match this pattern will not be uploaded.",suggestion, getValidator());
+ InputDialog dialog = new InputDialog(shell, Messages.getString("AddFilterDialog.0"), Messages.getString("AddFilterDialog.1"),suggestion, getValidator()); //$NON-NLS-1$ //$NON-NLS-2$
dialog.open();
if (dialog.getReturnCode() != InputDialog.OK) return;
@@ -38,8 +38,8 @@
if (pattern == null) return null;
pattern = pattern.trim();
if (pattern.length() == 0) return null;
- if (alreadyHasPattern(pattern)) return "You are already filtering this pattern.";
- if (!FilterUtils.isValidBundleIdPattern(pattern)) return "The pattern is not valid.";
+ if (alreadyHasPattern(pattern)) return Messages.getString("AddFilterDialog.2"); //$NON-NLS-1$
+ if (!FilterUtils.isValidBundleIdPattern(pattern)) return Messages.getString("AddFilterDialog.3"); //$NON-NLS-1$
return null;
}
};
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/Messages.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/Messages.java
new file mode 100644
index 0000000..e53e906
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/Messages.java
@@ -0,0 +1,22 @@
+package org.eclipse.epp.usagedata.internal.ui.preview;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.epp.usagedata.internal.ui.preview.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/RemoveFilterDialog.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/RemoveFilterDialog.java
index 15f9152..d8974eb 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/RemoveFilterDialog.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/RemoveFilterDialog.java
@@ -25,8 +25,8 @@
return super.getTableStyle() - SWT.SINGLE + SWT.MULTI;
}
};
- dialog.setTitle("Remove Filter");
- dialog.setMessage("Select one or more filters to remove.");
+ dialog.setTitle(Messages.getString("RemoveFilterDialog.0")); //$NON-NLS-1$
+ dialog.setMessage(Messages.getString("RemoveFilterDialog.1")); //$NON-NLS-1$
dialog.setAddCancelButton(true);
dialog.setLabelProvider(new LabelProvider() {
@Override
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/UploadPreview.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/UploadPreview.java
index 5348af2..372d9f6 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/UploadPreview.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/UploadPreview.java
@@ -138,7 +138,7 @@
colorBlack = parent.getDisplay().getSystemColor(SWT.COLOR_BLACK);
busyCursor = parent.getDisplay().getSystemCursor(SWT.CURSOR_WAIT);
- xImage = Activator.getDefault().getImageDescriptor("/icons/x.png").createImage(parent.getDisplay());
+ xImage = Activator.getDefault().getImageDescriptor("/icons/x.png").createImage(parent.getDisplay()); //$NON-NLS-1$
parent.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
@@ -149,8 +149,8 @@
private void createDescriptionText(Composite parent) {
FormText text = new FormText(parent, SWT.NONE);
- text.setImage("x", xImage);
- text.setText("<form><p>The following events have been captured by the Usage Data Collector. Those events marked with an <img href=\"x\"/> will not be uploaded. You can control what is uploaded by adding filters.</p></form>", true, false);
+ text.setImage("x", xImage); //$NON-NLS-1$
+ text.setText(Messages.getString("UploadPreview.2"), true, false); //$NON-NLS-1$
GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
layoutData.widthHint = 500;
text.setLayoutData(layoutData);
@@ -228,7 +228,7 @@
private void createWhatColumn() {
whatColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- whatColumn.setText("What");
+ whatColumn.setText(Messages.getString("UploadPreview.3")); //$NON-NLS-1$
whatColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -239,7 +239,7 @@
private void createKindColumn() {
kindColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- kindColumn.setText("Kind");
+ kindColumn.setText(Messages.getString("UploadPreview.4")); //$NON-NLS-1$
kindColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -250,7 +250,7 @@
private void createDescriptionColumn() {
descriptionColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- descriptionColumn.setText("Description");
+ descriptionColumn.setText(Messages.getString("UploadPreview.5")); //$NON-NLS-1$
descriptionColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -261,7 +261,7 @@
private void createBundleIdColumn() {
bundleIdColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- bundleIdColumn.setText("Bundle Id");
+ bundleIdColumn.setText(Messages.getString("UploadPreview.6")); //$NON-NLS-1$
bundleIdColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -272,7 +272,7 @@
private void createBundleVersionColumn() {
bundleVersionColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- bundleVersionColumn.setText("Version");
+ bundleVersionColumn.setText(Messages.getString("UploadPreview.7")); //$NON-NLS-1$
bundleVersionColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -283,7 +283,7 @@
private void createTimestampColumn() {
timestampColumn = new UsageDataTableViewerColumn(SWT.LEFT);
- timestampColumn.setText("When");
+ timestampColumn.setText(Messages.getString("UploadPreview.8")); //$NON-NLS-1$
timestampColumn.setLabelProvider(new UsageDataColumnProvider() {
@Override
public String getText(UsageDataEventWrapper event) {
@@ -322,7 +322,7 @@
private void createEclipseOnlyButton(Composite buttons) {
eclipseOnlyButton = new Button(buttons, SWT.CHECK);
- eclipseOnlyButton.setText("Only upload events from \"org.eclipse\" bundles");
+ eclipseOnlyButton.setText(Messages.getString("UploadPreview.9")); //$NON-NLS-1$
eclipseOnlyButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -349,7 +349,7 @@
private void createAddFilterButton(Composite parent) {
if (parameters.getFilter() instanceof PreferencesBasedFilter) {
addFilterButton = new Button(parent, SWT.PUSH);
- addFilterButton.setText("Add filter...");
+ addFilterButton.setText(Messages.getString("UploadPreview.10")); //$NON-NLS-1$
addFilterButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -362,7 +362,7 @@
private void createRemoveFilterButton(Composite parent) {
if (parameters.getFilter() instanceof PreferencesBasedFilter) {
removeFilterButton = new Button(parent, SWT.PUSH);
- removeFilterButton.setText("Remove filter...");
+ removeFilterButton.setText(Messages.getString("UploadPreview.11")); //$NON-NLS-1$
removeFilterButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -407,7 +407,7 @@
*/
synchronized void startContentJob() {
if (contentJob != null) return;
- contentJob = new Job("Generate Usage Data Upload Preview") {
+ contentJob = new Job("Generate Usage Data Upload Preview") { //$NON-NLS-1$
@Override
protected IStatus run(IProgressMonitor monitor) {
setTableCursor(busyCursor);
@@ -433,7 +433,7 @@
void processFiles(IProgressMonitor monitor) {
File[] files = parameters.getFiles();
- monitor.beginTask("Process Files", files.length);
+ monitor.beginTask("Process Files", files.length); //$NON-NLS-1$
for (File file : files) {
if (isDisposed()) break;
if (monitor.isCanceled()) break;
@@ -473,7 +473,7 @@
});
addEvents(events);
} catch (Exception e) {
- Activator.getDefault().log(IStatus.WARNING, e, "An error occurred while trying to read %1$s", file.getAbsolutePath());
+ Activator.getDefault().log(IStatus.WARNING, e, "An error occurred while trying to read %1$s", file.getAbsolutePath()); //$NON-NLS-1$
} finally {
try {
reader.close();
@@ -699,7 +699,7 @@
}
public String getText(UsageDataEventWrapper element) {
- return "";
+ return ""; //$NON-NLS-1$
}
public Image getImage(UsageDataEventWrapper element) {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/messages.properties b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/messages.properties
new file mode 100644
index 0000000..1489ed8
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/preview/messages.properties
@@ -0,0 +1,16 @@
+AddFilterDialog.0=New filter
+AddFilterDialog.1=Provide a bundle name pattern. Bundles ids that match this pattern will not be uploaded.
+AddFilterDialog.2=You are already filtering this pattern.
+AddFilterDialog.3=The pattern is not valid.
+RemoveFilterDialog.0=Remove Filter
+RemoveFilterDialog.1=Select one or more filters to remove.
+UploadPreview.10=Add filter...
+UploadPreview.11=Remove filter...
+UploadPreview.2=<form><p>The following events have been captured by the Usage Data Collector. Those events marked with an <img href="x"/> will not be uploaded. You can control what is uploaded by adding filters.</p></form>
+UploadPreview.3=What
+UploadPreview.4=Kind
+UploadPreview.5=Description
+UploadPreview.6=Bundle Id
+UploadPreview.7=Version
+UploadPreview.8=When
+UploadPreview.9=Only upload events from "org.eclipse" bundles
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/Messages.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/Messages.java
new file mode 100644
index 0000000..15252db
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/Messages.java
@@ -0,0 +1,22 @@
+package org.eclipse.epp.usagedata.internal.ui.wizards;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.epp.usagedata.internal.ui.wizards.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/SelectActionWizardPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/SelectActionWizardPage.java
index c9c5d26..1cc0be3 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/SelectActionWizardPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/SelectActionWizardPage.java
@@ -33,8 +33,8 @@
public class SelectActionWizardPage extends WizardPage {
// TODO Replace with proper values
- private static final String UDC_URL = "http://www.eclipse.org/org/usagedata/index.php";
- private static final String FAQ_URL = "http://www.eclipse.org/org/usagedata/faq.php";
+ private static final String UDC_URL = "http://www.eclipse.org/org/usagedata/index.php"; //$NON-NLS-1$
+ private static final String FAQ_URL = "http://www.eclipse.org/org/usagedata/faq.php"; //$NON-NLS-1$
private static final int WIDTH_HINT = 500;
@@ -45,10 +45,10 @@
private Button uploadNowRadio;
public SelectActionWizardPage(AskUserUploader uploader) {
- super("wizardPage");
+ super("wizardPage"); //$NON-NLS-1$
this.uploader = uploader;
- setTitle("Usage Data Upload");
- setDescription("It's time to upload your usage data.");
+ setTitle(Messages.getString("SelectActionWizardPage.3")); //$NON-NLS-1$
+ setDescription(Messages.getString("SelectActionWizardPage.4")); //$NON-NLS-1$
}
/**
@@ -58,15 +58,15 @@
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
- FormText greeting = createFormText(composite, "<form><p>The Eclipse <a href=\"udc\">Usage Data Collector</a> (UDC) has been collecting data on how you have been using the workbench. It would now like to upload the data to a server at the Eclipse Foundation.</p><p>You can preview the data before it is uploaded on the <a href=\"preview\">Preview page</a>.</p><p>Questions about the UDC? Check out our <a href=\"faq\">Frequently Asked Questions</a>.</p></form>");
+ FormText greeting = createFormText(composite, Messages.getString("SelectActionWizardPage.5")); //$NON-NLS-1$
greeting.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent event) {
- if ("udc".equals(event.getHref())) {
+ if ("udc".equals(event.getHref())) { //$NON-NLS-1$
browseTo(UDC_URL);
- } else if ("preview".equals(event.getHref())) {
+ } else if ("preview".equals(event.getHref())) { //$NON-NLS-1$
((AskUserUploaderWizard)getWizard()).showPreviewPage();
- } else if ("faq".equals(event.getHref())) {
+ } else if ("faq".equals(event.getHref())) { //$NON-NLS-1$
browseTo(FAQ_URL);
}
}
@@ -97,7 +97,7 @@
}
private String getTermsText() {
- return "<form><p>You agree to provide this data under the Usage Data Collector <a href=\"terms\">Terms of Use</a>.</p></form>";
+ return Messages.getString("SelectActionWizardPage.9"); //$NON-NLS-1$
}
private void createSpacer(Composite parent) {
@@ -108,23 +108,23 @@
}
private void createUploadNowRadio(Composite parent) {
- uploadNowRadio = createRadio(parent, "Upload now", AskUserUploader.UPLOAD_NOW);
- createDescriptionText(parent, "Upload the usage data now. Ask before uploading again.");
+ uploadNowRadio = createRadio(parent, Messages.getString("SelectActionWizardPage.10"), AskUserUploader.UPLOAD_NOW); //$NON-NLS-1$
+ createDescriptionText(parent, Messages.getString("SelectActionWizardPage.11")); //$NON-NLS-1$
}
private void createUploadAlwaysRadio(Composite parent) {
- uploadAlwaysRadio = createRadio(parent, "Upload always", AskUserUploader.UPLOAD_ALWAYS);
- createDescriptionText(parent, "Upload the usage data now. Don't ask next time; just do the upload in the background. Note that you can change this setting in the preferences.");
+ uploadAlwaysRadio = createRadio(parent, Messages.getString("SelectActionWizardPage.12"), AskUserUploader.UPLOAD_ALWAYS); //$NON-NLS-1$
+ createDescriptionText(parent, Messages.getString("SelectActionWizardPage.13")); //$NON-NLS-1$
}
private void createDontUploadRadio(Composite parent) {
- dontUploadRadio = createRadio(parent, "Don't upload now", AskUserUploader.DONT_UPLOAD);
- createDescriptionText(parent, "Do not upload usage data at this time. You will be asked to do the upload later.");
+ dontUploadRadio = createRadio(parent, Messages.getString("SelectActionWizardPage.14"), AskUserUploader.DONT_UPLOAD); //$NON-NLS-1$
+ createDescriptionText(parent, Messages.getString("SelectActionWizardPage.15")); //$NON-NLS-1$
}
private void createNeverUploadRadio(Composite parent) {
- neverUploadRadio = createRadio(parent, "Turn UDC feature off",AskUserUploader.NEVER_UPLOAD);
- createDescriptionText(parent, "Stop collecting data. The UDC will be turned off and data will never be uploaded.");
+ neverUploadRadio = createRadio(parent, Messages.getString("SelectActionWizardPage.16"),AskUserUploader.NEVER_UPLOAD); //$NON-NLS-1$
+ createDescriptionText(parent, Messages.getString("SelectActionWizardPage.17")); //$NON-NLS-1$
}
private Button createRadio(Composite parent, String label, final int action) {
@@ -185,7 +185,7 @@
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(url));
} catch (Exception e) {
- Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Error opening browser", e));
+ Activator.getDefault().getLog().log(new Status(Status.ERROR, Activator.PLUGIN_ID, "Error opening browser", e)); //$NON-NLS-1$
}
}
}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/TermsOfUseWizardPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/TermsOfUseWizardPage.java
index 8df43d1..d251a2d 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/TermsOfUseWizardPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/TermsOfUseWizardPage.java
@@ -33,9 +33,9 @@
private final AskUserUploader uploader;
public TermsOfUseWizardPage(AskUserUploader uploader) {
- super("wizardPage");
+ super("wizardPage"); //$NON-NLS-1$
this.uploader = uploader;
- setTitle("Terms of Use");
+ setTitle(Messages.getString("TermsOfUseWizardPage.1")); //$NON-NLS-1$
//setDescription("This wizard uploads captured usage data. Clearly a better description is required.");
}
@@ -51,7 +51,7 @@
browser.setUrl(getTermsOfUseUrl());
final Button acceptTermsButton = new Button(container, SWT.CHECK);
- acceptTermsButton.setText("I accept the Terms of Use");
+ acceptTermsButton.setText(Messages.getString("TermsOfUseWizardPage.2")); //$NON-NLS-1$
GridData gridData = new GridData(SWT.BEGINNING, SWT.FILL, true, false);
acceptTermsButton.setLayoutData(gridData);
acceptTermsButton.setSelection(uploader.hasUserAcceptedTermsOfUse());
@@ -68,7 +68,7 @@
}
private String getTermsOfUseUrl() {
- URL terms = FileLocator.find(Activator.getDefault().getBundle(), new Path("terms.html"), null);
+ URL terms = FileLocator.find(Activator.getDefault().getBundle(), new Path("terms.html"), null); //$NON-NLS-1$
try {
return FileLocator.toFileURL(terms).toString();
} catch (IOException e) {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/UploadPreviewPage.java b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/UploadPreviewPage.java
index 8c2d23b..7c3f38f 100644
--- a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/UploadPreviewPage.java
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/UploadPreviewPage.java
@@ -24,10 +24,10 @@
private final AskUserUploader uploader;
public UploadPreviewPage(AskUserUploader uploader) {
- super("wizardPage");
+ super("wizardPage"); //$NON-NLS-1$
this.uploader = uploader;
- setTitle("Upload Preview");
- setDescription("The following data will be uploaded.");
+ setTitle(Messages.getString("UploadPreviewPage.1")); //$NON-NLS-1$
+ setDescription(Messages.getString("UploadPreviewPage.2")); //$NON-NLS-1$
}
public void createControl(Composite parent) {
diff --git a/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/messages.properties b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/messages.properties
new file mode 100644
index 0000000..138b9e8
--- /dev/null
+++ b/plugins/org.eclipse.epp.usagedata.ui/src/org/eclipse/epp/usagedata/internal/ui/wizards/messages.properties
@@ -0,0 +1,16 @@
+SelectActionWizardPage.10=Upload now
+SelectActionWizardPage.11=Upload the usage data now. Ask before uploading again.
+SelectActionWizardPage.12=Upload always
+SelectActionWizardPage.13=Upload the usage data now. Don't ask next time; just do the upload in the background. Note that you can change this setting in the preferences.
+SelectActionWizardPage.14=Don't upload now
+SelectActionWizardPage.15=Do not upload usage data at this time. You will be asked to do the upload later.
+SelectActionWizardPage.16=Turn UDC feature off
+SelectActionWizardPage.17=Stop collecting data. The UDC will be turned off and data will never be uploaded.
+SelectActionWizardPage.3=Usage Data Upload
+SelectActionWizardPage.4=It's time to upload your usage data.
+SelectActionWizardPage.5=<form><p>The Eclipse <a href="udc">Usage Data Collector</a> (UDC) has been collecting data on how you have been using the workbench. It would now like to upload the data to a server at the Eclipse Foundation.</p><p>You can preview the data before it is uploaded on the <a href="preview">Preview page</a>.</p><p>Questions about the UDC? Check out our <a href="faq">Frequently Asked Questions</a>.</p></form>
+SelectActionWizardPage.9=<form><p>You agree to provide this data under the Usage Data Collector <a href="terms">Terms of Use</a>.</p></form>
+TermsOfUseWizardPage.1=Terms of Use
+TermsOfUseWizardPage.2=I accept the Terms of Use
+UploadPreviewPage.1=Upload Preview
+UploadPreviewPage.2=The following data will be uploaded.