Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 111311 Details for
Bug 245443
StandaloneIndexerTask base uses default ScannerConfig in producing AST
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed fix
bug_245443_patch.txt (text/plain), 4.93 KB, created by
Mike Kucera
on 2008-08-29 11:43:29 EDT
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Mike Kucera
Created:
2008-08-29 11:43:29 EDT
Size:
4.93 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.core >Index: parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java,v >retrieving revision 1.6 >diff -u -r1.6 StandaloneIndexer.java >--- parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java 22 Jul 2008 12:29:01 -0000 1.6 >+++ parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java 29 Aug 2008 15:40:31 -0000 >@@ -98,6 +98,7 @@ > * be provided, but not both. If a single IScannerInfo object is provided > * it will always be used. Otherwise the provider will be used. > */ >+ @Deprecated > protected IScannerInfo fScanner; > > /** >@@ -158,6 +159,10 @@ > } > }; > >+ /** >+ * @deprecated Its better to provide a scanner info provider instead. >+ */ >+ @Deprecated > public StandaloneIndexer(IWritableIndex index, boolean indexAllFiles, > ILanguageMapper mapper, IParserLogService log, IScannerInfo scanner) { > fIndex = index; >@@ -217,7 +222,10 @@ > > /** > * Returns the IScannerInfo that provides include paths and defined symbols. >+ * @deprecated Should probably be using a IStandaloneScannerInfoProvider instead and >+ * calling getScannerInfo(String). > */ >+ @Deprecated > public IScannerInfo getScannerInfo() { > return fScanner; > } >@@ -235,7 +243,14 @@ > > return fScannerInfoProvider.getScannerInformation(path); > } >- >+ >+ >+ /** >+ * Returns the IStandaloneScannerInfoProvider or null if one was not provided. >+ */ >+ public IStandaloneScannerInfoProvider getScannerInfoProvider() { >+ return fScannerInfoProvider; >+ } > > /** > * Returns the ILanguageMapper that determines the ILanguage for a file. >Index: parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java,v >retrieving revision 1.1 >diff -u -r1.1 IStandaloneScannerInfoProvider.java >--- parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java 14 Jul 2008 21:44:45 -0000 1.1 >+++ parser/org/eclipse/cdt/internal/core/indexer/IStandaloneScannerInfoProvider.java 29 Aug 2008 15:40:31 -0000 >@@ -15,8 +15,6 @@ > import org.eclipse.cdt.core.parser.IScannerInfoProvider; > > /** >- * Returns a IScannerInfo for the given file by a path. >- * > * Similar to IScannerInfoProvider but computes the IScannerInfo > * based on a String path instead of IResource. > * >@@ -24,5 +22,20 @@ > */ > public interface IStandaloneScannerInfoProvider { > >+ /** >+ * Returns an IScannerInfo for the given file path, >+ * or an empty IScannerInfo object if the file path is invalid. >+ */ > IScannerInfo getScannerInformation(String path); >+ >+ /** >+ * Returns an IScannerInfo when you don't necessary have access to a path. >+ * >+ * This is used by the "parse up front" feature. Since we are parsing >+ * files outside of the project a "default" IScannerInfo object >+ * is needed to get the minimal amount of available info in order >+ * to parse the file. >+ * @param linkageID >+ */ >+ IScannerInfo getDefaultScannerInformation(int linkageID); > } >Index: parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java,v >retrieving revision 1.8 >diff -u -r1.8 StandaloneIndexerTask.java >--- parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java 14 Jul 2008 21:44:45 -0000 1.8 >+++ parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerTask.java 29 Aug 2008 15:40:31 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.cdt.core.model.AbstractLanguage; > import org.eclipse.cdt.core.model.ILanguage; > import org.eclipse.cdt.core.parser.IParserLogService; >+import org.eclipse.cdt.core.parser.IScannerInfo; > import org.eclipse.cdt.internal.core.index.IWritableIndex; > import org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask; > import org.eclipse.cdt.internal.core.pdom.IndexerProgress; >@@ -218,6 +219,20 @@ > protected void logError(IStatus s) { > getLogService().traceLog(s.getMessage()); > } >+ >+ @SuppressWarnings("deprecation") >+ @Override >+ protected IScannerInfo createDefaultScannerConfig(int linkageID) { >+ IStandaloneScannerInfoProvider provider = fIndexer.getScannerInfoProvider(); >+ if(provider != null) >+ return provider.getDefaultScannerInformation(linkageID); >+ >+ IScannerInfo scannerInfo = fIndexer.getScannerInfo(); >+ if(scannerInfo != null) >+ return scannerInfo; >+ >+ return super.createDefaultScannerConfig(linkageID); >+ } > > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdtdoug
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 245443
:
111120
|
111128
| 111311