Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Xenos2016-03-23 17:17:44 +0000
committerSergey Prigogin2016-03-23 17:42:58 +0000
commit7d0b201368e91209b32a427f1467277d69b65e7f (patch)
tree1a090b7562d5876dbc2f8feeec2ab0bdf809931d
parentc8820b438ce70197e7abf06ca19bffe31bcc2387 (diff)
downloadeclipse.platform.team-Y20160331-1000.tar.gz
eclipse.platform.team-Y20160331-1000.tar.xz
eclipse.platform.team-Y20160331-1000.zip
Bug 489805 - Fix warnings in org.eclipse.compare.examplesY20160331-1000Y20160324-1000I20160330-1230I20160330-0930I20160329-0800
Change-Id: I3101a8ceb86de1920e5cd4b3c384185475b727c7 Signed-off-by: Stefan Xenos <sxenos@gmail.com>
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java2
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java6
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
index 7e0eb9615..60f8645e6 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
@@ -125,7 +125,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
if (newText.indexOf(".") > -1) //$NON-NLS-1$
status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_extfullstop);
else if (fIdExtensionToName.containsKey(newText) && !fIdExtensionToName.get(newText).equals(fIdMap.getName()))
- status.setError(MessageFormat.format("{0} {1}",new String[] {XMLCompareMessages.XMLCompareAddIdMapDialog_error_extExists,(String)fIdExtensionToName.get(newText)})); //$NON-NLS-1$
+ status.setError(MessageFormat.format("{0} {1}", XMLCompareMessages.XMLCompareAddIdMapDialog_error_extExists,fIdExtensionToName.get(newText))); //$NON-NLS-1$
}
updateStatus(status);
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
index eda121f70..604ad8410 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureCreator.java
@@ -164,7 +164,7 @@ public class XMLStructureCreator implements IStructureCreator {
currentParent.childElements.put(raw, new Integer(((Integer) currentParent.childElements.get(raw)).intValue() + 1));
}
elementId= raw + new Character(ID_SEPARATOR) + "[" + currentParent.childElements.get(raw) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
- elementName= MessageFormat.format("{0} [{1}]", new String[] { raw, currentParent.childElements.get(raw).toString()}); //$NON-NLS-1$
+ elementName= MessageFormat.format("{0} [{1}]", raw, currentParent.childElements.get(raw).toString()); //$NON-NLS-1$
}
int start= r.getOffset() + prevlocator.getColumnNumber() - 1;
if (start < 0)
@@ -334,7 +334,7 @@ public class XMLStructureCreator implements IStructureCreator {
body_value= removeWhiteSpace(body_value);
}
XMLNode bodynode= new XMLNode(TYPE_TEXT, "body_(" + fcurrentParent.bodies + ")", body_value, (fsignature + SIGN_TEXT), fdoc, offset, length); //$NON-NLS-2$ //$NON-NLS-1$
- bodynode.setName(MessageFormat.format("{0} ({1})", new String[] { XMLCompareMessages.XMLStructureCreator_body, Integer.toString(fcurrentParent.bodies)})); //$NON-NLS-1$
+ bodynode.setName(MessageFormat.format("{0} ({1})", XMLCompareMessages.XMLStructureCreator_body, Integer.toString(fcurrentParent.bodies))); //$NON-NLS-1$
fcurrentParent.addChild(bodynode);
bodynode.setParent(fcurrentParent);
if (XMLStructureCreator.DEBUG_MODE)
@@ -354,7 +354,7 @@ public class XMLStructureCreator implements IStructureCreator {
String popelementname= popid.substring(0, popid.indexOf("<")); //$NON-NLS-1$
pop.setId(popelementname + "<" + body_value); //$NON-NLS-1$
pop.setOrigId(popelementname + "<" + body_value); //$NON-NLS-1$
- pop.setName(MessageFormat.format("{0} [{1}={2}]", new String[] { popelementname, pelementname, body_value})); //$NON-NLS-1$
+ pop.setName(MessageFormat.format("{0} [{1}={2}]", popelementname, pelementname, body_value)); //$NON-NLS-1$
pop.setUsesIDMAP(true);
}
}
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
index b91244fbf..af1ae11f5 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLStructureViewer.java
@@ -323,7 +323,7 @@ public class XMLStructureViewer extends StructureDiffViewer {
.ID_TYPE_BODY))
.toString()))
oldId= oldId.substring(1);
- action.setText(MessageFormat.format("{0} {1}", new String[] { XMLCompareMessages.XMLStructureViewer_action_setId_text2, oldId })); //$NON-NLS-1$
+ action.setText(MessageFormat.format("{0} {1}", XMLCompareMessages.XMLStructureViewer_action_setId_text2, oldId)); //$NON-NLS-1$
action.setEnabled(true);
}
} else {

Back to the top