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

14173 commits

Author SHA1 Message Date
Jonah Graham
13cdd8ada7 Bug 576533: Add support for Mac M1
-framework JavaVM is no longer needed for a while and in
latest Xcode is removed as an option

x86 on macOS is no longer supported by recent Xcode, so drop it
from CDT. x86 hasn't been supported in Platform for a while, so
it wasn't actually usable.

Change-Id: I149722b168fe9819ee334d4afd25ae624b1664c5
2021-11-15 15:32:29 -05:00
Jonah Graham
fa8a6279d2 Bug 577074: Fix i18n on import/export language settings
Side effect is that the indentation in the transformer now
works properly, so the extra newlines inserted everywhere
can be removed.

This change was done by changing the output to an OutputStream
instead of a Writer so that the XML handler could set the
encoding to match what was in the settings, i.e.:
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");

The non-translated language IDs are used in preference to the
translated names when importing. The export now puts that ID
(when available) in the output file. The ID is available on
normal user files (C, ASM, C++) and not on object files. The
object files probably don't have languages settings that are
exported, but this code does not exclude them from being exported.

Change-Id: I46de004bb8c6a0ca05210487a5d33390d397c720
2021-11-09 11:01:13 -05:00
Jonah Graham
c12f9e28c0 [releng] Require target platform bundles as minimum version
Without setting dependent plug-ins to minimum version to match the
target platform we are aiming for we can imply (and therefore let install)
CDT into older versions of Eclipse where CDT does not actually work.

This can be exposed in very odd ways, such as IllegalAccessError, when
platform has allowed API changes.

However, rather than update every single bundle in CDT, only the
o.e.cdt.core/ui bundles are being updated as this should achieve the
desired result without every other bundle needing to be touched.

See Bug 536448

Change-Id: I6f57e19044facd65a9214204efc9c8b2c2201590
2021-10-25 18:56:15 -04:00
Jonah Graham
c13962fcd7 [releng] Update to latest dependencies (2021-12 M2)
This includes requiring older version Hamcrest as the org.hamcrest
bundle was recently update in Orbit to a new major version that
isn't compatible.

Change-Id: I7cb23f0be058d1404b93b1a76cbfe8182a3ded14
2021-10-25 18:56:15 -04:00
Torbjörn Svensson
994ea12856 Bug 574131: Make the graceful exit time configurable
Contributed by STMicroelectronics

Change-Id: I8ca32b2440ef1cc81bf5b9ddd70b6b4222a29261
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-25 21:59:02 +02:00
Torbjörn Svensson
b3be425429 Add convenient method to raise a custom signal
Contributed by STMicroelectronics

Change-Id: Ie9c6c7d87e1efc8e13861c3551c11a1da0be2695
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-20 13:49:48 -04:00
Torbjörn Svensson
e4c46094b1 Ensure constants are constant
Contributed by STMicroelectronics

Change-Id: I3ceecdba0bcf5715ce0c4f683fd3fdb9b86ad8b3
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-20 13:49:48 -04:00
GeraldMit
e8b257c645 Bug 576639 - [Accessibility][A11y] reduce JAWS table read while in table
correct previous fixes Bug 575946, Bug 575949, Bug 576090
to use only parent for accessibility add of table description.

Change-Id: Idbc39f13c06f27ed106839d922c328f3bce76d16
Signed-off-by: GeraldMit <Gerald.Mitchell@ibm.com>
2021-10-19 14:53:43 -04:00
Torbjörn SVENSSON
4a7bd0d1b4 Bug 574131: Do not concurrently call Spawner#destroy()
As the Object#wait() voids the synchronization, more threads can call
destroy() before the Reaper thread has identified that the process
exited or the timeout occured.
The change ensures that only one call actually raises the signal while
the others are NOP.

Contributed by STMicroelectronics

Change-Id: I64722b17138582a76bb9cf604a6b0c14685f1720
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-18 20:49:49 +02:00
Torbjörn Svensson
cd73469b01 Bug 574131: SIGTERM should let app do a gracefully exit on win
Let the process have some time to do a graceful exit with the signal
SIGTERM. If the process is still alive after 1s, raise the SIGKILL
signal and hammer down the process.
The 1s is aligned on all platforms and handled in JAVA.

Contributed by STMicroelectronics

Change-Id: Iff2f7727c1ac37b190c60a01774f106638eeeeaa
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-10-18 07:06:22 -04:00
Jonah Graham
ad4d444823 [releng] Prepare for CDT 10.5.0
Change-Id: I9b72edf4a0ff0771a147934dd7f1c92ba1ee799a
2021-09-26 20:23:17 -04:00
GeraldMit
174453ba91 Bug 576090: Fix Preference description for preference
The description for Advanced Content Assist Preference can not be read
out.

The description can  not be a stand-alone label when working with JAWS,
and titles on the page should have additional accessibility listener
values for Advanced Content Assist Preference can not be read out.

