1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Commit graph

174 commits

Author SHA1 Message Date
John Camelon
8e62beb552 CORE & UI
Made scoping support more robust in CompleteParse mode. 
	Refactored ISourceElementRequestor (enter|exit)CodeBlock() to take IASTCodeScope rather than IASTScope. 
	Removed the now obsolete DOM.  
	Added enumerator references to ISourceElementRequestor.
	
TESTS
	Added CompleteParseASTTest::testThrowStatement(), testScoping(), testEnumeratorReferences().
	Removed LineNumberTest source as it is obsolete.
2003-09-08 19:17:53 +00:00
John Camelon
cecd8598a0 Patch for Andrew Niefer
Core : 
- Create ParserLanguage.java
- Modified ParserFactory functions to take ParserLanguage as parameter
- Modifier Parser, Scanner & ParserSymbolTable to use new ParserLanguage 
class
- Update call to ParserFactory in Indexer, Search, CModelBuilder & 
Dependency Tree

Core.tests:
- Updated calls to ParserFactory to specify which language to use

UI:
-CStructorCreator uses the parser, modified call to ParserFactory to 
specify CPP language.
  (this is the same behaviour as before)
2003-09-08 18:11:00 +00:00
John Camelon
6c33540aab Patch for Hoda Amer
Core : 
    Added references to variables with pointers in solution of bug#42453:Expression result types not computed 
