Project: Eclipse_Platform_UI
Bug 88137 [Model] NPE on editor resource save
Reported: 2005-03-15 18:39:49 | Status: verified fixed

When the editor part has no title tool tip set (null) or when there is an editor input with null toolTipText the EditorPart.getTitleToolTip() will return null. This will result in NPE thrown in org.eclipse.ui.mode.WorkbenchPartLabelProvider.getText(Object) at line 56: String path = part.getTitleToolTip(); if (path.length() == 0) { <-- NPE here return part.getTitle(); } else { return part.getTitle() + " [" + part.getTitleToolTip() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } when this editor part is dirty and the workbench is closed. To fix: modify the code as String path = part.getTitleToolTip(); if (path == null || path.trim().length() == 0) { return part.getTitle(); } else { return part.getTitle() + " [" + path + "]"; //$NON-NLS-1$ //$NON-NLS-2$ }

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/model/WorkbenchPartLabelProvider.java