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

226 commits

Author SHA1 Message Date
John Camelon
a38f5c4f0d org.eclipse.cdt.core
Parser updates: Added IToken.getLineNumber() to facilitate adding line numbers to AST. Added line number support into IASTOffsetableElement.  Updated all implementations to use this.  Updated Parser and IASTFactory to populate IASTOffsetableElement with the values retrieved from IToken.  Removed IScanner.getLineNumberForOffset().  
Model updates: Updated CModelBuilder to access line number information from IASTOffsetableElement.

org.eclipse.cdt.core.tests
Updated ParserSymbolTableTest to accommodate new constructors for COMPLETE_PARSE ASTNodes (line # info).  Updated CModelElementsTest to enable testing for line numbers. Removed CModelElementsFailedTests.testBug36379() as it is redundant due to CModelElementTests.testCModelElements() is complete. Removed CModelElementsFailedTests from AutomatedIntegrationSuite as it is empty.
2004-01-20 02:21:30 +00:00
David Inglis
e05e298eb2 - remove make core dependency from project creation
- assert project create/deletion failure with detailed messages
- use common (were possible) project create/deletion methods in CProjectHelper.
- fixed problem with dep test when generating code the file was never closed causing project deletion to fail on win32
2004-01-19 20:02:53 +00:00
John Camelon
9cac774800 Patch for Andrew Niefer
This patch implements an iterator on all the contents of IContainerSymbol. 
This is a first step to an iterator on the IAST nodes.  

Core:
        Created IExtensibleSymbol, which is a new base class for the symbol interfaces
        Created IUsingDirectiveSymbol and UsingDirectiveSymbol
        Modified ASTUsingDirective to use IUsingDirectiveSymbol
        Modified CompleteParseASTFactory.createUsingDirective
        Added IContainerSymbol.getContentsIterator()
        Implemented getContentsIterator in ContainerSymbol

Core.tests:
        Modified CompleteParseASTTest.testUsingClauses
        Added ParserSymbolTableTest.testIterator_1 & testIterator_2
2004-01-17 00:18:24 +00:00
Hoda Amer
bcdd0ab7c3 Content Assist Work: More JUnit tests 2004-01-16 20:19:05 +00:00
John Camelon
57d668240a Patch for Andrew Niefer.
For normal lookups in the symbol table, a HashMap is faster than the tree 
map, but for prefix lookups the TreeMap is faster.  So we are now using 
the HashMap for normal parses, and we use the TreeMap in the parse mode 
used by content assist.

Note that with these changes the results returned by the IASTNode.lookup 
function used by content assist are now in predictable order:  they are 
first sorted in the order of the scopes visited during the lookup and then 
they are sorted alphabetically

Core:
Modified symbol table constructor to take a ParseMode as a parameter.
Modified symbol table to use a TreeMap instead of HashMap when ParseMode is COMPLETION_PARSE.
Modified ASTNode.lookup to throw ASTNotImplementedException if called when ParseMode is not CONTEXTUAL_PARSE.

Core.tests:
Moved testBug48307_FriendFunction_1 & testBug48307_FriendFunction_2 to ContextualParseTest.
Updated ContextualParseTest now that the order of prefix lookup results is predictable.

UI:
Updated CompletionEngine to catch ASTNotImplementedException from IASTNode.lookup.
2004-01-15 23:06:58 +00:00
Hoda Amer
1196d4a5ff Content Assist Work : Moved logging and testing to the UI side of CDT 2004-01-15 18:06:14 +00:00
David Inglis
e69bf2d4b5 fixed junit test to work without the deprecated CDT stuff 2004-01-15 14:18:37 +00:00
John Camelon
192a8293ce org.eclipse.cdt.core
====================
Renamed IASTNode.LookupResult IASTNode.ILookupResult.  
Introduced new ParseError exception for contextual parse() methods.  
Renamed ParserFactoryException ParserFactoryError.  
Replaced ParserNotImplementedException with a variant of ParseError.
Updated IScanner & IParser to not reference OffsetLimitReachedException explicitly. 
Renamed ParserMode.CONTEXTUAL_PARSE to COMPLETION_PARSE.  
Cleaned up IMacroDescriptor and made Scanner definitions table consistent.
Added IScanner.getDefinitions() to return the entire Map of definitions to a client.
Removed most of the warnings from parser source directory.  
Removed the unused SyntaxErrorException. 
Provided partial fix for Bug 44370  IASTMacro requires more information for clients.  

org.eclipse.cdt.core.tests
==========================
Updated references to LookupResult as it was renamed to ILookupResult.  
Removed some warnings from parser tests.  
Updated Scanner & QuickParseTests to accommodate new errors and signatures.  
Added QuickParseASTTests.testBug44370().  

org.eclipse.cdt.ui
==================
Updated references to LookupResult as it was renamed to ILookupResult.  
Updated references of ParserFactoryException to ParserFactoryError.
Updated references of ParserNotImplementedException to ParseError. 
Updated references of CONTEXTUAL_PARSE to COMPLETION_PARSE.
2004-01-15 13:38:02 +00:00
David Inglis
d70a6ac41a fixed junit test to work without the deprecated CDT stuff 2004-01-14 22:05:56 +00:00
Doug Schaefer
828dff9194 Fixed up test output so that it reports errors in an XML
friendly way.
2004-01-14 21:18:28 +00:00
John Camelon
2c18a23f89 CORE
Fixed bug 48909 - Wrong completion node after a . or an ->
	Fixed bug 49702 - Wrong completion kind sent in const/dest and code blocks
	Added new CompletionKind - STATEMENT_START to indicate the beginning of a statement line.  

TESTS
	Updated ContextualParseTest to accommodate bugfixes 48909 & 49702.  

UI
	Updated CompletionEngine to handle IASTCompletionKind.CompletionKind.STATEMENT_START
2004-01-13 17:07:02 +00:00
Doug Schaefer
53c3d3cbe1 Fixed up the automated integration suite to use the
new workbench test harness.
2004-01-12 19:08:28 +00:00
John Camelon
51fc347c92 Patch for Andrew Niefer.
Core:
        Added IParameterizedSymbol.setHasVariableArgs() &
hasVariableArgs()
        Modified ParserSymbolTable.resolveFunction & reduceToViable
        Modified CompleteParseASTFactory.createMethod & createFunction

Tests:
        Added CompleteParseASTTest.testBug43110_XRef
        Added ParserSymbolTableTest.testBug43110_Ellipses
        Added ParserSymbolTableTest.testBug43110_EllipsesRanking
        Added ParserSymbolTableTest.testBug43110_EllipsesRanking_2
2004-01-09 16:59:30 +00:00
John Camelon
15e4fa6b79 Patch for Andrew Niefer
Core:
        Added IDerivableContainerSymbol.lookupFunctionForFriendship.
        Modified IASTFactory.createMethod to take an ITokenDuple for the 
method name.
        Added LookupType.FORFRIENDSHIP and use it in LookupElement.
        Modified CompleteParseASTFactory.createMethod to handle friend 
functions.

Tests:
        Added CompleteParseASTTest::testBug48307_FriendFunction_1
        Added CompleteParseASTTest::testBug48307_FriendFunction_2
2004-01-08 16:57:54 +00:00
John Camelon
7a48cc3a16 Patch for Andrew Niefer
CORE

Support the content assist lookup kind LookupKind.THIS, where the lookup 
looks in the class of the this pointer.
Fix a bug where the forward declared functions/methods appeared twice in 
the content assist results .

TESTS

Added ContextualParseTest::testCompletionLookup_LookupKindTHIS
2004-01-07 02:00:22 +00:00
John Camelon
d02df84a93 CORE
Renamed IToken::tELIPSE to IToken::tELLIPSIS
	Partially fixed Bug 43110 : Parser support needed for functions with ellipses 

TESTS
	Added CompleteParseASTTest::testBug43110() and QuickParseASTTests::testBug43110().
2004-01-06 15:26:48 +00:00
Doug Schaefer
8cceffb272 Fix the classpaths to use dynamic containers again.
My apologies :-)
2004-01-05 21:16:28 +00:00
Doug Schaefer
e1b04cf0c0 Added org.eclipse.core.runtime.compatability as a
dependency to satisfy Eclipse 3.0M6 requirements.
2004-01-05 20:26:57 +00:00
Hoda Amer
b4c1ec6c05 Content Assist work: Bug fixing 2003-12-31 20:39:37 +00:00
Hoda Amer
7dc9ef21ba Content Assist work : Template Engine work 2003-12-22 21:12:56 +00:00
Hoda Amer
67ad10a37b Symbol Table work for Content Assist By Andrew 2003-12-17 20:51:39 +00:00
Hoda Amer
33f033599d Content Assist work 2003-12-17 19:21:32 +00:00
Hoda Amer
c8b4fb4ce5 Symbol Table work for Content Assist By Andrew 2003-12-16 15:18:16 +00:00
John Camelon
15c39a3ed3 CORE
Added preliminary keyword support into IASTCompletionNode::getKeywords().  
	Refactored parser to put keyword string literals in one utility class.  

