Treats #pragma region and #pragma endregion similarly to how
#pragma mark is treated in outline view. With
region and endregion they are always surrounded by
divider lines if there is text after region/endregion, else just
a divider line is inserted.
Change-Id: Idb8bebe94363731e59412a7f31af3b54d53a2c8e
Adds #pragma mark support to outline view. With mark, dashes
(-) cause divider lines before/after the mark label.
When outline is sorted, the divider lines are omitted (lest they appear
all grouped at the bottom of the view).
The system property org.eclipse.cdt.core.model_include_pragmas can
be set to false in case there are side effects of introducing IPragma
elements to the CModel.
This change applies to the Outline view and the Quick Outline (Ctrl-o)
information popup.
Icons contributed by Greg Willits.
Also-by: Greg Willits <gwillits@marway.com>
Change-Id: I072ef26fb14e21b5453f909bade391a3f0521823
The previous code iterated through the preprocessor statements
numerous times, this code has the same logic, but iterates through
the preprocessor statements less often.
Change-Id: If4fcf0a605aabff1f615811f8f528ea66a461136
Allow __declspec after identifier in decl-specifier.
See https://docs.microsoft.com/en-us/cpp/cpp/declspec
Change-Id: Ifdaeb649abcfa1b7391e2799072b1afbc07a16a1
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
I initially applied a fix only to alias declarations by parsing it
before the type-id but to my surprise __declspec works more widely as a
type-id specifier.
Change-Id: I50217e2453f888207b73fc3f4c7ff1ea67bf5937
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Starting with C++11, a null pointer constant has to be specifically an
integer literal of 0 and not any constant expression. Before this
change, an expression like (0 & 1) would wrongly being considered a null
pointer constant. It also means it could implicitly convert to a pointer
type (like int *) and lead to problems during function resolution, like
ambiguity.
This change corrects the behavior for C++11 by tracking whether the
integer type (basic type) came from a literal expression so that we can
add this additional constraint when checking for a null pointer
constant. Because types are sometimes returned directly when evaluating
different kinds of non-literal expressions that contain literal
expressions, we have to be careful that we remove the flag that tracks
"from literal expression".
Unfortunately, the semantic code does not track the active C++ version
which means the behavior for pre-C++11 will be impacted. Tracking the
active C++ version would not be trivial and at least the new behavior is
more future-proof.
Change-Id: Ied625e96e70390872e36ab5bb4dc238d75809d2e
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
When the options are applied in performApply, the call
DocCommentOwnerManager.setCommentOwner causes to set the
CProjectDescription, which causes UserDefinedEnvironmentSupplier to
flush cdt.core preferences. Then DocCommentOwnerArea.apply populates the
preference storage, but the preferences are not flushed after that
therefore the new options values only exist in memory.
Swapping the calls of DocCommentOwnerManager.setCommentOwner and
DocCommentOwnerArea.apply works but it makes no sense for the flushing
of Documentation options to depend on UserDefinedEnvironmentSupplier
flushing the preferences - it would work by a lucky accident.
A clean option would be to go through the preference's page
IWorkingCopyManager but this would involve a lot of more risky changes
in the DocOwner/Doxygen code and a vast majority of CDT code does not do
that.
Instead, this change explicitly calls CCoreInternals.savePreferences
which flushes the preferences, just like Indexer options does.
Change-Id: Id9a57cde47794f57f26ae295ec01eeb1df9aa120
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.
(follow up for 1557c2c4f5)
Change-Id: I126d60423b0e4ff6d9d240d7de2c1a4905763415
When starting on older versions of Windows ensure that WinPTY continues
to be used by catching all the types of exceptions that may indicate
that ConPTY is not available. This change catches all Throwables as
we want to know about all RuntimeExceptions and Errors
Change-Id: I7524d9286efe9296f1bb44311c4a3be1e5195c14
Some of these commands work "by accident" on Windows, but there are lots
of special/corner cases that may not. On Linux they almost certainly
never do the correct thing when spaces are in arguments.
Change-Id: Idce714da9c1d6ac7a67dc174d5b30bf619534c53
There are lots of bugs in WinPTY, while upgrading WinPTY would
resolve some of them, there are others that are unresolvable. See
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/
for a backgrounder on the general subject.
In this first version ConPTY won't be enabled by default, it requires
system property
org.eclipse.cdt.core.conpty_enabled=true
to be set. i.e. start Eclipse with:
-vmargs -Dorg.eclipse.cdt.core.conpty_enabled=true
In a future version the default will change to on if available,
so to force it off use:
org.eclipse.cdt.core.conpty_enabled=false
Change-Id: Ib2df0095027c23f20daa6aa044d9e5f0b0443164
A GCC information message starting with 'in constexpr expansion'
was incorrectly parsed as an error.
Change-Id: If6142f8486e97c088315060c826d59e61566692b
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
SWT.COLOR_GRAY is gray in dark or light mode, but COLOR_TEXT_DISABLED_BACKGROUND
changes with the theme so always leaves the text legible.
Change-Id: I3d0c2d1a19baa618ef08c5c40e35fbdda11691e2
The select can be called twice when the expansion first opens,
so clear out the old selection before processing the new one.
If this isn't done, the oldStyles gets set to the highlighted
version on the second call, which prevents deselect from
removing the highlight.
Change-Id: Ibc8ae45d4164d380b7946cd492c29f33c9fac981
Each source file could have few custom templates. If user selects a
specific template from the combo box for a specific file type, this
selection will be persistent for next file creation, but only for same
file extension.
Change-Id: I7dde198d6fefdfbbc124b8c52517dfe751009fca
Signed-off-by: Lidia Popescu <lidia.popescu@windriver.com>
Because the dll/jnilib is modified in place, the natives are qualified
with their build date, rather than their git date as the checked-in
libraries are not signed.
Change-Id: I3078f5040f7ef9590bb4ab5d031dcb29b3c3bdde
The changes adds sorting for source templates in alphabetic order.
Makes possible to bring to the top the new custom templates provided by
extension points, as the most frequently used ones and to avoid the need
for using the drop down list for the right option.
Change-Id: I931bd2fc08f3e37178a64e4b7908db73af1fbc2c
Signed-off-by: Lidia Popescu <lidia.popescu@windriver.com>
- hover with ctrl+mouse underlines word under cursor
- ctrl-click tries to open the word:
- if a relative path (not starting with /) a full path is
obtained by prepending the shell cwd
- if the fullpath maps to a workspace file, it is opened
- otherwise open the OpenResource dialog with the word as
filter text
- if there is line/column information (separated by colons)
then the opened editor jumps to that line
- http and https words are opened in a browser window
Change-Id: I3f46accbf1eac6743d7b0c3b34bf30ac5e7523bb
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
The ThrowNew JNI method requires the message to be encoded in
"modified UTF-8". The FormatMessage WinAPI method can return a string
using any encoding, so it needs to be converted to UTF-8 in order
to have it visible in the exception message.
To further help, try to extract the message in English and fall back
to the Windows installation language as a last resort.
Prefix the error message with the error code from the GetLastError()
function.
Contributed by STMicroelectronics
Change-Id: Id76ffd83e2d3ad1f061780c7ee0892c9b378649b
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
Java 16 restricts some reflection. The serializing of scannerInfoCache
with gson does some reflection on Pattern which isn't allowed.
Fortunately the reflection is not needed, we just have to prevent
gson from calling setAccessible by providing our own serialization
for the IExtendedScannerInfo
Change-Id: I0db5cec9cfec1ac4caabd2e67f1d6a336e361023
rebuilt docker images have small binary differences
in the jnilibs due to a rebuilt macOS toolchain being
used.
Change-Id: I25dc951e1e8c7c94a799d63a4c0db644d1f1be1e
Added missed license headers
Updated baseline for the parent pom to CDT 10.2
Updated version for pom.xml to 10.3
Updated version for features and bundles to CDT 10.3
Updated copyright for about.properties to be 2021
Incremented version + 100 where needed
Change-Id: I79666fcc0402fee6607499d7dce1eaf87a5f446d
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
The "filterPattern" attribute is used to filter templates by language
ID, not by build configuration ID.
Change-Id: Idd89fffc2ec3aefc3c1421b4cbbc7e1a19dbb7f3
to exclude flaky and slow tests from gerrit runs and main build
tests can be tagged as such. See BTreeExpensiveTests for example
of a slow test and Bug_303953Test for an example of a flaky one.
The root README.md has a few notes on converting tests to JUnit5
and adding annotations to mark them slow or flaky.
Change-Id: I03a4004112e6a500d8ec2771d68f14f7dc5f67fb
This change adjusts behavior in ElfParser.hasInterpProgramHeader()
(added for bug 512822) to throw an IOException that occurred, as opposed
to logging the exception and continuing. This excludes exceptions thrown
by Elf.getSections() indicating that ELFhdr.ELFCLASSNONE is read; a new,
more specific IOException type is defined to allow handling this as a
special case.
A "generic" IOException indicates an I/O problem with the binary. E.g.
the binary can be deleted by the user or by Eclipse, while being visited
in CModelManager. If hasInterpProgramHeader() returns instead of
throwing, more problems can occur "later on".
Change-Id: I8852d9cbaa17dc97f668bb1666e9b046bbde1fca
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
When GCC skips template instantiation in its output it was parsed
as an error instead of an informational message.
Change-Id: If5dca2d1430a6b5e9cb9317649dea8291bfc0356
Signed-off-by: Stephan Oostveen <stephan.oostveen@nextlevel-electronics.com>
This change adjusts replaces the following actions (part of action set
org.eclipse.cdt.ui.buildConfigActionSet) with commands and menus:
* org.eclipse.cdt.ui.manageConfigsAction2
* org.eclipse.cdt.ui.buildConfigMenuAction
* org.eclipse.cdt.ui.wsselection
This is done to avoid menu extension errors on perspective
customization, due to problematic code in CustomizePerspectiveDialog. In
particular the customize perspective dialog will populate main menu
submenus only after going over actions; this causes the menu paths of
the actions above to be detected as invalid, despite actually being
valid and functional.
The original action classes are deprecated and marked for removal. The
respective classes are defined in non-internal packages; removal would
be considered API breakage and so must be done in a major version bump.
Change-Id: I31517697689772395b7e1868ef4cab07ad946085
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
This change renames all suites to be called ...TestSuite so that
the default includes don't pick them up. With the name ...Tests it
means that those tests referenced by the suite are run multiple times.
Tests which relied on being run as part of a TestSuite have been
refactored to run as individual tests by moving the logic from
the suite into the test (e.g. CommentHandlingTestSuite)
Tests that were not runnable have been renamed from ...Test to ...Tester
to match a convention already used in CDT.
Lots of tests did not use standard name (i.e. didn't end in no Test) so
this was fixed.
Many tests were really abstract tests, so the missing abstract was added,
e.g. ArrayTests
The default excludes in Maven behaviour differently than may be expected,
so rather than remove static inner test classes, update the excludes,
see pom.xml change
Change-Id: Ia91e12fe76c3ec2d914463a28400d21b9daf1910