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

1336 commits

Author SHA1 Message Date
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
d6a7d069a1 Updated TranslationUnitTests to not include K&R 2003-08-25 14:13:26 +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
John Camelon
94b8758d5c patch to keep CDT working for Java 1.3 2003-08-25 11:54:00 +00:00
Doug Schaefer
eaab6a9736 Patch for Hoda Amer:
Core: 
        -Solutions to bug#38985 & bug#38986 
        In IStructure: 
                getField(String)                Implemented 
                getFields()                        Implemented 
                getMethod(String)                Implemented 
                getMethods()                Implemented 
                isAbstract()                Implemented 
                getBaseTypes()                Has been replaced by getSuperClassesNames() 
                getAccessControl(int)        Has been replaced by getSuperClassAccess(String name) 

        - Added some methods to IMethodDeclaration, namely: 
        isFriend(), isInline(), isVirtual(), and isPureVirtual(). 

Core Tests: 
        Enabled some tests in the IStructureTests, namely: 
        testGetFields(), testGetField(), testGetMethods(), testGetMethod(), 
        testIsAbstract(), testGetBaseTypes(), and testGetAccessControl().
2003-08-25 04:20:47 +00:00
Doug Schaefer
a80d2f71de Patch for Bogdan Gheorghe:
Indexer 
- Added additional file extensions to supported indexed files 
- Changed the parser instantiation to pass in retrieved build info 
- Added function decl index entry based on enterFunctionBody 
- Added method decl index entry based on enterMethodBody 
- Added forward decl refs 
- Added debug tracing to AbstractIndexer 

Search 
- Changed matching and reporting functions to handle nodes 
  of type IElaboratedTypeSpecifier 

UI 
- Added a search dialog pop up item to the context menu for the 
  CEditor and CContentOutlinePage
2003-08-20 20:53:50 +00:00
Doug Schaefer
301de9ca43 Patch for Sean Evoy:
I forgot (again) that the Eclipse patching mechanism does not pay 
attention to gifs. So, here are the build icons redone with the proper 
transparency settings. Now they no longer show up as an annoying white 
blob on the grey Motif background/ or Gtk selection box.
2003-08-20 20:09:31 +00:00
Alain Magloire
fac3669873 updated. 2003-08-20 20:05:40 +00:00
Alain Magloire
fa5928f508 Terminate when the thread is interrupted. 2003-08-20 20:05:05 +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
Alain Magloire
5fd96de2e5 updated. 2003-08-20 17:34:42 +00:00
Alain Magloire
279655a2ff support d&d non-resources in the CView. 2003-08-20 17:34:33 +00:00
David Inglis
0f45720f3d patch from sean see changelog 2003-08-18 17:34:23 +00:00
David Inglis
e5e277adaf removed abstract method as it does not need to be abstract 2003-08-18 16:16:10 +00:00
David Inglis
746f6bfdc7 new project C/C++ project wizard classes 2003-08-18 16:10:59 +00:00
David Inglis
8c4b0d9020 update so that it can be extended to use other type control 2003-08-17 19:49:30 +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
David Inglis
21a6509a3b fixed problem with large lists (resize policy did not has a height hint) 2003-08-14 13:55:11 +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
David Inglis
4c82ed5537 new C project options controls 2003-08-13 19:26:27 +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
fbd1af4e45 Fixed Bug 41480 - ceditor extension point is not default editor for C++ file extensions 2003-08-13 14:57:13 +00:00
John Camelon
905d5c624d Patch for Bogdan Gheorghe.
Changed the order of tests in AutomatedIntegrationSuite. The indexer tests must be run AFTER any indexer client tests...
2003-08-12 22:22:58 +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
8dba12bff3 Patch for Hoda Amer.
Hi, 
This patch updates code completion to use search. It also includes my previous patch which enabled the class wizard to use search as well. 

Current Code Completion has the following restrictions: 
- It will only work within the scope of a function or a method. 
-It will look for globals (variables, functions, classes, strucs, unions, enumerations, and macros). 
-In the scope of a method, it will also look for the methods and fields that belong to the owner class of this method. 
- It will NOT search the parent classes of the method in the method scope case. 
- It will NOT de-reference after a "." or an "->"
2003-08-12 20:20:13 +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
John Camelon
04453687f0 Patch for Bogdan Gheorghe
This patch combines the field and variable search patterns into one in order to allow qualified searches on variables.
2003-08-12 15:20:21 +00:00
John Camelon
04fd4de249 Patch for Bogdan. 2003-08-12 14:31:55 +00:00
John Camelon
dbc6ab4f98 Patch for Bogdan Gheorghe.
This patch adds working copy search, macro search and combines the function and method search patterns into one.
2003-08-12 14:29:07 +00:00
David Inglis
256866b864 new error dialog methods 2003-08-12 14:04:11 +00:00
David Inglis
dc9458bbc7 abstract class for implementing a tab folder control
block of ICOptionPages.
2003-08-12 13:44:37 +00:00
David Inglis
027d7aab46 abstract class for use by ICOptionPage implementers. 2003-08-12 13:39:20 +00:00
David Inglis
f384582c3c new i/f that will replace IWizardTab and IValidation 2003-08-12 13:37:58 +00:00
John Camelon
ff9ca80b0c Patch for Bogdan (Fancy Pants) Gheorghe
This patch adds macro declarations to the index.
2003-08-11 19:10:45 +00:00
John Camelon
42cf54e708 Patch for Sean Evoy
This patch contains a fix for bug 41274 in the core; library entries in 
the build property pages were not being saved by the build model manager.

