Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java9
-rw-r--r--org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomQuickAssistProcessor.java12
2 files changed, 10 insertions, 11 deletions
diff --git a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
index 5e0c0199..8a3bb5f9 100644
--- a/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
+++ b/org.eclipse.m2e.editor.xml/src/main/java/org/eclipse/m2e/editor/xml/PomContentAssistProcessor.java
@@ -47,7 +47,8 @@ import org.eclipse.jface.text.templates.TemplateProposal;
import org.eclipse.jface.text.templates.persistence.TemplateStore;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.utils.StringUtils;
import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
@@ -225,8 +226,8 @@ public class PomContentAssistProcessor extends XMLContentAssistProcessor {
if (relative != null) {
Region region = new Region(request.getReplacementBeginPosition(), 0);
ICompletionProposal proposal = new CompletionProposal("<relativePath>" + relative + "</relativePath>", //$NON-NLS-1$ //$NON-NLS-2$
- region.getOffset(), region.getLength(), 0,
- WorkbenchPlugin.getDefault().getImageRegistry().get(org.eclipse.ui.internal.SharedImages.IMG_OBJ_ADD),
+ region.getOffset(), region.getLength(), 0, //
+ PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD), //
NLS.bind(Messages.PomContentAssistProcessor_insert_relPath_title, relative), null, null);
if (request.shouldSeparate()) {
request.addMacro(proposal);
@@ -252,7 +253,7 @@ public class PomContentAssistProcessor extends XMLContentAssistProcessor {
}
ICompletionProposal proposal = new CompletionProposal(relative,
region.getOffset(), region.getLength(), 0,
- WorkbenchPlugin.getDefault().getImageRegistry().get(org.eclipse.ui.internal.SharedImages.IMG_OBJ_ADD),
+ PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD),
NLS.bind(Messages.PomContentAssistProcessor_set_relPath_title, relative), null, null);
if (request.shouldSeparate()) {
request.addMacro(proposal);
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 751c384b..cc369ee0 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
@@ -46,8 +46,9 @@ import org.eclipse.text.edits.InsertEdit;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolution2;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.texteditor.MarkerAnnotation;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
@@ -250,7 +251,7 @@ class SchemaCompletionProposal implements ICompletionProposal, ICompletionPropos
}
public Image getImage() {
- return WorkbenchPlugin.getDefault().getImageRegistry().get(org.eclipse.ui.internal.SharedImages.IMG_OBJ_ADD);
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ADD);
}
public Point getSelection(IDocument arg0) {
@@ -328,7 +329,7 @@ static class IdPartRemovalProposal implements ICompletionProposal, ICompletionPr
}
public Image getImage() {
- return WorkbenchPlugin.getDefault().getImageRegistry().get(org.eclipse.ui.internal.SharedImages.IMG_TOOL_DELETE);
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE);
}
public Point getSelection(IDocument arg0) {
@@ -498,7 +499,7 @@ static class ManagedVersionRemovalProposal implements ICompletionProposal, IComp
}
public Image getImage() {
- return WorkbenchPlugin.getDefault().getImageRegistry().get(org.eclipse.ui.internal.SharedImages.IMG_TOOL_DELETE);
+ return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE);
}
public Point getSelection(IDocument arg0) {
@@ -806,8 +807,5 @@ static class IgnoreWarningProposal implements ICompletionProposal, ICompletionPr
public Point getSelection(IDocument document) {
return null;
}
-
}
-
-
}

Back to the top