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

35908 commits

Author SHA1 Message Date
Mat Booth
80fb6372c6 Bug 562001 - Remove dependency to com.ibm.icu from CDT Launch
Switch to JRE implementations:
 * com.ibm.icu.text.MessageFormat -> java.text.MessageFormat
 * com.ibm.icu.text.DateFormat -> java.text.DateFormat

Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: I449fab36fdd45b1cd26eac216f6867a37462ae93
2021-07-28 10:07:56 +01:00
Martin Weber
7f96b6dc6c Bug 564349 - move plugins for non-gcc/clang support (arm, hpenonstop, intel, ms, nvidia) to an 'optional' category in the plugin installer GUI
Change-Id: I0700c5e1b01b45d9e84acd1f66deba187d89341a
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-27 15:26:07 -04:00
Martin Weber
5e1451a607 Bug 564349 - move code to parse compile_commands.json to subdir jsoncdb
Change-Id: I68f3b861b4326adf6da4f9d074a314628c7e8fef
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-27 15:25:54 -04:00
Mat Booth
f61688336b Bug 562002 - Remove dependency to com.ibm.icu from CDT Make Core
Switch to JRE implementations:
 * com.ibm.icu.text.MessageFormat -> java.text.MessageFormat
 * com.ibm.icu.text.DateFormat -> java.text.DateFormat
 * com.ibm.icu.text.SimpleDateFormat -> java.text.SimpleDateFormat

Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: Idbd5141bd131d412990ea51de681ab1a2d80262e
2021-07-27 15:35:24 +01:00
Mat Booth
b681480abb Bug 574247 - Same binary file can appear multiple times
A race condition could sometimes yield duplicate entries in
the binary container due to interleaving of calls to
includesChild() and addChild()

Add a method to CElementInfo that can perform the check and
add the child atomically, by synchronising on the list of
children for the duration of the two operations.

Change-Id: I1ef1cddf3aad4934ec63cb433ebae34a77b69739
Signed-off-by: Mat Booth <mat.booth@gmail.com>
2021-07-25 11:03:01 +01:00
Jonah Graham
c33e81872d Bug 575018: Mark volatile field correctly
Change-Id: I0edebbd906b4a5cfda804ddb3a22c75a04c3e510
2021-07-24 19:05:38 -04:00
Jonah Graham
467eeb06a4 Fix trace of command line array
In the DSF tests the command line is output, but it is an array so
needed an Arrays.toString

Change-Id: I8b7dc33073dc3a34ffe7eea0343e415041335c7d
2021-07-24 18:03:23 -04:00
Jonah Graham
de4a1e7222 Bug 574519: Always collect WSL entries in a Job
Change-Id: I35abec7ca075bf525e972e4cbc03af4361d1d490
2021-07-24 13:46:51 -04:00
Jonah Graham
43c285a7ef Bug 574247: Test for order of elements in outline view
Change-Id: I75593befecdc19ddee137830a457c8dbfb486a03
2021-07-24 12:18:22 -04:00
John Dallaway
79b1f157dd Bug 574928: Add PyOCD definitions
Change-Id: I3181d807d3ff33fd3b2cf7e2f764ed2cd3d174f5
2021-07-20 17:46:26 +01:00
Jeff Johnston
d27126df9a Bug 574874 - Disable full gdb console support if running CDT in flatpak
- add check for flatpak environment variable in
  GDBBackend_7_12.isFullGdbConsoleSupported() method
  and return false if variable is set

Change-Id: I667a63395592e2671ab3bf6f255e7428371086b3
2021-07-15 16:12:37 -04:00
Jonah Graham
c991e6ffaf [releng] Update simrel site for 2021-09
Change-Id: Ieb3672727058d0815dc02126e7d0026482ad0ad4
2021-07-14 20:14:48 -04:00
Martin Weber
37bcf543dc Bug 564349 - move workbench preference page of jsoncdb parser
move from up from pref-node C/C++/CMake/Json* to C/C++/Json*