Tests: 
        Added tests to CompleteParseASTTest to test the expression result type for function calls that reference variables with pointers (bug#42453).
2003-09-08 12:31:30 +00:00
John Camelon
8b12ea5492 CORE
Continue to add support for parsing within function bodies.  
	Add workaround for 1.2 for inline function declaration-before-use chicken-and-egg.
	
TESTS
	Added CompleteParseASTTest::testSimpleIfStatement(), testSimpleWhileStatement(). 
	testSimpleSwitchStatement(), testSimpleDoStatement().
2003-09-05 19:24:11 +00:00
John Camelon
63ed749357 Patch for Hoda Amer
- Added references to variables in solution of bug#42453:Expression result types not computed 
        - Solution to bug#42560: Class Cast Exception during Method definition
2003-09-05 15:23:17 +00:00
John Camelon
d557f7864c CORE
Fixed NPE on nested declarations in code blocks.  
	
TESTS
	Updated CompleteParseASTTest::testSimpleForLoop()
2003-09-05 14:20:15 +00:00
John Camelon
ae96e590ff Patch for Andrew Niefer
Fixed NPE in CompleParseASTFactory.createClassSpecifier caused by a null 
name.
2003-09-05 13:45:16 +00:00
John Camelon
619b617056 CORE/UI
First pass of parsing function bodies with X-Reference information.
    Updated IASTFactory/ISourceElementRequestor to include IASTCodeScope
    constructs, clients should keep this in mind and update their implementations.

TESTS
    Updated ASTFailedTests::testBug39702() to fail more accurately.
    Added testSimpleFunctionBody(), testSimpleForLoop() to CompleteParseASTTest.java.
2003-09-04 20:47:05 +00:00
John Camelon
1c6c93560a Patch for Hoda Amer
Core: 
        - Changed the ASTExpression of the complete package to store the 
        whole ITokenDuple for the typeId instead of just the string. 
        - Changed the ASTExpression in both quick and complete packages and 
        deleted the "id" parameter. 
        - Added partial solution to bug #42453: Exception result types not computed. 
        Now they are computed for simple types only. 
Tests: 
        Call to ASTExpression getTypeId() changed to getTypeIdString(). 
UI: 
         Solution to bug#42414 :Extraneous semi-colons in generated class methods
2003-09-04 14:39:20 +00:00
John Camelon
45cfbc6cba Patch for Andrew Niefer
fix bug in PST that causes parse failure on > 2 constructors for a given 
class
Modified ParserSymbolTableTest.testConstructors to test > 2 constructors
2003-09-03 20:57:51 +00:00
John Camelon
6354f078c0 CORE
Fixed bug41445 - QualifiedLookup succeeds where it should fail.  
TESTS
	Added testBug41445() to CompleteParseASTTests.java.
2003-09-03 15:16:03 +00:00
John Camelon
7ce8f5c91e Patch for Andrew Niefer.
Added support to the parser symbol table for namespace aliases.

tests:
        added ParserSymbolTableTest.testNamespaceAlias()
        added ParserSymbolTableTest.testUsingNamespaceAlias()
2003-09-02 20:05:20 +00:00
John Camelon
55bd1089ae Core :
- Added resolving references in a method's qualified name in Complete parse mode. 
        Example (.cpp file ): 
        The method "A::B::C::aMethod(){};" used to be an IASTFunction, with name = "A::B::C::aMethod". 
        Now is an IASTMethod, with name = "aMethod", and references to class A, class B and class C. 

        - Added the checking for "isConstructor" and "isDestructor" for an IASTMethod in complete parse mode.
2003-08-28 15:50:31 +00:00
John Camelon
cb951980f4 CORE
Fixed bug39535 - Parser fails on namesapce aliases
	
TESTS
	Moved bug39535 from failedTests to quickParse success tests.
2003-08-28 15:02:52 +00:00
Doug Schaefer
8f3b6007eb Patch for Bogdan Gheorghe:
Indexer 
======= 
- Changed file extensions to prevent header files from being indexed (they will be indexed via inclusion) 

Search 
======= 
- Added scope checking to MatchLocator 
- Modified CSearchPattern to allow for destructor searches 
- Added debug tracing statements to SearchEngine 
- Added debug tracing statements to MatchLocator 

UI 
== 
- Converted CTags based OpenOnSelectionAction to OpenDeclarationsAction. For now, we do a search on all types with the selected name. 
- Hooked up OpenDeclarationsAction to search engine 

General 
======= 
- Modified start up code to set debug trace options (which are defined from the launcher). I've added the following trace components: 
        - dependency 
        - indexer 
        - indexmanager 
        - matchlocator 
        - model 
        - search 
        - parser 

- Added trace debug statements to CModelBuilder 
- Modified Util.java to make use of IDebugLogConstants
2003-08-26 19:16:03 +00:00
John Camelon
d66610119d Placement New Code Review w/Hoda. 2003-08-25 18:19:55 +00:00
John Camelon
c64fbade9d Modified the IASTFactory to take three expression lists for the createNewDescriptor() instead of just one.
They are : newPlacementExpressions, typeIdExpressions, and newInitializerExpressions.
2003-08-25 15:41:30 +00:00
John Camelon
4f65c461c3 CORE
Fixed bug39526 - Parser doesn't handle initializers correctly.  
	Fixed bug41520 - FullParse : Constructor Initializer is mistaken as function prototype 
	
TESTS
	Moved testBug39526() from ASTFailedTests.java to QuickParseASTTests.java.
	Moved testBug41520() from FullParseFailedTests.java to CompleteParseASTTest.java
2003-08-25 15:19:06 +00:00
John Camelon
c55ebd35d1 Patch for Bogdan Gheorghe. 2003-08-25 13:55:32 +00:00
John Camelon
7c632b299c Removed debugLog statements from Parser.java. 2003-08-25 12:23:13 +00:00
John Camelon
2f398f309b CORE
Fixed Bug 39530 - More problems with initializers. 
	Fixed Bug 37424 - Crash when opening big files
	Refactored pointerOperators & cvQualifiers to not throw backtracks in optional case.  
	Added tracing support to cdt.core plugin via .options file.  

TESTS
	Added QuickParseASTTests::testBug39530().
2003-08-25 12:19:43 +00:00
Doug Schaefer
a55df357e1 Patch for Hoda Amer:
Core: 
        Modified the parser's newExpression() to send all its sub expressions to the newDescriptor and check on each expression to find references in the CompleteParserASTFactory.createExpression(). 

Core Tests: 
        Added testNewExpressions() to CompleteParseASTTest to test new expression's references.
2003-08-20 18:05:30 +00:00
Doug Schaefer
cc710063b4 Patch for Sean Evoy:
This patch contains some minor UI changes and a big chunk of work to add 
built-in symbols and includes search paths to a tool specification. 

The UI change is a switch from dynamically resizing the property page when 
an option category is selected from the list, but rather using a scrolled 
edit area. Now, if the option set is larger than the viewable area, a 
horizontal and/or vertical scrollbar is displayed.

In terms of built-ins, there is no UI support to change the values just 
yet. That is coming, but I wanted to get the framework and some 
definitions in place so that the indexer and scanner can start using them.
2003-08-20 17:52:32 +00:00
John Camelon
6acb69e971 CORE
Removed warnings from SymbolTable & QuickParseCallback (removing implicit accessor generation).
	Made IASTElaboratedTypeSpecifier derive from IASTOffsetableNamedElement (as it should).  

TESTS
	Removed warnings from AutomatedIntegrationSuite.java (removing implicit accessor generation).
2003-08-14 19:49:48 +00:00
John Camelon
83c27c9bb1 CORE
Added X-Reference support for ArrayModifiers and Exception Specifications.  
	Fixed Bug 41551  -  HandleInclusion always throws ScannerException on local includes.

TESTS
	Added CompleteParseASTTest::testArrayModExpression(), testPointerVariable() & 
	testExceptionSpecification().
2003-08-14 15:33:32 +00:00
John Camelon
80ee3e49e7 CORE
Added constructor expression support for variables.  
	Added constructor chain x-reference support for methods. 

TESTS
	Added testBug41520() to FullParseFailedTests.java.  
	Added testConstructorChain() to CompleteParseASTTest.java
2003-08-13 23:54:09 +00:00
John Camelon
fa8baf0518 CORE
Added Expression x-reference support into Parser.

TESTS
	Added testSimpleExpression(), testParameterExpressions() && 
	testNestedNamespaceExpression() to CompleteParseASTTest.java.
2003-08-13 21:51:53 +00:00
John Camelon
df11a294b8 Patch for Sean Evoy
In order to work through CExtensionPoint mechanism, I have to change the 
existing extension point entries for the Managed and Standard builders to 
the following (all future builders will have to conform to this as well):
   <extension
         id="ManagedBuildManager"
         point="org.eclipse.cdt.core.ScannerInfoProvider">
      <cextension>
         <run
 class="org.eclipse.cdt.core.build.managed.ManagedBuildManager">
         </run>
      </cextension>
   </extension>

   <extension
         id="StandardBuildManager"
         point="org.eclipse.cdt.core.ScannerInfoProvider">
      <cextension>
         <run
 class="org.eclipse.cdt.core.build.standard.StandardBuildManager">
         </run>
      </cextension>
   </extension>

As well, the ManagedBuildManager and StandardBuildManager must extend 
AbstractCExtension.

The new project wizards for managed and standard projects have to be 
modified to register the right class as the scanner info providers for the 
project. The example below shows the managed project wizard code, but the 
standard project wizard is similar.
try {
        ICDescriptor desc = 
CCorePlugin.getDefault().getCProjectDescription(project);
        desc.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID);
        desc.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, 
ManagedBuildManager.INTERFACE_IDENTITY);
} <snip>


