Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340069 - Change access modifier for SystemSearchPage methods to protected from private
Summary: Change access modifier for SystemSearchPage methods to protected from private
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 340072
  Show dependency tree
 
Reported: 2011-03-15 13:43 EDT by Mohammed Ajmal CLA
Modified: 2011-03-21 15:52 EDT (History)
2 users (show)

See Also:


Attachments
patch to change some methods from private to protected (3.41 KB, patch)
2011-03-15 13:53 EDT, David McKnight CLA
no flags Details | Diff
additional patch to give access to RemoteSearchData inner class (1.58 KB, patch)
2011-03-15 14:16 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.