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

14446 commits

Author SHA1 Message Date
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
Jonah Graham
2073d47084 Bug 572648: Handle cases of empty (EOF) JSON files
Change-Id: I10fae3542ae75120dad0a59b52aaf7b34a67d8e9
2021-04-08 10:56:14 -04:00
Jonah Graham
22ed0e0ae6 Bug 572250: Rename variables for consistency
Renames the local variables to be consistent with the names
in similar code.

Change-Id: Ic6159b7b108d433fdbd213d44d5a410982109f1d
2021-04-08 10:56:11 -04:00
Jonah Graham
19a37f18b4 Bug 572250: [Java 16] fix illegal reflection in scannerInfoCache
Java 16 restricts some reflection. The serializing of scannerInfoCache
with gson does some reflection on Pattern which isn't allowed.
Fortunately the reflection is not needed, we just have to prevent
gson from calling setAccessible by providing our own serialization
for the IExtendedScannerInfo

Change-Id: I0db5cec9cfec1ac4caabd2e67f1d6a336e361023
2021-04-08 10:55:26 -04:00
Jonah Graham
52ebe1f76f Bug 572581: update jnilibs for new version of cdt-infra
rebuilt docker images have small binary differences
in the jnilibs due to a rebuilt macOS toolchain being
used.

Change-Id: I25dc951e1e8c7c94a799d63a4c0db644d1f1be1e
2021-04-04 21:18:31 -04:00
Alexander Fedorov
8dbf024ab8 Bug 572552 - CDT releng: update versions to 10.3.0
Added missed license headers
Updated baseline for the parent pom to CDT 10.2
Updated version for pom.xml to 10.3
Updated version for features and bundles to CDT 10.3
Updated copyright for about.properties to be 2021
Incremented version + 100 where needed

Change-Id: I79666fcc0402fee6607499d7dce1eaf87a5f446d
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2021-04-04 16:17:25 -04:00
Marc-Andre Laperle
8b3998eb41 Bug 320186 - Support MSbuild error pattern in VC error parser
Change-Id: I2bea83a4ec79104f4ce7099ced2a7cde1c77a129
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2021-04-02 22:36:15 -04:00
Jonah Graham
cdd00392c1 Bug 571472: Don't resolve multi-line strings
Change-Id: Id6a8b208cb6bc965a2c8d781ba41bca3b3094685
2021-02-25 07:39:04 -05:00
John Dallaway
c66d331a95 Bug 570992: Fix templates extension point documentation
The "filterPattern" attribute is used to filter templates by language
ID, not by build configuration ID.

Change-Id: Idd89fffc2ec3aefc3c1421b4cbbc7e1a19dbb7f3
2021-02-07 04:03:44 -05:00
Jonah Graham
afee900b24 [releng] Fixup API error due to missing verion bump
Change-Id: I149aeb8f148f0f223e7ec09a73e153df5be68836
2021-02-03 09:50:12 -05:00
Jonah Graham
9c370cfcf0 Bug 521515: Update to JNA 5.6.0
Change-Id: Id56f6366e0bbaa33b1d0967cd64487fc173b3833
2021-02-02 21:14:08 -05:00
Jonah Graham
64e21a93c4 Bug 499777: Flaky and slow test tags
to exclude flaky and slow tests from gerrit runs and main build
tests can be tagged as such. See BTreeExpensiveTests for example
of a slow test and Bug_303953Test for an example of a flaky one.

The root README.md has a few notes on converting tests to JUnit5
and adding annotations to mark them slow or flaky.

Change-Id: I03a4004112e6a500d8ec2771d68f14f7dc5f67fb
2021-02-01 11:32:58 -05:00
Jonah Graham
5c82be881d Bug 569839: Provide a new JUnit5 base and utility classes
Change-Id: I8682f4702cfa0cad7d0452ca48d1ab74eeb1dbdb
2021-02-01 11:32:53 -05:00
Michael Uhl
28589d32a3 Bug 568957 - Header indexed with missing significant macros on multiple
headers with pragma once syntax

Change-Id: Iada2129ec7bf4f239ffdaa13ca3e33e322aa1025
Signed-off-by: Michael Uhl <Michael.Uhl@NashTech.Com>
2021-01-22 11:58:45 -05:00
Simeon Andreev
2962203bd2 Bug 569581 - Rethrow IOException in ElfParser.hasInterpProgramHeader()
This change adjusts behavior in ElfParser.hasInterpProgramHeader()
(added for bug 512822) to throw an IOException that occurred, as opposed
to logging the exception and continuing. This excludes exceptions thrown
by Elf.getSections() indicating that ELFhdr.ELFCLASSNONE is read; a new,
more specific IOException type is defined to allow handling this as a
special case.

A "generic" IOException indicates an I/O problem with the binary. E.g.
the binary can be deleted by the user or by Eclipse, while being visited
in CModelManager. If hasInterpProgramHeader() returns instead of
throwing, more problems can occur "later on".

Change-Id: I8852d9cbaa17dc97f668bb1666e9b046bbde1fca
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-01-14 09:10:28 +01:00
Stephan Oostveen
fe2d08b44a Bug 500798: Mark GCC template init message as info
When GCC skips template instantiation in its output it was parsed
as an error instead of an informational message.