Clients use a new method defined in CCorePlugin 

public IScannerInfoProvider getScannerInfoProvider(IProject project) {
        IScannerInfoProvider provider = null;
        if (project != null) {
                try {
                        ICDescriptor desc = (ICDescriptor) 
getCProjectDescription(project);
                        ICExtensionReference[] extensions = 
desc.get(BUILD_SCANNER_INFO_UNIQ_ID);
                        if (extensions.length > 0)
                                provider = (IScannerInfoProvider) 
extensions[0].createExtension();
                } catch (CoreException e) {
                }
        }
        return provider;
}

to get the information provider as shown in the updated JUnit test code 
below:
// Find the first IScannerInfoProvider that supplies build info for the 
project
IScannerInfoProvider provider = 
CCorePlugin.getDefault().getScannerInfoProvider(project);
assertNotNull(provider);

As is the case now, clients implement the IScannerInfoChangeListener 
interface and pass themselves to the provider in a subscription message. 
There is also a new method on the IScannerInfoProvider interface that 
allows the client to get information immediately as shown below:
IScannerInfo currentSettings = provider.getScannerInformation(project); 

The ManagedBuildManager::getScannerInfo(IResource) method will be 
deprecated, then removed before the end of this release cycle.
2003-08-13 17:45:38 +00:00
John Camelon
891454830b CORE
Added X-Ref/Elaborated type support w/element requestor callbacks.  

TESTS
	Added CompleteParseASTTest::testForewardDeclarationWithUsage().
2003-08-12 20:40:11 +00:00
John Camelon
a94839573b CORE
Added Complete Parse support for ASM Definitions.  
	Added isVolatile() to abstract declarations.
	Added Complte Parse support for elaborated types / forward declaration of classes.  
	Fixed some robustness issues.

TESTS
	Cleaned up Junit parser-related tests so that failed tests are now expected failures w/defects associated with them.  
	Updated CompleteParseTests for forward declaration/elaborated types.  
	Added Search/ParseTestOnSearchFiles to AutomatedSuite. 
	Updated Search tests to workaround bug 41445.
2003-08-12 18:19:55 +00:00
Doug Schaefer
65003d3ab2 Patch for Andrew Niefer:
Core:
- refactor symbol table function names to start with lower case letters
- added better constructor support :
        - IDerivableContainerSymbol.addConstructor
        - IDerivableContainerSymbol.lookupConstructor
        - IDerivableContainerSymbol.getConstructors
