Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2016-09-13 18:25:00 +0000
committerSam Davis2016-09-13 18:25:00 +0000
commitf208b13b818cfb58371c26d37b38ef18fdb3166e (patch)
treeeff2b7add4ec900588cde8bad337bb53f8edd0bf
parentde32d9a9e19e5fd8d0993cd2c1bab1f9706c92df (diff)
downloadorg.eclipse.mylyn.reviews-f208b13b818cfb58371c26d37b38ef18fdb3166e.tar.gz
org.eclipse.mylyn.reviews-f208b13b818cfb58371c26d37b38ef18fdb3166e.tar.xz
org.eclipse.mylyn.reviews-f208b13b818cfb58371c26d37b38ef18fdb3166e.zip
497534: externalize strings for o.e.m.reviews
Change-Id: I293bfa41df184a1c42be7e24b3621142add4dc8c Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=497534
-rw-r--r--org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/menus/DynamicMenuAddition.java10
-rw-r--r--org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/utils/GerritServerUtility.java50
-rw-r--r--org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/TaskBuildStatusMapper.java2
-rw-r--r--org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/editors/parts/TaskReview.java4
4 files changed, 31 insertions, 35 deletions
diff --git a/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/menus/DynamicMenuAddition.java b/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/menus/DynamicMenuAddition.java
index 452afed98..7e5be597b 100644
--- a/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/menus/DynamicMenuAddition.java
+++ b/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/menus/DynamicMenuAddition.java
@@ -44,7 +44,7 @@ public class DynamicMenuAddition extends CompoundContributionItem implements IWo
* Field SELECT_PICTURE_FILE. (value is ""icons/select.png"")
*/
// private String SELECT_PICTURE_FILE = "icons/select.png";
- private static String SELECT_PICTURE_FILE = "icons/select.gif";
+ private static String SELECT_PICTURE_FILE = "icons/select.gif"; //$NON-NLS-1$
/**
* Note: An image registry owns all of the image objects registered with it, and automatically disposes of them the
@@ -75,7 +75,7 @@ public class DynamicMenuAddition extends CompoundContributionItem implements IWo
@Override
protected IContributionItem[] getContributionItems() {
- GerritPlugin.Ftracer.traceInfo("\t\t DynamicMenuAddition .getContributionItems()");
+ GerritPlugin.Ftracer.traceInfo("\t\t DynamicMenuAddition .getContributionItems()"); //$NON-NLS-1$
CommandContributionItem[] contributionItems = new CommandContributionItem[0];
if (fServer != null) {
fMapServer = GerritServerUtility.getGerritMapping();
@@ -84,13 +84,13 @@ public class DynamicMenuAddition extends CompoundContributionItem implements IWo
if (fMapServer != null && !fMapServer.isEmpty()) {
Set<TaskRepository> mapSet = fMapServer.keySet();
String lastSelected = fServer.getLastSavedGerritServer();
- GerritPlugin.Ftracer.traceInfo("-------------------");
+ GerritPlugin.Ftracer.traceInfo("-------------------"); //$NON-NLS-1$
int size = mapSet.size();
contributionItems = new CommandContributionItem[size];
int count = 0;
for (TaskRepository key : mapSet) {
- GerritPlugin.Ftracer.traceInfo("Map Key: " + key.getRepositoryLabel() + "\t URL: "
+ GerritPlugin.Ftracer.traceInfo("Map Key: " + key.getRepositoryLabel() + "\t URL: " //$NON-NLS-1$ //$NON-NLS-2$
+ fMapServer.get(key));
CommandContributionItemParameter contributionParameter = new CommandContributionItemParameter(
fServiceLocator, fMapServer.get(key), UIConstants.ADD_GERRIT_SITE_COMMAND_ID,
@@ -116,7 +116,7 @@ public class DynamicMenuAddition extends CompoundContributionItem implements IWo
//Read the Gerrit potential servers
fServer = new GerritServerUtility();
- GerritPlugin.Ftracer.traceInfo("\t\t DynamicMenuAddition .initialize()()");
+ GerritPlugin.Ftracer.traceInfo("\t\t DynamicMenuAddition .initialize()()"); //$NON-NLS-1$
}
diff --git a/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/utils/GerritServerUtility.java b/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/utils/GerritServerUtility.java
index df6e40134..242b80a2e 100644
--- a/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/utils/GerritServerUtility.java
+++ b/org.eclipse.mylyn.gerrit.dashboard.ui/src/org/eclipse/mylyn/gerrit/dashboard/internal/utils/GerritServerUtility.java
@@ -1,11 +1,11 @@
/*******************************************************************************
* Copyright (c) 2013, 2014 Ericsson
- *
+ *
* 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:
* Jacques Bouthillier - Initial Implementation of the server selection
******************************************************************************/
@@ -35,7 +35,7 @@ import org.eclipse.mylyn.tasks.core.TaskRepository;
/**
* This class implements some utility for the Gerrit servers.
- *
+ *
* @author Jacques Bouthillier
* @version $Revision: 1.0 $
*/
@@ -49,7 +49,7 @@ public class GerritServerUtility {
/**
* Field LAST_GERRIT_FILE. (value is ""lastGerrit.txt"")
*/
- private static final String LAST_GERRIT_FILE = "lastGerrit.txt";
+ private static final String LAST_GERRIT_FILE = "lastGerrit.txt"; //$NON-NLS-1$
// ------------------------------------------------------------------------
// Variables
@@ -73,7 +73,7 @@ public class GerritServerUtility {
/**
* Map the configured Gerrit server found in the TaskList
- *
+ *
* @return Map<TaskRepository, String>
*/
private Map<TaskRepository, String> mapConfiguredGerritServer() {
@@ -83,24 +83,24 @@ public class GerritServerUtility {
TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
//Only get the TaskRepository related to Gerrit review connnector
- GerritPlugin.Ftracer.traceInfo("--------Review repo ---------------");
+ GerritPlugin.Ftracer.traceInfo("--------Review repo ---------------"); //$NON-NLS-1$
Set<TaskRepository> reviewRepo = repositoryManager.getRepositories(GerritConnector.CONNECTOR_KIND);
for (TaskRepository taskRepo : reviewRepo) {
- GerritPlugin.Ftracer.traceInfo("Add Gerrit Review repo: " + taskRepo.getRepositoryLabel() + "\t url: "
+ GerritPlugin.Ftracer.traceInfo("Add Gerrit Review repo: " + taskRepo.getRepositoryLabel() + "\t url: " //$NON-NLS-1$ //$NON-NLS-2$
+ taskRepo.getRepositoryUrl());
fResultTask.put(taskRepo, taskRepo.getRepositoryUrl());
if (null != taskRepo.getRepositoryUrl()) {
adjustTemplatemanager(taskRepo);
}
}
- //Print a the end the info for all Gerrit
+ //Print a the end the info for all Gerrit
printRepositoryTemplate();
return fResultTask;
}
/**
* Build a list of Gerrit server to display in the combo box in the dialogue window
- *
+ *
* @param aTaskRepo
*/
private void adjustTemplatemanager(TaskRepository aTaskRepo) {
@@ -109,8 +109,8 @@ public class GerritServerUtility {
Boolean found = false;
for (RepositoryTemplate template : templateManager.getTemplates(GerritConnector.CONNECTOR_KIND)) {
String convertedRemoteURL = aTaskRepo.getRepositoryUrl();
- GerritPlugin.Ftracer.traceInfo("\t template.label: " + template.label + "\t repo label: "
- + aTaskRepo.getRepositoryLabel() + " repo getname: " + convertedRemoteURL);
+ GerritPlugin.Ftracer.traceInfo("\t template.label: " + template.label + "\t repo label: " //$NON-NLS-1$ //$NON-NLS-2$
+ + aTaskRepo.getRepositoryLabel() + " repo getname: " + convertedRemoteURL); //$NON-NLS-1$
//Test the name and the remoteURL to reduce duplications
if (template.label.equals(aTaskRepo.getRepositoryLabel())
|| template.repositoryUrl.equals(convertedRemoteURL)) {
@@ -126,10 +126,10 @@ public class GerritServerUtility {
//Create a repository template
RepositoryTemplate templateTest = new RepositoryTemplate(aTaskRepo.getRepositoryLabel(),
- aTaskRepo.getRepositoryUrl(), aTaskRepo.getCharacterEncoding(), aTaskRepo.getVersion(), "", "", "",
+ aTaskRepo.getRepositoryUrl(), aTaskRepo.getCharacterEncoding(), aTaskRepo.getVersion(), "", "", "", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
aTaskRepo.getUserName(), anonymous, true);
- //Set the attributes
+ //Set the attributes
Map<String, String> attributes = aTaskRepo.getProperties();
Set<Entry<String, String>> value = attributes.entrySet();
@@ -144,10 +144,10 @@ public class GerritServerUtility {
private void printRepositoryTemplate() {
RepositoryTemplateManager templateManager = TasksUiPlugin.getRepositoryTemplateManager();
for (RepositoryTemplate template : templateManager.getTemplates(GerritConnector.CONNECTOR_KIND)) {
- GerritPlugin.Ftracer.traceInfo("------------======================------------------");
+ GerritPlugin.Ftracer.traceInfo("------------======================------------------"); //$NON-NLS-1$
Set<Entry<String, String>> value = template.getAttributes().entrySet();
for (Map.Entry<String, String> entry : value) {
- GerritPlugin.Ftracer.traceInfo("key: " + entry.getKey() + "\tvalue: " + entry.getValue());
+ GerritPlugin.Ftracer.traceInfo("key: " + entry.getKey() + "\tvalue: " + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
@@ -171,7 +171,7 @@ public class GerritServerUtility {
/**
* Return the mapping of the available Gerrit server used in the user workspace
- *
+ *
* @return Map<Repository, String>
*/
public static Map<TaskRepository, String> getGerritMapping() {
@@ -180,7 +180,7 @@ public class GerritServerUtility {
/**
* Save the selected Gerrit server URL
- *
+ *
* @param aURL
* @return Boolean
*/
@@ -202,7 +202,7 @@ public class GerritServerUtility {
/**
* Return the last selected Gerrit server used
- *
+ *
* @return String
*/
public String getLastSavedGerritServer() {
@@ -215,7 +215,7 @@ public class GerritServerUtility {
lastGerritURL = in.readLine();
in.close();
} catch (IOException e1) {
- //When there is no file,
+ //When there is no file,
//e1.printStackTrace();
}
}
@@ -224,7 +224,7 @@ public class GerritServerUtility {
/**
* Get the Gerrit URL based on the provided string
- *
+ *
* @param Menu
* string aSt
* @return URL as a string
@@ -233,12 +233,12 @@ public class GerritServerUtility {
String urlStr = null;
if (!fResultTask.isEmpty()) {
Set<TaskRepository> mapSet = fResultTask.keySet();
- GerritPlugin.Ftracer.traceInfo("-------------------");
+ GerritPlugin.Ftracer.traceInfo("-------------------"); //$NON-NLS-1$
for (TaskRepository key : mapSet) {
if (key.getRepositoryLabel().equals(aSt)) {
urlStr = fResultTask.get(key);
- GerritPlugin.Ftracer.traceInfo("Map Key: " + key.getRepositoryLabel() + "\t URL: "
+ GerritPlugin.Ftracer.traceInfo("Map Key: " + key.getRepositoryLabel() + "\t URL: " //$NON-NLS-1$ //$NON-NLS-2$
+ fResultTask.get(key));
return urlStr;
}
@@ -250,7 +250,7 @@ public class GerritServerUtility {
/**
* Get the Gerrit task Repository
- *
+ *
* @param string
* aSt
* @return TaskRepository
@@ -259,11 +259,11 @@ public class GerritServerUtility {
if (aStURL != null && !fResultTask.isEmpty()) {
Set<TaskRepository> mapSet = fResultTask.keySet();
- GerritPlugin.Ftracer.traceInfo("-------------------");
+ GerritPlugin.Ftracer.traceInfo("-------------------"); //$NON-NLS-1$
for (TaskRepository key : mapSet) {
if (key.getRepositoryUrl().equals(aStURL)) {
- GerritPlugin.Ftracer.traceInfo("Key label : " + key.getRepositoryLabel() + "\t URL: "
+ GerritPlugin.Ftracer.traceInfo("Key label : " + key.getRepositoryLabel() + "\t URL: " //$NON-NLS-1$ //$NON-NLS-2$
+ fResultTask.get(key));
return key;
}
diff --git a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/TaskBuildStatusMapper.java b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/TaskBuildStatusMapper.java
index 504acace6..bd175f9cb 100644
--- a/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/TaskBuildStatusMapper.java
+++ b/org.eclipse.mylyn.reviews.core/src/org/eclipse/mylyn/reviews/internal/core/TaskBuildStatusMapper.java
@@ -29,7 +29,7 @@ import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;
public class TaskBuildStatusMapper {
- public static final String BUILD_RESULT_TYPE = "BuildResult";
+ public static final String BUILD_RESULT_TYPE = "BuildResult"; //$NON-NLS-1$
public static final String JOB_NAME_ATTRIBUTE_KEY = "JOB"; //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/editors/parts/TaskReview.java b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/editors/parts/TaskReview.java
index d2d5e83ef..7ff70460f 100644
--- a/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/editors/parts/TaskReview.java
+++ b/org.eclipse.mylyn.reviews.ui/src/org/eclipse/mylyn/internal/reviews/ui/editors/parts/TaskReview.java
@@ -49,10 +49,6 @@ public class TaskReview implements IAdaptable {
}
}
- public String getIncomingChanges() {
- return review.getAttribute("INCOMING_REVIEW");
- }
-
public String getUrl() {
return review.getUrl();
}

Back to the top