Change-Id: I2eac9eb8528c6e7e255a78c92698cce42322e122
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-14 17:35:57 -04:00
Martin Weber
2f65266115 Bug 564349 - rename classes with 'Indexer' in name to sth. more appropriate
Change-Id: I3247f3a001a6d0f882a6b4c674b1c7c0f74b1b9e
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-14 17:35:57 -04:00
Martin Weber
72bc739a29 Bug 564349 - Update docs, UI strings and bundle descriptions
Change-Id: I00eeae3406ef83d34eba7f713b411692073ec323
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-14 17:35:57 -04:00
Martin Weber
422835d273 Bug 564349 - rename packages & projects o.e.cdt.cmake.is to o.e.cdt.jsoncdb
Change-Id: I29e4e0fdc988b6d9cdccfb50f73ad16591645fa4
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-14 17:35:57 -04:00
Martin Weber
6df1d75c4c sync translated Bundle-Name with manifest Bundle-Name
Change-Id: If77dc204bbcabfc12fbe325fa6615f49cc852921
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-07-14 17:35:57 -04:00
Jonah Graham
b2c33dfb13 Bug 546981: Treat pragma region like pragma mark in outline view
Treats #pragma region and #pragma endregion similarly to how
#pragma mark is treated in outline view. With
region and endregion they are always surrounded by
divider lines if there is text after region/endregion, else just
a divider line is inserted.

Change-Id: Idb8bebe94363731e59412a7f31af3b54d53a2c8e
2021-07-11 20:13:46 -04:00
Jonah Graham
b6a8f778f9 Bug 546981: Add #pragma mark to Outline view
Adds #pragma mark support to outline view. With mark, dashes
(-) cause divider lines before/after the mark label.

When outline is sorted, the divider lines are omitted (lest they appear
all grouped at the bottom of the view).

The system property org.eclipse.cdt.core.model_include_pragmas can
be set to false in case there are side effects of introducing IPragma
elements to the CModel.

This change applies to the Outline view and the Quick Outline (Ctrl-o)
information popup.

Icons contributed by Greg Willits.

Also-by: Greg Willits <gwillits@marway.com>
Change-Id: I072ef26fb14e21b5453f909bade391a3f0521823
2021-07-11 20:13:33 -04:00
Jonah Graham
c254b95cd6 Bug 546981: Process all preprocessor items in model in one pass
The previous code iterated through the preprocessor statements
numerous times, this code has the same logic, but iterates through
the preprocessor statements less often.

Change-Id: If4fcf0a605aabff1f615811f8f528ea66a461136
2021-07-11 16:03:13 -04:00
Jonah Graham
bcd5dd35bd Fix typo.
Change-Id: I0f4fb95c1a44088d19ae9f98abd98765f456d110
2021-07-09 21:31:21 -04:00
Christian Walther
ce521345e0 Bug 574741: Always add main-build to .PHONY.
Addendum to 0436516 (Bug 573502): The main-build target now always
exists, not just when there is a pre-build step, so it must always be
marked as .PHONY.

Change-Id: I478222bcc319c516a6e116f710d8382346b5ded5
Signed-off-by: Christian Walther <walther@indel.ch>
2021-07-08 16:11:59 +02:00
Marc-Andre Laperle
1278baf052 Bug 464624 - C++ Parser fails with Syntax error on function declaration with __declspec and non-native type
Allow __declspec after identifier in decl-specifier.
See https://docs.microsoft.com/en-us/cpp/cpp/declspec

Change-Id: Ifdaeb649abcfa1b7391e2799072b1afbc07a16a1
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-07-07 12:31:53 -04:00
Marc-Andre Laperle
3b8fcb62e7 Bug 574578 - Syntax error when using __declspec as type-id specifier
I initially applied a fix only to alias declarations by parsing it
before the type-id but to my surprise __declspec works more widely as a
type-id specifier.

Change-Id: I50217e2453f888207b73fc3f4c7ff1ea67bf5937
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-07-07 01:57:06 -04:00
Marc-Andre Laperle
99682412ce Bug 574481 - NullPointerException in LLDBLaunch.hasTrait
Always initialize fTraits. Also, prevent computeLLDBVersions from
spawning processes repeatedly by early returning. This means we also
populate fTraits only once and don't need the early return and
initialize it there.

