Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-11-07 10:56:18 -0500
committerIgor Fedorenko2011-11-07 10:56:18 -0500
commitfd5f7c4877ca64d5ff580bb30fc698184ed014e1 (patch)
tree92be79c258142c76a01fddc21251f072c671fb4c /org.eclipse.m2e.editor.xml
parent7eb939c1c3c46d5dc23b763abae0c532d734b51e (diff)
downloadm2e-core-fd5f7c4877ca64d5ff580bb30fc698184ed014e1.tar.gz
m2e-core-fd5f7c4877ca64d5ff580bb30fc698184ed014e1.tar.xz
m2e-core-fd5f7c4877ca64d5ff580bb30fc698184ed014e1.zip
361642 <ignore/> quickfix for <error/> implicit lifecycle mapping
Signed-off-by: Igor Fedorenko <igor@ifedorenko.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/MavenMarkerResolutionGenerator.java25
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java7
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java7
3 files changed, 20 insertions, 19 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MavenMarkerResolutionGenerator.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MavenMarkerResolutionGenerator.java
index 4d1e3ceb..f14b9c66 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MavenMarkerResolutionGenerator.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/MavenMarkerResolutionGenerator.java
@@ -39,28 +39,27 @@ public class MavenMarkerResolutionGenerator implements IMarkerResolutionGenerato
return new IMarkerResolution[] {new XMLSchemaMarkerResolution()};
}
if(IMavenConstants.EDITOR_HINT_PARENT_VERSION.equals(hint)) {
- return new IMarkerResolution[] {new PomQuickAssistProcessor.IdPartRemovalProposal(marker, true) };
+ return new IMarkerResolution[] {new PomQuickAssistProcessor.IdPartRemovalProposal(marker, true)};
}
if(IMavenConstants.EDITOR_HINT_PARENT_GROUP_ID.equals(hint)) {
- return new IMarkerResolution[] {new PomQuickAssistProcessor.IdPartRemovalProposal(marker, false) };
+ return new IMarkerResolution[] {new PomQuickAssistProcessor.IdPartRemovalProposal(marker, false)};
}
if(hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_DEPENDENCY_OVERRIDE)) {
- return new IMarkerResolution[] {
- new PomQuickAssistProcessor.ManagedVersionRemovalProposal(marker, true),
- new PomQuickAssistProcessor.IgnoreWarningProposal(marker, IMavenConstants.MARKER_IGNORE_MANAGED)
- };
+ return new IMarkerResolution[] {new PomQuickAssistProcessor.ManagedVersionRemovalProposal(marker, true),
+ new PomQuickAssistProcessor.IgnoreWarningProposal(marker, IMavenConstants.MARKER_IGNORE_MANAGED)};
}
if(hint.equals(IMavenConstants.EDITOR_HINT_MANAGED_PLUGIN_OVERRIDE)) {
- return new IMarkerResolution[] {
- new PomQuickAssistProcessor.ManagedVersionRemovalProposal(marker, false),
- new PomQuickAssistProcessor.IgnoreWarningProposal(marker, IMavenConstants.MARKER_IGNORE_MANAGED)
- };
+ return new IMarkerResolution[] {new PomQuickAssistProcessor.ManagedVersionRemovalProposal(marker, false),
+ new PomQuickAssistProcessor.IgnoreWarningProposal(marker, IMavenConstants.MARKER_IGNORE_MANAGED)};
}
if(hint.equals(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION)) {
- return new IMarkerResolution[] {
- new LifecycleMappingProposal(marker, PluginExecutionAction.ignore)
+ return new IMarkerResolution[] {new LifecycleMappingProposal(marker, PluginExecutionAction.ignore)
// new LifecycleMappingProposal(marker, PluginExecutionAction.execute)
- };
+ };
+ }
+ if(marker.getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR
+ && hint.equals(IMavenConstants.EDITOR_HINT_IMPLICIT_LIFECYCLEMAPPING)) {
+ return new IMarkerResolution[] {new LifecycleMappingProposal(marker, PluginExecutionAction.ignore)};
}
}
return new IMarkerResolution[0];
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
index 1996de4d..81231f73 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomHyperlinkDetector.java
@@ -469,10 +469,9 @@ public class PomHyperlinkDetector implements IHyperlinkDetector {
int row = marker.getAttribute(IMavenConstants.MARKER_CAUSE_LINE_NUMBER, 0);
int column = marker.getAttribute(IMavenConstants.MARKER_CAUSE_COLUMN_START, 0);
String name = marker.getAttribute(IMavenConstants.MARKER_CAUSE_RESOURCE_ID, null);
- String hint = marker.getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, null);
- if (IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(hint)) {
-
- }
+// String hint = marker.getAttribute(IMavenConstants.MARKER_ATTR_EDITOR_HINT, null);
+// if (IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION.equals(hint)) {
+// }
openXmlEditor(fileStore, row, column, name);
}
}
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
index 5ebf01d3..4ea8e323 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java
@@ -117,11 +117,14 @@ public class PomQuickAssistProcessor implements IQuickAssistProcessor {
proposals.add(new IgnoreWarningProposal(context, mark, IMavenConstants.MARKER_IGNORE_MANAGED));
} else if(hint.equals(IMavenConstants.EDITOR_HINT_MISSING_SCHEMA)) {
proposals.add(new SchemaCompletionProposal(context, mark));
- }
- else if (hint.equals(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION)) {
+ } else if (hint.equals(IMavenConstants.EDITOR_HINT_NOT_COVERED_MOJO_EXECUTION)) {
extractedFromMarkers(proposals, mark); //having this first sort of helps for 335490
proposals.add(new LifecycleMappingProposal(context, mark, PluginExecutionAction.ignore));
// proposals.add(new LifecycleMappingProposal(context, mark, PluginExecutionAction.execute));
+ } else if(mark.getMarker().getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR
+ && hint.equals(IMavenConstants.EDITOR_HINT_IMPLICIT_LIFECYCLEMAPPING)) {
+ extractedFromMarkers(proposals, mark); //having this first sort of helps for 335490
+ proposals.add(new LifecycleMappingProposal(context, mark, PluginExecutionAction.ignore));
}
}
}

Back to the top