TESTS
	Updated testBaseCase_SimpleDeclaration() for keyword assertions.
2003-12-12 19:44:52 +00:00
John Camelon
938c206289 CORE
Added OffsetLimitReachedException and restructured Parser exceptions.  
	Continued support for code assist/selection search parser.  
	Ensured all source in parser/ have copyright notices.  

TESTS
	Expanded ContextualParseTest::testBaseCase().  
	Updated tests to deal with new signatures/exceptions.  

UI
	Updated CompletionEngine to deal with new signatures/exceptions in parser.
2003-12-12 02:03:55 +00:00
Alain Magloire
08dab80c33 updated. 2003-12-11 18:42:31 +00:00
Alain Magloire
ba72f8169a New tests for the CPathEntry. 2003-12-11 18:42:20 +00:00
John Camelon
bce674ac9a Patch for Andrew Niefer. 2003-12-10 00:07:32 +00:00
Hoda Amer
0b91eeb637 Content Assist work 2003-12-09 19:58:34 +00:00
John Camelon
b363b30e27 CORE
Fixed Bug 47234 : new ParserMode required for a better CModel
	Updated IASTCompletionNode to include a scope as well as a context.  
	Begun parser updates to support code assist & selection search.  

TESTS
	Added ContextualParseTest.java and some test cases.
