Bug 174944 - SystemRemoteResourceDialog.setPreSelection() does not work
Summary: SystemRemoteResourceDialog.setPreSelection() does not work
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 1.0.1   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 2.0   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-21 07:14 EST by Martin Oberhuber CLA
Modified: 2008-08-13 13:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-02-21 07:14:41 EST
In the EclipseCon tutorial JarSigningActionDelegate.java line 132,
dlg.setPreSelection() is supposed to open a SystemRemoteFolderDialog,
and position it on a preselected folder.

This doesn't currently work (would it be necessary to expand the folders down to the selection piecewise? Would it be necessary to specify what filter to use?)

If not too much effort it would be great to get this fixed for EclipseCon.
Comment 1 David McKnight CLA 2007-02-21 14:41:51 EST
I've changed a few things to get this working.  I needed to add an additional api in ISystemRegistry: 

	/**
	 * Returns filter references associated with this resource under the subsystem
	 */
	public List findFilterReferencesFor(Object resource, ISubSystem subsystem, boolean onlyCached);

The onlyCached flag is used to determine whether we should return filter references that have no contents.  We pass false for the preselection, whereas all other users of this default to true.

I added a method in SystemView:
	public void expandTo(Object parentObject, Object remoteObject)

The method expands the tree from parentObject until remoteObject is found.  I have to turn off deferred queries temporarily in this case so I also added an enable flag for SystemViewLabelAndContentPRovider.
Comment 2 Martin Oberhuber CLA 2007-02-28 08:23:30 EST
Verified with I20070223-0730
Comment 3 Martin Oberhuber CLA 2008-08-13 13:16:40 EDT
[target cleanup] 2.0 M5 was the original target milestone for this bug