1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00
Commit graph

13510 commits

Author SHA1 Message Date
Alex Blewitt
12904409a3 Bug 492304 - Fix NLS warnings
Eclipse warns if a String literal does not have a `//$NON-NLS-<n>$`
entry at the end of the line. However, for historic or formatting
reasons, many such occurrences in the CDT source have an intermediate
whitespace, such as `// $NON-NLS-<n>$`

Fix these so that the whitespace is removed between the // and $
characters.

Change-Id: Idc12398fe6e9d619af1d0b1b73fb8b6180da223c
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-25 22:53:30 +01:00
Alex Blewitt
6bdca5f4a2 Bug 492230 - Replace buffer.append(a+b) calls
When using a `StringBuilder` or `StringBuffer` to create a string message,
using implicit string concatenation inside an `.append()` call will
create a nested StringBuilder for the purposes of creating the arguments,
which will subsequently be converted to a String and then passed to
the outer StringBuilder.

Skip the creation of the intermediate object and String by simply
replacing such calls with `buffer.append(a).append(b)`.

Where values are compile time String constants, leave as is so
that the javac compiler can perform compile-time String concatenation.
Ensure that NEWLINE isn't appended in such a way since it is not
a compile time constant `System.getProperty("line.separator")`

Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-25 11:38:47 -05:00
Doug Schaefer
7043af66fb Major change to new build arch to give configs more power.
Creates a single central CBuilder builder which find the C Build
Config and delegates the builds to it. That give configs full control
over the builds. Qt and CMake build configs are adapted to this new
structure.

More features are added to the default super class for configs.

Change-Id: I5ecfc7a4e9b909da6749189a059cdcd4a208fddd
2016-04-23 22:35:33 -04:00
Sergey Prigogin
903eb7ed3a Cosmetics. 2016-04-22 16:34:53 -07:00
Sergey Prigogin
6ff4be3caa Minor performance optimization.
Change-Id: I8c93a9b5347f58670ed4f87296ecd5e45429158d
2016-04-22 16:28:53 -07:00
Sergey Prigogin
9f79b897c1 Bug 492200 - Replace StringBuffer with StringBuilder where appropriate
Change-Id: Ib52b839a211e2068e56da4b62a5b9640fef55d40
2016-04-21 16:15:31 -07:00
Alex Blewitt
6b0a04c15e Bug 492200 - Replace StringBuffer with StringBuilder
There are many opportunities for replacing `StringBuffer` with
`StringBuilder` provided that the type isn't visible from the
public API and is used only in internal methods. Replace these
where appropriate.

Change-Id: I2634593603eef88dd68e127de9319377f43e7436
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-21 17:51:12 -05:00
Nathan Ridge
3e4e14f0d6 Bug 491834 - Revert the earlier attempt to guard against infinite recursion in HeuristicResolver
Change-Id: I22bd9deb13824a82f081c12051770f8d314b11e6
2016-04-21 13:28:07 -05:00
Nathan Ridge
a75ce4027b Bug 491747 - Reference to scoped enumerator declared later in class
Change-Id: If55f0a92c5e3723a306f6ec22a7363c90ef467a8
2016-04-20 22:11:04 -05:00
Nathan Ridge
50eca42cb1 Bug 491834 - Avoid certain kinds of infinte recursion in HeuristicResolver
This is done by tracking the set of lookups of names in primary template
scopes performed during a heuristic resolution, and short-circuiting a
resoluton if the same lookup is attempted twice.

Change-Id: I512cdc9493d1ac91b1f77603d816a33312d4be00
2016-04-20 23:09:48 -04:00
Karsten Thoms
2392400649 Bug 471103 - Add caching for performance improvements of indexing
Change-Id: I6c515202e029a030c89b7f71c013bbc2e2c1c588
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2016-04-20 17:18:00 -05:00
Sergey Prigogin
a295702335 Bug 491842 - Name resolution problem with initializer list
Change-Id: I9a70beb41e9819ca9e980b16249bd080f4d21e97
2016-04-19 19:13:37 -07:00
Sergey Prigogin
3b8da01c12 Cosmetics. 2016-04-19 19:11:41 -07:00
Alex Blewitt
2114f6b108 Bug 491984 - Replace .equals("") with .isEmpty()
In many cases a String's empty status is tested with `.equals("")`.
However, Java 1.6 added `.isEmpty()` which can be more efficient since
it compares the internal length parameter only for testing. Replace
code using the `.isEmpty()` variant instead.

Some tests for `"".equals(expr)` can be replaced with `expr.isEmpty()`
where it is already known that the `expr` is not null; however,
these have to be reviewed on a case-by-case basis.