Change-Id: I04b9af0b187fe8564bf7ce67f1322eee2d360033
2021-07-06 22:45:07 -04:00
Martin Weber
99ccdd11a4 externalize string
Change-Id: I9d47dd464ba9f9c7b696c2e6f69c2c90abd31071
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 21:04:33 +02:00
Martin Weber
7a1a619b6a project setup: eliminate warnings on non-existing folders
Change-Id: I109e2e56d0b687384c3c984cb6f4823fad0addb2
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 20:54:57 +02:00
Martin Weber
ef5f7c9d97 project setup: remove unnecessary maven nature
Change-Id: Ie0ccf12cfc7764170f2138ed2538876a4b3e3ba7
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-28 20:26:19 +02:00
Martin Weber
f9ce4f03e3 show markers in problem view instead of printing to build console
Change-Id: Ic487adc11153fac206183a3ceb943d05c6d36066
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2021-06-27 09:43:17 -04:00
Marc-Andre Laperle
0748cd24c6 Bug 573764 - Ambiguous conversion on numeric type
Starting with C++11, a null pointer constant has to be specifically an
integer literal of 0 and not any constant expression. Before this
change, an expression like (0 & 1) would wrongly being considered a null
pointer constant. It also means it could implicitly convert to a pointer
type (like int *) and lead to problems during function resolution, like
ambiguity.

This change corrects the behavior for C++11 by tracking whether the
integer type (basic type) came from a literal expression so that we can
add this additional constraint when checking for a null pointer
constant. Because types are sometimes returned directly when evaluating
different kinds of non-literal expressions that contain literal
expressions, we have to be careful that we remove the flag that tracks
"from literal expression".

Unfortunately, the semantic code does not track the active C++ version
which means the behavior for pre-C++11 will be impacted. Tracking the
active C++ version would not be trivial and at least the new behavior is
more future-proof.

Change-Id: Ied625e96e70390872e36ab5bb4dc238d75809d2e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-06-26 14:09:08 -04:00
Jonah Graham
3f472a917b Bug 574448: Fix spelling of GCC -fsanitize command line options
Change-Id: I9d02cc9937dc88ca3b180bb194edd80a6c904899
2021-06-24 14:29:29 -04:00
Marc-Andre Laperle
987d11ef42 Bug 574333 - Per-project Doxygen options are not flushed until saved a second time
When the options are applied in performApply, the call
DocCommentOwnerManager.setCommentOwner causes to set the
CProjectDescription, which causes UserDefinedEnvironmentSupplier to
flush cdt.core preferences. Then DocCommentOwnerArea.apply populates the
preference storage, but the preferences are not flushed after that
therefore the new options values only exist in memory.

Swapping the calls of DocCommentOwnerManager.setCommentOwner and
DocCommentOwnerArea.apply works but it makes no sense for the flushing
of Documentation options to depend on UserDefinedEnvironmentSupplier
flushing the preferences - it would work by a lucky accident.

A clean option would be to go through the preference's page
IWorkingCopyManager but this would involve a lot of more risky changes
in the DocOwner/Doxygen code and a vast majority of CDT code does not do
that.

Instead, this change explicitly calls CCoreInternals.savePreferences
which flushes the preferences, just like Indexer options does.

Change-Id: Id9a57cde47794f57f26ae295ec01eeb1df9aa120
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-06-20 00:38:08 -04:00
Jonah Graham
90b3ebc1df Bug 574331: Set default query results for tests
Most of the tests in this bundle already had this bit of code
before calling create project. This makes BuildDescriptionModelTests
consistent with the rest.

Note that this modifies global state and does not restore it. However,
as that is consistent with the other tests in this bundle, and the
global state is only maintained while running tests on this bundle,
I am not fixing this aspect of the code.

Change-Id: I2004af177a959e1efbd45b23c960b517d8993b7c
2021-06-19 15:33:04 -04:00
Jonah Graham
83f0b1be05 Bug 574271: Draw characters in the correct color on macos
There is a bug in SWT on macos - Bug 568777 - with the cache of single
character drawStrings with transparent backgrounds as a performance
boost. This causes the terminal to draw some characters in the
wrong color.

The workaround is to not draw with transparency, which should be fine
because we just filled the background with the same color that the
1 character string will draw with.

The performance, measured with TerminalTextUITest in Fast mode with
no throttling, does not seem affected and in my testing there does
not seem to be any graphic side effects.

Change-Id: I1b0aadae100d81a8f4533ba73273ccc8202e068f
2021-06-19 13:50:16 -04:00
Jonah Graham
49d29dc6ae Bug 573797: Use the user selected encoding when intercepting byte stream
Change-Id: Id64ba9218a626d9daec02ef3a7480a67e802b865
2021-06-17 16:03:09 -04:00
Jonah Graham
d465e83836 Bug 573797: Refactor code to use Charset instead of passing around Strings
This simplifies error handling as once you have a Charset you don't
have to worry about whether or not an UnsupportedEncodingException can
be thrown anymore. In addition it is a little easier on type safety.

