Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented May 3, 2025

This migrates the terminal control currently located at CDT to platform see:

From the readme:

The Terminal is a UI-less model of a grid of characters,
plus an SWT widget that's updated asynchronously for
maximum performance. The widget can be hooked up to various
ITerminalConnectors providing an InputStream, OutputStream,
and a method for setting the Terminal Size.

The widget processes ANSI control characters, including NUL,
backspace, carriage return, linefeed, and a subset of ANSI
escape sequences sufficient to allow use of screen-oriented
applications, such as vi, Emacs, and any GNU readline-enabled
application (Bash, bc, ncftp, etc.).

This is not yet a fully compliant vt100 / vt102 terminal
emulator!

FYI @akurtakov @jonahgraham @stbischof

nickboldt and others added 30 commits August 28, 2018 12:54
Change-Id: Ibab77ef2ba53f4fd91363269330955eca5fd2bb3
Signed-off-by: nickboldt <[email protected]>
…rsion everything to 4.5.0 and fix plugin deps to use new version; fix versions of dstore plugins

Change-Id: Ic5dd336a22e822e848b9fe63f02029c24bd0bf08
Signed-off-by: nickboldt <[email protected]>
…part 2

Change-Id: Ifa14f8b829bf1859e36ffce719e6cfac14012236
Signed-off-by: nickboldt <[email protected]>
Change-Id: I5ef20c1c81c17896e3c73ae0aa8c6cf47a708016
Signed-off-by: nickboldt <[email protected]>
Change-Id: I99acb204f490355d91a4de3f4233329246a0b9d0
Signed-off-by: nickboldt <[email protected]>
Change-Id: I12c461c9d05241629442ae84ea1c2f439a23039d
Signed-off-by: nickboldt <[email protected]>
Change-Id: I1481ac53d6bd5a0c66eced40acfa77a51c3c73f4
Signed-off-by: nickboldt <[email protected]>
Change-Id: I46db42560ec0b93bb265f45920d78c97a32338c3
Change-Id: I274a6e5f985d60d1ae6fc929af3eb0fdcea868ba
Change-Id: Ib63f010cf5e741beb6a77096e958ab5478133635
Change-Id: I4b8ca8341a3f479a74a06621f68534732cff6957
This is applying the per-project code formatting rules that would
be applied on save in the JDT editor

See also Bug 540373

Change-Id: Id04c972c3b3cb0a6ed1ab8581185359b7cf43f91
The 4.6.0 version marks the first version of terminal built in
CDT and in a different git repo - there are no API changes.

Change-Id: Ic6c4089d7e6ccbb2701bf59fedba2b6a8dd4c856
It is now Eclipse CDT providing these, so update to match

Change-Id: I1bc83b77d491d1475db51cbb6396571893d8ee42
Change-Id: I55b5fcce4948ec17a97a199bb75627e8e7a4c462
Signed-off-by: Alexander Kurtakov <[email protected]>
Change-Id: I2cd3dad7821e3c6ae3f0371edda5e511beff4014
Signed-off-by: Alexander Kurtakov <[email protected]>
Change-Id: I9248a3fd2481b590e8437bf7f880f936ba88ce6c
Signed-off-by: Alexander Kurtakov <[email protected]>
Change-Id: I30c23a89b3e78306d3e05fa65f5d2d8dd9e23540
Signed-off-by: Alexander Kurtakov <[email protected]>
And run save actions to modernize code a bit.

Change-Id: I4a718e73e8472679aa4ead7fdefe4259004ef6d6
Signed-off-by: Alexander Kurtakov <[email protected]>
constructor.


Change-Id: Iab91e05314206725d8175d30bfb2866c0d99a8d7
Signed-off-by: Alexander Kurtakov <[email protected]>
This is done by buffering the drawing of the line of the terminal.

Change-Id: I593a3b99080d779046ea37497d93a25584c472c1
Change-Id: Ief69751ba4affc13240cfdb4b79e190b3356bbd9
…xup)

Dispose of the image used for buffering GC.

Change-Id: I80b6edea3211847265140aa8992546a16474cadf
… event

The original code used the direction provided by the scroll wheel, but
not the magnitude.

Change-Id: I7f5e2083599990f4f4999aba46ef38602b9fe565
Change-Id: Ibb31fa697065add6d3341faf5bdc84e24504e1e3
The inconsistency of lower case and upper case in the internal
representation of the colour names made it harder than it should be
to find where colours are used in the code.

Note that the SytleMap creates lower and uppercase entries for each
colour.

Change-Id: I16b4ebe4a97adecd01f835319aa0f0d175ae3bb6
This may need to change to an LRU cache if we end up with
too many potential styles

Change-Id: I66bb6a4b9f67c6fd8656875f138899dd3a67a360
GC.getForeground / Background always create a new Color object,
so this if expression was always true.

Change-Id: Ief4ccaf1adb70967301411b012c0474608f425cb
There are two ways of specifying fonts in the terminal,
one via font definitions, and one via the font directly. The
method via the font directly was already deprecated in the public
API, this commit follows that deprecation chain through to
make it easier to identify which code paths are not likely
relevant anymore.

