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

Bug 348560

Summary: RunAndTracks that always return true
Product: [Eclipse Project] Platform Reporter: Paul Webster <pwebster>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: emoffatt, ob1.eclipse, remy.suen
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Paul Webster CLA 2011-06-07 09:28:39 EDT
RunAndTracks that appear to run forever:

#1
org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerRenderer.processAddition(MMenu, MenuManager, MMenuContribution, HashSet<String>, HashSet<String>, boolean)

This creates a RAT for every MMC contributed to the Main Menu.  It is scoped to the MWindow IEclipseContext.  That means that it will exist as long as the MWindow and it's main menu bar.  This might not be unreasonable.

Accuracy could be increased by adding and returning the ContributionRecord.isDispose().  When the contribution is gone, the RAT is no longer needed.

#2
org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.processAddition(MToolBar, ToolBarManager, MToolBarContribution)

Similar to #1, this creates a RAT that lives as long as the MWindow (for the main toolbars) or MPart (for the view toolbars).  It could also be made more accurate by returning contributionRecord.isDisposed().

#3
org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.track(MPart)
RATs are created to track MParts.  The RAT will live for the lifetime of the MPart's IEclipseContext.  Remy, does this make sense?

PW
Comment 1 Remy Suen CLA 2011-06-07 09:40:03 EDT
(In reply to comment #0)
> #3
> org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.track(MPart)
> RATs are created to track MParts.  The RAT will live for the lifetime of the
> MPart's IEclipseContext.  Remy, does this make sense?

That code is intended to be running and tracking until that part gets disposed/uninjected, yes.
Comment 2 Paul Webster CLA 2011-11-01 12:12:00 EDT
This still needs to be analyzed.
PW
Comment 3 Eclipse Genie CLA 2019-11-28 14:43:59 EST
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.