Change-Id: I3c6af4d8b7638e757435914ac76cb3a67899a5fd
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-19 13:35:54 -04:00
Anton Leherbauer
10ba077124 Bug 491972 - [winpty] Not enough storage is available to process this command 2016-04-19 12:00:39 +02:00
Alex Blewitt
470de4e66b Bug 491945 - Remove new String() from expressions
Replace all occurrences of `new String(expr)` with `expr` provided that the
`expr` is not a byte array or a char array.

Change-Id: Iecae801b83084908b60b9e146eba87550eac640d
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-18 23:34:01 +01:00
Alex Blewitt
ca4e5b10ee Bug 491945 - Remove new String() literals
Occurrences of `new String("...")` have been replaced with a direct reference
to the literal it was wrapping.

Change-Id: Iefb49a009f210db59e5724e0a232dba2e13292b1
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-18 23:30:05 +01:00
Alex Blewitt
809598db9d Bug 491945 - Remove new String()
Occurrences of `new String()` have been replaced with the equivalent `""` and
additional NON-NLS tags have been inserted in where appropriate.

Change-Id: I54cf71dcd0d5a92a675a71166d66949533de502b
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-18 23:15:05 +01:00
Sergey Prigogin
6be5a7fbe0 Bug 491834 - StackOverflowError in HeuristicResolver
Change-Id: I8aaf80e66d6d7bd999482450c506f7160bd276fd
2016-04-16 23:35:04 -04:00
Alex Blewitt
fc07efa909 Bug 491825 - Remove primitive wrapper creation
Using `new Integer` and other wrapper types such as `new Character` results in
potential extra heap utilisation as the values are not cached. The built-in
`Integer.valueOf` will perform caching on numbers in the range -128..127 (at
least) using a flyweight pattern. In addition, parsing `int` values can be done
with `Integer.parseInt` which avoids object construction.

Adjust tests such as `"true".equals(expr)` to `Boolean.parseBoolean(expr)`.

Change-Id: I0408a5c69afc4ca6ede71acaf6cc4abd67538006
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-16 12:17:48 -04:00
Sergey Prigogin
b91b69775f Bug 491825 - Remove uses of new Boolean and friends
Change-Id: Ie358c8385c278472f3b86851f6fc219007bb9b5c
2016-04-15 15:20:15 -04:00
Jonah Graham
1dd218df31 Stop using _ identifier
From JLS 15.27.1.

It is a compile-time error if a lambda parameter has the name _ (that
is, a single underscore character).

The use of the variable name _ in any context is discouraged. Future
versions of the Java programming language may reserve this name as a
keyword and/or give it special semantics.

Change-Id: I6f357dcc8f1eea933c6fc3afb474982e6d6210fe
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-04-15 11:12:02 +01:00
Sergey Prigogin
3c09a628a2 Bug 491748 - Name resolution problem with initializer list
Change-Id: Ib259f16a080c7f8848a7ce9e1c40c0153e99f387
2016-04-14 20:28:34 -07:00
Doug Schaefer
6e1b9b408d Tighter integration of new build system with cdt.core.
Move the new build system to cdt.core and remove the previous
plugins. Hook the new system into scanner info and environment
variable manager.

Clean up API in preparation for Neon and API lockdown. Hook up
Qt to the new APIs.

Add discovery of MSYS2's toolchain and Qt and Qt's MinGW toolchain.

Change-Id: I85b1a91da4a44e86f0e9da9310f8106c894623e0
2016-04-14 16:19:37 -04:00
Sergey Prigogin
ad0d665a19 Use CharArrayObjectMap instead of CharObjectMap to store symbols in
scopes.

Change-Id: Ie2f84135d22ba21829afc0426cf1d83e5d234e7c
2016-04-13 21:06:58 -07:00
Sergey Prigogin
27774c7688 Bug 491636 - Problem with constructor declaration with the name
including template arguments

