Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329787

Summary: [Perspectives] PerspContentProvider serves no purpose
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Remy Suen CLA 2010-11-09 09:12:11 EST
The PerspContentProvider merely casts the input to an IPerspectiveRegistry and calls getPerspective() on it. We could just as easily have made that call in the beginning as the input (passing the returned IPerspectiveDescriptor[] as the input to the viewer) and using ArrayContentProvider instead.
Comment 1 Paul Webster CLA 2010-11-10 13:05:16 EST
I have no preference here.  But then if a new perspective is added, it wouldn't show up, correct?

PW
Comment 2 Remy Suen CLA 2010-11-10 13:07:57 EST
(In reply to comment #1)
> But then if a new perspective is added, it wouldn't
> show up, correct?

That is true. You would have to manually call setInput(Object) again instead of calling refresh().
Comment 3 Paul Webster CLA 2010-11-10 13:21:37 EST
So I don't see a lot of benefit in making a change, unless there's something I'm missing.

Maybe it doesn't matter if setInput(*) is only ever called immediately after new PerspContentProvider.

PW
Comment 4 Remy Suen CLA 2010-11-10 13:29:06 EST
(In reply to comment #3)
> So I don't see a lot of benefit in making a change, unless there's something
> I'm missing.
> 
> Maybe it doesn't matter if setInput(*) is only ever called immediately after
> new PerspContentProvider.

In the two cases where this content provider is used (SavePerspectiveDialog and SelectPerspectiveDialog), they don't actually handle the dynamic case (that is, they don't listen for registry change events) so they are effectively just static lists.

However, feel free to close as WONTFIX.
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:12:40 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.
Comment 6 Eclipse Genie CLA 2021-10-07 16:09:56 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.