Change-Id: Ic7715676848ecefb8cf111800a2847fe6e3e30aa
Reported-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
Signed-off-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
2021-09-20 00:10:01 -04:00
Gerald Mitchell
525f801293 Bug 575949: The section title cannot be read out
The section title "Elements" can not be read out from Syntax Coloring
Preferences page. "Preview" could also not be read out.

Change-Id: Ia8e8261739100808eda7bccb28b4c2fca5d59210
Reported-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
Signed-off-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
2021-09-16 00:45:14 -04:00
GeraldMit
b7cc884e3d Bug 575946: Fix accessibility on C element Filter
The description for filter text on C element Filter
dialog could not be read out.

Change-Id: I7c4884cca2c1fff3d872f4775e8529e4428c86ac
Reported-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
Signed-off-by: Gerald Mitchell <Gerald.Mitchell@ibm.com>
2021-09-15 10:41:56 -04:00
Simeon Andreev
c410447f12 Bug 319668 - NPE in indexer CCorePlugin.getCProjectDescription
This change ensures code in SelectionListenerWithASTManager does not
attempt to compute an AST if the workbench is shutting down. This can
result in a NPE in the CDT core plug-in.

Change-Id: I3a0f921b3327bab9eab7169591f217c4f4766a70
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-08-26 17:35:17 -04:00
Marc-Andre Laperle
383211b9c7 Bug 574317 - Per-project Doxygen options are ignored
Pass along ICProject to edit strategies so that they can retrieve
per-project settings.

Change-Id: I87699917114a10439a820f9d6ec9d53f350ea50f
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-08-08 21:24:43 -04: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
43c285a7ef Bug 574247: Test for order of elements in outline view
Change-Id: I75593befecdc19ddee137830a457c8dbfb486a03
2021-07-24 12:18:22 -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
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
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
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
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
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
Jonah Graham
902ea0dfa1 [releng] Bump to CDT version 10.4.0
Change-Id: I0807f46d9ebb8bb579b687366cdb19e40935a9ec
2021-06-12 20:52:54 -04:00
Jonah Graham
087e0e4a3e Typo. s/Java Element/C Element/
Change-Id: Ida00d0fe8884ebf3beb4afc9b7fb44e084a028a5
2021-06-04 21:27:49 -04:00
Jonah Graham
37fef0749c Bug 573786: Handle UnsatisfiedLinkError turn off ConPTY
When starting on older versions of Windows ensure that WinPTY continues
to be used by catching all the types of exceptions that may indicate
that ConPTY is not available. This change catches all Throwables as
we want to know about all RuntimeExceptions and Errors

Change-Id: I7524d9286efe9296f1bb44311c4a3be1e5195c14
2021-05-26 10:21:29 -04:00
Jonah Graham
7e134ccf24 Bug 562776: Fix enablement variable for ConPTY
Change-Id: I46a6a64ddd1ca74a4466ea13ef8a942cd83c1853
2021-05-24 21:29:24 -04:00
Jonah Graham
1557c2c4f5 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.

Change-Id: Idce714da9c1d6ac7a67dc174d5b30bf619534c53
2021-05-23 20:49:26 -04:00
Jonah Graham
4e92239952 Bug 562776: Use Windows ConPTY API instead of WinPTY
There are lots of bugs in WinPTY, while upgrading WinPTY would
resolve some of them, there are others that are unresolvable. See
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
for a backgrounder on the general subject.

In this first version ConPTY won't be enabled by default, it requires
system property
org.eclipse.cdt.core.conpty_enabled=true
to be set. i.e. start Eclipse with:
-vmargs -Dorg.eclipse.cdt.core.conpty_enabled=true

In a future version the default will change to on if available,
so to force it off use:
org.eclipse.cdt.core.conpty_enabled=false

Change-Id: Ib2df0095027c23f20daa6aa044d9e5f0b0443164
2021-05-23 20:49:26 -04:00
Jonah Graham
02286a6a34 Bug 572878: Rewrite signing of dlls to preserve full file name
This is a fixup of the previous commits which has some basic
shell errors

Change-Id: I9572148d0fa9c6fdad5c6e256d6ccabaed9c8a9c
2021-05-19 08:53:56 -04:00
Jeff Johnston
2ec6d64b1b Bug 568957 - Missing significant macros on hdrs with pragma once syntax
- replace printStackTrace with CCorePlugin.log call

Change-Id: I2eb5398cfbd3ebfbfe3ab02acaf40a748699902a
2021-05-17 21:59:39 -04:00
Jonah Graham
8e3e8366c1 Bug 572878: Preserve file name when passing file to be signed
Do this by using a temp dir to store the unsigned files in rather
than mangling the name

