Community
Participate
Working Groups
EPartService needs either a deactivate() method OR API for accessing the activation history. I believe a deactivate() method makes more sense. As part of the work on Fast Views, I have a use case where I need to deactivate the currently active part. In such an event, an appropriate part from the activation history should be activated. I could accomplish this by either calling a deactivate method on the part service, and count on it activating an appropriate part from the activation history, or I could query the part service for its activation history, find an appropriate part to activate, and call activatePart on it. I think from an API point of view, a deactivate() method makes more sense than exposing the activation history in the part service. I propose that the history selection algorithm be the same one used by hidePart. There is an open question as to what happens when you deactivate() a part that is not active. Clearly this is a no-op, but should the activation history be modified or not. Whichever decision is made, I believe hidePart() should behave the same way. Currently I believe hidePart() will attempt to remove a part from the activation history, even if the part is currently hidden.
After more discussion it seems this API will not give me all of what I need, and the parts it does give me are trivial and nobody else would need this API anyhow. Instead, we might achieve our desired results with a small change to the existing requestActivation() API. Currently this API will do nothing if the currently active part is in the windows part list, regardless of whether the active part is in the presentation or not. Since the fast view part stacks are never in the presentation, and arguably it does not make sense to activate a part that is not in the presentation fixing this API to only consider parts that are in the presentation will work and is likely more correct. Interestingly, the code that looks for a candidate in the activation history already only considers visible and rendered parts in the presentation. It is simply that the activation history is never consulted in cases where the currently active part is any part in the window.
Created attachment 203087 [details] Change to scope requestActivation to parts in the presentation
Pushed in >20110921. commit a3384757e11ae898cac097a6fae7636dc94d99ac
Verified on I20111014-1625