Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2015-03-19 14:11:55 -0400
committerFred Bricon2015-03-19 14:11:55 -0400
commit8d2684f064546e66da13b50bab1727d0db521580 (patch)
treecbff87f43b0b17f0347fee52af049d6e0675d279 /org.eclipse.m2e.editor.xml
parent6eb6db0ce9f1f9169406f2d9846c09b84477a909 (diff)
downloadm2e-core-8d2684f064546e66da13b50bab1727d0db521580.tar.gz
m2e-core-8d2684f064546e66da13b50bab1727d0db521580.tar.xz
m2e-core-8d2684f064546e66da13b50bab1727d0db521580.zip
462588 : make warning about version override more specific
Change-Id: I903e5fbf62f6a71b910b4c674e27dae05599c9bf Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.editor.xml')
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
index bda31fbd..28bd9ee9 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/internal/MarkerLocationService.java
@@ -369,9 +369,9 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
if(lookForIgnoreMarker(document, version, off, IMavenConstants.MARKER_IGNORE_MANAGED)) {
continue;
}
-
- IMarker mark = mavenMarkerManager.addMarker(pomFile, type, NLS.bind(
- org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_managed_title, managedVersion, artString),
+ String msg = versionString.equals(managedVersion) ? org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_redundant_managed_title
+ : org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_managed_title;
+ IMarker mark = mavenMarkerManager.addMarker(pomFile, type, NLS.bind(msg, managedVersion, artString),
document.getLineOfOffset(off.getStartOffset()) + 1, IMarker.SEVERITY_WARNING);
mark.setAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT,
IMavenConstants.EDITOR_HINT_MANAGED_DEPENDENCY_OVERRIDE);
@@ -481,8 +481,9 @@ public class MarkerLocationService implements IMarkerLocationService, IEditorMar
continue;
}
- IMarker mark = mavenMarkerManager.addMarker(pomFile, type, NLS.bind(
- org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_managed_title, managedVersion, artString),
+ String msg = versionString.equals(managedVersion) ? org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_redundant_managed_title
+ : org.eclipse.m2e.core.internal.Messages.MavenMarkerManager_managed_title;
+ IMarker mark = mavenMarkerManager.addMarker(pomFile, type, NLS.bind(msg, managedVersion, artString),
document.getLineOfOffset(off.getStartOffset()) + 1, IMarker.SEVERITY_WARNING);
mark.setAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT,
IMavenConstants.EDITOR_HINT_MANAGED_PLUGIN_OVERRIDE);

Back to the top