Bug 326009

Summary: Need to add a getter function to fFilesToParseUpFront(Text) in AbstractIndexerPage
Product: [Tools] CDT Reporter: John Liu <john_ws_liu>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: vivkong
Version: 7.0Keywords: contributed
Target Milestone: 8.0   
Hardware: PC   
OS: Windows XP   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=326008
Whiteboard:
Attachments:
Description Flags
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage
none
Patch to be applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage
none
Patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage
none
Updated comment patch applied to org.eclipse.cdt.ui.dialogs.AbstractIndexerPage mschorn.eclipse: iplog+

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