Change-Id: I25d3b1fbb5751f8615266168a919990d9111204c
2021-05-17 21:26:40 -04:00
Jonah Graham
241c3a38fd Bug 572878: Preserve file extension when passing file to be signed
Change-Id: I28d15a6430ac3860ba65f6414498793e22dffee0
2021-05-17 21:01:58 -04:00
Jonah Graham
3f5438aad8 Bug 572878: Fail build if curl fails by having curl return error code
Change-Id: Iad5c276f0fbbda96a22d8fbf55d06485cf63f1d4
2021-05-17 20:42:47 -04:00
Stephan Oostveen
260c1b39f7 Bug 573560: Mark GCC constexpr message as info
A GCC information message starting with 'in constexpr expansion'
was incorrectly parsed as an error.

Change-Id: If6142f8486e97c088315060c826d59e61566692b
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
2021-05-15 19:43:18 -04:00
Jonah Graham
78b9b1e16c Bug 573498: Fix bg color when hovering over annotations in dark mode
SWT.COLOR_GRAY is gray in dark or light mode, but COLOR_TEXT_DISABLED_BACKGROUND
changes with the theme so always leaves the text legible.

Change-Id: I3d0c2d1a19baa618ef08c5c40e35fbdda11691e2
2021-05-15 16:21:33 -04:00
Jonah Graham
2c63592dd6 Bug 573546: Clear old selection in hover on annotation ruler
The select can be called twice when the expansion first opens,
so clear out the old selection before processing the new one.

If this isn't done, the oldStyles gets set to the highlighted
version on the second call, which prevents deselect from
removing the highlight.

Change-Id: Ibc8ae45d4164d380b7946cd492c29f33c9fac981
2021-05-15 16:21:13 -04:00
Lidia Popescu
41de69b06c Bug 572755: Update copyright header from previous work
Signed-off-by: Lidia Popescu <lidia.popescu@windriver.com>
Change-Id: I0286ada79fc7fc7df140475538d52dcb571a1e58
2021-05-12 10:19:07 -04:00
Lidia Popescu
60cb825cb2 Bug 573204: Persisted selection for create new file from template
Each source file could have few custom templates. If user selects a
specific template from the combo box for a specific file type, this
selection will be persistent for next file creation, but only for same
file extension.

Change-Id: I7dde198d6fefdfbbc124b8c52517dfe751009fca
Signed-off-by: Lidia Popescu <lidia.popescu@windriver.com>
2021-05-12 10:16:28 -04:00
Jonah Graham
919f0a0086 Bug 572875 and Bug 572878: Sign .jnilib/.dll in production builds
Because the dll/jnilib is modified in place, the natives are qualified
with their build date, rather than their git date as the checked-in
libraries are not signed.

Change-Id: I3078f5040f7ef9590bb4ab5d031dcb29b3c3bdde
2021-04-29 14:39:00 -04:00
Lidia Popescu
68c67c5a1b Bug 572755: Sorting for new custom templates
The changes adds sorting for source templates in alphabetic order.
Makes possible to bring to the top the new custom templates provided by
extension points, as the most frequently used ones and to avoid the need
for using the drop down list for the right option.

Change-Id: I931bd2fc08f3e37178a64e4b7908db73af1fbc2c
Signed-off-by: Lidia Popescu <lidia.popescu@windriver.com>
2021-04-19 10:24:18 -04:00
Jonah Graham
b6b66b5457 Bug 568397: Add separate text boxes for separate build command and args
Change-Id: I078a1db23a69dcbde503b1dd5e496705ecccc956
2021-04-12 17:25:15 -04:00
Fabrizio Iannetti
e6d5c634b9 Bug 563015: terminal: open files/links with ctrl-click
- hover with ctrl+mouse underlines word under cursor
- ctrl-click tries to open the word:
  - if a relative path (not starting with /) a full path is
    obtained by prepending the shell cwd
  - if the fullpath maps to a workspace file, it is opened
  - otherwise open the OpenResource dialog with the word as
    filter text
  - if there is line/column information (separated by colons)
    then the opened editor jumps to that line
- http and https words are opened in a browser window

Change-Id: I3f46accbf1eac6743d7b0c3b34bf30ac5e7523bb
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2021-04-12 16:04:07 -04:00
Jonah Graham
104819751c [releng] Remove no longer needed API problem filters
Change-Id: I6d648357ca1b9dc46d6f9e4757deba284d90d674
2021-04-12 09:28:46 -04:00
Torbjörn SVENSSON
450e0cac52 Bug 572749: Try to always show error in English in exception
The ThrowNew JNI method requires the message to be encoded in
"modified UTF-8". The FormatMessage WinAPI method can return a string
using any encoding, so it needs to be converted to UTF-8 in order
to have it visible in the exception message.
To further help, try to extract the message in English and fall back
to the Windows installation language as a last resort.

Prefix the error message with the error code from the GetLastError()
function.

Contributed by STMicroelectronics

Change-Id: Id76ffd83e2d3ad1f061780c7ee0892c9b378649b
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-04-10 14:44:44 -04:00