From 996f0d5959f716e17337bfa2c6dd1c297a9d0bd2 Mon Sep 17 00:00:00 2001 From: Milos Kleint Date: Tue, 26 Jul 2011 09:38:34 +0200 Subject: 352471 in xml editor proposals add handling of type and classifier when adding dependencies --- .../java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java index e9e6b570..3587ff0d 100644 --- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java +++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/InsertArtifactProposal.java @@ -209,6 +209,13 @@ public class InsertArtifactProposal implements ICompletionProposal, ICompletionP if (fDialog.getSelectedScope() != null && !"compile".equals(fDialog.getSelectedScope())) { setText(getChild(dependency, SCOPE), fDialog.getSelectedScope()); } + if (af.type != null && !"jar".equals(af.type) + && !"null".equals(af.type)) { // guard against MNGECLIPSE-622 //$NON-NLS-1$) + setText(getChild(dependency, TYPE), af.type); + } + if (af.classifier != null) { + setText(getChild(dependency, CLASSIFIER), af.classifier); + } format(toFormat); generatedOffset = ((IndexedRegion)toFormat).getStartOffset(); generatedLength = ((IndexedRegion)toFormat).getEndOffset() - generatedOffset; -- cgit v1.2.3