Fixes cases that cause stack trace like this when opening terminal
connection dialog and selecting ssh type:
```java
!ENTRY org.eclipse.ui.ide 4 4 2023-04-13 15:57:20.632
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
at org.eclipse.swt.graphics.Image.<init>(Image.java:605)
at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:300)
at org.eclipse.jface.resource.DeferredImageDescriptor.createImage(DeferredImageDescriptor.java:85)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:290)
at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:268)
at org.eclipse.tm.terminal.view.ui.panels.AbstractExtendedConfigurationPanel.createHostsUI(AbstractExtendedConfigurationPanel.java:400)
at org.eclipse.tm.terminal.connector.ssh.controls.SshWizardConfigurationPanel.setupPanel(SshWizardConfigurationPanel.java:79)
at org.eclipse.tm.terminal.view.ui.internal.dialogs.LaunchTerminalSettingsDialog$SettingsPanelControl.showConfigurationPanel(LaunchTerminalSettingsDialog.java:124)
at org.eclipse.tm.terminal.view.ui.internal.dialogs.LaunchTerminalSettingsDialog$1.widgetSelected(LaunchTerminalSettingsDialog.java:317)
```
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.
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
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
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
This change should have been done when o.e.remote was added to
CDT but was overlooked until the target platform was updated
to remote old o.e.remote from it.
Change-Id: Ia4238b5b85b42aa32adeeaad23b6f135919652fe
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
Newer Tycho has a new feature that adds an extra header (Bundle-License)
to every plug-in. This commit includes omitting this new feature
rather than bumping every single version of every bundle in CDT.
See https://www.eclipse.org/tycho/sitedocs/tycho-packaging-plugin/package-plugin-mojo.html#deriveHeaderFromProject
Bundles have version bumps due to newer Tycho including newer
JDT compiler which leads to classfile differences.
Change-Id: Id536d75a92a30582418324e27d74008869f7dd3a
If the return code is non-zero wsl may have failed in someway, with
recent changes in Windows, wsl.exe is present even when wsl is not
installed. In that case wsl.exe is a dummy that can be used to install
wsl.
Change-Id: I83af60623084e1364d16c3a1739bc4f6a25ac3a9
There is no need to spawn the WSL detect job for other platforms than
Windows.
Contributed by STMicroelectronics
Change-Id: I85256a9f6a4f5e9e9276458ba67e2f6adf02afa7
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
In certain scenarios, the WSL detect job is not launched directly. As
the join() method returns early for suspended jobs, the result list is
read too early and causing NPE.
This was deteced while running the JUnit tests.
Contributed by STMicroelectronics
Change-Id: I8a013cf83be26e8f8bee38fd2e7a4557eb1a57ab
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
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
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
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
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
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
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
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
These imports are only used for Javadocs, which is why it was sort
of ok that they were missing until now.
Change-Id: Ia941ca55c56a101766b709290b40609c20fdda9d
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
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>