diff options
author | Sam Davis | 2014-08-19 22:36:56 +0000 |
---|---|---|
committer | Sam Davis | 2014-08-19 22:36:56 +0000 |
commit | 9fa08ac3dd3fd0866837970c87fcb84dccfa88d3 (patch) | |
tree | 5bbed0f2877bd7668e650ef03ee150aae2d3124d | |
parent | aa8f1aa234d641dcdc188978f9e7be7794416231 (diff) | |
download | org.eclipse.mylyn.context-9fa08ac3dd3fd0866837970c87fcb84dccfa88d3.tar.gz org.eclipse.mylyn.context-9fa08ac3dd3fd0866837970c87fcb84dccfa88d3.tar.xz org.eclipse.mylyn.context-9fa08ac3dd3fd0866837970c87fcb84dccfa88d3.zip |
fix NLS warningsR_3_13_0e_4_4_m_3_13_x
Change-Id: Idcbafdc31bd8ac70db78ab2941850a6cb91fce93
4 files changed, 34 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextMementoMigrator.java b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextMementoMigrator.java index 1772c34c3..4a53b6ce6 100644 --- a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextMementoMigrator.java +++ b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/ContextMementoMigrator.java @@ -94,7 +94,7 @@ public class ContextMementoMigrator { IEclipsePreferences[] perspectiveNodes = perspectivePreferenceStore.getPreferenceNodes(false); IEclipsePreferences[] editorNodes = editorPreferenceStore.getPreferenceNodes(false); - monitor.beginTask("Migrating context information", 100); + monitor.beginTask(Messages.ContextMementoMigrator_0, 100); if (editorNodes.length > 0) { String[] keys; @@ -212,8 +212,8 @@ public class ContextMementoMigrator { private void write(ContextState state, ITask task) throws IOException, CoreException { ICommonStorable storable = ((TaskContextStore) TasksUiPlugin.getContextStore()).getStorable(task); try { - if (!storable.exists("context-state.xml")) { - OutputStream out = storable.write("context-state.xml", null); + if (!storable.exists("context-state.xml")) { //$NON-NLS-1$ + OutputStream out = storable.write("context-state.xml", null); //$NON-NLS-1$ try { stateManager.write(out, state); } finally { diff --git a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/Messages.java b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/Messages.java new file mode 100644 index 000000000..2b98f46e1 --- /dev/null +++ b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/Messages.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014 Tasktop Technologies and others. + * 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: + * Tasktop Technologies - initial API and implementation + *******************************************************************************/ + +package org.eclipse.mylyn.internal.context.tasks.ui; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.context.tasks.ui.messages"; //$NON-NLS-1$ + + public static String ContextMementoMigrator_0; + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/messages.properties b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/messages.properties new file mode 100644 index 000000000..330097572 --- /dev/null +++ b/org.eclipse.mylyn.context.tasks.ui/src/org/eclipse/mylyn/internal/context/tasks/ui/messages.properties @@ -0,0 +1 @@ +ContextMementoMigrator_0=Migrating context information diff --git a/org.eclipse.mylyn.java.tasks/src/org/eclipse/mylyn/internal/java/tasks/JavaStackTraceFileHyperlink.java b/org.eclipse.mylyn.java.tasks/src/org/eclipse/mylyn/internal/java/tasks/JavaStackTraceFileHyperlink.java index faba674e5..68a316607 100644 --- a/org.eclipse.mylyn.java.tasks/src/org/eclipse/mylyn/internal/java/tasks/JavaStackTraceFileHyperlink.java +++ b/org.eclipse.mylyn.java.tasks/src/org/eclipse/mylyn/internal/java/tasks/JavaStackTraceFileHyperlink.java @@ -111,12 +111,12 @@ public class JavaStackTraceFileHyperlink implements IHyperlink, IHighlightingHyp // TODO e3.8 remove reflection try { // e3.7 and earlier: OpenTypeAction.findTypeInWorkspace(typeName); - Method findTypeInWorspace = OpenTypeAction.class.getDeclaredMethod("findTypeInWorkspace", + Method findTypeInWorspace = OpenTypeAction.class.getDeclaredMethod("findTypeInWorkspace", //$NON-NLS-1$ String.class); result = findTypeInWorspace.invoke(null, typeName); } catch (NoSuchMethodException e) { // e3.8: OpenTypeAction.findTypeInWorkspace(typeName, false); - Method findTypeInWorspace = OpenTypeAction.class.getDeclaredMethod("findTypeInWorkspace", + Method findTypeInWorspace = OpenTypeAction.class.getDeclaredMethod("findTypeInWorkspace", //$NON-NLS-1$ String.class, boolean.class); result = findTypeInWorspace.invoke(null, typeName, false); } @@ -131,7 +131,7 @@ public class JavaStackTraceFileHyperlink implements IHyperlink, IHighlightingHyp if (!reflectionErrorLogged) { reflectionErrorLogged = true; StatusManager.getManager().handle( - new Status(IStatus.ERROR, ID_PLUGIN, "Unexpected error searching for Java type", e), + new Status(IStatus.ERROR, ID_PLUGIN, "Unexpected error searching for Java type", e), //$NON-NLS-1$ StatusManager.LOG); } } |