Remove unneeded dependencies in the help bundle because the
infocenter on help.eclipse.org only includes help bundles.
These removed dependencies were actually unused.
Fixes https://github.com/eclipse-cdt/cdt/issues/1170
Using:
```
mvn org.eclipse.tycho.extras:tycho-version-bump-plugin:4.0.12:update-manifest
```
and then multiple iterations to bump the bundle-version:
```
mvn verify org.eclipse.tycho:tycho-versions-plugin:4.0.12:bump-versions -Dtycho.bump-versions.increment=100 -DskipDoc=true -DskipTests=true -P baseline-compare-and-replace -fae -Djgit.dirtyWorkingTree-cdtDefault=warning
```
Make sure bounds of all dependencies match what we built against. This
prevents issues such as Bug 536448 from recurring. In 2025-06 there
are a number of Eclipse Platform changes that make CDT susceptible
to these types of issues again.
Note that this change is similar to previous iterations, such
as 1087dc5f22, but with the automatation
we can now apply this to *all* bundles.
In addition, with the tighter version constraints, building from
simrel repo for the jniheader (releng/scripts/do_rebuild_natives.sh)
is no longer sufficient. This speedup has been removed as it was probably
incorrect to have by default.
The api filters were introduced because some bundles are re-exported. Those
re-exported bundle requirements mean that technically we need to bump
the version, but in reality we effectively required the range as now
documented anyway, so doing a major version bump is unneeded.
The terminal control is migrated to the Eclipse platform, as those it
should be handled like a thrid-party dependency an not directly included
with an exact version in the feature.
This now changes it to a requirement with a lower bound of 5.5 excluding
the next major version. That way CDT and other consumers can gracefully
upgrade to the new platform variant.
The Build type combo custom value was lost when switching to another tab and back again.
Solution: Add modifyListener for buildTypeCombo and generator combo to keep properties up-to-date when switching tab.
Fixes#1118
Currently if I get passed a Process from by a method call I can check it
for the Spawner and can already call special methods like hangup(). But
there is no way to get access the the PTY used to create the Spawner so
for example one can't call PTY#setTerminalSize or query any other
properties.
This now adds a new method pty() that returns this instance for further
investigation and actions.
As we approach the release now I collapsed all the milestones into
the CDT 12.0.0 one as the milestone releases are not really public
once the release is complete.
Under certain conditions*, the compiler param in the command field of
the compile_commands.json is a relative path rather than absolute. When
this happens, the built-ins detection was not successful and the
following exception was thrown:
!ENTRY org.eclipse.cdt.core 4 0 2025-02-23 20:32:10.752
!MESSAGE Error: Cannot run program "gcc": Launching failed
!STACK 0
java.io.IOException: Cannot run program "gcc": Launching failed
at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:450)
at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:147)
at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:134)
at org.eclipse.cdt.utils.spawner.ProcessFactory$Builder.start(ProcessFactory.java:273)
at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:366)
at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:189)
at org.eclipse.cdt.jsoncdb.core.internal.builtins.CompilerBuiltinsDetector.detectBuiltins(CompilerBuiltinsDetector.java:111)
at org.eclipse.cdt.jsoncdb.core.CompileCommandsJsonParser.detectBuiltins(CompileCommandsJsonParser.java:290)
at org.eclipse.cdt.jsoncdb.core.CompileCommandsJsonParser.processJsonFile(CompileCommandsJsonParser.java:193)
at org.eclipse.cdt.jsoncdb.core.CompileCommandsJsonParser.parse(CompileCommandsJsonParser.java:455)
at org.eclipse.cdt.cmake.core.CMakeBuildConfiguration.processCompileCommandsFile(CMakeBuildConfiguration.java:361)
at org.eclipse.cdt.cmake.core.CMakeBuildConfiguration.build(CMakeBuildConfiguration.java:241)
This meant that source file includes were not indexed and could not be
opened using Open Declaration (F3) and info markers of the following
type appeared in the Problems view:
gcc -E -P -dM -Wp,-v
"...extCmakegcc\\build\\cmake.run.win32.x86_64.Local\\detect_compiler_builtins.c"
Cannot run program "gcc": Launching failed
Error: Program "gcc" not found in PATH
PATH=[...]
extCmakegcc Unknown Compiler Builtins Detector Problem
gcc -E -P -dM -Wp,-v
"...extCmakegcc\\build\\cmake.run.win32.x86_64.Local\\detect_compiler_builtins.c"
Cannot run program "gcc": Launching failed
This patch fixes the environment issue for Core Build projects, by
calling ICBuildConfiguration.setBuildEnvironment(Map<String, String>) as
part of the built-ins detection setup, thereby supporting absolute and
relative compiler paths.
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-011 Source
code navigation and Built-ins detection
*: CMake produces relative compiler path
When the CMAKE_<LANG>_COMPILER variable (eg CMAKE_C_COMPILER) is set in
the CMakeLists.txt *after* the project() or language commands, it causes
a relative path to be used. For example, in the CMakeLists.txt below,
gcc is set after project() command:
cmake_minimum_required(VERSION 3.10)
project (track2)
set(CMAKE_C_COMPILER gcc)
add_executable(${PROJECT_NAME} track2.c)
The above script creates a relative compiler path in
compile_commands.json:
"command": "gcc -O3 -DNDEBUG -o ...
Normally the CMAKE_C_COMPILER variable should be set before the
project() comannd.
"command": "C:\\msys64\\mingw64\\bin\\c++.exe -IC...
Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
If the CDT Variable is APPEND or PREPEND, and the incoming environment
did not contain that variable name, the resulting environment would
have null.
For example, if PATH was not set on the incoming environment, and
PATH was supposed to be prepended with /usr/bin, this method
would have set PATH=/usr/bin:null
This change ensures that the delimeter + null are not prended/appended
when the incoming value is null.
CMake compile_commands.json file is not found even though it has been
created. During a CMake build's generation stage, it generates the
compile_commands.json file inside the build folder. However,
when it comes to be used it is not found because it hasn't been
reliably refreshed.
To solve this, the file resource is refreshed
Co-authored-by: John Moule <evil_bandit_betamax@yahoo.co.uk>
Messages such as "make: Entering directory" are now processed so
that the scanner info builder knows the correct full path to use
for build.
Without this code calls to ToolChain.getResourcesFromCommand() would
pass in the wrong directory and resources could not be reliably
calculated. With the incorrect calculation the scanner info does
not get applied to the file correctly and the file cannot be indexed
reliably.
Without this the build and clean command entered in the CBS
settings could be parsed and re-assembled incorrectly.
A simple example is that an extra space (e.g. "make clean") would
lead to an error when running make like:
```
make: *** empty string invalid as file name. Stop.
```
This happened because the code used trivial split on " " and join
with " " to handle parsing that command line string into array of
arguments. This change fixes that by using the functionality already
available in CommandLineUtil
Fixes#1072
Initially CommandLineUtil.argumentsToString was used to provide properly
quoted string when interacting with GDB. But it is also useful to
print a string that can be copied + pasted to a terminal for the user.
When doing this the always quote every argument looks less nice, so
this change updates the code to only quote argument if needed.
Tests have also been added for the quoting.
Improves look and feel of changes in #1073
The default IBuildConfiguration is no longer used by projects that use
ICBuildConfigurationProvider.
For CMake, Makefile and other Core Build projects the build output
folder is sometimes named "default" rather than the pattern
toolName.launchMode.toolchain OS.toolchain Arch.launchTarget Id (eg:
cmake.debug.win32.x86_64.Local). PR #1076 exposes new API
(ICBuildConfigurationProvider.getCBuildConfigName) to encourage this
naming pattern.
The "sometimes" is variable and often happens when a project is first
created when the active launch target is Local and the launch mode is
"run", but not always. This gives a random, inconsistent impression to
CDT.
The Platform project always contains a IBuildConfiguration with the name
IBuildConfiguration.DEFAULT_CONFIG_NAME. It seems the original Core
Build system design went to some length to fit in with this and always
make use of this IBuildConfiguration when pairing it with a new
ICBuildConfiguration.
With this PR, this no longer happens, allowing CDT code to be simplified
and the build folder naming made consistent, always adhering to
ICBuildConfigurationProvider.getCBuildConfigName.
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-024 Default
CMake build folder
User can control the value of the CMake built type (CMAKE_BUILD_TYPE),
for example Debug or Release via new UI in CMakeBuildTab
Added UT for ICMakeProperties.getBuildType()
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-013
new AdaptedSourceViewer was unnecessarily upcast to ISourceViewer
leaving a bunch of null checks and instanceof checks in the rest
of the method. This commit removes the unneeded code.
This extra complication was a result of CDT following JDT, but the JDT
case has much more configurability which meant the extra instanceof
and null checks are needed for JDT case.
In addition to the active launch mode and toolchain, the active Launch
Target is now used to determine the Core Build Configuration
(ICBuildConfiguration).
The build output folder name now ends with the name of the Launch Target
(eg: cmake.debug.win32.x86_64.Local)
Additionally, API added to allow the ISV to configure the build output
folder name.
The ICBuildConfigurationProvider implementations, shown below, have been
tidied up to use common code.
CMakeBuildConfigurationProvider
AutotoolsBuildConfigurationProvider
MakefileBuildConfigurationProvider
MesonBuildConfigurationProvider
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-016 Launch
Targets used in ICBuildConfiguration
Addresses Issue: CDT CMake Improvements #1000, IDE-82683-REQ-018 Build
output folder name
* Put Core Build and Managed Build items in separate topics.
* Added two images to Creating a CMake project.
* Added new pages about creating a CBS Makefile project, using
existing code, launch bar, building, running, and debbuggin
a project.
* Renamed "Creating a simple application" to "Creating a Managed Build
System Makefile project" and replaced two images.
* Removed "Creating a Makefile project", because it was duplicate
information.
Fixes#992
Some of the changes that are about to arrive have specific impacts
of API of core build. Because CBS is largely in org.eclipse.cdt.core/ui
any breaking changes to the CBS API necessitate bumping the entire
bundle to a new version.
One of the most noticeable changes is expected to be that
org.eclipse.cdt.core.build.ICBuildConfigurationProvider.createBuildConfiguration(IProject, IToolChain, String, IProgressMonitor)
needs a new parameter to properly connect the target. The upcoming
PR that makes the API change will document that change in the
CHANGELOG-API.md and N&N documentation.
Part of #1000
With some better Javadocs the cross referencing between IConsole
and the UI aspects of the console is a little easier to follow.
This resolves#1059 in two parts:
1. For Core Build System this update consistently uses info stream to
show information messages and output stream to be stdout of launched
build tool. This resolves the "Build Complete" appearing as the output
color when doing clean (See screenshots in #1059)
2. CBuildConfiguration.watchProcess(IConsole, IProgressMonitor) incorrectly
passed the info stream as the output stream. Mostly this was used for
the clean stage of builds. This resolves the CMake output like ("Cleaning
all built files...") appearing as the info color when doing clean (See
screenshots in #1059)
Fixes#1059