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

199 commits

Author SHA1 Message Date
John Camelon
a3a827cf92 CORE
Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error
	Fixed Bug 43062 : Outline is confused on operator methods containing spaces 
	Fixed Bug 39531 : Problems with type conversion operators 

TEST
	Added QuickParseASTTests::testBug43644() & testBug43062().  
	Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
2003-09-26 19:21:12 +00:00
John Camelon
ba0a125734 Patch for Hoda Amer
Core: 
        - Last part of solution to bug#42453: Expression result types not computed 
        Added the handling of POSTFIX_TYPENAME_IDENTIFIER 
        Completed bug#43221: POSTFIX_TYPENAME_IDENTIFIER not implemented 
        - Solution to bug#43644 : 6 triangle icons appearing in outline viewer when typing ... 
Tests: 
        Enabled CompleteParseASTExpressionTest.testPostfixTypenameIdentifier() 
UI: 
        Solution to bug#43646: Code Assist won't work if missing end bracket
2003-09-25 19:40:39 +00:00
John Camelon
9cd42c12c5 Patch for Hoda Amer
Core: 
        Partial solution to bug#42453: Expression result types not computed 
        Added the handling of the NEW_TYPEID, CASTEXPRESSION, POSTFIX_DYNAMIC_CAST, 
        POSTFIX_REINTERPRET_CAST, POSTFIX_STATIC_CAST, and POSTFIX_CONST_CAST 

Tests: 
        Added testNewTypeId(), testCastExpression(), testPostfixDynamicCast(), 
        testPostfixReinterpretCast(), testPostfixStaticCast(), and testPostfixConstCast() 
        to CompleteParseASTExpressionTest.
2003-09-25 14:26:33 +00:00
John Camelon
a6efadb09a CORE
Partial fix for Bug 43221 : POSTFIX_TYPENAME_IDENTIFIER not implemented 

TEST
	Updated CompleteParseASTExpressionTest::testPostfixTypenameIdentifier() for Hoda.
2003-09-25 13:33:33 +00:00
John Camelon
a317cc46f9 CORE
Fixed Bug 43106 : Symbol Table support needed to resolve types
	Fixed Bug 43375 : isExtern not returning true for extern declarations 

TESTS
	Added testBug43375() to CompleteParseASTTest. 
	Moved testConditionalExpressionWithReferencesB_Bug43106 from failed tests to passed tests. 
	Moved testPMDotStar() and testPMArrowStar to failed tests w/defect number 43579.
2003-09-24 17:26:45 +00:00
John Camelon
02c194aaf4 CORE
Fixed Bug 43084 : need to restructure TypeId to allow dynamic_cast<> type expression references.
	Fixed Bug 39504 : sizeof-expressions are not handled properly

TESTS
	Replaced ASTFailedTests::testBug39504A() with CompleteParseASTTest::testBug39504(). 
	Moved testPostfixTypeIdExpression2() && testPostfixTypeIdTypeId2() to CompleteParseASTExpressionTest. 
	Restructured expression reference tests so that the order of arrival will not cause JUnit failures.
2003-09-23 22:58:34 +00:00
John Camelon
ef856ea3e1 Patch for Hoda Amer
Core: 
        Solution to bug#43373: No reference to static member in definition  (Major) 
        Solution to bug#43371: constructor incorrectly marked private (Normal) 
Tests: 
        Added CompleteParseASTTest.testBug43373() 
        Added QuickParseASTTests.testBug43371() 
UI: 
        Solution to bug#43143: Naming of Code Assist Menus/Tab are not consistent 
        changed both names to Content Assist. No tests provided.
2003-09-23 20:46:22 +00:00
John Camelon
3e361ae186 Core :
Solution to bug#43162 : Code Assist not showing the right return value: 
        Saved a function return value string in the BasicSearchMatch object. 
        Created a new package org.eclipse.cdt.internal.core.parser.util and 
        added ASTUtil class with static methods to help convert an ASTFunction 
        return type from IASTAbstractDeclaration to String. Note that this was 
        previously implemented in the CModelBuilder. I just moved it to a common 
        library for others (BasicSearchMatch) to use. 
