1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 13:42:30 +02:00
Commit graph

172 commits

Author SHA1 Message Date
Jonah Graham
d465e83836 Bug 573797: Refactor code to use Charset instead of passing around Strings
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
2021-06-17 16:02:59 -04:00
Jonah Graham
385d302d70 Bug 573797: Always use sendString, regardless of encoding
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
2021-06-17 16:02:27 -04:00
Jonah Graham
27f6637d3f Bug 573796: Warn user if not using UTF-8 on Windows
The PTY, in case of ConPTY, operates always in UTF-8. This is suggested
back to the user with a decorated combo if they try to change the default.

Change-Id: Iaf4c13e256ea7ee3469eecab4a0ec3df1ceb19a4
2021-06-17 15:37:48 -04:00
Jonah Graham
902ea0dfa1 [releng] Bump to CDT version 10.4.0
Change-Id: I0807f46d9ebb8bb579b687366cdb19e40935a9ec
2021-06-12 20:52:54 -04:00
Jonah Graham
261af5106c Bug 573719: Display error on shell open failed
Save shell before disposing control so error message has somewhere to go

Change-Id: I3bcaa0e8f23a8c177309e72b6d9dfbb8afb72cf4
2021-05-24 00:30:58 -04:00
Jonah Graham
f71d92114f Bug 573646: Open primary terminal view when there is no last available
Change-Id: I286d039d6cb3eb1e73fdb5b76c8743a8e0870d94
2021-05-24 00:30:58 -04:00
Jonah Graham
cb89216031 Bug 573712: Populate WSL entries in terminal list like git bash is
Change-Id: I371d5455296e9d1bcb9137e538d5cc2ed5417ba1
2021-05-24 00:30:58 -04:00
Jonah Graham
a4963b35ad Bug 573712: Reduce work done at Eclipse startup time on main thread
In Bug 466650, the git bash detector was removed from startup to reduce
overhead on startup. Later during a rewrite it was added back in under
a different code path for Bug 473107. In the context of Bug 573712
which is going to add more detectors that may do much more work on
a full load, reduce the amount of work needed to do the presence check.

Change-Id: If1ae3f12ec51b1edc2d419f0efd89fed81a7b56e
2021-05-23 20:49:26 -04:00
Jonah Graham
a7fab87648 Bug 573712: Reorganize external tools detection code
The code was not very extensible and the main purpose of the bug
is to add additional detectors. This first commit refactors
the code to make that easier, and to provide a platform for
what could become an extension point.

Change-Id: I5ce514eda11f2573098d6e16663e324954da961b
2021-05-23 20:49:26 -04:00
Jonah Graham
ece07888a8 Bug 573713: Support alternate way of bright escape codes
ConPTY uses 90-107 to indicate bright instead of using extra 1; parameter.

Change-Id: I42263edd5dbe78fe164f00b99d1850ca5be85081
2021-05-23 20:49:26 -04:00
Jonah Graham
4e92239952 Bug 562776: Use Windows ConPTY API instead of WinPTY
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
2021-05-23 20:49:26 -04:00
Jonah Graham
17cabff257 Add missing imports for Javadocs
These imports are only used for Javadocs, which is why it was sort
of ok that they were missing until now.

Change-Id: Ia941ca55c56a101766b709290b40609c20fdda9d
2021-05-19 23:26:40 -04:00
Jonah Graham
e44ef41078 Bug 573646: Restore to correct secondary tab
The handling of ssecondary ids was problematic, special cases were
not well documented and depending on code paths, a secondary ID
of null would mean different things.

This commit fixes that documentation, defines shared constants, and
fixes the logic so secondary id dispayed terminals restore to the
correct location on restart.

Change-Id: Ia87b64f735a37d505e1a5a7b7a4a8e210dfb8c1e
2021-05-19 23:26:07 -04:00
Jonah Graham
df78cd3055 Bug 460495: Save/restore terminal process/args and other settings
Change-Id: Id87d1ade4b58a4abf759c5016dcf4ab24b4b028b
2021-05-19 14:47:53 -04:00
Jonah Graham
a7e14187ea Bug 453696: Save CWD in terminal to restore it
Change-Id: I6a432fcbd40f6b4e991e49ba582b8b9f7cae823e
2021-05-19 12:54:10 -04:00
Fabrizio Iannetti
f13c182df4 Bug 572938 [terminal] reverse linefeed: Honour the scrolling region
The reverse linefeed should scroll down when the cursor is on the
first line of the scrolling region, not only on the first screen
line

