Compile a pattern ahead of time and early return.
The first pattern is used to trim extra characters that are not
contained within the actual option pattern. If this first pattern
doesn't match, there is no point in continuing because it is a superset.
Times before/after, only counting AbstractOptionParser.parseOption
LLVM before: 4289ms, after: 622ms
Change-Id: Id40fc9a35359c39aea00ba14813ffe6c343158fc
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Clarify in the javadoc that numbered back-references should not be used
in order for option pattern to safely work. Add a unit test
demonstrating the flaw when numbered back-references are used. Update
GCC parser as an example for not using numbered back-references.
Change-Id: I008b3589486dc9fb0d9d9aa41f7cc2443bf4351e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Remove all equalIgnoreCase and equal with uppercasing for environment
variables
Change-Id: Ic15974b5fb62413c7b1826ced544ff6d4a8eba2f
Signed-off-by: jantje <eclipse@baeyens.it>
Unused since bug 559674: Integrate new indexer support into CDT build
Change-Id: Ifd4878f944eff6f12e3ab2df399c619abfa47f59
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
Sets the pattern to the default of upcoming tycho 2.0 in advance.
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
Change-Id: I31b3fc733d0cb888fbf6f566995ce2043f6cd621
The vendor specific support files need to be installed separately.
Includes changing the bundles display names to match the CMake main bundle
so that in the install wizard it is clear(er) what they work with.
Change-Id: I12ca155228e906c6c38fe37e37e8ce08d05a2452
This is one way to publish the cmake.is plug-ins. It may be that
additional features are desired as this implementation is all of cmake
support or non of it.
Change-Id: Ie945d2ce94b5ac34c6c238ed7bfbdc3ff336e538
Implement a file exclusion algorithm that favors excluding whole folders when
possible.
The way it works is we gather exclusion information of each folder as we visit
each children. When "leaving" the folder, we can act on whether or not it can
be considered for exclusion as a whole or instead individually exclude a subset
of its children.
Using LLVM code base as a test:
Before: 613 sec
After: 2.4 sec
Change-Id: Ib882a72cae157e3db6b6c94a1a09cb6f05b66bc4
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Cache results of various path resolution algorithms.
Resolving paths is particularly slow while creating entries, see
AbstractLanguageSettingsOutputScanner.createResolvedPathEntry.
There are three main callees within that method that this patch addresses with
a caching approach:
* findContainerForLocationURI: First, this finds containers for a given URI in
the workspace using Eclipse resources API. Then a single container is
selected based on a preferred project. This can done repeatedly for include
paths, which are often similar for source files in a given project or source
folder. This first step is the expensive one and it only depends on one
argument (the URI) and a simple IResource[] return type, so the cache here is
done for this operation. Then the post-filtering is kept as is.
* findFileForLocationURI: Similar to the container case but for files. A
typical projet has much less file paths than folder paths in its options. One
more common option using file paths is -include. The same approach is applied
here as the previous point because there are performance gains but they are
smaller if you consider typical projet setup.
* findBestFitInWorkspace: When a path cannot be found, this makes an attempt to
find the parsed path relative to every folder of the workspace, by starting
first with the preferred project, then its referenced projects and then the
rest. Caching the result of findBestFitInWorkspace itself is too cumbersome
because the result depends on 3 variables (currentProject,
currentCfgDescription and parsedName) which would make a complex cache key.
Instead, caching the result of findPathInFolder at the project level is
sufficient, with little to no performance difference.
In all three cases, the class LRUCache is used in order to limit memory
consumption of the cache. A limit of 100 elements for each cache was chosen
based on experimentation with a few projects like LLVM and projets several
times bigger. A limit higher than necessary for small projects does not incur a
noticeable overhead for small projects and a limit too small for very large
projects merely diminishes the performance gains.
Using LLVM code base as a test, the time to parse options for all files:
Before: 68395ms, after: 5599ms
Change-Id: Ib997e9373087950f9ae6d93bbb1a5f265431c6bc
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
By design, the parser/provider fires when loading the cproject
description but we also call it by hand in the main code of the tests.
This means CompilationDatabaseParser could be running twice
simultaenously along with the same output parser code that it delegates
to. The problem was exposed fully when adding more complex data
structure (hash maps) to the output parsers in another commit, as it
would produce ConcurrentModificationException.
We need to be careful when we choose to call setProjectDescription
because it triggers the provider and then we have to wait for the jobs
to complete (joinLanguageSettingsJobs). By taking this into
consideration, several tests had to be updated. Most notably, the
read-only config test case had to be merged with the time-stamp update
test case because it was the only sensible way to test before/after
changes of language settings with such config.
Change-Id: Ib3a7caefa95b436ad9b699a2614e966a4a8dfca9
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Don't overwrite it in plugins as version is set in
parent/pluginManagement.
Change-Id: I73d2b4d234ba83eae7ec2cd51f3e53d58256b81e
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Get rid of tycho-extras-version as there is no more tycho-extras.
Change-Id: I9d215aad94c4e8320153f06368d6b3ecfa4a3c42
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
One flaw with this implementation is that the "arguments" coming from
the CDB do not have shell quoting and shell escaping of quotes whereas
the current implementations of Build Output parsers assume some form of
shell quoting. This means that simply joining strings of arguments with
spaces will be missing the expected shell quoting and possibly misparsed
by the build output parsers.
It is not clear to be at this point if this should be fixed or not as it
might involve revamping the existing build output parsers to add the
concept of shell/environment and this could also affect potential
extenders.
In this current form, simple cases with no spacing and quote escaping
involved work correctly and is still a nice improvement.
Change-Id: Ia81796e63c748318b34696998ac4a467712e5f96
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
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>
The dependency was removed.The Copyright head was updated.
Change-Id: I82e4289fc8cb14e8488b847e8efa415dd1d77b6c
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
The class overrode org.eclipse.core.runtime.Platform to
workaround bugs in the platform that have since been fixed.
As 32-bit x86 and PPC support has been removed this
class is no longer needed as all the code is now
unreachable anyway.
Change-Id: I01bb00b9203aa02663ff25ce36c4c14f22dadee5
Signed-off-by: jantje <eclipse@baeyens.it>
The method Configuration.getUserObjects() and Configuration.getLibs()
should respect the commandGenerator and applicabilityCalculator defined
for the option in the toolchain definition.
The method Tool.getToolCommandFlags() should call the commandGenerator
only if the value type would generate a default command.
Change-Id: I4d6224627888e602682076ac929adbf808cff8d7
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Use java.text.MessageFormat instead of com.ibm.icu.text.MessageFormat
Change-Id: Ie7ed91d776b707def1bbfc12c24f5e863638e083
Signed-off-by: Sergei Kovalchuk <serjiokov@gmail.com>
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>
Export packages as x-internal" for test bundles
Change-Id: I6961e5f9e805cab13263d3407ac95b8006d8de43
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
Mark packages either "x-internal" or "x-friends"
Change-Id: I63a1ff904ed483de2591004e42b452e6b76c16c2
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
- renamed package "org.eclipse.cdt.cmake.ui.properties"
to "org.eclipse.cdt.cmake.internal.ui.properties"
- exported all packages as "x-internal"
Change-Id: Iedf70fec4d3457b24fdfa288d87af855c560fbf4
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
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>
I have no idea why JAX-RS was needed to parse JSON, may be meson has
REST based web-services? Who knows.
I removed com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider that
seems to cause wiring issue - but I'm not sure that it is really gone.
I still can see a UI from json, checked it with modifying field
descriptions in "intro-buildoptions.json"
Change-Id: I2252ae0901e4e408ba6a4752c91ad3a1fbecb096
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
As the pages are served in an https:// frame, modern browsers will
only successfully link content if link is also to https.
This commit includes the regenerated from Wiki output
Change-Id: If4c3bc083ddbb5dc63a9edfb2b3cd9aaf47b54de
As the pages are served in an https:// frame, modern browsers will
only successfully link content if link is also to https.
This commit includes the regenerated from Wiki output
Change-Id: Ie09f411baa02cda76d33a294c8feaa9d35d0ffbe