1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00
Commit graph

4541 commits

Author SHA1 Message Date
Nathan Ridge
a2a05a515a Bug 372004 - Locally declared extern variable
Change-Id: I33d634d6c63138910b2958b81f6d8df358e89e7d
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/23098
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-03-10 12:44:07 -04:00
Sergey Prigogin
68b2dd67dc Minor code cleanup. 2014-03-03 15:35:52 -08:00
Sergey Prigogin
f36a34d6a5 Bug 425595 - Opening 'C/C++ General-> Formatter' of a project properties
cuases NPE
2014-03-03 15:07:36 -08:00
Sergey Prigogin
843cd2bf00 Bug 429364 - NPE in Organize Includes. 2014-02-28 13:38:22 -08:00
Andrew Eidsness
f7d49e5bde Bug 425711: User preference to limit tokens per translation unit
This adds a new scalability preference that aborts parsing when too many
Tokens are created for a single translation unit.  This is a heuristic
that fairly close predicts the files that will be too complex for the
indexer to handle.

The token counter is disabled by default.

When it is enabled, the default token limit is 25,000,000.  This value
was determined by counting the number of Tokens produced for each
translation unit in the boost-1.55.0 sources:

sqlite> select * from counts where count > 10000000;
count       location
-----------------------------------------------------------------
100000001   libs/local_function/test/all_decl.cpp
100000001   libs/local_function/test/all_decl_seq.cpp
100000001   libs/local_function/test/all_decl_seq_nova.cpp
100000001   libs/preprocessor/doc/examples/array_arithmetic.c
99808587    libs/function_types/build/preprocess_arity_loops.cpp
62380381    libs/preprocessor/doc/examples/delay.c
58096841    libs/serialization/performance/xml/string256_test.cpp
58096828    libs/serialization/performance/xml/int256_test.cpp
52898416    libs/mpi/src/python/collectives.cpp
52573708    boost/spirit/home/support/char_encoding/ \
                  unicode/create_tables.cpp
21315014    libs/utility/binary_test.cpp
18799536    libs/math/test/test_rational_instances/ \
                 test_rational_double1.cpp
17758615    libs/mpl/test/string.cpp
13100401    libs/container/bench/bench_set.cpp
11976021    libs/local_function/example/const_block.cpp
11381198    libs/math/test/test_tr1.cpp
10432186    libs/parameter/test/preprocessor.cpp

This value means that the indexer will process all files in boost
without running out of memory on a 1Gb heap.

Change-Id: Ia9fc73dfb38454cc8735f537e3ac6e661864fb4f
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/22386
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-02-27 12:49:35 -05:00
Sergey Prigogin
6677a74ae0 Removed redundant methods. 2014-02-18 18:05:42 -08:00
Sergey Prigogin
0c0523d642 Cosmetics. 2014-02-18 17:15:21 -08:00
Marc Khouzam
1ea82aff04 Bug 427958 - Update version of o.e.cdt.ui and @since tags for CDT 8.4
Change-Id: I84bccf9bdc6e169624908fee106080f840843e28
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2014-02-15 07:34:47 -05:00
Sergey Prigogin
62ba90a145 Bug 427958 - Extension mechanisms for Find References and Call Hierarchy
This change introduces two new extension points - callHierarchyProviders
and externalSearchProviders.

Change-Id: I5e2e5e6c17b596eddfebe97b6be32a7cc62954f6
Reviewed-on: https://git.eclipse.org/r/21862
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-02-14 16:58:45 -05:00
Serge Beauchamp
493f6ad273 Bug 418817 - Control dependency is not observed after clicking "Restore
Defaults" button

Change-Id: I7f0aaac8f227c7f2ca0e05e144a7f1862d7bea95
Signed-off-by: Serge Beauchamp <sergebeauchamp@mac.com>
Reviewed-on: https://git.eclipse.org/r/17110
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-02-11 18:36:03 -05:00
Sergey Prigogin
15fb26ea6a Cosmetics. 2014-02-11 14:10:07 -08:00
Sergey Prigogin
aa3df633a7 Allow CSearchElement to adapt to IFileStore and to IIndexFileLocation. 2014-02-05 11:38:24 -08:00
Sergey Prigogin
8dc69e1ca0 Use StringBuilder instead of StringBuffer. 2014-01-31 11:38:27 -08:00
Andrew Eidsness
d046e0a25f Bug 423679: CEditor navigation actions disabled outside of CEditor
The Open Declaration (F3), etc. actions use code in the ASTProvider.  If
the provider is not able to get an AST then the actions are disabled.
The implementation of the ASTProvider has an "instanceof CEditor" check
the result being that ASTProvider can only be used when the editor is a
CEditor.