2003-12-09 16:39:15 +00:00
John Camelon
7ff25dd4c8 CORE
Removed some warnings. 
	Fixed Bug 39678 : Scanner doesn't support concatenation of different-type string literals (GCC) 
	Refactored ScannerContext to use constructors rather than initializers.  
	Refactored IScannerContext to use enumeration-esque kinds.  
	Added code assist/selection search support to Scanner.  

TESTS
	Removed some warnings.  
	Moved testBug39678() from ASTFailedTests to QuickParseASTTests.
2003-12-04 21:28:56 +00:00
John Camelon
e43eb360d1 Patch for Andrew Niefer.
This patch changes the handling of ambiguities during prefix lookup.
It also addresses problems in the symbol table to do with qualified 
lookup.  Fixing these revealed problems caused by the 
CompleteParseASTFactory not always using the correct lookup functions.  So 
the factory has been modified to call the appropriate lookups.

The following tests have been created:
        FailedCompleteParseASTTest.testBug47926
        CompleteParseASTTest.testQualifiedLookup
        ParserSymbolTableTest.testPrefixLookup_Ambiguities
        ParserSymbolTableTest.testQualifiedUnqualifiedLookup
        FunctionMethodPatternTests.testLookupForDefinition
2003-12-03 21:48:19 +00:00
Hoda Amer
307d4a1d40 Content Assist work 2003-12-03 20:29:29 +00:00
John Camelon
21f4465862 Patch for Andrew Niefer
CompleteParseASTFactory should use the symbol table's elaboratedLookup 
instead of qualifiedLookup when it encounters an elaborated type 
specifier.

