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

14231 commits

Author SHA1 Message Date
Jonah Graham
9cc97ac406 Error message if launcher is null when trying to watchProcess
Part of #125
2022-11-04 08:24:54 -04:00
Jonah Graham
1f19cff227 Make missing identifiers and classes in plugin.xml errors
Subsequent commits fix the errors
2022-11-04 08:19:23 -04:00
Jonah Graham
949d46c630 Delete abstract class with no concrete subclasses 2022-10-25 22:56:02 -04:00
Jonah Graham
306708f5cb Remove projects from workspace at test startup
Various tests are not cleaning up properly after
themselves, causing test failures on subsequent
tests. Therefore start each test by deleting
all projects.

In addition, some tests were creating their test
projects in their constructor. As all the constructors
run before all the tests as part of test discovery
it means that projects were being created in
constructor and interfering with other tests
later. With the deleting of all projects in @AfterEach
these tests would have started failing. Therefore,
change these tests to create their projects
and do other initialize tasks in the setUp method.

For older JUnit3 style tests:
This substantially slows down tests as many tests
rely on sharing the project between multiple tests and
recreating those projects on each run is slow.
Therefore this is not applied universally to
all JUnit3 tests.

For tests that are affected, those tests are moved
to JUnit5 base test.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
23d44d05a4 Restore completion filter after testing preference
On GitHub actions the org.eclipse.cdt.ui.tests.text.contentassist2
tests are running after ProposalFilterPreferencesTest and
ProposalFilterPreferencesTest was changing the default
filter and not restoring it.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
d345323f49 Fix CDescriptorOldTests.testDescriptorCreation instability
This old test had a race condition. The failing test was trying
to verify that CDTPROJECT_ADDED was received, but if there
was a delay in the startup then another event would come in
later. So for this test use the first received event,
for the remaining tests use the last received event.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
128de5d6cd Add missing abstract keyword to abstract tests
Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
a827d71f52 Add additional diagnostic to error message
It may be that this test fails regularly because
another test is not cleaned up properly.
Make sure there are no unexpected projects in
the workspace.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
30166dea86 Bump org.eclipse.cdt.core major version
Due to the removal of previous API done in:

- PR #103
- commit 4de9516e97
2022-10-25 22:28:51 -04:00
Mat Booth
4de9516e97 Bug 580314 - Remove deprecated methods from core build
Deprecated methods in CommandLauncher and CBuildConfiguration
are now removed.
2022-10-21 15:38:58 +01:00
Mat Booth
7edb711c7c Fixes launchbar icons looking blurry on hidpi screens
The launchbar way of compositing images for the buttons was preventing
the use of higher quality icons on hidpi dislays, making the launchbar
buttons look blurry or pixelated compared to other toolbar buttons.

Instead we can get a nicer result with a custom widget on which we can
directly draw a button border plus the hidpi version of the icon.

Also included is an attempt at a 2x hammer build button icon, which
should look a bit nicer on hidpi screens.
2022-10-19 08:41:15 +01:00
Jonah Graham
ab3b819156 Remove API tooling from projects that are not part of our release 2022-10-03 12:42:37 -04:00
Jonah Graham
e4e06008af Update to Java 17 as BREE. Fixes #80 2022-10-03 12:42:37 -04:00
Jonah Graham
110ac149c2 [releng] Bump versions for CDT 11.0.0 2022-10-03 12:42:37 -04:00
Jonah Graham
81785221b4 Bug 579666: Make fields private/non-API that were previously marked for removal 2022-09-09 20:18:47 -04:00
Torbjörn Svensson
3af7d50c4a Improve dark theme on Windows
Switch to CTabFolder/CTabItem for newui.
This changeset is a breaking change but on a review of existing
adopters/extenders of CDT no one is actually accessing these fields.