This breaks our use case where we have a CEditor embedded as a tab in a
multi-pane editor (see org.eclipse.papyrus.infra.core.sasheditor
.editor.AbstractMultiPageSashEditor).

This patch modifies the ASTProvider to use #getAdapter instead of only
the instanceof check.  I've kept the common case (where the editor is a
CEditor) unchanged and added the new code as extra handling.

I've also introduced a public interface, ITranslationUnitProvider, to
avoid forcing clients to adapt to the internal CEditor class.  The only
part of CEditor that ASTProvider cares about is the ITranslationUnit.
The existing implementation has an unchecked cast.  The new interface
provides the required type directly.

Change-Id: Ie7e68e8909928374fa11fe2b8a857f09d042fb5c
Signed-off-by: Andrew Eidsness <andrewe@jfront.com>
Reviewed-on: https://git.eclipse.org/r/20026
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2014-01-29 16:23:34 -05:00
Sergey Prigogin
5d7a19fa6c Enabled JDK 1.7.
Change-Id: Ic2a161ea3c318dc1e8ba01c271c936bf5ed8763d
Reviewed-on: https://git.eclipse.org/r/21020
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-24 13:38:55 -05:00
Sergey Prigogin
ad526b4fb0 Cosmetics. 2014-01-22 11:46:21 -08:00
Jiří Nytra
0c3bdb4d24 Added a space before the opening parenthesis
Change-Id: I08c2486686b2db540ba321334976a8d5830a2813
Signed-off-by: Jiří Nytra <jiri.nytra@gmail.com>
Reviewed-on: https://git.eclipse.org/r/20900
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-22 13:18:18 -05:00
Sergey Prigogin
1d166260a8 Bumped up CDT version to 8.4.
Change-Id: I1229344feaaed4a3551ceb7b1ef1410545048b55
Reviewed-on: https://git.eclipse.org/r/20908
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-21 17:35:29 -05:00
Sergey Prigogin
74c0954dc8 Bug 425595 - Opening 'C/C++ General-> Formatter' of a project properties
cuases NPE
2014-01-13 11:40:57 -08:00
Sergey Prigogin
e9b3224eaa Cosmetics. 2014-01-10 09:54:58 -08:00
Marc-Andre Laperle
fb12c43146 Bug 424635 - The wrench icon overlay for a source file does not appear
When the language settings providers functionality is enabled, also
check for build settings customization, not just the language setting
entries.

Change-Id: Ia9fec3bc377617dc9f2264dd924941879f1b64b0
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/20297
Tested-by: Hudson CI
Reviewed-by: Andrew Gvozdev <angvoz.dev@gmail.com>
IP-Clean: Andrew Gvozdev <angvoz.dev@gmail.com>
Tested-by: Andrew Gvozdev <angvoz.dev@gmail.com>
2014-01-06 15:53:33 -05:00
Sergey Prigogin
3005e7ef26 Bug 424876 - Unable to extract a function containing nested loops 2014-01-03 18:39:31 -08:00
Sergey Prigogin
59b67cd28b Cosmetics. 2014-01-03 17:38:29 -08:00
Sergey Prigogin
c95730601b Cosmetics. 2014-01-02 17:22:04 -08:00
Sergey Prigogin
106afe4e80 Proper handling of subclasses in getAdapter method. 2013-12-26 09:44:54 -08:00
Sergey Prigogin
2e0bd2e95b Added ICElement.EMPTY_ARRAY constant. 2013-12-11 15:29:22 -08:00
Sergey Prigogin
bdde88fd2a Cosmetics. 2013-12-11 15:28:58 -08:00
Marc-Andre Laperle
431dff5671 Bug 421289 - Preferences for indexing all versions of all or specific
headers

