Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2014-02-17 07:45:22 -0500
committerTomasz Zarna2014-02-17 07:45:22 -0500
commit1f6bc2cd2456540b6ef1535472f2ad7af013e498 (patch)
tree138af9f09f5d9ab358312d7d6cc0d15786dd413a /org.eclipse.mylyn.reviews.edit
parent1a8da3891bea60ce7cb6e1c4845d511124204273 (diff)
downloadorg.eclipse.mylyn.reviews-1f6bc2cd2456540b6ef1535472f2ad7af013e498.tar.gz
org.eclipse.mylyn.reviews-1f6bc2cd2456540b6ef1535472f2ad7af013e498.tar.xz
org.eclipse.mylyn.reviews-1f6bc2cd2456540b6ef1535472f2ad7af013e498.zip
415872: fix non-externalized string literal warnings in Reviews Edit
Bug: 415872 Change-Id: I54a0ab25fe7465396718472f88ae135f2812cd53 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=415872 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.reviews.edit')
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewItemProvider.java4
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewRequirementsMapItemProvider.java7
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/UserApprovalsMapItemProvider.java11
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/AbstractRemoteEditFactoryProvider.java16
-rw-r--r--org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/review/ReviewsRemoteEditFactoryProvider.java10
5 files changed, 21 insertions, 27 deletions
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewItemProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewItemProvider.java
index 71072686..1f795411 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewItemProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewItemProvider.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -224,7 +224,7 @@ public class ReviewItemProvider extends CommentContainerItemProvider implements
*/
@Override
public String getText(Object object) {
- String label = ((IReview) object).getId() + " / " + ((IReview) object).getMessage();
+ String label = ((IReview) object).getId() + " / " + ((IReview) object).getMessage(); //$NON-NLS-1$
return label == null || label.length() == 0 ? getString("_UI_Review_type") : //$NON-NLS-1$
label;
}
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewRequirementsMapItemProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewRequirementsMapItemProvider.java
index 3d0172f7..6a7dd6ef 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewRequirementsMapItemProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/ReviewRequirementsMapItemProvider.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -17,7 +17,6 @@ import java.util.Map;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -26,10 +25,8 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.mylyn.reviews.core.model.IApprovalType;
import org.eclipse.mylyn.reviews.core.model.IRequirementEntry;
-import org.eclipse.mylyn.reviews.core.model.IReviewsFactory;
import org.eclipse.mylyn.reviews.core.model.IUser;
import org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage;
@@ -114,7 +111,7 @@ public class ReviewRequirementsMapItemProvider extends ItemProviderAdapter imple
@Override
public String getText(Object object) {
Map.Entry<IApprovalType, IRequirementEntry> reviewRequirementsMap = (Map.Entry<IApprovalType, IRequirementEntry>) object;
- String text = "";
+ String text = ""; //$NON-NLS-1$
IUser user = reviewRequirementsMap.getValue().getBy();
if (user != null) {
text += user.getDisplayName();
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/UserApprovalsMapItemProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/UserApprovalsMapItemProvider.java
index e60b50e0..f482a4db 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/UserApprovalsMapItemProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/edit/provider/UserApprovalsMapItemProvider.java
@@ -4,7 +4,7 @@
* 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
*/
@@ -18,7 +18,6 @@ import java.util.Map.Entry;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -27,10 +26,8 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.mylyn.reviews.core.model.IApprovalType;
import org.eclipse.mylyn.reviews.core.model.IReviewerEntry;
-import org.eclipse.mylyn.reviews.core.model.IReviewsFactory;
import org.eclipse.mylyn.reviews.core.model.IUser;
import org.eclipse.mylyn.reviews.internal.core.model.ReviewsPackage;
@@ -116,11 +113,11 @@ public class UserApprovalsMapItemProvider extends ItemProviderAdapter implements
public String getText(Object object) {
Map.Entry<IUser, IReviewerEntry> userApprovalsMap = (Map.Entry<IUser, IReviewerEntry>) object;
Map<IApprovalType, Integer> approvals = userApprovalsMap.getValue().getApprovals();
- String approvalDescs = "";
+ String approvalDescs = ""; //$NON-NLS-1$
int i = 0;
for (Entry<IApprovalType, Integer> approval : approvals.entrySet()) {
- approvalDescs += approval.getKey().getName() + ": " + approval.getValue();
- approvalDescs += (i++ > 0 ? ", " : "");
+ approvalDescs += approval.getKey().getName() + ": " + approval.getValue(); //$NON-NLS-1$
+ approvalDescs += (i++ > 0 ? ", " : ""); //$NON-NLS-1$ //$NON-NLS-2$
}
return "" + userApprovalsMap.getKey().getDisplayName() + " -> " + approvalDescs; //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/AbstractRemoteEditFactoryProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/AbstractRemoteEditFactoryProvider.java
index ab8262aa..b1bea5c4 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/AbstractRemoteEditFactoryProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/AbstractRemoteEditFactoryProvider.java
@@ -77,7 +77,7 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
this.localKeyAttribute = localKeyAttribute;
this.childType = childType;
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("reviews", new ReviewsResourceFactory());
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("reviews", new ReviewsResourceFactory()); //$NON-NLS-1$
ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
@@ -140,7 +140,7 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
} catch (Exception e) {
//If anything else goes wrong, just delete and recreate the file anyway!
StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID,
- "Problem with model file. Will be recreated at: " + uri, e));
+ "Problem with model file. Will be recreated at: " + uri, e)); //$NON-NLS-1$
file.delete();
resource = editingDomain.getResourceSet().getResource(uri, loadOnDemand);
}
@@ -154,7 +154,7 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
}
}
if (eClass == null) {
- throw new RuntimeException("No instances of " + className + " found in "
+ throw new RuntimeException("No instances of " + className + " found in " //$NON-NLS-1$ //$NON-NLS-2$
+ emfFactory.getEPackage().getEClassifiers());
}
@@ -175,11 +175,11 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
save(resource);
} catch (AssertionError e) {
StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID,
- "Bad provider defintion. Local key attribute must be reference of class child type. Local Key: "
- + localKeyAttribute.getName() + " Class: " + eClass.getName(), e));
+ "Bad provider defintion. Local key attribute must be reference of class child type. Local Key: " //$NON-NLS-1$
+ + localKeyAttribute.getName() + " Class: " + eClass.getName(), e)); //$NON-NLS-1$
} catch (ClassCastException e) {
StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID,
- "Bad provider definition. Root remote refernce must match child type.", e));
+ "Bad provider definition. Root remote refernce must match child type.", e)); //$NON-NLS-1$
}
}
@@ -285,7 +285,7 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
try {
resource.save(saveOptions);
} catch (IOException e) {
- StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID, "Couldn't save model.", e));
+ StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID, "Couldn't save model.", e)); //$NON-NLS-1$
}
}
@@ -302,7 +302,7 @@ public abstract class AbstractRemoteEditFactoryProvider<ERootObject extends EObj
FileUtils.deleteDirectory(file);
} catch (IOException e) {
StatusHandler.log(new Status(IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID,
- "Problem when deleting cache.", e));
+ "Problem when deleting cache.", e)); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/review/ReviewsRemoteEditFactoryProvider.java b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/review/ReviewsRemoteEditFactoryProvider.java
index a8c83f3d..898bd846 100644
--- a/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/review/ReviewsRemoteEditFactoryProvider.java
+++ b/org.eclipse.mylyn.reviews.edit/src/org/eclipse/mylyn/reviews/spi/edit/remote/review/ReviewsRemoteEditFactoryProvider.java
@@ -55,21 +55,21 @@ public abstract class ReviewsRemoteEditFactoryProvider extends AbstractRemoteEdi
@Override
public String getContainerSegment() {
try {
- return taskRepository.getConnectorKind() + "-" + asFileName(taskRepository.getUrl());
+ return taskRepository.getConnectorKind() + "-" + asFileName(taskRepository.getUrl()); //$NON-NLS-1$
} catch (MalformedURLException e) {
RepositoryStatus.createStatus(taskRepository, IStatus.ERROR, ReviewsEditPluginActivator.PLUGIN_ID,
- "Bad repository url: " + taskRepository.getUrl());
- return "BadRepository";
+ "Bad repository url: " + taskRepository.getUrl()); //$NON-NLS-1$
+ return "BadRepository"; //$NON-NLS-1$
}
}
public static String asFileName(String urlString) throws MalformedURLException {
URL url = new URL(urlString);
- return url.getProtocol() + "-" + url.getHost() + "-" + url.getPath().replaceAll("/", "-");
+ return url.getProtocol() + "-" + url.getHost() + "-" + url.getPath().replace('/', '-'); //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
public String getFileExtension(EClass eClass) {
- return "reviews";
+ return "reviews"; //$NON-NLS-1$
}
}

Back to the top