Change-Id: I628ab135d48d868bc8e3eacd2ea57dda948873a8
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2021-05-01 16:25:49 -04:00
Jonah Graham
61d1a02f32 Bug 572938: Tests for scroll reverse
Change-Id: I08a812d9f7847e2fa24dddf0f97efc65cc44d49d
2021-04-23 21:24:45 -04:00
Jonah Graham
b044543451 Bug 573064: Test for full clear - extended "E3" capability
Change-Id: Ic30dac68f870f04808eb9038c2ba61b1da9e983f
2021-04-23 21:24:45 -04:00
Jonah Graham
3e29cd6525 Bug 341721: Test for rename terminal escape sequence
Change-Id: Id03f3d4361d0ac0ac0758c3f00eadbe2d6b568fc
2021-04-23 21:24:45 -04:00
Jonah Graham
a14c962ff2 Bug 573108: Add test harness for VT100Emulator
This contains basic tests so far, as bugs are fixed other tests
can be added here, leading to easier development of escape sequences.

Change-Id: Iadd0b24d400f72927c446d61386f19cfd8bd05a0
2021-04-23 21:24:45 -04:00
Jonah Graham
327026010b Bug 573110: Emulator can spin if Reader is ready but not available
The implementation of the read loop in the emulator can spin because
it uses Reader.ready() to determine if there is more data to read.

However the Reader contract does not specify that ready() means
that read() will return a character, simply it means that read()
won't block. As such, if a Reader won't block, but it has no
characters, the inner read loop will spin constantly polling.

The outer loop uses polling too - but it has a wait so that the
CPU does not hit 100% and yields.

Change-Id: Id9b2426c65e6c2a2c3ae817a78d2be435e568c1f
2021-04-23 21:24:45 -04:00
Jonah Graham
4ef3cb7f30 Bug 573109: Add new logging options for terminal
Change-Id: I0c35b7ce0c4350081eac6ace974dbcee3e0f103d
2021-04-23 21:24:45 -04:00
Jonah Graham
b7d017572d Bug 573109: Use new StackWalker API
Java 9+ contains new API for getting/walking stack frames. It is much
faster and has a much cleaner API than using Throwable.getStackTrace

Change-Id: Id0c888aeb06665f10605ce5ab5f0a567249e068c
2021-04-23 21:24:44 -04:00
Jonah Graham
20f73f9c64 Bug 573121: Remove unneeded dependencies in terminal
To enable the terminal to be built independently of the
rest of CDT, remove these unused dependencies.

AFAICT they may date back to a time when some of the
native code was part of the core?

Change-Id: I61505a2bfc6c85f6c2d6efd9d66ac788018f9e82
2021-04-23 21:24:17 -04:00
Jonah Graham
d3b0dd254a Bug 573121: Allow terminal to be built on its own
Change-Id: I74024d0c247159a1adef767e79ad64ab1bfd14b2
2021-04-23 17:38:34 -04:00
Jonah Graham
6386faff0d Bug 563015: Log exception if process.pid() fails
Change-Id: Ie9888e1e56b19086890caf221f0cbd97eafa817c
2021-04-23 11:21:38 -04:00
Jonah Graham
e033c50e28 Bug 573064: Support full clear - extended "E3" capability
Change-Id: I9d4f7fffb11cc5386eb0a4e5c0445f1fc518b0a5
2021-04-21 15:37:14 -04:00
Fabrizio Iannetti
6dbad0b10e Bug 572938 Terminal: add support for reverse linefeed
Scroll up is not working with `less`, `man`, probably
other programs.

Change-Id: I99d2472ab09df6b79fffbcaa581f3024c44d3ead
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2021-04-21 15:37:05 -04:00
Fabrizio Iannetti
e6d5c634b9 Bug 563015: terminal: open files/links with ctrl-click
- 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>
2021-04-12 16:04:07 -04:00
Jonah Graham
7ef7f04d0c Remove launch files that have little value
These launch files are basically all defaults and fill every devs space
but no one is running them on a regular basis.

Change-Id: I194dadd2ca55a20489935e690e3cd94357026389
2021-04-06 13:38:01 -04:00
Alexander Fedorov
8dbf024ab8 Bug 572552 - CDT releng: update versions to 10.3.0
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>
2021-04-04 16:17:25 -04:00
Jonah Graham
6874b7e013 Bug 341721: Add context menu item to change terminal name
Change-Id: Idd41b58ad4f052c32d6a9c57303f1b9ef05aff7c
2021-03-01 18:51:58 -05:00
Jonah Graham
fe00320854 Bug 341721: Update terminal tab title with ANSI command
All the hard work had been done before, simply no one had actually
added the bit of code to update the title based on the listener.