Core:
change createElaboratedTypeSpecifier to call 
IContainerSymbol.elaboratedLookup

Core.tests
add CompleteParseASTTest.testBug47624
2003-11-28 05:07:26 +00:00
John Camelon
0adb9b9d20 Patch for Andrew Niefer.
Core:
        In prefix lookup, the lookup does not stop when a symbol is found, also abiguity resolution is modified.
        Add IContainerSymbol.prefixLookup (signature subject to change)
        Add ParserSymbolTable.LookupMode, an enum with 2 values: NORMAL, PREFIX
        In prefix mode, the lookup does not stop when a symbol is found.

Tests:
        ParserSymbolTableTest.testBug46882
        ParserSymbolTableTest.testPrefixLookup_Unqualified
        ParserSymbolTableTest.testPrefixLookup_Qualified
        ParserSymbolTableTest.testPrefixLookup_Inheritance
2003-11-28 04:58:00 +00:00
Doug Schaefer
9c677d807f Upversioned the plugins, etc to 2.0.0.
Made sure the jar files got included in the zips.
2003-11-25 18:24:55 +00:00
Doug Schaefer
9dc3aa63e5 Upgrade to Eclipse 3.0. Includes:
- upgrade plugin.xml files
- use PDE containers
- apply Eclipse 3.0 porting items, in particular openEditor and gotoMarker
- remove TestWorkbenches from test plugins
2003-11-24 18:31:03 +00:00
John Camelon
fcfd56c2af Patch for Andrew Niefer.
Refactor the symbol table by splitting the ParserSymbolTable.Declaration 
class in 4 classes and moving it to not be nested
Tests have been updated and tested on windows & Linux
2003-11-20 15:23:01 +00:00
Hoda Amer
4d7450e8fb Bug Fixes for the complete AST factory 2003-11-13 19:27:29 +00:00
Hoda Amer
f14741b541 Fix for Andrew 2003-11-10 19:37:02 +00:00
John Camelon
df634f2e75 CORE
Fixed Bug 39554 : _Pragma directive is not supported (ANSI C99) 

TESTS
	Moved testBug39554() from ASTFailedTests to QuickParseASTTests.
2003-11-07 19:49:36 +00:00
John Camelon
13b7aeb128 CORE
Fixed Bug 44838 : exception when resolving parameter references in a constructor 
	Fixed Bug 46165 : fields referenced in constructor chains are not called back upon 
	Fixed Bug 45551 : Macro replacement in #include <file.h> directives 

TESTS
	Added CompleteParseASTTest::testBug44838().  
	Added CompleteParseASTTest::testBug46165().  
	Added ScannerTestCase::testBug45551().
2003-11-06 04:57:38 +00:00
John Camelon
97e203468e CORE
Cleaned up the ParserFactory interface to check for validity of input arguments.  
	Moved NullSourceElementRequestor and ScannerInfo to public interface as requested. 
	Restructured code so that no Eclipse/CDT source outside the parser source directory is used.
	Updated parser clients to use new ParserFactory (stand-alone parser work item).  	

UI & TESTS
	Updated parser clients to use new ParserFactory (stand-alone parser work item).
2003-11-05 23:35:28 +00:00
John Camelon
56c76eb3e7 CORE
Removed warnings from parser source tree.  
	Removed preliminary task tags support to clean up parser interfaces and implementation.   
	Added preliminary IProblem support to 

UI
	Updated parser clients to use new IProblem strategy.  

TESTS
	Updated parser clients to use new IProblem strategy.
