This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 379212 - IPerspectiveListener3.perspectiveOpened is not called on opening a new perspective
Summary: IPerspectiveListener3.perspectiveOpened is not called on opening a new perspe...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.3 M7   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 04:12 EDT by Hristo Bojilov CLA
Modified: 2013-05-02 13:56 EDT (History)
5 users (show)

See Also:


Attachments
Fire events for legacy window (962 bytes, patch)
2013-03-28 13:57 EDT, Jens Kuebler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Bojilov CLA 2012-05-11 04:12:29 EDT
Build Identifier: Version: 4.2.0 Build id: I20120315-1300

After I opened new perspective by using the "open perspective" button IPerspectiveListener3.perspectiveOpened was not called.Same for IPerspectiveListener3.perspectiveClosed if closing the perspective.These worked fine for older eclipse versions such as 3.7.

Reproducible: Always

Steps to Reproduce:
I have the following simple code fragment:
IWorkbenchWindow workbechWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
workbechWindow.addPerspectiveListener(new IPerspectiveListener3(){
...
public void perspectiveOpened(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
System.out.println("Inside perspective open");
}
...
});
Comment 1 Michael Mühlberg CLA 2013-01-31 11:19:34 EST
We have the same problem upon clode, open works fine.
Comment 2 Jens Kuebler CLA 2013-03-28 13:57:59 EDT
Created attachment 229163 [details]
Fire events for legacy window
Comment 3 Eric Moffatt CLA 2013-04-18 14:35:42 EDT
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=91b8a59e7fd7e5ca6bfbd2d6336d311afcf85972

Committed Jens' code (one slight mod, I put the perspOpened call inside the 'persp != null' check since if it is null we shouldn't fire the event)

Thanks Jens ! I've given you the 'author' attribution for this one !
Comment 4 Eric Moffatt CLA 2013-04-18 14:36:02 EDT
Marking as FIXED...
Comment 5 Eric Moffatt CLA 2013-05-02 13:56:15 EDT
Verified in 4.3.0.I20130430-0031.