Bug 74517 - [Workbench] It should be easier to start Eclipse with device data tracking on.
Summary: [Workbench] It should be easier to start Eclipse with device data tracking on.
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-09-22 06:58 EDT by Robert (Kraythe) Simmons CLA
Modified: 2009-08-30 02:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert (Kraythe) Simmons CLA 2004-09-22 06:58:51 EDT
I am currently overhauling the old SLeak plugin (Bug: 71615) to eclipse and 
the problem I have is one of usability. Right now you need to do no less than 
three things to enable the plugin to function. All these things are required 
to do and then undo in order to turn device tracing on and off. 

1) Change the .options file in the org.eclipse.ui so that the following are 
set to true:

# Turn on debugging for the org.eclipse.ui plugin.
org.eclipse.ui/debug=true

# Enable the trace of SWT graphics.
org.eclipse.ui/trace/graphics=true

2) Run the platform with the -debug flag on the command line. 

This seems like a royal pain when you are talkign about enabling just do do 
some resource cleanup (hence the reason SLeak shows dangling resources all 
over the IDE.) 

I have found where the display is created on the command line in 
org.eclipse.ui.internal.Workbench and the lines that enable devide data 
tracking are pasted here: 

		// create the display
		Display newDisplay = null;
		if (Policy.DEBUG_SWT_GRAPHICS) {
			DeviceData data = new DeviceData();
			data.tracking = true;
			newDisplay = new Display(data);
		} else {
			newDisplay = new Display();
		}


I propose that this be changed to simply take either a command line property 
or a system property. So I could say -Dswt.track.device.data=true on the VM 
arguments or -devicedata as a switch to the platform. 

If this was made easier than I think more developers would use SLeak to track 
their resources. Especially with all the improvements i have made. ;-)

There are also 2 locations that have Displays created without any posiblity of 
device data tracking; these should be fixed as well: 

1) org.eclipse.ui.internal.gestures.GestureSupport.main(String[])

This one Can merely be made to support the new flag. 

2) org.eclipse.swt.widgets.getDefault()

Im not sure what to do about this one.
Comment 1 Kim Horne CLA 2004-09-22 14:02:50 EDT
The gestures one can probably be ignored - that code isn't used in the workbench
at this time.
Comment 2 Tod Creasey CLA 2006-04-15 14:36:45 EDT
There are no plans to work on this feature at this time.
Comment 3 Denis Roy CLA 2009-08-30 02:10:28 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.