2003-11-05 18:15:21 +00:00
John Camelon
1a068f661e Patch for Andrew Niefer
core:
Fixed Bug 44925 : Search: Elaborated type specifier
Partially Fixed Bug 44510 : C/C++ Search gives wrong results 

ui:
Fixed Bug 44337 : Disabling of "definition" not making sense in Search 
dialog
Fixed Bug 44947 : Navigate from Outline: Enumeration type not 
pre-populated
Fixed Bug 44948 : Navigate via Open Declarations: typedef decl not found
2003-11-03 14:00:24 +00:00
Doug Schaefer
92669e0062 Patch for Bogda Gheorghe: (44366 & 45324)
- Moved off all dependency calculations to the Indexer thread,
created a new UpdateDependency job
- Modified CSearchOperation to only lock the workspace when
tagging resources with markers.
2003-10-27 20:57:47 +00:00
John Camelon
a95faa4dbe CORE
Fixed Bug 45476 : preprocessor macro "defined" not handled correctly 
	Fixed Bug 45477 : macro redefines prevent further parsing 

TESTS
	Added testBug45476() to ScannerTestCase.  
	Added testBug45477() to ScannerTestCase.
2003-10-24 21:34:15 +00:00
John Camelon
5be9f16c62 CORE
Fixed Bug 39542 : Parser fails on 'struct' parameter types 
	Fixed Bug 39549 : Designated initializers are not supported (ANSI C99) 
	Fixed Bug 39551 : Complex and imaginary numbers are not supported (ANSI C99) 

TESTS
	Moved testBug39542() from ASTFailedTests to QuickParseASTTests.
	Moved testBug39549() from ASTFailedTests to QuickParseASTTests.
	Added testCDesignatedInitializers() to CompleteParseASTTests.
	Moved testBug39551A() from ASTFailedTests to QuickParseASTTests. 
	Moved testBug39551B() from ASTFailedTests to QuickParseASTTests. 
	Added testCBool() to QuickParseASTTests.  
	Added testBug39551A(), testBug39551B() and testCBool to CompleteParseTests.
2003-10-24 17:49:22 +00:00
Hoda Amer
1f8b4f48a6 Bug fixes in CModelBuilder 2003-10-22 17:46:50 +00:00
John Camelon
dfdfecab15 CORE
Fixed Bug 40007 : Parser reports success when it fails
	Fixed Bug 44305 : Scanner/preprocessor fails on conditionals using hexidecimal 
	Fixed Bug 41935 : parser provides wrong name on namespace aliases 
	Fixed Bug 39525 : Parser fails on expressions that take address of overloaded operators 
	Fixed Bug 45287 : Scanner does not accept character sequence literals 
	Fixed Bug 36550 : Error recovery with unterminated string is weak 
	Fixed Bug 41063 : Remove unused K&R C support from ANSI Parser 
	Fixed Bug 39528 : Function try-blocks are not supported by the parser (ANSI C++) 
	Fixed Bug 39538 : Parser fails on explicit instantiation of templated operators 
	Fixed Bug 39536 : Parser fails on templated constructors/conversion operators 
	Refactored Scanner to make it easier to debug.  

TESTS
	Moved testBug40007() from ASTFailedTests to QuickParseASTTests.  
	Added QuickParseASTTests::testBug40759().  
	Added QuickParseASTTests::testBug44633().  
	Added ScannerTestCase::testBug44305().  
	Added QuickParseASTTests::testBug41935(). 
	Moved testBug39525() from ASTFailedTests to QuickParseASTTests.  
	Added ScannerTestCase::testBug45287(). 
	Moved testBug39528() from ASTFailedTests to QuickParseASTTests.  
	Moved testBug39538() from ASTFailedTests to QuickParseASTTests.  
	Added QuickParseASTTests::testBug39536().  
	Moved testBug39536A() from ASTFailedTests to QuickParseASTTests.  
	Moved testBug39536B() from ASTFailedTests to QuickParseASTTests.
2003-10-21 23:22:40 +00:00