Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361460 - View hidden by capability filtering does not appear when capability activated
Summary: View hidden by capability filtering does not appear when capability activated
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M4   Edit
Assignee: Dean Roberts CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 15:18 EDT by Dean Roberts CLA
Modified: 2011-12-06 13:32 EST (History)
2 users (show)

See Also:
pwebster: review+


Attachments
Projects demonstrating problem (17.63 KB, application/zip)
2011-10-19 15:20 EDT, Dean Roberts CLA
no flags Details
Patch (4.19 KB, patch)
2011-10-21 11:13 EDT, Dean Roberts CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Roberts CLA 2011-10-19 15:18:57 EDT
1) use File->Import Existing Projects into Workspace to import the attached projects
2) Run and note view not visible in Java Perspective (as expected)
3) Enable the "C Category Relend Perspective" capability
4) Note that the view is STILL not visible in the Java Perspective (the bug)
5) Reset the Java perspective and note the view does appear

There is some code added in ModeledPageLayout by a patch for bug 355497 that hooks identifierListeners when a perspective is is created.  These listeners are hooked on views that are in the perspective but are not rendered.  They listen for activity enablement changes to render the view when necessary.

I suspect the cause for this problem is that the code in ModeleledPageLayout is not being called when the initial layout is loaded on startup from the model.  This also causes the problem when the perspective is saved with filtered views, and the restarted workbench will not show the views when the capability is enabled.
Comment 1 Dean Roberts CLA 2011-10-19 15:20:11 EDT
Created attachment 205563 [details]
Projects demonstrating problem
Comment 2 Paul Webster CLA 2011-10-19 16:12:23 EDT
In 3.x, activities would not make an existing view disappear if its activity was false, nor would it make a filtered view appear if the activity was suddenly enabled.

PW
Comment 3 Dean Roberts CLA 2011-10-20 08:06:34 EDT
Perhaps I didn't describe the initial behaviour properly?

This is what I am seeing on:

Version: 3.7.1
Build id: M20110909-1335

Which is NOT happening in e4.

Using the test bundles attached to this defect.

1) Open a clean workspace.
2) It opens with the Java Perspective, no added view because the capability is not active.
3) Use Windows->Preferences->General->Capabilities to activate the "C Category Releng Perspective 3" capability

At this point the "Sample View" view appears to the right of out Outline view

I agree that this view does not, and should not disappear if the capability is subsequently deactivated.  However, having a view that is not displayed because it is being filtered by an inactive capability appear when that capability is subsequently enabled seems like proper and desired behaviour.

So are we talking about the same thing here or does "if the activity was
suddenly enabled." from comment 2 mean a different set of steps that what I describe?
Comment 4 Dean Roberts CLA 2011-10-21 11:13:55 EDT
Created attachment 205737 [details]
Patch
Comment 6 Dean Roberts CLA 2011-12-06 13:32:18 EST
Verified in I20111205-2330