Open TorstenU opened 1 year ago
@TorstenU
I have tried your snippet on Mac. Inspite of rectifying some issues related to the snippet, I am still not able to run the snippet. Can you share a snippet without errors which reproduces the issue.
Sorry for buggy code, the web formatting has dropped some characters. Attached You find an Eclipse Project created on 2023-03-R (win) with a simple RCP with one view. Hope this helps. issue532.zip
@TorstenU Can you give us the indetail instructions on how to run this please.
Hi @deepika-u,
with best regards Torsten
@TorstenU
I am checking the same on windows 11. Thanks for the quick detailed steps.
When right click on plugin.xml and run it as "Eclipse Application", I am getting the below popup
=>
(Irrespective of 1st or 2nd selection)i selected the 1st one and say "Continue", I get the below console output and one new window opens up
Framework arguments: -application Issue532.application Command-line arguments: -application Issue532.application -data C:\e\swt/../runtime-Issue532.application -dev file:C:/e/swt/.metadata/.plugins/org.eclipse.pde.core/Issue532.application/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog
!ENTRY org.eclipse.swt.tools 4 0 2023-04-05 17:36:41.536 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.eclipse.swt.tools [72] Unresolved requirement: Require-Bundle: org.eclipse.jdt.core; bundle-version="3.4.0"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1852)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1845)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1786)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1750)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1672)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Please let me know your comment on my observation.
Hi @deepika-u, I don't know the reason, why some dependencies are missing, but nevertheless ignoring that will reproduce the reported problem. Your screenshot exactly shows the problem. With best regards Torsten
@TorstenU
Just tried this out in Mac OS with the zip file provided.The issue is seen in Mac OS as well. The selection works completely fine until any scrolling is done using the scroll bar.
The picture below shows before scrolling. The actual selected lines are the ones that are getting highlighted.
The picture below shows after scrolling down a little to the bottom. Here I tried to select the green portion but highlighting appeared somewhere below.The lines that I selected are not the ones that are getting highlighted.
Describe the bug If a ScrolledFormText is scrolled vertically and text is selected using the mouse, the selection foreground and background colors are not applied as expected. The selection itself is correct only the visual feedback seems to be wrong.
To Reproduce `import org.eclipse.swt.; import org.eclipse.swt.graphics.; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.*; import org.eclipse.ui.forms.widgets.ScrolledFormText;
import com.sqlag.tc.manager.util.AbstractPart;
public class Snippet26 {
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setText("Snippet 26");
shell.setLayout( new GridLayout( 1, false ) );
ScrolledFormText formText = new ScrolledFormText( shell, SWT.H_SCROLL | SWT.V_SCROLL, true ); formText.setText( text );
// get preferred size of the content Point size = formText.getFormText().computeSize( SWT.DEFAULT, SWT.DEFAULT );
// limit size of scrolled control to max 600x500 GridData gdata = new GridData( SWT.FILL, SWT.FILL, true, true ); gdata.widthHint = Math.min( size.x, 600 ); gdata.heightHint = Math.min( size.y, 500 ); formText.setLayoutData( gdata );
shell.pack (); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); }
static String text = "
"; }`Expected behavior The selection colors must be applied at the correct location (as if they are if not scrolled).
Screenshots![screen](https://user-images.githubusercontent.com/95748470/213420307-5e565779-45c2-40ce-9796-3747eb6100aa.png)
Environment:
Select the platform(s) on which the behavior is seen:
Additional OS info (e.g. OS version, Linux Desktop, etc) Windows 10, Linux Ubuntu 22.04
JRE/JDK version Eclipse Adoptium 11
Version since Eclipse 2020-06