Change-Id: If5dca2d1430a6b5e9cb9317649dea8291bfc0356
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
2021-01-11 15:18:34 -05:00
Jonah Graham
8f04a3bc34 [releng] Bump version number
Change-Id: I770d1842e4efeb3261db698356f4819e04f1f4a8
2021-01-11 15:14:09 -05:00
Simeon Andreev
fd09187f9a Bug 383348 - Replace actions with invalid menu paths in CDT UI
This change adjusts replaces the following actions (part of action set
org.eclipse.cdt.ui.buildConfigActionSet) with commands and menus:

* org.eclipse.cdt.ui.manageConfigsAction2
* org.eclipse.cdt.ui.buildConfigMenuAction
* org.eclipse.cdt.ui.wsselection

This is done to avoid menu extension errors on perspective
customization, due to problematic code in CustomizePerspectiveDialog. In
particular the customize perspective dialog will populate main menu
submenus only after going over actions; this causes the menu paths of
the actions above to be detected as invalid, despite actually being
valid and functional.

The original action classes are deprecated and marked for removal. The
respective classes are defined in non-internal packages; removal would
be considered API breakage and so must be done in a major version bump.

Change-Id: I31517697689772395b7e1868ef4cab07ad946085
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-01-05 20:28:50 -05:00
Jonah Graham
25cbbcd5b5 Bug 569839: Ensure that behaviour is same running tests without suites
This change renames all suites to be called ...TestSuite so that
the default includes don't pick them up. With the name ...Tests it
means that those tests referenced by the suite are run multiple times.

Tests which relied on being run as part of a TestSuite have been
refactored to run as individual tests by moving the logic from
the suite into the test (e.g. CommentHandlingTestSuite)

Tests that were not runnable have been renamed from ...Test to ...Tester
to match a convention already used in CDT.

Lots of tests did not use standard name (i.e. didn't end in no Test) so
this was fixed.

Many tests were really abstract tests, so the missing abstract was added,
e.g. ArrayTests

The default excludes in Maven behaviour differently than may be expected,
so rather than remove static inner test classes, update the excludes,
see pom.xml change

Change-Id: Ia91e12fe76c3ec2d914463a28400d21b9daf1910
2020-12-21 14:50:51 -05:00
Jonah Graham
7b6701f9ef Bug 569839: Add DefaultCCommentAutoEditStrategyTest to testsuite
This test started failing (and wasn't in testsuite previously) because
it had significant trailing whitespace in some tests.

The fix is to use ${whitespace_eol} which I have also added to some
of the javadocs to make it easier to find next time.

Change-Id: Ib364d8a400bcdeb21445dde8428e0fd4c77db990
2020-12-21 11:49:24 -05:00
Jonah Graham
75e281ffac Bug 569839: Restore the cleanupProject
This style is the JUnit3 way of doing JUnit4 @AfterClass. It was
commented out as part of Bug 564002 (commit 9e303185f9).

Change-Id: I56e2754f3cce447c47546c91cdc16b302e18b4a6
2020-12-21 11:49:24 -05:00
Jonah Graham
f3bee99f00 Bug 569839: Don't discard exceptions in tests
Change-Id: I710922fcc1b23d61d52fa1aa868b491bc26edf01
2020-12-21 11:49:24 -05:00
Jonah Graham
cb35c8daa2 [releng] Remove unused API filters
Change-Id: I960afcd99198918fe5f86983243b571c23a3c97f
2020-12-19 13:01:44 -05:00
Jonah Graham
c248620053 [releng] Increment feature and related versions to 10.2.0
Change-Id: Icd135a588920fa25fd846dc285db5f83e5ac7037
2020-12-19 12:11:25 -05:00
Torbjörn SVENSSON
05322656c6 Bug 539927: Do not mark "Removing unused section" lines as errors
The lines are printed by the GNU ld with the flag --print-gc-secions

Change-Id: Ie09229427a29e9959f8ffe4920a1645ad3dcb086
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2020-12-02 10:53:11 +01:00
Torbjörn SVENSSON
0f3214ace9 Bug 569353: The mode output from ld is not an error
Change-Id: I1a29bd698c3b37d687bf76a416689df0a69aa50d
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2020-12-01 08:34:03 -05:00
Simeon Andreev
d4c6168964 Bug 486033 - Add close button to CDT Build Console toolbar
This change adds a close action
(org.eclipse.ui.console.actions.CloseConsoleAction) to the CDT build
console.

CDT accessing a closed console via BuildConsoleManager will result in
re-adding the respective console page to the console view, if the
console page was closed.

Change-Id: Ifc4d4c6ed329f1c1c7e70f7903ed660ba85306c5
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2020-11-29 15:14:40 -05:00
Simeon Andreev
a655f7b4a5 Bug 568926 - Build Console has no action to disable activation on output
This change adds an action to the CDT build console, to disable
activation on build output. The action uses the existing preference
"build console on top when building" from C/C++ -> Build -> Console.

The action icon is copied from platform debug UI, see:

org.eclipse.debug.internal.ui.IInternalDebugUIConstants.IMG_ELCL_STANDARD_OUT
org.eclipse.debug.ui/icons/full/elcl16/writeout_co.png (and @2x)

The change also ensures the existing preference works, as it currently
has no effect on not showing the build console on CDT build.

Change-Id: I0d94583b85e1a13f18d43de8c10355ccdab7f259
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2020-11-29 15:04:00 -05:00