- implicit user-defined conversion sequences now only use constructors not 
marked explicit
- user-defined conversion sequences are now only applied at most once 
(12.3-4 in spec) 
- changed ParserSymbolTableException.r_Unspecified to r_InternalError 
which is thrown on internal symbol table inconsistancies (likely from bugs 
rather than semantic problems with the parsed code)

Core.tests:
- updated tests to reflect function name refactoring
- added ParserSymbolTableTest.testConstructors
2003-08-07 14:46:58 +00:00
John Camelon
87e177ade2 Patch for Andrew Niefer
This patch improves support in the parser symbol table for forward declarations
2003-08-01 17:43:10 +00:00
John Camelon
c2e6e9ec5b Patch for Victor Mozgin
Fixed PR 39540 : Parser fails on const qualifier after class specifier
2003-07-31 13:14:32 +00:00
John Camelon
7b4de80105 Patch for Victor Mozgin.
Fixed PR 39532 : Parser fails on fully-qualified class names.
2003-07-30 13:04:53 +00:00
John Camelon
57c348fffa CORE
Updated AST to better represent pointers to functions/methods.
	Implemented typedef declaration/x-ref infrastructure.  

TESTS
	Updated QuickParseASTTests for pointer to function updates.
	Updated CompleteParseASTTests for typedef work.
2003-07-30 01:31:14 +00:00
John Camelon
5423bbc79e Patch for Victor Mozgin.
Fixed PR 39546 : Parser fails on 'signed' casts.
2003-07-29 14:21:07 +00:00
John Camelon
95b11e1171 CORE
Fixed Bug 40842 - Parser: NPE while parsing class declaration in full parse mode 
	Fixed Bug 40843 - Parser: failParse doesn't set parsePassed = false on EOF.
	Fixed Miscellaneous overrides issues involving parameters & functions. 


TESTS
	Added/moved tests as necessary for bugfix 40842 & 40843.
2003-07-28 20:49:47 +00:00
John Camelon
30f7903424 Fixed Bug 40730 - Parser is not searching the include path for #include"<name>" 2003-07-28 15:40:36 +00:00
John Camelon
9b571cb993 Patch for Victor Mozgin.
Fixed PR 39537 : Parser fails if template parameters contain '>' or
'<'  characters.
2003-07-28 14:18:39 +00:00
John Camelon
136320038c Patch for Victor Mozgin.
Fixed PR 39553 : Macros are not expanded in #include statements.
2003-07-28 00:02:34 +00:00
John Camelon
7c5787894d Last minute demo fixes for Search/Indexer/COMPLETE_PARSE. 2003-07-25 16:45:49 +00:00
John Camelon
ee5dac3bd9 Patch for Bogdan Gheorghe.
This patch adds type refs, function refs, method refs,  fireld refs and namespace refs to the index and changes the parser mode to complete parse.
2003-07-25 15:21:57 +00:00
John Camelon
8b6f29d3ad Fix Symbol Table Lookup in addBaseSpecifier() for Andrew. 2003-07-25 14:49:18 +00:00
John Camelon
196aedf345 Fixed ASTEnumerator::getOwnerEnumerationSpecifier() in COMPLETE_PARSE mode for Bogdan. 2003-07-25 14:30:11 +00:00
John Camelon
4824b20cdc CORE
Added COMPLETE_PARSE support for Method and Field declarations and cross-references. 
	Fixed some small ParserSymbolTable bugs.
	Added support for linkage specification under COMPLETE_PARSE.

TESTS
	Updated CompleteParseASTTests for Method/Field updates.
	Fixed TortureTest's parser mode switch (was always QuickParsing).
2003-07-25 00:35:42 +00:00
John Camelon
ea9038f44b Fix ending offsets of Functions/Methods w/bodies for Hoda. 2003-07-24 14:47:32 +00:00
John Camelon
9d44e90798 CORE
Added CompleteParse - UsingDirective & UsingDeclarations w/namespace/class/field variable references.
	Added CompleteParse support for enumeration specifiers and references in variables & fields.  
	Stubbed out other Scopes/Declarations for COMPLETE_PARSE mode to allow indexer team to switch over ASAP. 

TESTS
	Updated CompleteParseASTTests.
2003-07-24 13:47:20 +00:00
John Camelon
b9273831d1 Fix offsets of PointerToFunctions/PointerTo Methods for OutlineView 2003-07-23 20:20:50 +00:00
John Camelon
f476d6f782 Fixed classOffsets for Hoda 2003-07-23 19:51:30 +00:00
John Camelon
b97503af2c Fix id offsets on variables/fields 2003-07-23 14:39:42 +00:00