Change-Id: Ic1ef0f242c1d2932726f3a6d4c9df9558312764a
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
2022-09-09 20:18:47 -04:00
Jonah Graham
93fbce4f2c Bump cdt.ui major version for CDT 11.0 development 2022-09-09 20:18:47 -04:00
Davin McCall
6445ec4890
Bug 580325 - constexpr evaluation of builtins for clrsb, clz (#52)
Adds constexpr evaluation for some additional compiler builtins. This is
probably the last lot few builtins that can reasonably be
constexpr-evaluated in CDT.
2022-08-22 12:18:26 -04:00
githubaf
9ce74a7145
Do not mark "removing unused section" lines as errors (#19)
gcc linker outputs "removing unused section" to stderr when the option "--print-gc-sections" is used. That is fine. 

Eclipse CDT reports all these lines as errors however and the build seems to have failed, which is wrong.
The was a bug report Bug 539927: Do not mark "Removing unused section" lines as errors and a fix
To fix this bug a change was made 2020-12-02 05322656c6
-CDTGNULinkerErrorParser.regex.LdMode=(.*[/\\\\])?ld(\\.exe)?: (mode .*)
+CDTGNULinkerErrorParser.regex.ldInfo=(.*[/\\\\])?ld(\\.exe)?: ((mode|Removing unused section) .*)

That does however not solve problem entirely, as the output of gcc linker is "removing", not "Removing", i.e. the word "removing" starts with a lower-case "r"
To fix that problem both R and r should be accepted.
2022-08-22 11:42:57 -04:00
Torbjörn Svensson
5aee96dfb4 Fix widget is disposed error during shutdown
After building a project and shuting down eclipse, the build console
will have a propertyChange event fired that will attempt to modify the
stream and background color that will trigger a use-after-dispose error
from SWT. This changeset ensures that the action is only taken on
non-disposed widgets.

Contributed by STMicroelectronics

Change-Id: I872c28da1b2fca7ec39f5b12d9d1ec398e559814
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-08-16 16:04:11 +02:00
Torbjörn Svensson
4a1e0f467b Bug 580113: Expose concurrent invocations
The class CommandLauncher holds an internal state of the process and
it's command line. To avoid corrupting the internal state, only allow
executing new commands if the previous command is finished.

Contributed by STMicroelectronics

Change-Id: If41816f6b642953776a4fea3df9f341a17712222
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-08-16 16:03:27 +02:00
Jonah Graham
1c8c96c239 Move the disable intro ini out of root of repo
The root files in GitHub are a bit more prominent, so keep
that area clean and move this special ini to a subdir.

Change-Id: I12d95727e9dad29ebe4f50d47faa9e98753a52bc
2022-08-04 12:23:12 -04:00
Jonah Graham
2481f398e0 [releng] Rebuilt natives for updated Java
java 17 is now the default, and that means that a new hash
is created by reproducible_build_wrapper.py due to the changed
path for includes to the Java 17 include directory.

Nothing else about the binaries has actually changed.

Change-Id: I36398b84cc5fe20cd1d0f58f52dfee4737e913f8
2022-07-19 15:51:41 -04:00
Mat Booth
5e4a66b0af Bug 580178 - Unable to stop build process from launchbar
Switch from the standard Java ProcessBuilder to the CDT CommandLauncher
for new style core build projects.

The CommandLauncher uses a more sophiscated mechanism for watching the
spawned process allowing us to interrupt the process when the user hits
the stop button on the launchbar by properly listening to a monitor.

The change adds new API to CBuildCongifuration that takes a progress
monitor, and changes all the affected build configuration types to use
this new API.

Change-Id: I0c4225616ad8331c2cea28bcb502028455a8ea71
2022-06-30 12:34:16 -04:00
Davin McCall
4a956060cd Bug 580201 - narrowing for constexpr evaluation of builtins
Implement narrowing of argument value (in constexpr context) for various
builtins.

Change-Id: I428cc789358638bf3796ea706f459032c8be10a1
2022-06-28 19:43:05 -04:00
Davin McCall
7e59306985 Bug 580037 - constexpr evaluation of additional builtins: ctz, etc
Provide constexpr evaluation for: __builtin_ctz, __builtin_popcount,
__builtin_parity, __builtin_abs, and the variants which take a long int
or long long int.

Change-Id: I6088e2d41a161059ce0a64443a1d1126952ff905
2022-05-30 18:18:30 -04:00
Davin McCall
1ec4ae52c1 Bug 579934 support constexpr evaluation of __builtin_ffs[l,ll]
Change-Id: I103a4d0a7958d6172eb2b05379c8eec40369526c
2022-05-25 11:43:22 -04:00
Torbjörn Svensson
a1794246d5 Bug 579876: Use same bgcolor for occurrence in editor as JDT
Contributed by STMicroelectronics

Change-Id: Ic1bfd9af7d308a8c9b14a9b2f40bbd278a0ceca0
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-05-13 10:07:53 -04:00
Torbjörn Svensson
b86404669a Bug 579876: Make background transparent on icons
Contributed by STMicroelectronics

Change-Id: I51432f72979b7f1d95543ea1f7fcb48c3543bac7
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-05-10 17:27:54 +02:00
Torbjörn Svensson
a2e6ef61c9 Bug 579666: Improve dark theme on Windows
On Windows, the TabFolder and TabItem classes does not follow the
themeing in Eclipse. As a result, the tab selectors will be drawn with
the light theme while the rest of the Eclipse UI is in dark theme.

Contributed by STMicroelectronics

Change-Id: I9169c9e01f8c9a3af7b6bb6d1c673a043735e7e9
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-05-06 04:38:00 -04:00
Jonah Graham
a7d39a80a3 Stop using jaxb's DatatypeConverter
jaxb is not standard anymore, and having a dependency just
for this simple method is overkill.

This is also a workaround for Bug 579817.

Change-Id: Ic0db6e595b8faa9323c26d29f8caedc0ac4b089e
2022-05-02 21:54:12 -04:00
Jonah Graham
a1c02e2cce [releng] Apply auto-clean of save to all files with Eclipse 4.23
This mostly is using diamond operator, but includes
adding missing @Override and organizing imports and
applying formatting improvements in the JDT formatter.

Change-Id: Id91cbff33b0a039cc5121945ffbc407ecba45866
2022-04-19 20:13:15 -04:00
Jonah Graham
148ae40d0f [releng] Make CDT Clean-up profile match Editor on save actions
The CDT Cleanup profile had a bunch of extra cleanups applied to it, this
prevents running the CDT cleanup profile manually to simulate running the
save actions on all Java files

Change-Id: Iad491e1258a4ba90d81d1457ea0f6779e3663e38
2022-04-19 20:13:15 -04:00
Jonah Graham
ad1473feef Bug 579666: Mark parts of AbstractPage API for deletion
Change-Id: Iddade3b1a1fb848703d87ee9d1d3233bd6ab55ed
2022-04-18 19:27:48 -04:00
Torbjörn Svensson
96d8c32368 Prevent NPE in property change callback
Contributed by STMicroelectronics

Change-Id: I7be0660541bfe85cd0c371eddeb7ef14eb2fe75d
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-17 17:27:24 -04:00
Jonah Graham
5e5373982f Cosmetics.
Change-Id: I7b563198e5b0b5eb58d3d270b134afa62e9b0dc5
2022-04-17 15:05:08 -04:00
Jeff Johnston
7991361258 Bug 579668 - Regression in Docker header file support
- fix CBuildConfiguration.getScannerInformation() method to look to
  see if the toolchain is a ContainerGCCToolChain but the include paths
  have nothing pointing to the special HEADERS directory for copying
  over Image headers to the host in which case do a fix-up by
  calculating the scanner info again and massaging the include paths
  as needed

Change-Id: If6f76ef6ffb1bc5958377c565e4847989d5de0db
2022-04-14 20:47:32 -04:00
Torbjörn Svensson
f5446675ec Bug 579666: Mark fileds and internal class for removal
This is the first step towards fixing the dark theme on windows.
In order to fix the AbstractPage class, an API breakage is required and
this will pave the way to let any sub-classers know that things are
about to change. From my point of view, the marked fields and the
InternalTab class should never have been part of the API as they are
internal to the AbstractPage class that contains proper API methods.

Contributed by STMicroelectronics

Change-Id: Icfea8c963727718d4dc99e8df916674384dcb532
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-14 05:42:04 -04:00
Jonah Graham
7400e22b1f [releng] Update all legal files with update_legal_files.sh
The about.html was changed as per
https://gitlab.eclipse.org/eclipsefdn/it/websites/eclipse.org/-/issues/90

Change-Id: Ied879279460a8fc610630fc26794ab3df9eae39f
2022-04-13 13:42:35 -04:00
Jonah Graham
1f0451c163 [releng] Prepare for 10.7.0 with version bumps
All the about.html files are updated, so every bundle that hasn't
already had a bump in 10.7 needs one now

Change-Id: I6143d2fbe77a58a3a6d2f4a226d96087117f9ac1
2022-04-13 13:15:06 -04:00
Jonah Graham
2402a0101e Bug 579669: Ignore .settings in some tests
In Eclipse 4.24 .settings is created all the time for new projects,
for CDT test projects which have the root of the project being the source
root this means that .settings is now returned in various places.

This patch removes .settings from results before checking results against
expected results.

Change-Id: Id02e9b8f25b109ed289d22ffb526ecceb747d4f7
2022-04-12 14:30:37 -04:00
Jonah Graham
e954ff6fe1 Bug 579669: Remove testProject in finally block
These tests were not cleaning up properly if they failed.

Change-Id: Ic649335dd439a1cc29dd2784b203158e49d4bb1c
2022-04-12 13:41:36 -04:00
Torbjörn Svensson
c5f0f85be0 Avoid NPE and redrawing disposed widget
Contributed by STMicroelectronics

Change-Id: I753844ff035bc6b3511c1e283e80e37bd547b6e7
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-12 03:29:30 -04:00
Jonah Graham
5c4d54df1a [releng] Update comparator repo to 10.6.0
Change-Id: Ie4e5bc90a41bb6e47cd34afb42126e1934fcc042
2022-04-10 20:55:36 -04:00
Jonah Graham
e8d924bb9a [releng] Bump versions for 10.7.0
Change-Id: Ibada1ef26f47f4238ae64f53fb67a73125534347
2022-04-10 20:55:36 -04:00
Torbjörn Svensson
ca92f0243e Added dark theme colors for build console and editor
Editor supported dark theme except for inactive code blocks like
  #ifdef
  ...
  #endif

Contributed by STMicroelectronics

Change-Id: I192d76136946a6e4dceaba99a31eb42f7df4c584
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-06 12:23:55 +02:00
Jonah Graham
db4bc74334 Bug 579261: Fix formatter exception when formatter comment tags aren't used
Change-Id: Ia704bfd9bd6ff0e171187b78aa6b693a1921902e
2022-03-14 17:05:45 -04:00
Torbjörn Svensson
66f3c6b08d Bug 579039: Limit SOURCE_DATE_EPOCH to fit 32bit unsigned int
The impementation in GCC allows a value up to 253402300799 that
corresponds to "Dec 31 9999 23:59:59 UTC". Apparently, this is due
to some limit of __DATE__ and __TIME__ within the preprocessor.
Regardless, as the reporter claims to have problem with values
outside the range of a 32bit unsigned integer, lets use
"(1 << 32) - 1" as a limit.

Contributed by STMicroelectronics

Change-Id: Ifa7995cd9edb460d4ad6544b5231eef88d7e39a0
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-03-10 01:43:40 -05:00
Jonah Graham
0ae896b0f1 Bug 577952: Close pathEntryStore to fix listener leak
CConfigBasedDescriptorManager.addDescriptorListener is being called
repeatedly, but the listeners are never removed due to the missing
close.

Change-Id: Ib1b92139a0090ffcdd662aa7b79d5de94a883cb1
2022-03-09 13:49:16 -05:00
Jonah Graham
687503911b Dispose of icons in managed build settings pages
In Bug 531915 the code was rewritten to use imageDescriptorFromBundle,
which lead to url being null all the time. This meant only the last
loaded image was being disposed properly.

There fix to Bug 531915 had another side effect - it changed the caching
of icons from the Image to the ImageDescriptor.

As it has been ~4 years without the image being cached, I suppose it
is ok to leave it not cached and instead I store the images to be
disposed of in a list.

Change-Id: Id3427ebfc8720da52132bd8f11714bba1e2cd0bf
2022-02-25 11:39:22 -05:00