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

21368 commits

Author SHA1 Message Date
Nathan Ridge
773aa77a2a Bug 401743 - NullPointerException in EvalBinding.instantiate() - tpMap
is null

Change-Id: Iea69ddf7f1872f0e1b0a918faed400b6d5d4f2f7
Reviewed-on: https://git.eclipse.org/r/10641
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-27 14:25:47 -05:00
Doug Schaefer
9c4d88dab4 Fix up a few formatting things and the version number for tags. 2013-02-26 23:08:13 -05: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
Sergey Prigogin
f331210279 Bug 389009 - Enumerator with dependent value. Fixed issues described in
comments #24 and #25.
2013-02-25 16:10:24 -08:00
Sergey Prigogin
185fe357cf Cosmetics. 2013-02-25 16:03:03 -08:00
Vivian Kong
3ef0d403ac Bug 307542 - [Accessibility] Error Parser Options is not accessible by
keyboard
2013-02-25 14:36:20 -05:00
Thomas Corbat
d24992f0a6 Bug 401661 - CPPClassType.getScope() at split definition and declaration
Now CPPClassType.getScope() returns the scope of the surrounding class
or namespace independent of the location of the definition.
2013-02-25 14:18:07 +01:00
Andrew Gvozdev
6e5ac901f4 bug 355488: Cannot delete variables from C/C++ build environment 2013-02-24 15:33:41 -05:00
Andrew Gvozdev
fffc3a13e3 bug 348781: Problem adding environment variables to preferences 2013-02-24 15:33:24 -05:00
Jesse Weinstein
8da0b43d30 Bug 400955: add Source menu docs
Some of the descriptions are not very good, and will be improved in a
future commit.

Change-Id: I1150a76c504fe0cf71911acb3c0a1c6e72ee3686
Reviewed-on: https://git.eclipse.org/r/10557
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-22 19:07:33 -05:00
Jesse Weinstein
3fc0510ecd Bug 400955: update Edit menu docs
Change-Id: I743c5ca8a412eb059bba478aaecc223dd04b2080
Reviewed-on: https://git.eclipse.org/r/10541
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-22 19:05:08 -05:00
Jesse Weinstein
b502c8ab5d Bug 400955: move some styling into css classes
The edit menu docs will be updated in a later patch.

Change-Id: I5a8975d1159e39e580e87f502160d3f46d71b3f0
Reviewed-on: https://git.eclipse.org/r/10604
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-22 19:02:59 -05:00
Nathan Ridge
f0a597bc2b Bug 401400 - Another error involving variadic non-type template
parameters

Change-Id: Ic5c64de6d32a203d13274053da61923d9d8e2ad3
Reviewed-on: https://git.eclipse.org/r/10559
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-21 16:51:21 -05:00
Mikhail Khodjaiants
895e0aa394 Bug 398913 - 'Connect' button remains disabled after being used
Change-Id: I301e897b5c4c76e3edbcd6f517c15793e4323d04
Reviewed-on: https://git.eclipse.org/r/10345
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
2013-02-21 14:07:44 -05:00
Jeff Johnston
18ff30de24 Bug 400972: Creating new C/C++ project in existing read-only
directory should be disallowed

Change-Id: I75090498bd4f408d77ad17491f50f4fd66850c97
Reviewed-on: https://git.eclipse.org/r/10404
Reviewed-by: Jesse Weinstein <Jesse.Weinstein@clinicomp.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
IP-Clean: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
2013-02-20 16:16:50 -05:00
Andrew Eidsness
1908efec38 qt slot/signal auto-complete
Tags signal and slot methods when the index is created.  Uses these tags
to suggest values inside of SIGNAL and SLOT macro expansions.  Enabled
only for projects with the QtNature.

Recognizes QObject::connect function calls and suggests SIGNAL(a) and
SLOT(a) for the 2nd and 4th parameters.

When expanding the SIGNAL and SLOT macros within a call to
QObject::connect, suggests signals and slots based on the type of the
previous parameter.

