1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-14 03:35:37 +02:00
Commit graph

88 commits

Author SHA1 Message Date
Sergey Prigogin
48c9cc0b73 Merge branch 'bug_45203' 2013-03-14 17:25:27 -07:00
Sergey Prigogin
7ac4d43010 Bug 45203. Major milestone - Organize Includes command is ready for
alpha testing.
2013-03-14 17:20:22 -07:00
Andrew Eidsness
6c6ab24c23 Bug 400020: Allow tagging of IBindings
Addresses review comments from https://git.eclipse.org/r/#/c/10648.

Fixes the junit problems by making sure that the dummy PDOM acquires its
write lock before calling exercising the tag index.

Original commit message:
This new extension point allows contributors to put their own
information into the PDOM and to later retrieve it for their own
purposes.

There are many details in the bug.  The idea is that contributors
provide an implementation of IBindingTagger, which is given a chance to
examine IBindings when they are created.  The ITagWriter interface
allows the contributor to create a new tag which can then have data
written to it.

The ITagService interface (accessible from CCorePlugin.getTagService()
provides a way for the contributor to later get an instance of
ITagReader to retrieve tags from bindings.

ITags are copied to the PDOM when the associated binding is persisteed.

Contributors use a unique id (based on their plugin id), so that
multiple contributors are able to independently tag a given binding.

In-memory tags are not cached.  I've done some timing tests using my
sample implementation and found no measurable difference.  The full log
lines look like:

	!MESSAGE Indexed 'simple-01' (2 sources, 184 headers) in <see below>
sec: 21,550 declarations; 35,394 references; 0 unresolved inclusions; 1
syntax errors; 0 unresolved names (0.00%)

I did 5 tests using the current master (no tagging-related code), the
times were:
	18.86 sec
	 9.17 sec
	 5.91 sec
	 4.79 sec
	 4.83 sec

And then I ran the same sequence of tests using the code in this
commit:
	18.73 sec
	 9.39 sec
	 6.50 sec
	 4.78 sec
	 5.27 sec

If performance does become a problem, then caching could be introduced
with a new implementation of ITaggableService.  The two problems are
finding a key other than the identity of the IBinding (since IBindings
are re-created often) and properly evicting stale entries when the
binding is no longer valid.

The process of copying tags from an in-memory IBinding to a PDOMBinding,
is a synchronization.  This means that tags that are no longer
applicable, will be removed from the persistent store.

While developing this I found that PDOMBindings are not deleted from the
Database (only the names that reference them are deleted), so there is
no provision for deleting all tags at once.

New database locks are not needed.  By the time the persistent tags are
accessed, higher levels of code have already taken a read or write lock
as appropriate.

There are new unit tests covering the changes to the PDOM.

Change-Id: I6ae1afc949082f7f4484b3faa1550670be43312f
Reviewed-on: https://git.eclipse.org/r/10659
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-26 21:17:01 -05:00
Sergey Prigogin
29efae5311 Reverted commit 2279927: Bug 400020: Allow tagging of IBindings 2013-02-25 16:36:23 -08:00
Andrew Eidsness
2279927623 Bug 400020: Allow tagging of IBindings
This new extension point allows contributors to put their own
information into the PDOM and to later retrieve it for their own
purposes.

There are many details in the bug.  The idea is that contributors
provide an implementation of IBindingTagger, which is given a chance to
examine IBindings when they are created.  The ITagWriter interface
allows the contributor to create a new tag which can then have data
written to it.

The ITagService interface (accessible from CCorePlugin.getTagService()
provides a way for the contributor to later get an instance of
ITagReader to retrieve tags from bindings.

ITags are copied to the PDOM when the associated binding is persisteed.

Contributors use a unique id (based on their plugin id), so that
multiple contributors are able to independently tag a given binding.

In-memory tags are not cached.  I've done some timing tests using my
sample implementation and found no measurable difference.  The full log
lines look like:

	!MESSAGE Indexed 'simple-01' (2 sources, 184 headers) in <see below>
sec: 21,550 declarations; 35,394 references; 0 unresolved inclusions; 1
syntax errors; 0 unresolved names (0.00%)

I did 5 tests using the current master (no tagging-related code), the
times were:
	18.86 sec
	 9.17 sec
	 5.91 sec
	 4.79 sec
	 4.83 sec

And then I ran the same sequence of tests using the code in this
commit:
	18.73 sec
	 9.39 sec
	 6.50 sec
	 4.78 sec
	 5.27 sec

If performance does become a problem, then caching could be introduced
with a new implementation of ITaggableService.  The two problems are
finding a key other than the identity of the IBinding (since IBindings
are re-created often) and properly evicting stale entries when the
binding is no longer valid.

The process of copying tags from an in-memory IBinding to a PDOMBinding,
is a synchronization.  This means that tags that are no longer
applicable, will be removed from the persistent store.

While developing this I found that PDOMBindings are not deleted from the
Database (only the names that reference them are deleted), so there is
no provision for deleting all tags at once.

New database locks are not needed.  By the time the persistent tags are
accessed, higher levels of code have already taken a read or write lock
as appropriate.

There are new unit tests covering the changes to the PDOM.

Change-Id: I8da1bf5eeba7e1fc2ca7ec308ed8e212629986a4
Reviewed-on: https://git.eclipse.org/r/10407
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-20 11:27:03 -05:00
Sergey Prigogin
f7f56bb08e Bug 397208 - Problem markers don't get updated when preferences change 2012-12-27 16:54:43 -08:00
Markus Schorn
cf08c60eda Bug 299911: Increment plugin and pdom version. 2012-06-26 07:44:40 +02:00
Alex Ruiz
181907f2fd Bug 372551. Fixed running checkers on file open. Split "On file save"
launch mode into "On file save" and "On file open". Removed warnings in
project org.eclipse.cdt.codan.ui.cxx.

Change-Id: I7f0bc16731ba36e8048904f19836da9ae47514de
Reviewed-on: https://git.eclipse.org/r/5665
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2012-04-26 23:02:11 -04:00
Marc Khouzam
6abf9e1a42 Bug 317173: Cleanup warnings for DSF-GDB. 2012-04-20 15:38:21 -04:00
Alex Ruiz
1f83e4aa21 Bug 372551. Codan support for writing checkers that invoke external
tools.

Change-Id: Ia5cfd24d54ec6e67e08f24a367a6bc689ae407d0
Reviewed-on: https://git.eclipse.org/r/5586
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2012-04-18 15:52:48 -04:00
Sergey Prigogin
bfb9dae292 Added dependency on com.ibm.icu plug-in in an attempt to fix broken
Hudson build.
2012-03-17 17:03:15 -07:00
Andrew Gvozdev
b4230c0fff bug 290631: Added New Scanner Discovery core functionality from branch
sd90 (Not connected to the rest of the code yet)
2012-01-26 15:30:43 -05:00
Sergey Prigogin
457af57f60 Changed the execution environment to JavaSE-1.6 2011-10-17 16:44:49 -07:00
Markus Schorn
b2452fb45d Bug 347298: Array type in field access. 2011-06-29 12:16:21 +02:00
Chris Recoskie
b609ec68ba Bug 133881 - Make refreshing after building optional
- serialize/deserialize to/from C project description
- fix stack overflow issue on load
- move ResourceExclusion and friends to internal packages
2011-05-10 16:53:37 +00:00
Markus Schorn
63eebc5290 Bug 173458: Make camel-case content assist a UI preference, by Jens Elmenthaler. 2011-05-02 09:24:05 +00:00
Chris Recoskie
e923b9a3c9 Bug 205257 - CDTProject creation scalability issue 2011-03-24 17:11:35 +00:00
Anton Leherbauer
754bca12d2 Update minimum bundle versions 2011-02-25 13:37:13 +00:00
James Blackburn
bf5233d4e4 Bug 321588 - Headless Builder allow extending the build environment from the command line 2010-08-23 14:43:15 +00:00
Markus Schorn
7ed4f94f50 Bug 294543: Built-in candidates for overloaded operators: Additional testcases and corrections. 2010-06-18 07:47:43 +00:00
Markus Schorn
66d10bd31a Bug 316747: Fix mistyped 'getTemplateParameter'. 2010-06-17 14:12:18 +00:00
Markus Schorn
4c8a4d2d74 Bug 162806: Deprecate IASTTranslationUnit.getParserLanguage(). 2010-06-16 12:27:16 +00:00
Chris Recoskie
947eedd5bc - Merged changes from cdt_5_0 to HEAD. Too many to mention individually.
- Reworked IFileSystem utility so that now it is noimplement/noextend.  Clients should now extend from concrete class FileSystemUtility instead to better insulate them from future API changes.
- Reworked the resulting concurrency fixes - indexing and scanner discovery now synchronize on the project root as a scheduling rule.  Original HEAD behaviour was to synch on the project's .settings folder for indexing, but that deadlocked with scanner discovery.
- Fixed remote indexing.  Changes on HEAD that deprecated CodeReader broke the ability for remote translation units to provide the path to load the file content from.  Added API to ITranslationUnit for this purpose.
2010-05-11 22:50:20 +00:00
Markus Schorn
d27a79d465 Bug 298069: Wrong encoding for lines in search result. 2010-01-04 10:43:49 +00:00
John Cortell
df44df36d3 [288656] Add tracing for DsfSession. Implemented Pawel's recommendation after review 2009-09-08 15:52:33 +00:00
John Cortell
7e8ee4c873 [288656] Add tracing for DsfSession 2009-09-04 19:42:17 +00:00
Markus Schorn
55f642b6df Increment plugin versions. 2009-07-06 13:05:01 +00:00
Vivian Kong
fa3911cd90 bug 254200 - use ICU4J 2009-03-13 13:47:48 +00:00
Markus Schorn
938969ae49 Fixes warnings. 2009-01-13 13:19:51 +00:00
Markus Schorn
3e28b31ae1 Implementation to select resource for a location, bug 248419. 2008-10-02 11:36:51 +00:00
Markus Schorn
a359eb6090 Implementation of an heuristics to resolve include files, bug 213562 2008-10-01 09:59:44 +00:00
Alena Laskavaia
8e64dbaaa5 PR: 215492 - moved to external package 2008-08-18 14:13:35 +00:00
Markus Schorn
7b61bb10f2 Allows to visit array-modifiers, bug 237605. 2008-06-18 12:43:30 +00:00
Markus Schorn
0b1b9a6092 Fix warnings. 2008-04-25 14:24:53 +00:00
Chris Recoskie
5f76384955 exporting indexer package because otherwise it's impossible to build anything that uses the standalone indexers 2008-04-22 19:06:29 +00:00
John Cortell
7b3681fc19 Applied patch in 227869. Produce an error if user tries to create memory monitor using a literal address that exceeds the range of the address factory used by the debug session. Prior to this change, the monitor would be created based on the truncated value. 2008-04-22 15:25:36 +00:00
Markus Schorn
da70ef502f Support search for local variables and parameters, bug 151334. 2008-04-22 09:08:07 +00:00
Markus Schorn
ca61147d16 Extract Function (work in progress) by Emanuel Graf, bug 226484. 2008-04-16 10:19:55 +00:00
Markus Schorn
f0854abfb0 Mark package 'org.eclipse.cdt.internal.core.dom.parser.cpp.semantics' as internal. 2008-03-28 08:14:51 +00:00
Andrew Ferguson
8bc2a7437a 222748: refactor semantic routines to separate package 2008-03-27 18:31:16 +00:00
Ken Ryall
3071e4834e Bug 182388, Executables view and supporting classes. 2008-03-24 21:21:02 +00:00
Markus Schorn
73869d3e94 Reworked refactoring: moved rename refactoring into ui-plugin (bug 220741), applied patch for extract constant (bug 181493). 2008-03-12 09:56:10 +00:00
Markus Schorn
1f19d506f8 Source Change Generator for ASTTransformations by Emanuel Graf and others, bug 214605. 2008-03-07 12:13:38 +00:00
Andrew Ferguson
c113b00476 178386: check-in documentation tool framework plus doxygen implementation 2008-02-09 12:23:25 +00:00
Anton Leherbauer
f4bbc8aaa1 Undo temporary package export 2008-01-18 08:37:04 +00:00
Markus Schorn
88ac1b7a85 Proposal for AST-rewriter API, bug 214334. 2008-01-09 14:37:20 +00:00
Doug Schaefer
e8019df504 Flexible File System. Get project creation working by replacing the use of IPath for project location with URIs. Also move FFS to its own plugin to avoid early initialization of the CDT. 2007-12-31 20:31:08 +00:00
Doug Schaefer
0d50d5b222 Get more of the FFS working. Also turned on Java 5 for cdt.core. 2007-12-28 21:29:45 +00:00
Markus Schorn
1e43fc3186 Removes DOMScanner and related classes, cleans up interfaces IScanner and IIndexMacro, (bug 212864). 2007-12-21 09:35:52 +00:00
Anton Leherbauer
1d35805d67 23540: Macro-expansion hover 2007-12-20 15:23:00 +00:00