| Summary: | [Big Sur] in Swt widget table indexed based remove is not working in Big Sur Os | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | shireesha k <shireesha> |
| Component: | SWT | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | daniel, lshanmug, sravankumarl |
| Version: | 4.18 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 565691 | ||
|
Description
shireesha k
Can you please provide a snippet to reproduce the problem? (In reply to Lakshmi P Shanmugam from comment #1) > Can you please provide a snippet to reproduce the problem? Please find the following base code.this is just example . Steps to reproduce: 1.Run the code you will get Ui . 2.select any of the column and click add button. 3.you will be able to see the list in last table. 4.like this add multiple items to the added list. 5.From added list select any item click on remove. u can see that still that item will be exist on added list. same way you can click on remove all. sorry im using 3.115.0 version of swt. this is how added in xml <dependencies> <dependency> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.cocoa.macosx.x86_64</artifactId> <version>3.115.0</version> <exclusions> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.gtk.linux.aarch64</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.gtk.linux.arm</artifactId> </exclusion> </exclusions> </dependency> import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; public class SWTSnippet { static Shell s; static Table multiSelectTable; Table t; private static String selectedItem; public static void main(String[] argv) { Display d = new Display(); s = new Shell(d ); s.setSize(250, 200); s.setText("A Table Shell Example"); s.setLayout(new FillLayout()); Table t = new Table(s, SWT.BORDER); TableColumn tc1 = new TableColumn(t, SWT.CENTER); tc1.setText("First Name"); tc1.setWidth(70); t.setHeaderVisible(true); TableItem item1 = new TableItem(t, SWT.NONE); item1.setText(new String[] { "Tim" }); TableItem item2 = new TableItem(t, SWT.NONE); item2.setText(new String[] { "Caitlyn"}); TableItem item3 = new TableItem(t, SWT.NONE); item3.setText(new String[] { "Reese"}); t.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { TableItem item = t.getItem(t.getSelectionIndex()); selectedItem = item.getText(); } }); t.addMouseListener(new MouseListener() { @Override public void mouseDown(MouseEvent arg0) { // Do Nothing, Override Method if (t.getSelectionIndex() != -1) { TableItem item = t.getItem(t.getSelectionIndex()); selectedItem = item.getText(); } } @Override public void mouseUp(MouseEvent arg0) { // Do Nothing, Override Method } @Override public void mouseDoubleClick(MouseEvent event) { } }); GridData saveGridData = new GridData(); saveGridData.horizontalAlignment = GridData.CENTER; saveGridData.widthHint = 120; GridData contactGroupGridData = new GridData(GridData.FILL_HORIZONTAL); contactGroupGridData.horizontalSpan = 1; Button btnForAdd = new Button(s, SWT.PUSH | SWT.CENTER); btnForAdd.setText("ADD"); btnForAdd.pack(); btnForAdd.setLayoutData(saveGridData); btnForAdd.setAlignment(SWT.CENTER); btnForAdd.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { addRestoreItems(); } }); Button btnForRemove = new Button(s, SWT.PUSH | SWT.CENTER); btnForRemove.setText("REMOVE"); btnForRemove.pack(); btnForRemove.setLayoutData(saveGridData); btnForRemove.setAlignment(SWT.CENTER); btnForRemove.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (multiSelectTable.getSelectionIndex() != -1) { removeRestoreItems(); } } }); Button btnRemoveAll = new Button(s, SWT.PUSH | SWT.CENTER); btnRemoveAll.setText("REMOVE_ALL"); btnRemoveAll.pack(); btnRemoveAll.setLayoutData(saveGridData); btnRemoveAll.setAlignment(SWT.CENTER); btnRemoveAll.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { multiSelectTable.removeAll(); } }); multiSelectTable = new Table(s, SWT.BORDER); TableColumn tc11 = new TableColumn(multiSelectTable, SWT.CENTER); tc11.setText("Added List"); tc11.setWidth(70); multiSelectTable.setHeaderVisible(true); s.open(); while (!s.isDisposed()) { if (!d.readAndDispatch()) d.sleep(); } d.dispose(); } private static void addRestoreItems() { TableItem tableItem; tableItem = new TableItem(multiSelectTable, SWT.NONE); tableItem.setText(0, selectedItem); // tableItem.setData("........"); } private static void removeRestoreItems() { multiSelectTable.remove(multiSelectTable.getSelectionIndex()); } } It's not reproducible with the latest milestone build - https://download.eclipse.org/eclipse/downloads/drops4/S-4.18M3-202011190730/ Looks like a refresh issue fixed by Bug 567132 changes. I am still experiencing the same problems as reported. Even with the eclipse version you have linked. I tried to code provided by shireesha k and when I delete an entry the table is not refreshed. (I am also on Big Sur) (In reply to Lakshmi P Shanmugam from comment #3) > It's not reproducible with the latest milestone build - > https://download.eclipse.org/eclipse/downloads/drops4/S-4.18M3-202011190730/ > > Looks like a refresh issue fixed by Bug 567132 changes. I'm not understanding what is the solution. if this bug is fixed can you please tell me the swt version.I'm using 3.115.0 version of swt. this is my dependencies which i have used for swt, please check this still I'm able to see this issue on big sur <dependency> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.cocoa.macosx.x86_64</artifactId> <version>3.115.0</version> <exclusions> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.gtk.linux.aarch64</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt</artifactId> </exclusion> <exclusion> <groupId>org.eclipse.platform</groupId> <artifactId>org.eclipse.swt.gtk.linux.arm</artifactId> </exclusion> </exclusions> </dependency> (In reply to shireesha k from comment #5) > (In reply to Lakshmi P Shanmugam from comment #3) > > It's not reproducible with the latest milestone build - > > https://download.eclipse.org/eclipse/downloads/drops4/S-4.18M3-202011190730/ > > > > Looks like a refresh issue fixed by Bug 567132 changes. > > I'm not understanding what is the solution. > > if this bug is fixed can you please tell me the swt version.I'm using > 3.115.0 version of swt. > Please try SWT version 3.115.100. (In reply to Lakshmi P Shanmugam from comment #6) > (In reply to shireesha k from comment #5) > > (In reply to Lakshmi P Shanmugam from comment #3) > > > It's not reproducible with the latest milestone build - > > > https://download.eclipse.org/eclipse/downloads/drops4/S-4.18M3-202011190730/ > > > > > > Looks like a refresh issue fixed by Bug 567132 changes. > > > > I'm not understanding what is the solution. > > > > if this bug is fixed can you please tell me the swt version.I'm using > > 3.115.0 version of swt. > > > Please try SWT version 3.115.100. I couldn't find SWT jar version 3.115.100. can you please send me the link where i can get maven dependencies for SWT jar version 3.115.100 (In reply to shireesha k from comment #7) > > I couldn't find SWT jar version 3.115.100. > > can you please send me the link where i can get maven dependencies for SWT > jar version 3.115.100 The maven dependencies with version 3.115.100 will be available on Maven central when 4.18 is released (December 16). Meanwhile, you can test your snippet with the Eclipse M3 or RC1 builds - https://download.eclipse.org/eclipse/downloads/drops4/S-4.18RC1-202011251800/ This is a refresh issue I am able to reproduce the issue with 4.17 eclipse and this problem is not reproducible in 4.18 I-build I20201130-1800 > The maven dependencies with version 3.115.100 will be available on Maven > central when 4.18 is released (December 16). > Meanwhile, you can test your snippet with the Eclipse M3 or RC1 builds - > https://download.eclipse.org/eclipse/downloads/drops4/S-4.18RC1-202011251800/ Thanks for testing, Sravan. @Shireesha, Please reopen if problem still happens for you after testing with the above fixed versions. *** This bug has been marked as a duplicate of bug 567132 *** |