Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362129 - IWorkbenchPage.getPerspective() returns 'null' inside perspectiveActivated(...)
Summary: IWorkbenchPage.getPerspective() returns 'null' inside perspectiveActivated(...)
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 16:22 EDT by Pawel Piech CLA
Modified: 2019-11-14 03:07 EST (History)
3 users (show)

See Also:


Attachments
Exception trace. (5.08 KB, text/plain)
2011-10-26 16:22 EDT, Pawel Piech CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2011-10-26 16:22:53 EDT
Created attachment 206032 [details]
Exception trace.

Version: 4.1.0
Build id: I20111025-2000

I got the following trace after I started SDK with an existing workspace. 

java.lang.NullPointerException
	at org.eclipse.core.internal.preferences.EclipsePreferences.internalGet(EclipsePreferences.java:599)
	at org.eclipse.core.internal.preferences.EclipsePreferences.get(EclipsePreferences.java:452)
	at org.eclipse.core.internal.preferences.PreferencesService.get(PreferencesService.java:465)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet(ScopedPreferenceStore.java:474)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.getBoolean(ScopedPreferenceStore.java:387)
	at org.eclipse.jdt.internal.ui.javaeditor.ToggleBreadcrumbAction.perspectiveActivated(ToggleBreadcrumbAction.java:132)
	at org.eclipse.ui.internal.PerspectiveListenerList$1.run(PerspectiveListenerList.java:74)
... (full trace attached)
Comment 1 Dani Megert CLA 2011-10-27 04:22:31 EDT
I've protected the code in JDT against 'null' but the real issue is that perspectiveActivated(...) gets called while IWorkbenchPage.getPerspective() still returns 'null'.
Comment 2 Lars Vogel CLA 2019-11-14 03:07:44 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.