1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00
Commit graph

14049 commits

Author SHA1 Message Date
Torbjörn Svensson
5779b04e6b Fixed "Key X is not found in localization properties file" warning
Change-Id: I467386ce652c67507c9373a669a60dbb8a8f8e2d
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-28 21:32:18 +02:00
Torbjörn Svensson
1f069898cf Fixed "Build entries must contain at least one value" warning
Change-Id: I47d8b76bc80f863d034044d2a0e4d9e84a335e29
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-28 21:32:18 +02:00
Torbjörn Svensson
8e42cc8b7b Cleanup of PTY class
Change-Id: If04a3ccbc178040d4929767ef1f4c0f1672dfae9
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-28 10:25:08 -04:00
Torbjörn Svensson
07b50ba2a2 Bug 521515: Do not rely on commit date for reproducible builds
As mentioned in
https://devblogs.microsoft.com/oldnewthing/20180103-00/?p=97705,
Microsoft has stopped using the _IMAGE_FILE_HEADER.TimeDateStamp as a
time stamp and rather as a hash of the source files to make the build
result predictable.

Change-Id: I4f4a7b9557330e4c478ef7fb25653144c5b2d4ad
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-27 15:42:44 -04:00
Jeff Johnston
2f05a6348e Bug 565142 - Support using CDT in Eclipse flatpak
- add missing @since tag for new CommandLauncherManager
  checkIfIncludesChanged method

Change-Id: Ic1774a464c08ee86ee594c4d80102457f79b0ea5
2020-08-26 15:46:15 -04:00
Marc-Andre Laperle
b87c2a793d Bug 565553 - Improve performance of build command parsers with large number of files
Do not pretty-format *.language.settings.xml files in the workspace
plugin state area. These are not meant to be shared and looked by users
so they do not really need to be pretty-formatted. This saves a lot of
time for large projects with per-file language settings. For example, I
have seen this save 30 sec on a test project during serialization.

Change-Id: I27f8e0cfdc593f084d95bbed7aedb707570f1f6d
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-08-25 23:11:40 -04:00
Jeff Johnston
05c45c0bae Bug 565142 - Support using CDT in Eclipse flatpak
- modify ProcessFactory to prefix commands with flatpak-spawn
  when running under Eclipse flatpak
- add new FlatpakLaunch class to dsf.gdb to do a prelaunch
  of gdbserver and set up remote port settings when debugging
  local C/C++ application under Eclipse flatpak
- add new tab to gdb when running under Eclipse flatpak
  to allow user to specify gdbserver and port number
- add new org.eclipse.cdt.flatpak.launcher plug-in which
  contains a FlatpakCommandLauncherFactory to handle copying
  header files from host to workspace when developing under
  Eclipse flatpak
- add new FlatpakCommandLauncher class which simply extends
  CommandLauncher and can be used for debugging purposes to
  distinguish from regular command launcher
- also add new FlatpakHeaderPreferencePage to allow C/C++ users
  to delete copied headers if needed
- dynamically add the headers preference page from
FlatpakCommandLaunchFactory
  if running under Eclipse flatpak
- add new ICommandLaunchFactory3 to add an interface to check if
  headers have been modified/removed and scanner info refresh
  is required
- add new org.eclipse.cdt.flatpak.launcher-feature
- give higher priority to ContainerCommandLauncherFactory so if
  running on Eclipse flatpak, the flatpak factory won't be chosen
  if both apply (i.e. building in a container but running on
  Eclipse flatpak)

Change-Id: Id68e60c4dd37c4494af10440231ac7b7bbec8d17
2020-08-25 13:45:33 +03:00
Jonah Graham
0c5093d6ff Bug 566334: Turn on API Tooling & Analysis for all bundles
Change-Id: I3cb5645eba52b0cd0e9a71069264d9c589159107
2020-08-24 17:50:56 -04:00
Jonah Graham
fd9382d8a9 Bug 562494: Update BREE to Java 11
Change-Id: I0c91aafc0cb1b179936acbd4c9df2d961899e3fa
2020-08-24 17:50:56 -04:00
Torbjörn Svensson
e4e1f6780d Bug 565628: Unify line endings for memory block configuration
As the memory browser configuration is preserved in the launch
configuration file as an indented serialized XML string, the string will
contain the result of System.lineSeparator(). As the launch
configuration file can be shared among developers with different
platforms, there is a risk that the launch configuration file is always
modified although there is no real modification, just line endings.
To avoid this scenario, always save the XML string without any
indentation or line endings.

