Bug 326009 - Need to add a getter function to fFilesToParseUpFront(Text) in AbstractIndexerPage
Summary: Need to add a getter function to fFilesToParseUpFront(Text) in AbstractIndexe...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-09-22 16:20 EDT by John Liu CLA
Modified: 2010-09-30 04:23 EDT (History)
1 user (show)

See Also:


Attachments
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage (873 bytes, text/plain)
2010-09-22 16:44 EDT, John Liu CLA
no flags Details
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage (876 bytes, text/plain)
2010-09-22 16:51 EDT, John Liu CLA
no flags Details
Patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage (1.09 KB, text/plain)
2010-09-28 11:54 EDT, John Liu CLA
no flags Details
Updated comment patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage (1.34 KB, text/plain)
2010-09-29 09:52 EDT, John Liu CLA
mschorn.eclipse: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Liu CLA 2010-09-22 16:20:06 EDT
Build Identifier: 

Need to add a getter function to fFilesToParseUpFront(Text) in AbstractIndexerPage, since RDT needs to access fFilesToParseUpFront(Text) for a RDT bug, https://bugs.eclipse.org/bugs/show_bug.cgi?id=326008





Reproducible: Always
Comment 1 John Liu CLA 2010-09-22 16:42:21 EDT
Let me give more details for it.

RDT has a remote indexer page called RemoteFastIndexerBlock (similar with DOMSourceIndexerBlock), which inherits AbstractIndexerPage, wants to disable the text field of fFilesToParseUpFront since RDT doesn't support this feature for the remote files yet. So RemoteFastIndexerBlock needs to get access to its parent's fFilesToParseUpFront by a getter function.

This won't affects anything in CDT's indexer preference page.
Comment 2 John Liu CLA 2010-09-22 16:44:31 EDT
Created attachment 179410 [details]
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage

Please let me know if there are any concerns regarding this update.
Comment 3 John Liu CLA 2010-09-22 16:51:25 EDT
Created attachment 179413 [details]
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage

Change the getter function access level to protected, so it can only be accessed by its sub-classes.
Comment 4 Markus Schorn CLA 2010-09-28 06:02:09 EDT
(In reply to comment #3)
> Created an attachment (id=179413) [details]
> Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage
> Change the getter function access level to protected, so it can only be
> accessed by its sub-classes.

AbstractIndexerPage is public API, it is not a good idea to expose the text widget. (This forces the implementation to always use a text widget whereas
it could well be a list or a combo).

I suggest to add a method to inform the class that the files to parse up front are not supported. (e.g. void enableSupportForFilesParsedUpFront(boolean val).
The implementation can either disable or not show the corresponding widget.
Comment 5 John Liu CLA 2010-09-28 11:54:59 EDT
Created attachment 179763 [details]
Patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage

Update the fix patch according to the approach suggested by Markus.

Markus, I replace the getter function with a function "protected void setSupportForFilesParsedUpFront(boolean val)" in AbstractIndexerPage class to disable or enable the text field of fFilesToParseUpFront. Let me know if you observe any problems from this change.

Thanks,
Comment 6 Markus Schorn CLA 2010-09-29 03:05:55 EDT
(In reply to comment #5)
In the java-doc you need to make clear, whether the new method is supposed to be called before the page is created or afterwards. (If possible my preference would be to call it before the page is created, with that the text field can be ommitted if it is not needed).
Comment 7 John Liu CLA 2010-09-29 09:52:43 EDT
Created attachment 179845 [details]
Updated comment patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage

Updated the function comment as suggested by Markus.
Comment 8 Markus Schorn CLA 2010-09-30 04:15:50 EDT
Corrected the since tag and adjusted the java-doc. 

Released to 8.0 > 20100930.
Comment 9 CDT Genie CLA 2010-09-30 04:23:03 EDT
*** cdt cvs genie on behalf of mschorn ***
Bug 326009: Option to disable edit field for parsing files up front, by John Liu.

[*] AbstractIndexerPage.java 1.11 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/AbstractIndexerPage.java?root=Tools_Project&r1=1.10&r2=1.11