Change-Id: Icdbc7b9b0a9b8fccf7d4eddf8d20674e50e0a170
2021-03-01 18:51:58 -05:00
Jonah Graham
d3f09041de Bug 570775: Correct ID of InvertColorsAction
Change-Id: Id74b075a3a0d932cb65041c8d206f9ca2663cdf1
2021-02-28 07:41:29 -05:00
Jonah Graham
67c048d5cc Cosmetics.
Change-Id: I130139bc6f3f711976f988b150400f822f23bea8
2021-02-28 07:41:29 -05:00
Fabrizio Iannetti
3b680c8d8e Bug 570775: Add pop-up action to invert terminal colors on the fly
New action to temporarily invert the terminal colors,
the preference setting is not altered by this action.
Only the active terminal is affected.

Change-Id: Idc01163838539c2ba5699556951c1742bbf07ad6
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2021-01-30 12:08:50 -05:00
Fabrizio Iannetti
dabe283c27 Bug 570588: Some Private CSI sequences are not correctly interpreted
CSI commands should be recognised as private if the first
character is one of <=>? and not only ?

Change-Id: Idca36ba4dc6bb1bcb3d10f921b2315876769ea5b
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
2021-01-23 15:19:54 -05:00
Jonah Graham
c248620053 [releng] Increment feature and related versions to 10.2.0
Change-Id: Icd135a588920fa25fd846dc285db5f83e5ac7037
2020-12-19 12:11:25 -05:00
Simeon Andreev
bddeeeac3b Bug 568923 - add activity for TM terminal main toolbar button
This change adds an extra activity for the TM terminal main toolbar
contribution. This allows applications to disable the contribution
without disabling the rest of TM terminal functionality.

With this change, disabling of the TM terminal main toolbar button can
be done with a product customization file containing the line:

org.eclipse.ui.workbench/UIActivities.org.eclipse.tm.terminal.view.ui.activity.maintoolbar=false

The product customization file is specified to Eclipse arguments:

-pluginCustomization /some/path/plugin_customization.ini

Change-Id: Id1c34616f4f2a0ac77edbfe201c1db095f9ce7b8
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2020-11-24 12:27:35 +01:00
Jonah Graham
7a106097e0 Bug 568856: Upgrade BREE to Java 11
Change-Id: I7422fabff409ec4bab5379350dc9bf67b84a07c0
2020-11-16 10:27:05 -05:00
Jonah Graham
a1201a811a Bug 567810: Squash over zealous warning from PDE
See also Bug 558477

Change-Id: I0765a2a49dc77e2f24af787b0f9a1e0e1e510a30
2020-10-12 10:14:26 -04:00
Marc-Andre Laperle
fa270ed30a [releng] Update plug-in versions
Version changes are all to refect non-API changes (micro version)

Change-Id: I372aa2671a4c7f5c765a42156d3f639b8eaff680
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-06 16:20:18 -04:00
Jonah Graham
24639efcee [releng] Bump version to 10.1.0
Change-Id: I39f7c379c0b43c086a25b047b3af564f6f24d670
2020-10-06 16:20:18 -04:00
Alexander Kurtakov
de70eaa5c5 Bug 567455 - Stop using the
IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS

Change-Id: I6ee225298d68d68c65cfe6c55e662107055a4238
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-09-29 19:15:14 +03:00
Jonah Graham
e2b94a324f Bug 566732: Connect selection preference page to terminal
Bug 549697 introduced the new UI for setting colors, but the
selection color (while added to the pref page) was never
connected to the code.

Change-Id: I9934efe595efe141a14f0bca3bdf355f436d907d
2020-09-07 09:50:43 -04:00
Jonah Graham
88b2322c38 Bug 551817: Fix legal docs - and automate their checks
Change-Id: I6f97927f0df64a28e71a2d7ab4c55b609794f751
2020-08-30 23:15:59 -04:00
Jonah Graham
0cb1f7482a Bug 566511: [releng] Add missing UTF-8 encoding for all CDT projects
Includes updates to code cleanliness script

Change-Id: Ic495124285e3e002993f34dc12be5ad7337fe13b
2020-08-30 20:02:41 -04:00
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
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
Jonah Graham
fd9382d8a9 Bug 562494: Update BREE to Java 11
Change-Id: I0c91aafc0cb1b179936acbd4c9df2d961899e3fa
2020-08-24 17:50:56 -04:00