Invalid small icon path throws unclear exception

Description

When creating a CustomServiceTask and incorrectly referencing an image file in the jar, an unclear exception is raised that's presented to the user. Proposed solution is to catch this situation and return a placeholder image instead so it's obvious the image cannot be located. Stacktrace that occurs looks like this:

Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".

java.lang.NullPointerException
at org.eclipse.gef.ui.palette.PaletteViewer$PreferenceListener.refreshAllEditParts(PaletteViewer.java:79)
at org.eclipse.gef.ui.palette.PaletteViewer$PreferenceListener.propertyChange(PaletteViewer.java:65)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at org.eclipse.gef.ui.palette.DefaultPaletteViewerPreferences.firePropertyChanged(DefaultPaletteViewerPreferences.java:188)
at org.eclipse.gef.ui.palette.DefaultPaletteViewerPreferences.handlePreferenceStorePropertyChanged(DefaultPaletteViewerPreferences.java:240)
at org.eclipse.gef.ui.palette.DefaultPaletteViewerPreferences$PreferenceStoreListener.propertyChange(DefaultPaletteViewerPreferences.java:357)
at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372)
at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.initializeGraphicalViewer(DiagramEditorInternal.java:1164)
at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.createGraphicalViewer(DiagramEditorInternal.java:424)
at org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(GraphicalEditor.java:171)
at org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.createPartControl(GraphicalEditorWithFlyoutPalette.java:75)
at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.createPartControl(DiagramEditorInternal.java:1588)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)

Assignee

Tiese Barrell

Reporter

Tiese Barrell

Labels

None

Components

Fix versions

Priority

Minor
Configure