It also contains a bunch of fixes for minor problems in the UI. I added a 
new target for building DLLs on Cygwin. The zip file adds a new icon for 
configurations in the tree view of the build property page for managed 
builds. Now the tool uses the tool icon and the category uses the new 
category icon.

The list editor will better fit a page with space-grabbing widgets in 
different columns. For example, the default list field editor puts the 
list in the left column and allows it to grab all excess space. Entry 
fields put the label in the left and the space-grabbing entry field/combo 
box in the right. The layout manager then gives both left and right 
columns equal space in that case. By wrapping the list field editor in a 
group control that spans both columns, the layout manager allocates enough 
space for controls in the right-hand column. It also lays out the contents 
of the list field editor inside the group control independently of the 
outer container, so it looks right too. Also added a double-click event 
handler so users  can edit list elements. All in all, this makes the list 
widget work better.

I re-activated the summary field editor class (it's alive!). It still does 
not behave quite right in terms of showing the command line summary, but 
that functionality will be added shortly.

Finally, the build property page is being resized for large pages. It is 
still possible to specify categories with too many options to display, 
even with the new resize. This will have to be a documented limitation, or 
we will have to add a vertical scroll bar for pages that are too large.
2003-08-11 17:33:10 +00:00
John Camelon
78d86df8e3 Patch for Andrew Niefer
core : 
- add function parameter information to search results

ui:
- modified Search result sorting to sort by offset if the label is the 
same for two items
2003-08-11 13:48:39 +00:00
John Camelon
e1a20e1a7d Patch for Bogdan Gheorghe
Put in Indexer shut down which cleans up the .metadata directory of any suspicious looking index files 
Put in CSearchScope changes (in both UI and core) to enable working set searches
2003-08-11 13:42:55 +00:00
Doug Schaefer
b97611936d Patch for Andrew Niefer:
core:
- created new search pattern OrPattern, which returns a match if any of 
its constituent pattens return a match.

To use it, do something like:
OrPattern orPattern = new OrPattern();
orPattern.addPattern( SearchEngine.createSearchPattern( "::NS::B::e", 
ENUM, REFERENCES, true ) );
orPattern.addPattern( SearchEngine.createSearchPattern( "Hea*", CLASS, 
DECLARATIONS, true ) );

Searching for all occurences of something now uses the OrPattern. ie, 
SearchEngine.createSearchPattern( "A", TYPE, ALL_OCCURENCES, true );
is the same as
OrPattern orPattern = new OrPattern();
orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, 
DECLARATIONS, true ) );
orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, 
REFERENCES, true ) );
orPattern.addPattern( SearchEngine.createSearchPattern( "f", FUNCTION, 
DEFINITIONS, true ) );

For large projects this is much more efficient than the old method of 
finding all occurences

core.tests:
- added ClassDeclarationPatternTests.testAllOccurences
- added OtherPatternTests.testOrPattern
2003-08-07 14:52:18 +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
287009d748 Patch for Andrew Niefer.
This patch contains modifications to BasicSearchMatch and 
BasicSearchResultCollector so that the collector will not accept matches 
that have already been seen.

( Addresses the problem of seeing a class definition in a header file 
multiple times because that header was included from multiple cpp files)

This patch also fixes a small bug in finding the resource for header files 
we enter while parsing.
2003-08-01 19:26: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
8513838955 Patch for Sean Evoy
I am in the process of documenting the build model and as I go along, a 
number of things will have to be cleaned up in the actual model itself. 
This patch is purely a bookeeping change to make it easier for me to 
maintain the build model in the face of these changes as we go forward. 
Where I used to access XML elements using hard-coded strings, I have moved 
the string into the appropriate interface class. If the name of the 
attribute changes in the future, I only have to update it one place.

I have also begun the process of renaming certain attributes of the schema 
to make them better reflect what they are doing. My hope is that if they 
have intuitive names, toolchain implementers will have less difficulty 
understanding their intent. In any case, I have changed four attribute 
names; optionRef -> optionReference, toolRef -> toolReference, optionValue 
-> listOptionValue, and  optionEnum -> enumeratedOptionValue. 

Unfortunately, these changes will invalidate the dot-cdtbuild files for 
any managed build projects in your workspace. If you can't bear to create 
a new project, move the files over, and set-up the compiler options again, 
you can always hand-edit the changes in the file yourself. Just remember 
to restart CDT after you do so.
2003-07-31 13:20:37 +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
5aae8a1f5d Patch for Hoda Amer.
- The core patch modifies the CModelBuilder to recognize pointers to functions. 
- The tests patch changes the CModelElementsTests and puts the pointer to function test back in its original place (as a variable). 
- The ui patch modifies the NewClassWizard to use search in finding a base class ( the new indexer must be on for it to work ).
2003-07-30 19:17:14 +00:00