E.g. in

    QObjectA a;
    QObjectB b;
    QObject::connect( &a, SIGNAL(*), &b, SLOT(**) );

The content assistant will suggest the methods of type QObjectA that
have been marked as signals at *, and the methods of QObjectB that have
been marked as slots at **.

Change-Id: Ia6aaa71724547b0977e322399a500f072004767a
Reviewed-on: https://git.eclipse.org/r/10532
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2013-02-20 16:13:49 -05:00
Nathan Ridge
24ba7ff688 Bug 401142 - Error involving variadic non-type template parameters
Change-Id: I7735649c59354431a91980142055e4b86a82e6f6
Reviewed-on: https://git.eclipse.org/r/10467
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-20 12:51:30 -05:00
Nathan Ridge
ee08bee24b Bug 401140 - NullPointerException in CPPTemplates.addDefaultArguments()
Change-Id: I05fa8a3935904cb1bd293348dcbf10810e677b5c
Reviewed-on: https://git.eclipse.org/r/10466
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-20 12:37:58 -05:00
Nathan Ridge
f1542b27c6 Bug 399829 - Wrong context for name lookup in dependent expression
Change-Id: Iab800a2264c56bdf01498c238b08a2948ca3cfc8
Reviewed-on: https://git.eclipse.org/r/10333
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-20 12:24:28 -05: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
Nathan Ridge
81885d232f Bug 401024 - Error involving variadic templates
Change-Id: Ic5e0b3176e87e6dcecfb528367ce5f8eea4760c1
Reviewed-on: https://git.eclipse.org/r/10426
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-19 23:14:57 -05:00
Andrew Gvozdev
c48e321ea3 bug 401255: LSP userdef entries: Cannot add macro after adding a workspace include path 2013-02-19 23:03:33 -05:00
Doug Schaefer
9c88bbc509 Fix overly strict dependency in qt.core. 2013-02-19 10:50:58 -05:00
Sergey Prigogin
0ae8bcc48c Bug 401093 - Expression type for pointer difference does not fit on
64bit machines
2013-02-18 17:49:55 -08:00
Sergey Prigogin
e2cbee5c2b Cosmetics. 2013-02-18 17:44:39 -08:00
Andrew Gvozdev
e4966b7c0c bug 401116: Built-in compiler settings cannot be scanner-discovered prior to a build by non-shared language settings providers 2013-02-18 14:20:30 -05:00
Andrew Gvozdev
b5d0a617f2 Added logging methods with severity as parameter 2013-02-18 14:20:07 -05:00
Andrew Gvozdev
df7db35d55 bug 395302: Project needs to refresh after discovering compiler built in settings 2013-02-17 17:37:45 -05:00
Andrew Gvozdev
4796a11050 Read-only project description can be used here 2013-02-17 15:10:39 -05:00
Andrew Gvozdev
8f8ad163a5 Fix testRepeatedlyChangeConfig_bug375226 so its failure won't break all subsequent indexer tests 2013-02-17 15:10:08 -05:00
Jesse Weinstein
9b764dddbd Bug 400226: updated Toggle Function Definition docs
Change-Id: Ie7c579d40e64ea8e0c4d6e7354db8a12c480f964
Reviewed-on: https://git.eclipse.org/r/10405
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-16 14:21:33 -05:00
Jesse Weinstein
c5f65f3722 Bug 400226: updated Rename refactoring docs
Change-Id: Ic5d2ecc39fa6dd97b8640b5170adcac59450be3e
Reviewed-on: https://git.eclipse.org/r/10402
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-16 14:19:22 -05:00
Jesse Weinstein
ee70160c98 add missing items to Refactor menu docs
Change-Id: I7baf8e88da0cfeeff27e984f406e0cf16439ba8a
Reviewed-on: https://git.eclipse.org/r/10398
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-15 15:11:44 -05:00
Marc Khouzam
4af3066d40 Bug 394183 - MIBreakpointChangedEvent causing NullPointerException in
View Model

