Skip to content

Commit 8ae10f9

Browse files
committed
Don't use UpdatingTableColumnLayout
- It seems thet table.getParent().layout() does the trick
1 parent de701e5 commit 8ae10f9

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/views/branches/BranchesTableViewer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
import com.archimatetool.editor.ui.ColorFactory;
3131
import com.archimatetool.editor.ui.FontFactory;
32-
import com.archimatetool.editor.ui.components.UpdatingTableColumnLayout;
3332

3433

3534
/**
@@ -89,7 +88,7 @@ public void doSetInput(IArchiRepository archiRepo) {
8988
setInput(archiRepo);
9089

9190
// Do the Layout kludge
92-
((UpdatingTableColumnLayout)getTable().getParent().getLayout()).doRelayout();
91+
getTable().getParent().layout();
9392

9493
// Select first row
9594
//Object element = getElementAt(0);

org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/views/branches/BranchesView.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.eclipse.jface.action.IToolBarManager;
2626
import org.eclipse.jface.action.MenuManager;
2727
import org.eclipse.jface.action.Separator;
28+
import org.eclipse.jface.layout.TableColumnLayout;
2829
import org.eclipse.jface.viewers.ISelection;
2930
import org.eclipse.jface.viewers.IStructuredSelection;
3031
import org.eclipse.swt.SWT;
@@ -39,7 +40,6 @@
3940
import org.eclipse.ui.PlatformUI;
4041
import org.eclipse.ui.part.ViewPart;
4142

42-
import com.archimatetool.editor.ui.components.UpdatingTableColumnLayout;
4343
import com.archimatetool.model.IArchimateModel;
4444

4545

@@ -111,7 +111,7 @@ private void createInfoSection(Composite parent) {
111111

112112
private void createTableSection(Composite parent) {
113113
Composite tableComp = new Composite(parent, SWT.NONE);
114-
tableComp.setLayout(new UpdatingTableColumnLayout(tableComp));
114+
tableComp.setLayout(new TableColumnLayout());
115115

116116
// This ensures a minumum and equal size and no horizontal size creep for the table
117117
GridData gd = new GridData(GridData.FILL_BOTH);

org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/views/history/HistoryTableViewer.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
import org.eclipse.swt.SWT;
3434
import org.eclipse.swt.graphics.Image;
3535
import org.eclipse.swt.widgets.Composite;
36-
37-
import com.archimatetool.editor.ui.components.UpdatingTableColumnLayout;
36+
import org.eclipse.swt.widgets.Display;
3837

3938

4039
/**
@@ -102,8 +101,7 @@ public void doSetInput(IArchiRepository archiRepo) {
102101

103102
setInput(archiRepo);
104103

105-
// Do the Layout kludge
106-
((UpdatingTableColumnLayout)getTable().getParent().getLayout()).doRelayout();
104+
Display.getCurrent().asyncExec(() -> getTable().getParent().layout()); // avoid bogus horizontal scrollbar cheese
107105

108106
// Select first row
109107
//Object element = getElementAt(0);
@@ -120,9 +118,6 @@ public void setSelectedBranch(BranchInfo branchInfo) {
120118
fSelectedBranch = branchInfo;
121119

122120
setInput(getInput());
123-
124-
// Layout kludge
125-
((UpdatingTableColumnLayout)getTable().getParent().getLayout()).doRelayout();
126121
}
127122

128123
// ===============================================================================================

org.archicontribs.modelrepository/src/org/archicontribs/modelrepository/views/history/HistoryView.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.eclipse.jface.action.IToolBarManager;
2525
import org.eclipse.jface.action.MenuManager;
2626
import org.eclipse.jface.action.Separator;
27+
import org.eclipse.jface.layout.TableColumnLayout;
2728
import org.eclipse.jface.viewers.ISelection;
2829
import org.eclipse.jface.viewers.ISelectionChangedListener;
2930
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -43,7 +44,6 @@
4344
import org.eclipse.ui.PlatformUI;
4445
import org.eclipse.ui.part.ViewPart;
4546

46-
import com.archimatetool.editor.ui.components.UpdatingTableColumnLayout;
4747
import com.archimatetool.model.IArchimateModel;
4848

4949

@@ -151,7 +151,7 @@ private void createHistorySection(Composite parent) {
151151
tableSash.setLayoutData(new GridData(GridData.FILL_BOTH));
152152

153153
Composite tableComp = new Composite(tableSash, SWT.NONE);
154-
tableComp.setLayout(new UpdatingTableColumnLayout(tableComp));
154+
tableComp.setLayout(new TableColumnLayout());
155155

156156
// This ensures a minumum and equal size and no horizontal size creep for the table
157157
GridData gd = new GridData(GridData.FILL_BOTH);

0 commit comments

Comments
 (0)