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

4789 commits

Author SHA1 Message Date
Jeff Johnston
9fd79b0596 Bug 491619 - Choosing a C++ dialect should reindex
- changed gcc builtin settings providers to prefer non-shared
- added isIndexerAffected method override to ToolSettingsTab which
  looks at new isIndexerAffected boolean
- add logic to ToolSettingsTab setOptions() method to look for
  dirty options that return true for isForScannerDiscovery() or
  are special options that affect include path or defines
- add performok method to ToolSettingsTab to look if isIndexerAffected
  when user hits OK without hitting APPLY
- change the message for bringing up the question dialog for end-user
  to choose whether to reindex or not

Change-Id: Icd740caafe638f272b6f1434d5817f2377ffe04a
2016-05-13 09:54:29 -04:00
Sergey Prigogin
ed7f1cea09 Cosmetics.
Change-Id: If3fa0aa0c6679cf508492322c6e38e2dc0d1351f
2016-05-12 18:03:53 -04:00
Sergey Prigogin
efd6a7263b Bug 493475 - Add an option to format edited lines when saving a file
Change-Id: I1c5c91a269f7685e2963bb26f12fdee9bb5fae97
2016-05-12 18:02:49 -04:00
Jonah Graham
e091657eaf Bug 493070: [GTK3] stop removing all items from list
in GTK3 when the current selection is removed from the
org.eclipse.swt.widgets.List the selection is updated to another item,
on GTK2 and Windows the list stops having a selection. 

This change updates the code to safely delete all selected items.

Change-Id: Iedc99db89af117a04ad163190bdda0f8720eb2a6
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2016-05-12 13:59:02 -04:00
Sergey Prigogin
decaa7f934 Code cleanup.
Change-Id: Ibe8f9fc65ddfc3dafe187935bd7f605be8ea1820
2016-05-11 15:50:43 -07:00
Sergey Prigogin
d36b9dcdd1 Bug 492489 - Protect against NPE
Change-Id: I5eb6590b94a6267cff0b3da14513f1b00d1170d4
2016-04-26 14:09:35 -07:00
Sergey Prigogin
590d832822 Bug 492491 - IWYU hyperlink in Include Pragmas preference page has moved
Change-Id: Iddb08db3427592f4725a9c54747971b9efe2d97a
2016-04-26 13:54:13 -07:00
Alex Blewitt
c73978c03a Bug 492210 - Remove ChangeLog files from project
ChangeLog is an archaic format for identifying what has changed in a
project. Fortunately more powerful version control systems are capable
of generating this information and displaying information such as this
paragraph in order to determine what has changed in a project and when.

Change-Id: Ia71a05fa51869c1adb193d94f71c28b3b36beb37
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
2016-04-25 22:53:31 +01:00
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
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
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
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
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
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
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
f136f05560 Bug 488612 - Fix a NPE in DoxygenSingleAutoEditStrategy
Change-Id: I79f91dfc97da1cf4429fdedf4bee457b8e7cb1b7
2016-03-30 01:22:05 -04: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
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
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
Sergey Prigogin
44e0370d76 Marked deprecated APIs with @noreference tags to be able to remove them
later.

Change-Id: I7ca0a396d3080c30d8dad70717d85bb0b973b01a
2016-03-14 23:54:42 -04:00
Sergey Prigogin
9d492879be Removed deprecated methods.
Change-Id: I2bcbab9c93767451b8649963daabb9ea6259c683
2016-03-14 17:13:07 -04:00
Jesper Eskilson
eac2f92bb4 Fixed warnings: do not call MessageFormat#format(...) with String[].
Change-Id: I3da681e323cfeb0c1c07a669183e6d1d18ca6ff6
Signed-off-by: Jesper Eskilson <jesper.eskilson@iar.com>
2016-03-14 13:41:59 -04:00
Sergey Prigogin
2f32c523f5 Cosmetics. 2016-03-11 19:10:12 -08:00
Sergey Prigogin
6009665334 Bug 489468 - Extract Function creates illegal declaration in .h when
there is a using statement in the .cpp for an argument type