UI: 
        Solutions to 
        bug#43162 : Code Assist not showing the right return value 
        Bug#43145 : foo function still showing in Code Assist even if "f" is deleted 
        Bug#42810 : Code Assist adding characters after pressing <enter> 
        Bug#42861 : Code Assist should be case insensitive. 

Tests: 
        Solution to bug#43162 : Code Assist not showing the right return value. 
        Solution to Bug#42861 : Code Assist should be case insensitive. 
        Modified the CompletionProposalsTest to include upper and lower cases 
        and to include functions with different return values.
2003-09-23 13:54:28 +00:00
John Camelon
8c79a22ec0 Patch for Andrew Niefer
Core :
        - modified Symbol table interfaces to use List & Map instead of 
LinkedList and HashMap
        - fixed warnings in ParserSymbolTable
        - fixed bug43106 - Symbol Table support needed to resolve types
        - fixed bug43156 - require ability to add implicit inheritance 
copy constructor
        - fixed bug43159 - TypeInfo.equals() not working properly
        - fixed bug43238 - Postfix_Subscript expressions confuse function 
resolution

Tests:
        - removed testConditionalExpression_Bug43159 from 
FailedCompleteParseASTExpressionTest
          and uncommented it (testConditionalExpression) in 
CompleteParseASTExpressionTest
        - uncommented the following tests in 
CompleteParseASTExpressionTest :
            testPostfixSubscript, 
            testPostfixSubscriptA, 
            testPostfixSubscriptB,
            testPostfixSubscriptWithReferences
        - updated ParserSymbolTableTests to use new addOperatorExpression 
function
        - added testDerivedReference, testAddCopyConstructor to 
ParserSymbolTableTests
        - fixed warning in ClassDeclarationPatternTests
2003-09-19 16:00:53 +00:00
John Camelon
43d8ca642d Patch for Hoda Amer
Core: 
         In completeParseASTFactory.getExpressionResultType(): Added  the support 
         for expression types: PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION
 Tests: 
         Added more success test cases to CompleteParseASTExpressionTest 
         and more failure test cases to FailedCompleteParseASTExpressionTest 
         in testing PM_DOTSTAR, PM_ARROWSTAR, CONDITIONALEXPRESSION
2003-09-18 15:22:48 +00:00
John Camelon
51a73af86d Patch for Andrew Niefer
core :
        - add parameter references to index
        - modify CharOperation.match to allow escaping wildcards 
(bug43063)
        - modify AbstractIndexer.bestPrefix to handle wildcard escaping in 
name (bug43063)
        - modify CSearchPattern to handle escaping wildcards (bug43063)
        - modify enterFunctionBody and enterMethodBody to fix bug42979
        - search for Parameter References
        - added setThrowExceptionOnBadCharacterRead to IScanner to help 
with wildcard bug43063

tests:
        - modified resources/search/classDecl.cpp & include.h to include 
some operators
        - added testOperators_bug43063_bug42979() to 
MethodDeclarationPatternTests
        - added testParameterREferences to OtherPatternTests
2003-09-18 15:15:09 +00:00
John Camelon
9b9bf1a17c IASTFunction::previouslyDeclared implementation 2003-09-16 15:34:43 +00:00
John Camelon
6f580b7c1a Patch for Hoda Amer
Core: 
        In completeParseASTFactory.getExpressionResultType(): Added the support 
        for expression type PRIMARY_THIS. 
        In createMethod(): changed the scope of a method definition to point to 
        the parent class. 

Tests: 
    Added CompleteParseASTExpressionTest.testPrimaryThis()
2003-09-16 14:45:39 +00:00
John Camelon
61976f1b51 CORE
Fixed Bug 39556 : 'restrict' qualifier is not supported (ANSI C99) 
	Fixed Bug 43126 : ISourceElementRequestor.acceptParameterReference accesses internal class
	Fixed Bug 43062 : Outline is confused on operator methods containing spaces 
	Cleaned up some warnings in the parser. 

TESTS
	Moved ASTFailedTests::testBug39556() to QuickParseASTTests.
	Cleaned up some warnings in parser tests.