Change-Id: I94497a924f7aa5a881ac6a32f146d2cbceb6324f
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-22 11:33:02 -04:00
Torbjörn Svensson
5a3d2e744b Bug 521515: Also build pty.dll if host is Windows
Change-Id: Idb991b8c641a6fd7a38ef32cce04c63f15f8f57d
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-18 20:16:49 -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
Torbjörn Svensson
09582630d7 Bug 521515: Do not log every failed access attempt
The Windows registry can be checked for keys that may not exist.
In order to avoid logging an exception that the entry is missing when
it's not critical that the entry do exist, the method should just return
null and let the caller handle if it's critical or not that the entry
exists. To easily debug situations where the entry is supposed to always
exist, the trace symbol
"org.eclipse.cdt.core.native/debug/win32/registry" can be set to "true"
and the exceptions will be logged in any case.

Change-Id: I6603cbe363ebecd357fa44c41fb1a26c6345dd70
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-18 14:52:26 -04:00
Jonah Graham
a708a1dcc9 Bug 564123 Remove deprecated PathUtil that has a replacement
Change-Id: Ie2fd4ed201a2bc0c490df9b0deb43cb6d53b1876
2020-08-18 12:33:13 -04:00
Jonah Graham
8c1be591ff Bug 521515: Build pty.dll in docker (fixup)
Fixes for items identified by Torbjörn in my changes to commit
2d03236339

Change-Id: I51f289f731062b4a43bb041d25cd08467014151e
2020-08-18 08:20:12 -04:00
Torbjörn Svensson
2d03236339 Bug 521515: Build pty.dll in docker
Change-Id: I370327489b6c18ac6ba9f36a8da9e94b078ffe1e
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-17 21:42:25 -04:00
Martin Weber
9e303185f9 Bug 564002: Restore the default pattern of the surefire-plugin
Sets the pattern to the default of upcoming tycho 2.0 in advance.

Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
Change-Id: I31b3fc733d0cb888fbf6f566995ce2043f6cd621
2020-08-13 14:18:47 -04:00
Jonah Graham
7120731766 Bug 521515: Generate JNI header files as part of build
Change-Id: Ia92da44f964e1934b2c32d2536f3ec27c03d5d59
2020-08-12 21:30:42 -04:00
Torbjörn Svensson
49dc726dd1 Bug 521515: Use channel object for native stream access
On Linux and mac, a simple int will do for accessing streams (file
descriptor).
On Windows, a HANDLE is used. This is in reality a pointer and on 64
bit JVM, the pointer will not fit in an int. To not force a change to
the API everytime a different platform has a different requirement
for accessing streams, use a common interface and specific classes
that is known by the native part. The java part of the function
block should just pass the object back to the native code when
needing to reference an open stream.

Change-Id: Ibc3ff5c85735dac6a0ce8e9a1f25b839d7e9aab9
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-12 11:48:35 -04:00
Torbjörn Svensson
0ede7c7a60 Bug 534105: Only files are allowed to be executed
When searching the PATH environment variable, only accept resources of
type "file" and that are executable. Any directories on the PATH is
silently ignored by shells and so should also CDT do.

Change-Id: Ia7cfd1b0b61d59602994528f0fb2af7fee93d946
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-12 10:47:03 -04:00
Jonah Graham
f0235bae94 Bug 565628: Fix typo in variable name
Change-Id: I62a470e6ebe3b3e8369aad5861bab7dc1d5dd6f4
2020-08-12 10:01:00 -04:00
Jonah Graham
ee0e931b42 Bug 565628: Handle formatting/indentation of XML files with CDT code only
The javax.xml.transform.Transformer as used in CDT did not fully
indent, despite INDENT=yes being set (See Bug 286751).

However in Java 11, INDENT=yes started doing "more", so to maintain
compatibility with how .cproject and others are formatted, turn
off INDENT=yes and rely solely on XmlUtil.prettyFormat and the
related workarounds in xmlutil.

Change-Id: Icec04cfd3f9f1290593cff8b15b398b41c9d932a
2020-08-11 18:20:09 -04:00
Jonah Graham
6f3cb8014b Bug 565628: Fix spelling of Indent in variable names
Change-Id: Ifb9124927a7c1afecede6e8bcd75ac8c09526422
2020-08-11 18:19:53 -04:00
Jonah Graham
149ccaffcc Bug 565836: Add linux aarch64 for natives
Note: the Windows dll is not actually modified, apart from the embedded
date stamp to match the date of the jni/ modification