Change-Id: I4292878a7c621f9d05fdb98f5c26a0ae8bfec062
2021-06-17 16:02:59 -04:00
Jonah Graham
385d302d70 Bug 573797: Always use sendString, regardless of encoding
This removes a TODO in the code that makes no sense, and in
most cases the else branch is not taken as a common operating
mode is the default charset/encoding is windows-1252 but the
current charset is utf-8.

The effective difference between the two branches is that
the else does a flush after character rather than after each
string.

Change-Id: I50b3cc5837d783ba20b88c2efa44d9c4e6381d30
2021-06-17 16:02:27 -04:00
Jonah Graham
27f6637d3f Bug 573796: Warn user if not using UTF-8 on Windows
The PTY, in case of ConPTY, operates always in UTF-8. This is suggested
back to the user with a decorated combo if they try to change the default.

Change-Id: Iaf4c13e256ea7ee3469eecab4a0ec3df1ceb19a4
2021-06-17 15:37:48 -04:00
Abdullah Khalid
481f08beb4 Bug 574239 - Adding path mapping through CSourceNotFoundEditor makes
launch configuration's Source tab dirty

Change-Id: I32396e274e4e803344d5e4a56324fb84ca40fd93
2021-06-16 19:16:06 -04:00
Jonah Graham
b831c73cfd [releng] Add missing sequence number bump to API baseline
Without this bump, Eclipse PDE can assume the contents hasn't changed
so will use the wrong baseline.

Change-Id: I02706b1277f9cfdd664c70b76832d6616e0fbf47
2021-06-16 13:07:36 -04:00
Jonah Graham
1610ed7b29 Cosmetics.
Remove trailing whitespace.

Change-Id: I6395b447f427b75c851d8cce2676fb14b3e1402b
2021-06-14 22:22:58 -04:00
Jonah Graham
ffc4272acb Fix NPE on projects which aren't full CDT projects
Change-Id: I4b611fe032eca9c5657d493fc60d6451bd6ddf7d
2021-06-14 22:20:28 -04:00
Jonah Graham
d907da99a4 Bug 573677: Use array based exec commands to avoid problems with spaces
While most of these commands don't actually have spaces in them, or
their arguments, avoid the deprecated methods.

Change-Id: If7b4324695699d5a6d9a2f8a979657977486d8a4
2021-06-14 22:20:28 -04:00
Jonah Graham
1ac907184b Bug 573677: Mark methods that don't handle commands well as deprecated
Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.

(follow up for 1557c2c4f5)

Change-Id: I126d60423b0e4ff6d9d240d7de2c1a4905763415
2021-06-14 22:20:28 -04:00
Julien Dehaudt
a6e6be0457 Bug 526421: Search the icon path from provided contribution
Signed-off-by: Julien Dehaudt <julien.dehaudt@st.com>
Change-Id: I7592a5df9b297f54184f754c7e3b0f8d79a6677c
2021-06-14 16:01:06 -04:00
Jonah Graham
e172ddcbf1 [releng] Update jacoco-maven-plugin to latest
Change-Id: I60931f867f48b50f98216552bf0a559fe08d79dc
2021-06-12 20:52:54 -04:00
Jonah Graham
902ea0dfa1 [releng] Bump to CDT version 10.4.0
Change-Id: I0807f46d9ebb8bb579b687366cdb19e40935a9ec
2021-06-12 20:52:54 -04:00
Jonah Graham
b60204625f Bug 561343: org.eclipse.cdt.debug.gdbjtag has no source, so don't attach it
org.eclipse.cdt.debug.gdbjtag in the root pom.xml is explictly excluded,
but it seems that the local exclude is needed too:
bc9ecdad17/pom.xml (L739)

Change-Id: Ib7489d8ac1feff5f5ec8542dfabdcba00b620ca7
2021-06-12 20:52:54 -04:00
Jonah Graham
4e07f56f0d [releng] Update to newer help-docs-eclipserun-repo
Change-Id: I46118a378e4edf319292a91483df27221c910839
2021-06-12 20:13:23 -04:00
Jonah Graham
071758e131 [releng] Update CDT baseline to 10.3.0
Change-Id: Iafd85f12126ce9c41d9d068ee0f6ea2ba9487b7f
2021-06-12 18:20:56 -04:00