2003-09-15 22:50:59 +00:00
John Camelon
994113f274 Patch for Niefer Andrew
Core: 
bug43106 - added getConditionalOperand to ParserSymbolTable

Core.tests:
added testGetConditionalOperand_bug43106 to ParserSymbolTableTests
2003-09-15 21:50:00 +00:00
John Camelon
780a8096ed CORE
Partially fixed Bug 42979 : Cannot search for operator overloaders 
	

TESTS
	Added CompleteParseASTTest::testBug42979().
	Updated CompleteParseASTTest::testAndrewsExample().
2003-09-15 19:04:48 +00:00
John Camelon
bc7648a24e Patch for Hoda Amer.
Core: 
        In completeParseASTFactory.getExpressionResultType() 
        - Added the handling of some more expression types. 
        See CompleteParseASTExpressionTest for details. 
Tests: 
    - Added lots of test cases to CompleteParseASTExpressionTest
2003-09-15 13:20:30 +00:00
John Camelon
edd344b8af CORE
Fixed Bug 42985 : Search: Qualified function call is treated as a declaration 
	Fixed Bug 40419 : parser fails on heavily templated expressions 

TESTS
	Created QuickParseASTTests::testBug42985(). 
	Moved LokiFailures::testBug40419() to QuickParseASTTests. 
	Deleted LokiFailures as it was empty.
2003-09-12 19:11:22 +00:00
John Camelon
9d95cfa455 CORE
Fixed Bug 43013 : IASTParameterDeclaration does not derive from IASTOffsetableNamedElement
2003-09-12 18:36:36 +00:00
John Camelon
406f05d071 Patch for Andrew Niefer
This is my previous patch updated with a test and resubmitted.

It fixes some NPE's in function resolution if the parameter information is 
bad. 
It also tries to clarify conversion sequence ranking with comments and 
constants.
2003-09-12 15:08:40 +00:00
John Camelon
322dcaad49 CORE
Fixed Bug 42840 : Search: Cannot find things after double declarations 
	Fixed Bug 42798 : Selected #include <Angled> off by 1 char 
	Fixed Bug 42872 : dynamic cast not parsed properly 
	Partially fixed Bug 39504 : sizeof-expressions are not handled properly 
	Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. 

UI 
	Updated SourceElementRequestor callbacks to include IASTParameterReference callbacks. 

TESTS
	Added CompleteParseASTTest::testBug42840() & testBug42872().
	Moved testBug39504B(), testBug39505A() & testBug39505B() from failed to QuickParse tests.
2003-09-11 18:06:15 +00:00
John Camelon
d4cfca7836 Patch for Hoda Amer
Core: 
        - Solved the double reference problem 
        - solution to bugs #42822, #42823, & #42822B 

Tests: 

        Moved three failed tests (bugs #42822, #42823, & #42822B) 
        from FailedCompleteParseASTExpressionTest to CompleteParseASTExpressionTest
2003-09-10 13:21:53 +00:00
John Camelon
7ff5917dad Patch for Hoda Amer
CORE
	-Added more IASTExpression.Kind handling to CompleteParseASTFactory.getExpressionResultType()	
TESTS
	-Seperated the Expression result type test in a new file : completeParseASTExpressionTests.
	-Added more test cases for simple types.
	-Added FailedCompleteParseASTExpressionTest for failed reference tests.
2003-09-09 20:01:23 +00:00
John Camelon
93b627eabc CORE
Updated ScannerException to be more precise and include more information.  
	Updated Parser to be more careful of how it handles particular Scanner errors in COMPLETE_PARSE mode.  
	
TESTS
	Updated ScannerTestCase to keep up to date wrt ScannerException updates.
2003-09-09 18:02:40 +00:00
John Camelon
8f627892aa Core
- Hooked up the Indexer to the dependency tree. Everytime a header file 
gets modified, the including source files get reindexed. 
- Automated dependency calcuations - each time a file gets modified, its 
tree gets updated. 
- Added error logging via the PDE Error Log (Views->PDE Runtime->Error 
Log) - the indexer reports unsuccesful index attempts and the preprocessor 
reports unsuccesful inclusion resolution attempts 

UI 
- Changed the names on the search popup mens
2003-09-09 17:54:02 +00:00
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