Also-by: Liviu Ionescu <ilg@livius.net>
Change-Id: Ice3d5e7ae5999a0e4d1866e76e515a91e30e9f11
2020-08-11 17:17:34 -04:00
Torbjörn Svensson
00a52086c9 Bug 521515: Adopt native build support on jenkins
Change-Id: I6aee7a7c94f93375d3a2ddb0171602a27a6873e7
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-06 20:55:42 -04:00
Alexander Fedorov
76497af249 Bug 565154 - Delete CDT Core Options API
Removed org.eclipse.cdt.core.options package
Removed org.eclipse.cdt.internal.core.options package
Removed corresponding tests
Updated documentation

Change-Id: Iac3ae1328e9eec3c8db0a633de68bde71573b736
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-08-01 05:54:03 -04:00
Marc-Andre Laperle
0b1492b5c8 Add leave method to ICElementVisitor to support leaving ICElements
This can be used when walking the ICElement tree and wanting
to act after visiting all children of an element and the element itself.
For example, I use this to collect information about whether or not
all files in a folder are excluded or not and when "leaving" the source
container, I can then act on whether or not the
source exclusions can be simplified by excluding the whole folder.
Without the leave() method, one would have to do cumbersome and
error-prone path checking when visiting each node to detect if we
have left a parent node.

Change-Id: Iad480fe18f28db1477d5d527ac51c320f6d280b7
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-07-27 12:04:50 -04:00
Alexander Kurtakov
94f1bb0f30 Remove unused imports.
Change-Id: Ida8455b078fa7cb39af17773c7bde1a4895158ca
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-07-22 11:23:33 +03:00
Torbjörn Svensson
c58603dfbe Bug 521515 - Access Windows registry using JNA
There is no need to have custom JNI implementation any more in java to
be able to access native functions. JNA solves this just fine with the
benefit that the code is easier to debug and maintain.

Change-Id: Ia9d36981cb10fa7348bf0a5f0549b3e96bd4c982
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-07-18 08:36:44 +02:00
Torbjörn Svensson
36ec703c2f Bug 521515 - List running tasks using JNA on win32
As Eclipse only support 64-bit JRE on Windows, some legacy support has
been dropped.
* Dropped support for listing 16-bit applications using NTVDM.EXE
  process (was only supported on 32-bit WinNT based systems).
* Dropped support for listing processes on non-WinNT based systems
  (Windows 9x/ME is 32-bit only).

Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Change-Id: Ib827de6510a342c0de5c6eaca68a944b2f1d641e
2020-07-17 18:21:43 -04:00
Torbjörn Svensson
803d6cd8ad Fixed NLS warnings and removed excess semicolon
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
Change-Id: Ife6550a77af5e410fd7b252a239dfa1ae6ae36f5
2020-07-15 22:31:35 -04:00
Torbjörn Svensson
6e19332c33 Mark exe and dll files as executable
When git is configured to honor executable bit for files
(core.fileMode=true), the .exe and .dll files in the
repository needs to have execute bit set to be able to run
Eclipse in runtime mode on Windows.
For more details:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-corefileMode
"Git for Windows" does not appear to have this problem,
but at least Cygwin does.

Change-Id: I4c164f6d99219d461c301189f101ccbf63debb50
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-07-12 16:53:47 -04:00
Marco Stornelli
530818839f Bug 564586 - Fix auto complete for final and override keywords
Change-Id: I69ee87f57a45b7b622a06534ce8b8ff2de9f80ff
2020-06-25 01:09:48 -04:00
Aijun Shi
30845347d0 Bug 564232 - Add cpu risc for RISC-V need to support.
Change-Id: Ib62ed14f3c0dbe4375da41dba7209b27e034c53e
Signed-off-by: Aijun Shi <Aijun.Shi@windriver.com>
2020-06-16 09:39:43 -04:00
Alexander Fedorov
8b039257b7 Bug 564276 - Extract CDT Core templateengine to a separate bundle
Hide the value of extension point identifier
"org.eclipse.cdt.core.templateProcessTypes" with dedicated type. After
moving to another bundle we will preserve the identifier value for
compatibility.

