Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359765 - [Compatibility] IWorkbenchPage's savePerspective() method is unimplemented
Summary: [Compatibility] IWorkbenchPage's savePerspective() method is unimplemented
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 16:21 EDT by Remy Suen CLA
Modified: 2019-08-15 20:33 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-10-03 16:21:24 EDT
This method is empty at the moment.
Comment 1 Eric Moffatt CLA 2011-10-11 14:15:15 EDT
Dean, could you take a look into this one ?
Comment 2 Dean Roberts CLA 2011-10-12 09:28:58 EDT
This method is only called when attempting to save a singleton perspective.

Back when I joined the team I recall a discussion about what exactly a singleton perspective was, and if we would try and support them in e4.

I believe the thought was that singleton perspectives where not really used and to ignore singleton perspectives and wait and see if any users actually report a problem.

Is this still a strategy we want to take?
Comment 3 Remy Suen CLA 2011-10-12 09:30:38 EDT
(In reply to comment #2)
> This method is only called when attempting to save a singleton perspective.
> 
> Back when I joined the team I recall a discussion about what exactly a
> singleton perspective was, and if we would try and support them in e4.

Personally, I'm not even sure how singleton perspectives are supported in 3.x. From what I can tell, it reads some 'singleton' attribute in the definition of the perspective extension but that attribute doesn't seem to exist.
Comment 4 Dean Roberts CLA 2011-10-12 09:52:04 EDT
I agree, I was looking through the documentation and singleton is certainly not a documented attribute for perspective extensions

org.eclipse.ui.perspectives

If the GIT history view was friendlier I could see where the constants where added and try and find a defect that caused the feature to be added .... any GIT hints on how to see real history?  Or does anybody know what happened to the CVS annotation view?
Comment 5 Remy Suen CLA 2011-10-12 11:00:37 EDT
After a discussion with Dean, we've decided to just let this remain unimplemented for now as the 'singleton' attribute doesn't actually exist in the schema file (anymore?).

I've changed the method to throw an UnsupportedOperationException so that anyone that tries to call this method will "automatically" know that the method is not working.

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=88406581bce09ddb99184fc0755a13c172bcd795
Comment 6 Eric Moffatt CLA 2011-10-18 15:09:25 EDT
Presuming that it doesn't actually work in 3.x...

Have we deprecated the method ? 
Is savePerspectiveAs the alternative ?
Comment 7 Remy Suen CLA 2011-10-18 16:55:25 EDT
(In reply to comment #6)
> Presuming that it doesn't actually work in 3.x...

The method is API but does not appear to be called in a test. It is called by the 'Save Perspective' handler in a singleton perspective scenario.

There is code there but someone would have to know about the secret 'singleton' attribute which is nowhere to be found in the perspectives.exsd schema file.

> Have we deprecated the method ?

No, it is not deprecated in 3.x.

> Is savePerspectiveAs the alternative ?

I would be inclined to say so.
Comment 8 Eric Moffatt CLA 2011-10-19 15:20:05 EDT
I'd be tempted to deprecate the method to stop future folks from thinking it should do anything...comments ?
Comment 9 Dean Roberts CLA 2011-10-20 07:40:53 EDT
I agree assuming we could undeprecate it should a valid use case be put forward for these mysterious singleton perspectives.
Comment 10 Remy Suen CLA 2011-10-20 09:05:04 EDT
(In reply to comment #9)
> I agree assuming we could undeprecate it should a valid use case be put forward
> for these mysterious singleton perspectives.

I'm not sure I like this undeprecating business.
Comment 11 Eclipse Genie CLA 2019-08-15 20:33:37 EDT
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.

--
The automated Eclipse Genie.