Change-Id: If0788d35af7aea0f95ffbff10b4e5d1b9f30ba62
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/19033
Tested-by: Hudson CI
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-12-10 14:48:56 -05:00
Sergey Prigogin
ecf7d25dd9 Cosmetics. 2013-12-06 12:01:12 -08:00
Sergey Prigogin
772f6c1643 Bug 423126 - Extract Function refactoring misses additional occurrences
of the extracted code
2013-12-03 18:16:43 -08:00
Sergey Prigogin
bd0e88a3e2 Code streamlining. 2013-12-03 17:31:52 -08:00
Sergey Prigogin
3a7a88486b Cosmetics. 2013-12-03 17:29:36 -08:00
Sergey Prigogin
772066afce Bug 422727 - Extract Function doesn't properly handle auto types 2013-11-30 22:39:34 -08:00
Sergey Prigogin
eb421c9fec Removed public visibility from DialogMessages class. Externalized
strings were never intended to be a part of the public API.
2013-11-30 22:34:35 -08:00
Sergey Prigogin
a9f9839cc9 Added @noreference tag to logging methods. 2013-11-30 22:14:14 -08:00
Sergey Prigogin
c9909363f9 Cosmetics. 2013-11-30 22:09:42 -08:00
Andrew Eidsness
f887c8e671 Bug 422681: Allow references to bindings in other linkages
The existing PDOMBinding and PDOMName implementations do not allow
references between linkages.  This feature is needed so that the new Qt
linkage can reference elements in the C++ linkage.  It will also allow
the C++ implementation for extern "C" to be cleaned up (see
PDOM.getCrossLanguageBindings).

Prior to this change, a PDOMBinding held three lists of names.  One for
each of declarations, definitions, and references.  This change adds a
fourth list for external references.  External references are stored as
a linked list of nodes.  Each node holds:

    - The linkage id.
    - A pointer to the next node (or 0 for end-of-list).
    - A pointer to the record of first name in the list.

The linkage id is held separately because a PDOMName does not have any
field of it's own for linkage.  By grouping elements in this way, we can
reuse most of the existing list-related code.

External references are accessed through a new PDOMIterator class.  This
is needed so that we can advance to the next linkage node when we get to
the end of one node's list of names.

This also adds a unit test for the new API.

Change-Id: Ie2b14848db7409905beda0cec752080d5f42eec8
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/18979
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
2013-11-27 19:56:03 -05:00
Sergey Prigogin
02001dbe71 Bug 422695. More test cases and fixes. 2013-11-27 14:27:00 -08:00
Sergey Prigogin
e9e53fb9fa Bug 422695 - Organize Includes does not add include for template
parameter of unique_ptr, etc.
2013-11-27 09:42:55 -08:00
Sergey Prigogin
38fd6392e2 Cosmetics. 2013-11-25 19:48:46 -08:00
Sergey Prigogin
4f485bfd58 Bug 422217 - NPE in IndexLocationFactory.getAbsolutePath 2013-11-21 11:47:18 -08:00
Sergey Prigogin
24922585f0 Bug 421398 - Organize Includes not adds includes for base class. 2013-11-20 11:47:17 -08:00
Sergey Prigogin
6f2c349bc3 Corrected tracing code. 2013-11-19 13:47:17 -08:00
Sergey Prigogin
6aa836780c Cosmetics. 2013-11-18 19:13:47 -08:00
Marc-Andre Laperle
dfd0794ed6 Bug 421889 - Typo in CRefactoringDescriptor_unknown_project message
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2013-11-16 17:21:56 -05:00
Sergey Prigogin
33174d0697 Cosmetics. 2013-11-07 20:27:37 -08:00
Sergey Prigogin
c98b965760 Erase code_formatter preference when disabling project specific settings 2013-11-07 20:23:28 -08:00
Sergey Prigogin
e363ba7f04 Cosmetics. 2013-11-07 11:26:53 -08:00
Sergey Prigogin
642d4c3975 A step towards unification of Organize Includes and Add Include header
substitution algorithms.
2013-10-28 16:27:08 -07:00
Sergey Prigogin
cc3695ca21 Cosmetics. 2013-10-25 09:26:03 -07:00