Commit graph

36273 commits

Author SHA1 Message Date
Alexander Fedorov
88355ecc48 [#657] CDT cannot be built on Java 21 due to security manager changes
* Switch CI to Java 21
* Remove config generation for debug application
* Remove `org.eclipse.osgi.services` from `proxy.server` product
* Remove `org.eclipse.osgi.services` from
`org.eclipse.cdt.debug.application.product` product
* Move `org.eclipse.cdt.debug.application.product` from profile to
general part

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2024-04-19 22:16:40 +03:00
John Dallaway
96a3310420 Add GNU assembler debug level option to N&N 2024-04-03 20:48:59 +01:00
Jonah Graham
98e86ff23a CDT 11.5.0 composites 2024-03-10 12:44:13 -04:00
Jonah Graham
7f5080a3d0
Update to Eclipse Platform 4.32 for CDT 11.6 development (#731)
Pulled out of https://github.com/eclipse-cdt/cdt/pull/729 due
to instability in tests caused by a platform change.
2024-03-08 16:29:22 -05:00
John Dallaway
8222dbeee7 Add GNU assembler debug level option to MBS 2024-03-08 21:17:41 +00:00
Jonah Graham
381cb7eac5
Refactor MarkOccurrenceTest to JUnit5 style (#730)
This was completed so I could best investigate
https://github.com/eclipse-cdt/cdt/pull/729#issuecomment-1984184372
2024-03-08 11:59:50 -05:00
Jonah Graham
221d346f6d
Prep repo for 11.6.0 (#729) 2024-03-07 14:17:45 -05:00
Alexander Fedorov
b661f1757c Revert "[#719] Add required root files"
This reverts commit 9ab2cd2ba9.
2024-02-28 19:31:12 +03:00
Alexander Fedorov
9ab2cd2ba9 [#719] Add required root files
* add SECURITY.md
2024-02-28 18:19:50 +03:00
Alexander Fedorov
5ab120a1ce [#719] Add required root files
* add NOTICE.md
2024-02-28 18:19:50 +03:00
Dietrich Travkin
95fe4d8701
[#716] Fix varying order of elements in project explorer (#717) 2024-02-26 11:35:53 -05:00
Jonah Graham
207bddab5a
Build with Tycho 4.0.6 (#715)
Includes bundle version bumps for new version of ECJ and
target platform update.

Co-authored-by: Александър Куртаков <akurtakov@gmail.com>
2024-02-22 21:38:57 -05:00
G. Hentschke
424f3112a7
CDT LSP 1.1.0 download files (#714)
Part of https://github.com/eclipse-cdt/cdt-lsp/issues/210
2024-02-21 17:45:15 +01:00
Александър Куртаков
55a3dc2ac2 Update maven plugins
maven-enforcer-plugin 3.2.1 -> 3.4.1
maven-pmd-plugin 3.20.0 -> 3.21.2
maven-resources-plugin 3.3.0 -> 3.3.1
org.codehaus.mojo:build-helper-maven-plugin 3.4.0 -> 3.5.0
org.codehaus.mojo:sonar-maven-plugin 2.4 -> 3.10.0.2594
org.jacoco:jacoco-maven-plugin 0.8.8 -> 0.8.11
2024-02-21 17:53:55 +02:00
Александър Куртаков
25edc17924 Copyright year bumps 2024-02-21 16:59:16 +02:00
Александър Куртаков
ceb55c49fb Unify maven-compiler-plugin setting
Define the common version in parent pom and don't override it.
Move to latest version while at it.
2024-02-21 16:59:16 +02:00
Александър Куртаков
fa47bbdb2a Update CBI plugins to 1.4.3 2024-02-21 16:12:58 +02:00
G. Hentschke
d04849b0c4
[703] fix NPE when no build binaries on system PATH (#704)
[703] fix NPE when no build binaries on system PATH

- fixes NPE when new cmake project has been created while there are no
C/C++ build binaries on the PATH environment variable. The NPE has been
thrown when the children of the project should be fetched (e.g. in
project explorer view)
- fix NPE cause in ErrorBuildConfiguration
- fix unit test

fixes #703
2024-02-11 07:45:57 +01:00
Jonah Graham
bfa8700634
Remove unreferenced properties key (#702) 2024-02-08 15:56:25 -05:00
Jonah Graham
64433f4d19
Remove DiscoveredPathContainerPage (#701)
The class DiscoveredPathContainerPage used a number of APIs in
the Eclipse Platform
[removed](https://github.com/eclipse-platform/eclipse.platform.ui/pull/1563) in
[Eclipse 4.31 release](81e406456f/eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/porting/removals.html (L595)).
This class, while API, has not be used, nor usable since the CDT 4
release as it was only for CDT 3.x style projects.
The class had been deprecated since 2010.

To mitigate against the possibility that someone may have a dependency
on this old class the minor version has been bumped so that version
range can have `,8.3)` as their upper version.

Fixes https://github.com/eclipse-cdt/cdt/issues/700
2024-02-08 15:06:12 -05:00
Jonah Graham
70dbde4ce1
Fix copyright end year for recently modified code (#699)
Follow up for #683
2024-02-08 14:32:50 -05:00
betamax
b7fa35979a
Bug579242: allow user to override CMake Settings (#683)
The Launch Bar Launch Configuration, Build Settings tab allows the user
to customise the CMake Settings (CMake generator, extra arguments, build
command and clean command). But changing these settings did not affect
the CMake build. This is now fixed.
A "Use these settings" checkbox allows the user to choose settings from
the UI or use the operating system defaults.
2024-02-07 13:52:58 -05:00
Alexander Fedorov
1589b8b074 [#695] Improve localization for org.eclipse.tools.templates.ui bundle
* retarget localization to default location
* do i18n for plugin.xml
* do i18n for java sources
* add missed copyright headers
2024-02-07 21:18:58 +03:00
Alexander Fedorov
7f69191296 [#693] Fix resource leak warnings for org.eclipse.cdt.core.utils
* use `try-with-resources` for `AutoCloseable`
2024-02-07 18:24:08 +03:00
John Dallaway
2e38e74b73 Add GNU archive content presentation improvements to N&N 2024-02-04 20:46:45 +00:00
John Dallaway
a1a9d93c7e Accommodate external binary object files
- Adorn external binary object icons
- Present symbols under external binary object resources
- Label external binary objects with filename only
- Present absent external binary objects with grey label
- Sort external binary objects by filename only
2024-02-03 04:24:32 +00:00
Marc-Andre Laperle
d5ec9d7c68
Improve ProblemBinding checker message for failed function instantiation (#668)
Display the new more accurate error when all candidates were failed
instantiations. Otherwise, if there is a mix of failed instantiation and
wrong number of arguments, display the old message.
This could really be improved even more...

template<typename T>
void function() {}

Before:
function(); // Invalid arguments 'Candidates are:

After:
function(); // Cannot instantiate template function 'Candidates are:
2024-02-02 11:40:47 -05:00
Marc-Andre Laperle
e838a231d9
Partial fix for bug 574196/530103, error involving sizeof...() (#667)
Also discovered that non-type param is not handled at all.  This case is not
covered in this commit but there is a commented-out failing test for it.
2024-02-02 11:39:16 -05:00
John Dallaway
f3c2d91dfa Add COFF binary object presentation improvements to N&N 2024-01-30 20:22:11 +00:00
Jonah Graham
e53d4141e6
Workaround #684 by disabling dsf-gdb tests (#685)
This only disables running the tests on Jenkins as the GitHub actions
these tests work fine for now.

See https://github.com/eclipse-cdt/cdt/issues/684
2024-01-29 18:49:31 -05:00
John Dallaway
dd543580a5 Enhance legacy GNU assembler flag detection 2024-01-27 16:03:45 +00:00
John Dallaway
233c6d8696 Invoke "gcc" to build assembler files
Enables pre-processing of *.S and *.sx source files.
2024-01-24 20:25:19 +00:00
Max Leuthäuser
61c3568839
Made PreprocessorMacro and TokenList public (#676)
### Changes

With this PR, `PreprocessorMacro` and its subclasses are no longer package-private but public instead. Same goes for `TokenList`.

### Reasons for the changes

When parsing C/C++ code with CDT as a standalone library I want to track certain macro expansions using the [MacroExpander](https://github.com/eclipse-cdt/cdt/blob/main/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MacroExpander.java).

It is not actually part of the public API but declared as `public`. It takes an argument `macroDictionary` of type `CharArrayMap<PreprocessorMacro>` in its constructor. Currently, `PreprocessorMacro` is package-privat and thus, not available without shadowing (i.e., implementing my custom macro tracker in the package `org.eclipse.cdt.internal.core.parser.scanner`).

It questionable whether it is a good design decision to have public and private API mixed together here (rendering the usage of the constructor of `MacroExpander` impossible).

Also, another problem occurs once you take the route of shadowing to have access to `PreprocessorMacro`: the CDT jars are all signed during release (makes sense) but, sadly speaking, that will result in a `SecurityException` when trying to call their API from your own (unsigned) code which lives in the shadowed package (in my case in `org.eclipse.cdt.internal.core.parser.scanner`).

### Problem solved

MacroExpander can now be used from the outside because `PreprocessorMacro` and `TokenList` are no longer package-private. Shadowing is no longer needed. Signed jars are no longer a problem.
2024-01-18 18:22:40 -05:00
Alexander Fedorov
5e7ce7e31a [#669] Switch from "Require-Bundle:" to "Import-Package:" directive
* Fix MANIFEST.MF for org.eclipse.cdt.core
* Fix MANIFEST.MF for org.eclipse.launchbar.ui.controls
2024-01-05 21:15:21 +03:00
John Dallaway
0e41dfea40 Improve PE64 symbol presentation in Project Explorer
Enhances PE64/COFF symbol presentation for parity with ELF symbol
presentation within Project Explorer.
2024-01-04 16:29:07 +00:00
John Dallaway
0173da5325 Support section data lookup within static libraries 2024-01-02 15:23:27 +00:00
kuch3n
8e3012c902
#461 Add support for freescale compiler (#462)
Parse command line arguments for chc08/12 and file based compiler build-ins
2023-12-28 18:08:20 -05:00
Davin McCall
232b24cd80
[#457] Fix partial specialisation matching for deduced primitive types (#458)
Current partial specialisation selection matches deduced type by
IBinding, not by IType, meaning that it can't work for types (such as
primitive types) that aren't represented by an IBinding. Fix that by
wrapping the result of resolution in a type which can handle either.
2023-12-28 18:07:49 -05:00
Igor V. Kovalenko
f6481742dd Properly persist deduction guide templates in index
Turned out that index is missing information about template parameters of
deduction guide templates, and all affected names which are only available
via index could not be resolved. This happens to e.g. std::map<> which is
usually looked up via index populated from <map> header file.

Fix this by implementing ICPPTemplateParameterOwner and ICPPTemplateDefinition
interfaces in new CPPDeductionGuideTemplate which delegates missing resolution
calls to the function object which already carry required template information.

Closes #438
2023-12-28 17:41:02 -05:00
Igor V. Kovalenko
727430964a Add test for deduction guide template vs index issue
Add new index binding resolution test strategy SinglePDOMReindexedTestStrategy
which does reindex project after adding test case sources. Clean up redundand
C++17 setup helper classes from test since deduction guides are always enabled.

Add test case modelling std::map resolution problem and make sure to run it with
new test strategy to reproduce the issue.

Bug #438
2023-12-28 17:41:02 -05:00
Igor V. Kovalenko
8091626ee4 Allow aggregate initialization in template body 2023-12-28 17:40:41 -05:00
Igor V. Kovalenko
84322c30f4 Amend list-initialization handling of class or aggregate 2023-12-28 17:40:41 -05:00
Igor V. Kovalenko
ae3a0adb81 More tests for list-initialization of class or aggregate 2023-12-28 17:40:41 -05:00
Davin McCall
be3a2eb539
[#455] If constructor arguments fail to resolve, propagate failure (#456)
This change prevents invalid partial specialisations from being chosen
when
instantiating a template in cases where the expression for the
type/value of a template parameter involves a constructor call.
2023-12-28 17:13:35 -05:00
Igor V. Kovalenko
a7bfdd2802
Fix struct declaration introducing name in namespace scope (#587)
When AST is used to resolve binding for class-name and elaborated-type-specifier
is found matching [basic.lookup.elab] rule introducing the class-name, behavior
of CPPSemantics.resolveAmbiguities() is different in presence of index.

If there is no index, CPPVisitor.createBinding() for ICPPASTElaboratedTypeSpecifier
creates binding for class-name as introducing the name. When later lookup finds
this binding all is good because binding is declared before the use site.

If index is available, lookup for class-name fails in AST too but now matching
entry is found in the AST index. When later lookup finds this index binding
CPPSemantics.declaredBefore() returns false because it does not look in
AST index and only checks project index.

To fix this additionally check if ICPPClassType object is in AST index,
as we already do for ICPPConstructor. This way declaredBefore() does almost
the same thing as isReachableFromAst() and lookup succeeds returning the
same binding from index.
2023-12-28 16:41:44 -05:00
Igor V. Kovalenko
4970952382
Recognize simple declaration of function name with function type specifier (#595) 2023-12-28 16:29:40 -05:00
Michael Keppler
d4102ca82f
Clean up Maven build (#662)
* remove invalid tycho resolver config (not valid since many versions)
* fix PMD plugin configuration (config attribute was renamed in 3.18)
* remove duplicate versions already managed in pluginManagement section
* fix indentation
* move all not yet configured versions into pluginManagement of the
parent module to avoid further duplication
* consume the target platform as file, not as maven artifact (this
simplifies building a single module A LOT)
* remove invalid tycho-source-plugin configuration
* disable tycho consumer POM generation (not needed here, and avoids a
warning in each module)
* remove prerequisites. that's for maven plugins only, and this POM
already contains the better suited similar maven enforcer rule
* enforce UTF-8 for javadoc generation (the build fails on Windows
otherwise, trying to read some Japanese? characters with the Windows
default encoding)
2023-12-28 14:35:58 -05:00
Jonah Graham
37ff19400f
Quote eclipse in cleanup script (#661)
This is to support cases where eclipse is installed in path
with spaces
2023-12-27 20:58:12 -05:00
betamax
959c02755c
Allows launch config to override launch target connection type (#625)
When launching a GDB debug session using the Launch Bar and a Launch
Target, now the launch takes into account a REMOTE_TCP value in the
launch configuration before considering the type of the Launch Target.

Improves the change submitted in:
Bug 547881 - Allow targets to set ATTR_REMOTE_TCP

Fixes issue #622
2023-12-27 18:42:00 -05:00
Shahzad Iftikhar
93c136de3c
Fix cursor behavior in memory view on HiDPI (#645)
Cursor not behaving correctly in memory view editor while
chaging variable value on Hi-DPI #641

Used GC.textExtent() method for getting width of a character as
it handles zooming factor

Fixes https://github.com/eclipse-cdt/cdt/issues/641
2023-12-27 18:06:50 -05:00