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

Bug 340069

Summary: Change access modifier for SystemSearchPage methods to protected from private
Product: [Tools] Target Management Reporter: Mohammed Ajmal <majmal>
Component: RSEAssignee: David McKnight <dmcknigh>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: dmcknigh, wagnross
Version: unspecified   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 340072    
Attachments:
Description Flags
patch to change some methods from private to protected
none
additional patch to give access to RemoteSearchData inner class none

Description Mohammed Ajmal CLA 2011-03-15 13:43:44 EDT
Build Identifier: 

I have created a class which extends the org.eclipse.rse.files.ui.SystemSearchPage class in RSE. This allows me to override the performAction() method and change the way in which the actual remote search is performed. However, my subclass needs access to the getter methods in SystemSearchPage so that I can know the values entered by the user for the various fields on the search page. Specifically, the following private methods should be marked protected:

getConnectionName()
getFileNames()
getFolderName()
getProfileName()
getRemoteFileSubSystem(String, String)
getSearchData()

The SystemSearchPage class is part of an internal package so this change is not API-breaking in any way.

Reproducible: Always
Comment 1 Mohammed Ajmal CLA 2011-03-15 13:44:32 EDT
Forgot to mention the version of RSE we're using: RSE 3.2.2_20110301.
Comment 2 David McKnight CLA 2011-03-15 13:53:37 EDT
Created attachment 191232 [details]
patch to change some methods from private to protected

As an internal class, it would not normally be advisable to extend SystemSearchPage but it's apparently very useful in this case.  We ought to consider bringing this out of the internal package at some point.
Comment 3 David McKnight CLA 2011-03-15 13:59:12 EDT
I've committed the change to cvs and opened bug 340072 for the RSE 3.2.x backport.
Comment 4 David McKnight CLA 2011-03-15 13:59:22 EDT
Marking this as fixed.
Comment 5 Mohammed Ajmal CLA 2011-03-15 14:14:32 EDT
Marking getSearchData() as protected partially solves the problem of gaining access to user input. In addition, though, I would need the RemoteSearchData class itself to be protected as well. Then, to actually get at the data, I would need either public getters, or the fields in RemoteSearchData would need to be marked public.
Comment 6 David McKnight CLA 2011-03-15 14:16:02 EDT
Created attachment 191235 [details]
additional patch to give access to RemoteSearchData inner class
Comment 7 David McKnight CLA 2011-03-15 14:19:30 EDT
I've committed the additional patch.
Comment 8 Ross Wagner CLA 2011-03-21 15:46:52 EDT
Which plugins were affected by this bug?
Comment 9 David McKnight CLA 2011-03-21 15:52:06 EDT
(In reply to comment #8)
> Which plugins were affected by this bug?


The affected plugin is org.eclipse.rse.files.ui.