These methods could simply be removed as part of the major version
bump.

Change-Id: I05d746c429c4e6c3ced5ee7bb7a6172e0a255c2d
jonahgraham and others added 26 commits June 17, 2021 16:02
This removes a TODO in the code that makes no sense, and in
most cases the else branch is not taken as a common operating
mode is the default charset/encoding is windows-1252 but the
current charset is utf-8.

The effective difference between the two branches is that
the else does a flush after character rather than after each
string.

Change-Id: I50b3cc5837d783ba20b88c2efa44d9c4e6381d30
…rings

This simplifies error handling as once you have a Charset you don't
have to worry about whether or not an UnsupportedEncodingException can
be thrown anymore. In addition it is a little easier on type safety.

Change-Id: I4292878a7c621f9d05fdb98f5c26a0ae8bfec062
There is a bug in SWT on macos - Bug 568777 - with the cache of single
character drawStrings with transparent backgrounds as a performance
boost. This causes the terminal to draw some characters in the
wrong color.

The workaround is to not draw with transparency, which should be fine
because we just filled the background with the same color that the
1 character string will draw with.

The performance, measured with TerminalTextUITest in Fast mode with
no throttling, does not seem affected and in my testing there does
not seem to be any graphic side effects.

Change-Id: I1b0aadae100d81a8f4533ba73273ccc8202e068f
Change-Id: I0f4fb95c1a44088d19ae9f98abd98765f456d110
Change-Id: I0d35eb6514d87fb6dcba0a284f58963b80861d51
Change-Id: I0d78c550512d8e63374bf1bc3a53f80e5d387e31
TerminalColorsFieldEditor had a dispose method, but
FieldEditorPreferencePage does not call dispose on the
individual field editors despite API implication that
it should.

Change-Id: I98c2987446d8b005cbca571763a9e811e966e0d3
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
The about.html was changed as per
https://gitlab.eclipse.org/eclipsefdn/it/websites/eclipse.org/-/issues/90

Change-Id: Ied879279460a8fc610630fc26794ab3df9eae39f
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
This mostly is using diamond operator, but includes
adding missing @OverRide and organizing imports and
applying formatting improvements in the JDT formatter.

Change-Id: Id91cbff33b0a039cc5121945ffbc407ecba45866
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.
When a more complete implementation of ANSI Escape sequence for
renaming terminal titles was added in
[CDT 10.2](https://github.com/eclipse-cdt/cdt/blob/main/NewAndNoteworthy/CDT-10.2.md#rename-terminal-tab)
it caused a regression in use cases where extenders of the terminal
wanted to retain control of the terminal's title.

This commit adds a new flag that will prevent the title of the
terminal tab from being updated from ANSI escape sequences.

Fixes #494
This escape sequence can be generated when using Powershell on
Windows (and possibly other places too) to erase number of
characters.

Change-Id: I32405f51a3f91fd8653d44f2676a5c85b696ef99
Includes a new system property `org.eclipse.tm.terminal.control.convertBackspace`
to allow us to disable this new behaviour in the field if it turns out that
some terminal/host combination does not like this conversion.

Fixes #392
* remove invalid tycho resolver config (not valid since many versions)
* fix PMD plugin configuration (config attribute was renamed in 3.18)
* remove duplicate versions already managed in pluginManagement section
* fix indentation
* move all not yet configured versions into pluginManagement of the
parent module to avoid further duplication
* consume the target platform as file, not as maven artifact (this
simplifies building a single module A LOT)
* remove invalid tycho-source-plugin configuration
* disable tycho consumer POM generation (not needed here, and avoids a
warning in each module)
* remove prerequisites. that's for maven plugins only, and this POM
already contains the better suited similar maven enforcer rule
* enforce UTF-8 for javadoc generation (the build fails on Windows
otherwise, trying to read some Japanese? characters with the Windows
default encoding)
This fixes support to properly identify the end of
OSC control sequences which can be terminated
with a BEL or ESC \.

Fixes eclipse-cdt/cdt#831
the rest of Eclipse now uses UTF-8 as default encoding.

The tm.terminal code reverts to null when the encoding
begins with "Default" and this leads to UTF-8 being
selected from Charset.defaultEncoding instead of ISO-8859
when the displayed default value is selected.

Co-authored-by: Philipp SALZGEBER <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2025

Test Results

0 files   -  1 758  0 suites   - 1 758   0s ⏱️ - 1h 31m 17s
0 tests  -  4 173  0 ✅  -  4 150  0 💤  -  23  0 ❌ ±0 
0 runs   - 13 119  0 ✅  - 12 952  0 💤  - 167  0 ❌ ±0 

Results for commit 1752516. ± Comparison against base commit 86aa0ac.

@laeubi
Copy link
Contributor Author

laeubi commented May 3, 2025

Pushed branch to wrong repository :-\

Moved to #1851

@laeubi laeubi closed this May 3, 2025
@laeubi laeubi deleted the merge_terminal_control branch May 3, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.