| Summary: | NullPointerException in org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor$PropertyChangeListener | ||
|---|---|---|---|
| Product: | [Modeling] GMF-Runtime | Reporter: | Zac Wolfe <zac.wolfe> |
| Component: | General | Assignee: | Inbox <gmf.runtime.diagram-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug |
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor$PropertyChangeListener needs to do null checking or allow the user to override the behavior. The problem happens when the PropertyChangeListener is invoked while there is no active page (eg. when a ProgressMonitor has focus). This code: if (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart() == DiagramDocumentEditor.this) { String property = event.getProperty(); ... Should be changed to something like: if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage() != null && PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart() == DiagramDocumentEditor.this) { ...