Fixing the issue where circular dependencies cause stack overflow.
Change-Id: I4ca87eb4e8ccb82b25f85d1cea04fc0d4ddd60c0
Signed-off-by: Umair Sair <umair_sair@hotmail.com>
The colors chosen were based where possible on the colors of the CDT
main editor (org.eclipse.cdt.ui/css/e4-dark_cdt.css) for similar
syntax/semnatic elements.
Change-Id: Iea6ccb481b8d1b16aa2d6dda16e44b2512662fa0
If a user set the make arguments manually to what the automatic
arguments would have been if enabled, they would be discarded. This
change does not do that bit of magic anymore because the user
now (since Bug 568397) edits the build command and arguments
separately so less magic needs to happen in the code.
This is a follow-up to Bug 568397.
Change-Id: Ie8f51cbb86133fc4a9506913743613712e93d881
and:
- bump versions of all the docs plug-ins.
- improve comment so that next person can do it more easily
- change to using https in the URL
Change-Id: I62bd970f03e1ce081d4655ddbf6c742be2623acd
Include the top-level subdir.mk only when one was actually generated
(i.e. when there are source files there), just like for all other
subdir.mk, otherwise a stale one from earlier when there were source
files that have since been removed may be picked up, causing "No rule to
make target" errors.
In some cases (from bug 303953), the removal would be noticed and the
stale subdir.mk be overwritten by a correct empty one, avoiding the
error, but not in the following cases:
- When CommonBuilder.performCleanning() decides that a full rebuild is
needed, regenerateMakefiles() is called instead of generateMakefiles(),
which doesn't get the delta.
- When the refresh in which Eclipse notices the removed source file
happens as part of a build (one that probably failed because the
makefiles weren't updated yet), the next build after that apparently
does not get the delta containing the removal anymore.
Change-Id: Id15b424f02dd5c513d2124620c0c8699d61874fd
Signed-off-by: Christian Walther <walther@indel.ch>
Several parts of makefile output were generated by iterating over
HashMaps, which do not have a deterministic iteration order. Use
TreeMaps instead to output in sorted order. This is possible now that
the API function with return type HashMap is no longer public API and
can be changed to return Map instead.
Benchmark files for affected tests are updated to the new ordering.
This would not be strictly necessary: the tests would also succeed
without, since org.eclipse.cdt.managedbuilder.testplugin.
ManagedBuildTestHelper.compareMakefiles() uses a reordering-tolerant
comparison. However, recording the new (now hopefully stable) order
makes future development on makefile generation easier by avoiding
spurious diff output when tests fail due to changes to other parts of
makefiles.
Change-Id: I20f2e51bd5b9e3bcc5da245d781ca5b4a34fc0b2
Signed-off-by: Christian Walther <walther@indel.ch>
This fixes a small and rarely hit in practice regression regarding
nondeterministic ordering in makefile output introduced in 15c29eb (bug
505882).
Multiple values for a build output variable were previously output in
definition order. Now they are generated by iterating over a HashSet,
which does not have a deterministic iteration order. Use a TreeSet for
output in a consistently sorted order instead.
Output variables with multiple values are rare (most tools generate one
output file of a particular type) and this case was not exercised in the
existing unit tests. Modify one such that it does (even if in a somewhat
contrived situation). Of note, ${OUTPUT} cannot be used in the
commandLinePattern for such a tool because it squashes the multiple
values into a single quoted file name - misuse ${FLAGS} instead.
Change-Id: Iaa28525c21d74c87dd4d72a03e334ed0e5576727
Signed-off-by: Christian Walther <walther@indel.ch>
Add API to o.e.tools.templates.ui that hooks into the smart import
feature and allows easy implementation of configurators for various
CDT project types.
Project types that have a IGenerator may use this API to offer smart
import functionality by registering their implementation using the
org.eclipse.ui.ide.projectConfigurator extension point.
This change includes project import implementations for Meson and
CMake project types.
For these project types users can use the normal project import
workflow for their existing non-Eclipse CMake projects instead of
using the New Project Wizard. As an additional benefit, users
can now also import more than one project at a time, even nested
projects.
Change also includes SWTBot tests to exercise the feature.
Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: I96589e86bee561aa200a4a4487549305765d6409
If these tests fail, they cause a series of metadata corruption that
will render most/all test executed after as unreliable. Usually, there
is about ~150 test cases that fail without reason when one of these
fails.
Contributed by STMicroelectronics
Change-Id: Ic71ace8b6a55c49dd729d40385b245f12dbd6d85
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
The interface has no use as it's hardcoded to be an instance of
ManagedBuildGnuToolInfo in the GnuMakefileGenerator anyway.
Contributed by STMicroelectronics
Change-Id: I0e9130ef485d103e7114e0d122015c062253b4bb
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
To avoid errors like "Command line too long" when removing build
artifacts, split the clean command on multiple lines. In order to
properly handle whitespace etc, generate a new clean target in each
subdir.mk with the explicit list of files to remove in that directory.
The command should be splited on a sane length, 6000 is used in the
internal builder, so reuse that limit here.
Contributed by STMicroelectronics
Change-Id: I843e1ac896076d279173c421210b72f4a325296f
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
One more place where the GnuMakefileGenerator is instanciated that
should have been changed in previous commit.
Contributed by STMicroelectronics
Change-Id: Ib89d5e77cbdd2148723b9b1a80cafb72d35390a4
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
The GnuMakefileGenerator is a huge file that needs lots of fixes.
However most of the time to implement the fixes are taken up trying
to not break API. Most extenders of CDT provide their own
implementation of GnuMakefileGenerator by copying the CDT one
and modifying it. Therefore CDT is going to take that same
approach internally and leave the existing GnuMakefileGenerator
in its unmodifiable state.
Change-Id: I12fafb5e347112648a02d4593267bd88a47b5c88
Bug_303953Test.testBuildAfterSourcefileDelete() is occasionally seen
failing with an unexpected change to .cproject. I have not investigated
what the change is, but it's plausible that some background process like
the indexer or scanner discovery might asynchronously modify .cproject,
and .cproject is not the focus of this test, so just ignore it along
with .project.
On the hopeful assumption that this was the only flakiness, I am
removing the @Tag(BaseTestCase5.FLAKY_TEST_TAG) annotation.
Change-Id: Ie9191aaf1a66e8475f05eb422d6e4b3949f8138d
Signed-off-by: Christian Walther <walther@indel.ch>
This file was not being detected by Surefire because it didn't
match the expected file name pattern.
Change-Id: I357fcf7845ad4fdaa2697599d0f400bb128efd20
Exclude everything in */meson-private/* when generating meson
projects.
Signed-off-by: Mat Booth <mat.booth@gmail.com>
Change-Id: Id26c8dd695e5d09d158bb747b50e04544df706c9
Addendum to 0436516 (Bug 573502): The main-build target now always
exists, not just when there is a pre-build step, so it must always be
marked as .PHONY.
Change-Id: I478222bcc319c516a6e116f710d8382346b5ded5
Signed-off-by: Christian Walther <walther@indel.ch>
Most of the tests in this bundle already had this bit of code
before calling create project. This makes BuildDescriptionModelTests
consistent with the rest.
Note that this modifies global state and does not restore it. However,
as that is consistent with the other tests in this bundle, and the
global state is only maintained while running tests on this bundle,
I am not fixing this aspect of the code.
Change-Id: I2004af177a959e1efbd45b23c960b517d8993b7c
While most of these commands don't actually have spaces in them, or
their arguments, avoid the deprecated methods.
Change-Id: If7b4324695699d5a6d9a2f8a979657977486d8a4
The "eclipse.launcher" property is available when using the eclipse
launcher. If the headless builder app is launched without the eclipse
launcher, fall back to generic "PROGRAM".
The property is not available when running eclipse in runtime mode!
Contributed by STMicroelectronics
Change-Id: If2c99a234fd841451af05e3635d44fe2967c9537
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
During operations, such as remove projects, the subtask of a progress
monitor has useful information for users. However during a normal build
there ends up being lots of output that is of little value.
Change-Id: Ie5bf95a743e8909242a0224883fd22e49ff55ed6
The post-build step may depend on secondary artifacts of the build and
should thus be executed last.
Contributed by STMicroelectronics
Change-Id: Iaf67f6b3e1fcab008798d2712e15d0a6a46ceae8
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This allows to clean the correct configuration
Contributed by STMicroelectronics
Change-Id: Ia47f3694809579f8d6fa6d6e6b0dd46f553d256d
Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
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>
Note that:
- doc/org.eclipse.cdt.doc.isv
- doc/org.eclipse.cdt.doc.user
were updated in commit 149aca51f9 made
this release cycle.
Change-Id: I5b19c7ba14d1c3f837163c109603f9a330e9f138
System.arraycopy is more error prone and subsequent commits will
be modifying the array. This commit is to keep unrelated code
separate.
Change-Id: I2490318176da3e631a63974ffe5fa62da44a96ea
Upgrade the tests to JUnit5 so they can be marked as flaky and slow.
Also removed a bunch of unused code.
This partially reverts commit 8220215a2e.
Reason for revert: These tests were "temporarily" disabled a while ago
as part of the JIRO migration in Bug 545624.
Change-Id: I111cf4d9d9f5e07e49074ca2355a3d1f52fb1070