Change-Id: I33559d798f218d358eb491d426f680cfe85ebe13
Reviewed-on: https://git.eclipse.org/r/10337
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-02-15 06:00:30 -05:00
Sergey Prigogin
54ae5864d7 Bug 400747 - [regression] ClassCastException:
PDOMCPPEnumeratorSpecialization cannot be cast to IType
2013-02-13 15:28:16 -08:00
Sergey Prigogin
0901395d32 Code streamlining. 2013-02-13 15:28:08 -08:00
Pawel Piech
285d6cf662 Bug 400152 - Add org.eclipse.debug.core and org.eclipse.resources.core imports 2013-02-13 11:40:25 -08:00
Marc Dumais
7a656b87e5 Bug 400231 - MulticoreVisualizer: NPE in
MulticoreVisualizerEventListener.handleEvent(IExitedDMEvent)

Change-Id: Iac1567de8a72e2a72a57d35f492710472142ac94
Reviewed-on: https://git.eclipse.org/r/10290
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-02-12 13:27:23 -05:00
Marc-Andre Laperle
5d335384e3 Bug 385144 - Invalid redefinition of enum reported when enum is used as
first parameter in constructor

createBinding is called twice for the enumeration specifier because now
ImplicitsAnalysis calls createType on the constructor parameter
declaration. The second time it is called, it wrongly thinks the
specifier is a redefinition. We can check that it's not a redefinition
by comparing the ast names.

Change-Id: If7fb168d578a7a59e78867d6d8154e0866d2a730
Reviewed-on: https://git.eclipse.org/r/10272
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-12 13:03:57 -05:00
Sergey Prigogin
ec0ec79c55 Improved Javadocs. 2013-02-08 14:03:41 -08:00
Pawel Piech
77db4a8dcd Bug 396230 - [breakpoints] In Breakpoint Properties dialog sort and group pages. 2013-02-08 13:32:00 -08:00
Sergey Prigogin
487c68d366 Bug 400275 - CoreModel.isScannerInformationEmpty mistakenly thinks that
language settings providers are enabled

Change-Id: Ie9cbb2df8dbc9b1034bde2dbfd5de64d27d54c49
Reviewed-on: https://git.eclipse.org/r/10248
Reviewed-by: Andrew Gvozdev <angvoz.dev@gmail.com>
IP-Clean: Andrew Gvozdev <angvoz.dev@gmail.com>
Tested-by: Andrew Gvozdev <angvoz.dev@gmail.com>
2013-02-08 10:54:53 -08:00
Marc Khouzam
31bedb1408 Cleanup imports
Change-Id: I314ed99ece9b42d6ed1bf06ed90094e665621d06
2013-02-08 13:29:41 -05:00
Marc Khouzam
e28469e9b3 Bug 400350 - [tests] LaunchUtilsTest use JUnit3 instead of JUnit4
Change-Id: I98d0d0e256c98d49d5ec0ddb03f2487eb82a70f4
Reviewed-on: https://git.eclipse.org/r/10262
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-02-08 13:09:43 -05:00
Marc Khouzam
7734088fea Bug 400328 - [visualizer] Make Multicore Visualizer packages internal
Change-Id: I09ce5046ccc0935ef036bb6a707900a308f7204f
Reviewed-on: https://git.eclipse.org/r/10255
Reviewed-by: William Swanson <traveler@tilera.com>
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
2013-02-08 11:18:35 -05:00
Andrew Gvozdev
7f710ebde4 bug 398056: Regression: LanguageSettingsProviders can get enabled unexpectedly on project-import when they should not 2013-02-07 23:28:32 -05:00
Sergey Prigogin
fda493a012 Use generics. 2013-02-07 10:24:00 -08:00
Nathan Ridge
929cc935a9 Bug 399362 - Error with depedent expression involving field in
nested class

Change-Id: I9245b09a926d5dda6da8e5fbd4a1ad7996fe999a
Reviewed-on: https://git.eclipse.org/r/10231
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-02-07 12:17:15 -05:00
Sergey Prigogin
f5567f16bd Added a comment. 2013-02-06 20:53:54 -08:00