Change-Id: Ie54ce13b434bab21f96b0c6bb7347846d52314e0
2016-03-11 17:47:46 -05:00
Sergey Prigogin
1a0c51205e Bug 488904 - Performance regression of code completion due to parameter
guessing

Code cleanup.

Change-Id: Idf8fadddef683bd1161a0d60333e47cd2437d730
2016-03-11 17:34:13 -05:00
Sergey Prigogin
9240257992 Cosmetics.
Change-Id: If6660920227beedfa8d2c39c3e24cf1bd6454d5e
2016-03-11 17:33:53 -05:00
Sergey Prigogin
4a9287acb5 Remove use of deprecated methods.
Change-Id: Id14e9948dc30a998adad463e338dc86df109e315
2016-03-11 16:45:54 -05:00
Sergey Prigogin
6386496e21 Minor cleanup.
Change-Id: I75888180972f3e4f9c5cf1088c9347b1e6fd0b27
2016-03-11 15:52:12 -05:00
Sergey Prigogin
b2db38b873 Removed redundant type arguments.
Change-Id: Id238b37fb6852e9998b9aa3f4fd9f5e8d7f54bd6
2016-03-09 05:24:49 -08:00
Sergey Prigogin
a045063cea Removed redundant type arguments.
Change-Id: I96e07fd9e0fdb628db449bbf54385abe68fccced
2016-03-08 21:19:14 -05:00
Sergey Prigogin
70fe6cbbde Bug 488904 - Added a preference for enabling/disabling argument guessing
Change-Id: Id39454da16638d5f11c95e419c2385dc16cdb53a
2016-03-02 20:39:12 -08:00
Sergey Prigogin
86dabd3d00 Cosmetics. 2016-03-02 19:54:02 -08:00
Sergey Prigogin
70fe8493fc Cosmetics. 2016-03-02 19:29:36 -08:00
Sergey Prigogin
028f8545ca Cosmetics. 2016-03-02 17:46:00 -08:00
Sergey Prigogin
bc14c5b1cc Bug 488904 - Performance regression of code completion due to parameter
guessing

Change-Id: I5a6b693b898d40853da5c2d112c62c93eaf60064
2016-03-02 17:21:51 -08:00
Sergey Prigogin
3e27134c47 Cosmetics.
Change-Id: I379de81844c6beed828ec2d27cef110a10987d17
2016-03-02 14:34:20 -08:00
Sergey Prigogin
69562ae63e Bug 488605 - Organize Includes adds an include for a header included by
the partner header

Change-Id: I16ca2afc2ecbe1b47c9a71be5e0c170c9ac0d08d
2016-02-26 23:43:01 -05:00
Sergey Prigogin
6fb068d42e Bug 488604 - Organize Includes adds include for type hidden behind a
macro

Change-Id: Ibfe1499580b3b34ff9c3cff0fbbd8b3b3b9506fa
2016-02-26 16:32:56 -08:00
Sergey Prigogin
7c321bae13 Bug 488506 - Organize Includes adds include for function hidden behind a
macro

Change-Id: Ic737e34f71953f1e53a2c1cf2a21e340b7593c33
2016-02-25 19:54:01 -08:00
Sergey Prigogin
34eac4ab17 Adjusted a message. 2016-02-25 16:54:03 -08:00
Sergey Prigogin
01b0b877e1 Bug 488349 - Organize Includes removes an include necessary for a method
call

Change-Id: I309046e32ea2be5f0b6ecc00643d03c131bfafb6
2016-02-24 20:49:27 -08:00
Sergey Prigogin
a913d61e4f Cosmetics. 2016-02-24 17:57:35 -08:00
Sergey Prigogin
98bbc1597e Adjusted header substitution map.
Change-Id: I3ab5e2aaaa1ece8e22059a4228ebff9754894f91
2016-02-19 20:13:46 -08:00