Change-Id: I6c2269d232cb1a93a070c73f2ed52f1beeb43926
2016-04-13 19:48:13 -07:00
Sergey Prigogin
739bc922cf Code streamlining.
Change-Id: Iaafe325b1c984b4246bd80b3b80a4f08c612d32a
2016-04-13 19:03:49 -07:00
Sergey Prigogin
a8d768376d Cosmetics. 2016-04-13 16:44:21 -07:00
Sergey Prigogin
aad801dad0 Code cleanup.
Change-Id: Id6ea0aa5450d623b0be1bb3acde8d0a0c4628d6d
2016-04-11 10:37:11 -07:00
Sergey Prigogin
e7d8109e95 Fixed deprecation warnings. 2016-04-08 11:57:01 -07:00
Sergey Prigogin
9804e683e6 Cosmetics.
Change-Id: I9cd2b475d2992086f4cf722c31c69d322377c484
2016-04-08 11:55:58 -07:00
Nathan Ridge
cb76eaa873 Bug 489876 - Virt-specifier following trailing-return-type
Change-Id: I1c86634cbb69c0e4b2243dc858abe4c048335378
2016-03-30 00:25:03 -05:00
Nathan Ridge
1723662de3 Bug 489477 - Compare AST types to PDOM types correctly during final overrider analysis
Change-Id: Ie34dad36cfb9f459b997a859c2c193745131f5c8
2016-03-30 00:23:33 -05:00
Nathan Ridge
f136f05560 Bug 488612 - Fix a NPE in DoxygenSingleAutoEditStrategy
Change-Id: I79f91dfc97da1cf4429fdedf4bee457b8e7cb1b7
2016-03-30 01:22:05 -04:00
Nathan Ridge
e41a1c30eb Bug 488611 - Overloaded pointer-to-member operator
Change-Id: I16dfaa0d91fbc703e2cde014b62578c168e48716
2016-03-30 00:20:29 -05:00
Solganik Alexander
36be245004 Bug 435726 - Dont set SWT colors for foreground on active element.
When dark theme is in use outline and project explorer background
expected to be dark, regardless of globally (OS level) selected SWT
scheme. So for active elements foreground always return NULL which will
result in default colors to be displayed. For inactive element, continue
displaying them in grey, as grey is inactive color for both dark and
default theme.

Change-Id: I91b20b0327e0008a2aa01573981f217a609e3bbc
Signed-off-by: Solganik Alexander <solganik@gmail.com>
2016-03-30 01:16:05 -04:00
Sergey Prigogin
64e7137959 Report long wait for exclusive index access to the user.
Change-Id: I27b69a7be19060ec2874aff92d86420c32ee595f
2016-03-28 20:37:25 -07:00
Sergey Prigogin
9622166291 Use prime numbers for hash table sizes to reduce collisions.
Change-Id: I4233e4a4ca729dd742825ee23b9c254fa836bc41
2016-03-28 19:06:42 -07:00
Sergey Prigogin
eeaed8ee74 Minor optimization. 2016-03-28 13:52:44 -07:00
Sergey Prigogin
b1f7f7f7f1 Moved to JDK 1.8.
Change-Id: I630a0c442b1df2624148a9d62418b862c313897c
2016-03-28 16:50:01 -04:00
Sergey Prigogin
929d8dfb45 Consolidated similar tests.
Change-Id: If8161fdd23956f3cb61660f45d1b1407bb102835
2016-03-28 15:04:39 -05:00
Sergey Prigogin
16562814f7 Cosmetics. 2016-03-28 11:43:55 -07:00
Doug Schaefer
c29243b187 Revert "Bug 489563 - API change for Language Settings Providers."
This reverts the changes we've made for language settings providers
so that I can start again with a cleaner approach.

Change-Id: Icddd5a465a8f217594af5b07011a56bf1dfdf014
2016-03-22 10:32:31 -04:00
Sergey Prigogin
52432d7370 Cosmetics.
Change-Id: I4022285d11267b77861cc8e4333adbea9c780ea7
2016-03-21 20:17:05 -07:00
Sergey Prigogin
de3b172c7d Bug 489563 - API change for Language Settings Providers.
Restored binary compatibility of LanguageSettingsSerializableProvider.

Change-Id: I02c9c7b0cc98a72ef47798a74f7a6ff99e85cf46
2016-03-21 19:15:23 -07:00
Sergey Prigogin
d07b74f31a Bug 489987 - Name resolution problem with static constexpr method
Change-Id: Ib1ec66f3c4d250112a606482a8c97a593fb0bfce
2016-03-21 16:58:45 -07:00
Sergey Prigogin
7f6e86085c Cosmetics. 2016-03-21 16:30:32 -07:00
Sergey Prigogin
9ea3641953 Minor performance optimization.
Change-Id: I8d529cf8bf41faca127d12db033f295b8a23e338
2016-03-21 14:17:25 -07:00
Sergey Prigogin
e156a0fb89 Added two missing @noreference tags. 2016-03-21 14:02:12 -07:00
Doug Schaefer
5a5de4b1db Bug 489563 - API change for Language Settings Providers.
Use IBuildConfiguration instead of ICConfigurationDescription.
Add adapters to convert back and forth between these. Create
IBuildConfiguration objects when configuration descriptors are
created.

Clean up formating of the code involved.

Change-Id: Iec5ca132dddbf990f116f96b4680ef5f7318e28b
2016-03-20 23:10:46 -04:00