Change-Id: I8dbca52f1223e8751ebb5ac7844845c30a1f0266
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-06-15 14:21:21 -04:00
Jonah Graham
fe2daff197 Bug 563051: Use new Rename API in platform for resource renaming
This removes use of internal API RenameResourceProcessor and removes
copying of code from platform's RenameResourceWizard to take advantage
of new UI API too.

Change-Id: I0e596027751dacf6982d4a63def617ae19f69827
2020-06-15 06:59:25 -04:00
Marco Stornelli
f4bed34dd0 Bug 564273 - Fix format lambda expressions without parenthesis
Change-Id: I918ca05d75ca4e8cba7501e232d4e6b05e434f06
2020-06-15 00:58:12 -04:00
Alexander Fedorov
72bf8216d8 Bug 564276 - Extract CDT Core templateengine to a separate bundle
Remove dependency to org.eclipse.cdt.core.CCorePlugin during template
schema URL resolution. The TemplateDescriptorSchema.xsd URI should be in
one bundle with TemplateEngine.

Change-Id: Ice2fbc4f33da6616184728d3a41cc803328526a6
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-06-14 20:17:03 +03:00
Alexander Fedorov
db577a85ca Bug 564276 - Extract CDT Core templateengine to a separate bundle
Remove dependency to org.eclipse.cdt.core.CCorePlugin during IStatus
creation.

Change-Id: Ic9cf5e55866ab6f0727ea91378b7366c6090b7f1
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-06-14 12:47:51 -04:00
Michael Woski
c7895abec0 Bug 564026: CPPSemantics.selectByArumentCount does not trim after
removing elements from the result array

the list of candidate functions is filtered for redundant elements. The
returned array must be shrunk to avoid NullpointerExceptions further
down the road.

Change-Id: I5f3c5a19433266dd20492241fd74edc43fbfc0ef
Signed-off-by: Michael Woski <woskimi@yahoo.de>
2020-06-14 09:28:18 -04:00
jantje
3516a46a92 Bug 564123: use EnvironmentReader in core build
CBuildConfiguration.findCommand read environments like
EnvironmentReader

Change-Id: Iedd474c647a0c22fecdd525bf50927159d138031
Signed-off-by: jantje <eclipse@baeyens.it>
2020-06-13 19:40:08 -04:00
jantje
9867126d6f Bug 564123 Uppercase only special environment variables on Windows
Only uppercase the env variable names that are special (only Path for now).
This is part of handling the change to keeping cdt variables case
sensitive.

Change-Id: Ibf22823328c8f8d57c98aa9b62763ea884164fae
Signed-off-by: jantje <eclipse@baeyens.it>
2020-06-13 18:58:14 -04:00
jantje
d99d06ceca Bug 564123: Remove deprecated method from EnvironmentReader
EnvironmentReader.getRawEnvVars has a better replacement,
EnvironmentReader.getEnvVars

Change-Id: I91b209f3f601b748dd5d635ff44a36765d519e49
Signed-off-by: jantje <eclipse@baeyens.it>
2020-06-13 18:01:08 -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
jantje
f5e029d19c Bug 564123 delete org.eclipse.cdt.utils.Platform
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>
2020-06-13 13:05:41 -04:00
Marco Stornelli
51398ca2ae Bug 564026 - Fix null pointer exception
The ICPPFunction array can contain null values. A check is needed.

Change-Id: Icde40880f7913d0de7ae2c0a293de8d5be899327
2020-06-13 10:56:29 -04:00
Jonah Graham
c0ffeb6474 Bug 563864: By default fail build on test failures when building CDT with maven
Change-Id: I9bd3db3850cc45abb0ea53f8885a331c7f327887
2020-06-02 15:26:57 -04:00
Marco Stornelli
3997ba62f5 Bug 563591 - Fix exception in EvalBinding
Change-Id: If5138fec2ec00f1a88b25d3a32995a703c9aa790
2020-06-01 04:37:27 -04:00
Marco Stornelli
0f1940afc5 Bug 487990 - Fix format of variadic functions
Change-Id: I802d032f733247178db46c8fe43fdb9350555509
2020-06-01 04:37:13 -04:00
Jonah Graham
cfc3278454 Deprecate and remove use of method now in JVM (Object.equals)
Change-Id: Iec34f0f8388d7d76ce63f88cfc7d16534e5a7d84
2020-05-31 20:21:06 -04:00