Commit graph

778 commits

Author SHA1 Message Date
G. Hentschke
597eda2d60
Add enabled to JSON Compilation Database Generator prop page (#847) (#848)
Show the JSON Compilation Database Generator properties page only for
managed build projects.

fixes #847
2024-06-28 18:59:39 -04:00
alicetrifu
5ca51073c9
Added feature to generate compile_commands.json file (#692)
Includes:

- Created a new extension point to provide the opportunity to
incorporate additional information into the file
- New tests for the generator
- Preference page to enable/disable generator

Fixes https://github.com/eclipse-cdt/cdt/issues/689
2024-05-16 12:06:18 -04: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
Jonah Graham
b8bd15844b Bug 571722: Add ALL_FLAGS for scanner discovery
This change adds the ALL_FLAGS that does not limit tool options to
those declared as IOption::isForScannerDiscovery when launching the
compiler to discover compiler built-ins.

This is needed as many other flags, either entered manually in "Other
flags" or some of the existing flags with checkboxes such as "-ansi",
"-fPIC", and "-fstack-protector-all" which all affect scanner discovery
as they can all change what macros are built-in to the compiler.

The current solution has as a drawback that some settings, like -I and -D
then appear twice. For example in the "Includes" node in the "Project
Explorer"

My only reservation about this change is if there is an option
that can be specified successfully at build time, but when used
at scanner discovery time causes the compiler to fail, or return
incorrect results. Therefore I have added a new field,
excludeFromScannerDiscovery to tool options (buildDefinitions
extension point) that allows tool integrators to always exclude
a command line option from ALL_FLAGS. I have also added
a new "Other flags (excluded from discovery)" to the
"Miscellaneous" tab to allow compiler options to be entered
by the user.
2022-11-21 10:46:49 -05:00
Jonah Graham
6eaaf714cc Upgrade build.properties warnings to errors
Warning in build.properties will be errors when they run
in the tycho build, like this:

```
Error:  Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:2.7.5:package-plugin
(default-package-plugin) on project org.eclipse.cdt.core.tests:
/home/runner/work/cdt/cdt/core/org.eclipse.cdt.core.tests/build.properties:
bin.includes value(s) [test.xml] do not match any files. -> [Help 1]
```

So make them errors in the workspace so that the issue is
detected before push.

Some build.properties issues don't affect the build, but
are still indicative of a problem.
2022-11-06 18:29:28 -05:00
15knots
369ddea39c
Add ManagedBuildManager#createConfigurationForProject() (#131)
* Add ManagedBuildManager#createConfigurationForProject()

This should allow ISV's to create MBS based project with a
vendor-specific build-system ID without using internal API.

Update New & Noteworthy

Signed-off-by: 15knots <11367029+15knots@users.noreply.github.com>
2022-11-04 21:30:22 +01: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
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
Jonah Graham
e4e06008af Update to Java 17 as BREE. Fixes #80 2022-10-03 12:42:37 -04:00
Jonah Graham
93fbce4f2c Bump cdt.ui major version for CDT 11.0 development 2022-09-09 20:18:47 -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
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
Torbjörn Svensson
3c58527d53 Bug 350499: Ask user to confirm toolchain change
When a user switches toolchain integration used, all the settings will
be lost. Rather than having the user find this out the hard way, prompt
about it and highlight the implications of changing toolchain.

Contributed by STMicroelectronics

Change-Id: I885bc5544d7222eb1aeee7c92ac98c0d1c083cb1
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2021-04-25 11:26:29 -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
Jonah Graham
1d0bc6992f Revert "Bug 568397: Hide "Build settings" if using custom command"
This reverts commit 1d226f9273.

Reason for revert: Due to some concerns about use cases and the
desire to resolve those concerns with separate build and args
text boxes this is being reverted for 10.1 until this change
can be done at the same time as https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/173118

Change-Id: Iffa37087c00f434d4e684eea19ecacde36004b80
2020-12-01 12:07:38 -05:00
Torbjörn Svensson
fb20df887a Bug 569300: Allow custom build option editors to save the value
Added a new interface with a method that is called when the value is to
be saved into a resource configuration.
If the function returns false, then the default implementation of
handling property changes will kick in. If the function returns true,
then it's assumed that the value has been handled.

Change-Id: I0523d15ba0a3ec9dbc24c3e4afc070b071d8fb7e
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-30 16:11:01 -05:00
Torbjörn Svensson
e632011f2c Bug 568728: Drop execute permission on files
Add enforecment script that verifies that only specified file types are
allowed to be mared as executable.

Change-Id: I4b40e3a46b03bfc78a9dcd52e8bf29cb079b7f3b
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-18 17:38:22 +01:00
Torbjörn Svensson
1d226f9273 Bug 568397: Hide "Build settings" if using custom command
When unchecking the "Use default build command" checkbox, hide the GUI
options to configure the flags as the user should have full control.

This solution was discussed in
https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/171735

Change-Id: Ifbd67b279db55f5a83f4a660b9a1248e5c021df2
Also-by: cartu38 opendev <cartu38.opendev@gmail.com>
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-09 14:17:15 -05:00
Alexander Fedorov
f2dcc3dff3 Bug 567966 - CDT code clean up: type safety warnings
Generalize the type of elements and resolve type safety warnings

Change-Id: Id8e443d0c071bbd5447092099e80574cdf7fd9b3
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-10-29 06:11:39 -04:00
Alexander Fedorov
b8ba9605c6 Bug 567966 - CDT code clean up: type safety warnings
Generalize the type of elements and resolve type safety warnings

Change-Id: Ibbbdc26663a7fede9debef3ca5d1c79ca346608c
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-10-24 16:37:11 +03:00
Jonah Graham
a1201a811a Bug 567810: Squash over zealous warning from PDE
See also Bug 558477

Change-Id: I0765a2a49dc77e2f24af787b0f9a1e0e1e510a30
2020-10-12 10:14:26 -04:00
Jonah Graham
0cb1f7482a Bug 566511: [releng] Add missing UTF-8 encoding for all CDT projects
Includes updates to code cleanliness script

Change-Id: Ic495124285e3e002993f34dc12be5ad7337fe13b
2020-08-30 20:02:41 -04:00
Jonah Graham
fd9382d8a9 Bug 562494: Update BREE to Java 11
Change-Id: I0c91aafc0cb1b179936acbd4c9df2d961899e3fa
2020-08-24 17:50:56 -04:00
jantje
2a62d58621 Bug 564123 Treat environment and build variable case sensitively
Remove all equalIgnoreCase and equal with uppercasing for environment
variables

Change-Id: Ic15974b5fb62413c7b1826ced544ff6d4a8eba2f
Signed-off-by: jantje <eclipse@baeyens.it>
2020-08-18 18:11:48 -04:00
Marc-Andre Laperle
97c1151f01 Bug 564949 - Remove support for CDT 3.X style projects (partial)
Remove some Wizard classes that are not referenced anywhere anymore.
This commit is just a first of probably several commits but is already
a start. I already had very large commits in progress in the past but
it became big and hard to push so I'd rather do it step by step this
time and at least have some of it done for the next release.

Also moved some messages to its own message bundle in managedbuilder.ui
because it's the only place they are used now.

Change-Id: Ib4258684c91f205dc4af3b17169609b5ebcff253
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-07-07 22:26:01 -04:00
Torbjörn Svensson
0391d6ccf1 Fixed NLS and null warnings
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Change-Id: I6e40038e99c37a4efc25f64d8d186b00c6f55f8c
2020-07-04 04:20:49 -04:00
Jonah Graham
12cf801870 Bug 564272: Increment major version of org.eclipse.cdt.core to 7.0.0
Change-Id: I9124dd406c5981435a72ff4aaa7033f1c3d1979b
2020-06-13 16:21:05 -04:00
Sergei Kovalchuk
afdd68157b Bug 561993 - Remove dependency to com.ibm.icu from CDT UI
Use java.text.MessageFormat instead of com.ibm.icu.text.MessageFormat

Change-Id: Ie7ed91d776b707def1bbfc12c24f5e863638e083
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
2020-06-04 07:31:47 -04:00
Marc-Andre Laperle
167ce562b2 Bug 559186 - Allow using variables for the CDB path in CDB settings provider
For example, you can use ${ProjDirPath}/buid/compile_commands.json
which is a more sharable setting

Change-Id: Ic51775ea1f7d258c55e2e720c94f626a17444744
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-05-10 14:44:18 -04:00
Marco Stornelli
31b748e7b9 Bug 510789 - Added final field to class wizard
Change-Id: Ib2f0168b897e665f3577511144692bb446d5ab84
2020-04-09 06:44:42 -04:00
Jonah Graham
5a6b9b4bf4 Revert "Bug 560614 - Drop dependency on ICU4J"
This reverts commit 87b627bf02.

Change-Id: I54ea1ac766437deb174eeba571a7a5094c180828
2020-03-02 06:49:24 -05:00
Alexander Kurtakov
87b627bf02 Bug 560614 - Drop dependency on ICU4J
Straightforward conversion. Still usages left that need deeper
investigation how to be done proper.
Some long time commented code removed as java formatter breaks trailing
whitespaces on save.


Change-Id: If74259bed5735b0d4cc98fc2cfa609c9c53c80c9
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-03-02 06:46:15 -05:00
Alexander Kurtakov
f90f900e48 Move away of the deprecated AbstractUIPlugin.getWorkbench
Use PlatformUI.getWorkbench instead.

Change-Id: I8c0eb2c4b3b414e61f03fc9d9becd1d574f7e26d
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-02-04 14:43:53 +02:00
Alexander Kurtakov
2f20829144 Remove unnecessary cast to IToolChain.
Change-Id: I653c4b3f4389c4ad4add33cf223ff7882d8fb0ac
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-02-04 10:55:18 +02:00
Jonah Graham
ca1ee32031 [releng] Update comparator repo for p2 compare and replace
Change-Id: Iff7e7ba98fe37f89d1b6b0e0754ef827925e849e
2020-01-03 15:16:28 -05:00
Sergey Kovalchuk
b74f56878c Bug 558474 - CleanUp deprecated methods in org.eclipse.cdt.ui
Reworked SubMonitors (Part2)
Fixed percentage counting
Removed explicit cancellation checks.

Change-Id: Ibd9ef2664885746ab9ac2be556ac5effc994a512
Signed-off-by: Sergey Kovalchuk <sergei.kovalchuk@arsysop.ru>
2020-01-03 09:34:34 -05:00
Marc-Andre Laperle
0c577f6e7e Bug 548730 - Compilation database (CDB) language settings provider
This language settings provider lets you specify the path to the
compile_commands.json and reuses existing build output parsers to figure out all
the language entries for each file to be used while indexing. With this, there
is no need to do a full build and in fact no need to have a working build
configured in CDT for indexing to work and be fully configured. This is
especially useful for non-CMake build systems that have no existing integration
in CDT but indexing would still works with little effort.  The build output
parser (GCC, MSVC, etc) is selectable as part of the configuration of the CDB
provider. There is also an option to exclude any file that is not present in
the CDB. This option is useful for large projects in order to speed up indexing
but also to increase index accuracy (conflicting symbol names, etc).

Change-Id: If21455ec529f9e162cdf3e5aff7a1bca83e362f6
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2019-10-23 21:47:54 -04:00
Alexander Kurtakov
c252113586 Replace ViewerSorter with ViewerComparator.
Change-Id: I3013723be25fef063f382456166f6e5a622316d3
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2019-08-09 08:50:29 +03:00
Jonah Graham
53e14118d2 Bug 547894: Fail build if differences before baseline replace
Also fix version numbers in all bundles who's binary contents have
changed despite no change in the source of the bundle.

Change-Id: Ic67b79aafa801c7ce96c5e52843ad5c881827d84
2019-06-07 13:57:15 -04:00
Jonah Graham
481e4f13f0 Bug 544944: Add a description for new Arduino Project
and fix wording of makefile project. These are to take
advantage/improve based on new platform feature:
https://www.eclipse.org/eclipse/news/4.11/platform.php#onboarding-text
which was done in Bug 543746

Change-Id: I4b6c5812adbf0c94e7dd60c80b5150f524e065e5
2019-03-01 11:29:10 +00:00
Jonah Graham
37ed2c406d Bug 540373: Update the compiler warnings/ignores
The previous alignment of all the warnings/ignores
led to too many warnings that weren't there before. This
commit relaxes them a bit.

The core/org.eclipse.cdt.core/.settings/org.eclipse.jdt.core.prefs
is still the "master" copy, with
releng/scripts/check_code_cleanliness.sh containing the
exceptions that apply to test plug-ins.

Change-Id: Ibd4e31ade0b42b31e7cbe5a94f06c6fc15183a56
2018-11-24 10:55:06 +00:00
Jonah Graham
ff75ae80fa Bug 540373: Cleanup: Remove trailing whitespace in properties files
Command used:
# Remove space at eol in comments
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/^(#.*)[ \t]+$/\1/' {} +
# Remove space at eol in blank lines
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/^[ \t]+$//' {} +
# Replace escaped spaces at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\\ $/\1\\u0020/' {} +
# Replace unescaped spaces at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\]) $/\1\\u0020/' {} +
# Replace escaped tabs at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\\\t$/\1\\u0009/' {} +
# Replace unescaped tabs at eol with unicode
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/([^\\])\t$/\1\\u0009/' {} +
# Stage all changes
git add -A .
# trim any remaining whitespace and then identify and fixup
# manually
# Only dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/MessagesForDebugVM.properties
# needed this due to missing newline at end of the file
find .  ! -path "./.git/*" -type f -name *.properties -exec sed -i -E 's/[ \t]+$//' {} +

Change-Id: I858f16891fe001f4f7e62d5a4f904146e891cd39
2018-11-23 07:52:26 +00:00
Jonah Graham
aa1040a21a Bug 540373: Remove '(non-Javadoc)' comments
These were inserted in the past automatically by Eclipse but
newer tooling makes them redundant.

These were removed by doing a global find/replace on *.java files
using the following regular expression:
\t/\*\n\t \* \(non-Javadoc\)[^/]*/\n

Change-Id: I59d3248020f10934fde1dda5b5a31e20bb188e19
2018-11-22 22:00:29 +00:00
Jonah Graham
caf2292768 Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard

Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
2018-11-22 21:55:36 +00:00
Jonah Graham
a923614c73 Bug 540373: Cleanup: Organize Imports
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Organize Imports
and completing the wizard

Change-Id: Ia7b305a4c967d0e6f4e8fb8c1041e7028b24006c
2018-11-22 21:47:02 +00:00
Jonah Graham
170e654b47 Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard

Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
2018-11-22 21:47:02 +00:00
Jonah Graham
35996a5c5c Bug 540373: Standard .settings auto applied
The releng/scripts/apply_jdt_prefs_to_all_projects.sh was run to
copy standard settings to all other projects.

Change-Id: I4436c947d7f0142f56b709e661379c3eb54f666b
2018-11-22 21:47:02 +00:00
Jonah Graham
f70a8b35c1 Bug 540371: Update to EPLv2 using releng/scripts/change_to_eplv2.sh
Change-Id: Ifbb1d5af2a00bd5634dea200320e8c4303ffca6c
2018-11-22 20:31:51 +00:00
Jonah Graham
48d2271a58 Bug 540373: Normalize newlines with .gitattributes
There is also a new script to verify completeness of .gitattributes:
releng/scripts/verify_gitattributes.sh

Change-Id: I2ce270852ab54b66b6c474a6ec94203fe5bba78b
2018-11-20 21:20:39 +00:00