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

Bug 360719

Summary: Make TargetPlatformService#newDefaultTargetDefinition() public
Product: [Eclipse Project] PDE Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ankur_sharma
Version: 4.1   
Target Milestone: 3.8 M4   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 347695    
Bug Blocks:    

Description Curtis Windatt CLA 2011-10-12 15:05:38 EDT
There are a few use cases where this method would be useful. We are already using this internal method in our preference pages. I'm not aware if there was a reason why this was excluded from the provisional API, but I think we can justify including it.

Case #1: Trying to restore things after messing with the target. After changing the target platform to perform some operation, the client may want to restore the default state of the target platform.  Currently there is no practical way to do this except to store the previous target themselves or browsing the list of known targets.

Case #2: Trying to see if a target definition is equivalent to the default target. This is the case that our preference page encounters and uses the method for. Knowing whether the target is default can prevent duplicates from being created and provide UI improvements.

Note that even with changes to support multiple targets, this would be a useful feature.
Comment 1 Curtis Windatt CLA 2011-10-12 15:06:13 EDT
Ankur, this could be added to the branch or after the changes are merged.
Comment 2 Curtis Windatt CLA 2011-10-25 11:34:12 EDT
Target API is waiting for M4
Comment 4 Curtis Windatt CLA 2011-12-06 17:38:38 EST
Verified in I20111206-1015