Author: scabanovich
Date: 2009-06-16 10:51:13 -0400 (Tue, 16 Jun 2009)
New Revision: 15993
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4465
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java 2009-06-16
14:08:25 UTC (rev 15992)
+++
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/objecteditor/XTable.java 2009-06-16
14:51:13 UTC (rev 15993)
@@ -193,14 +193,12 @@
Color color = provider.getColor(i);
if(color != null) item.setForeground(color);
}
- for (int i = table.getItemCount() - 1; i >= provider.getRowCount() ; i--) {
- item = table.getItem(i);
- try {
- item.dispose();
- } catch (SWTException e) {
- ModelUIPlugin.getPluginLog().logError(e);
- }
+ if(table.getTopIndex() > provider.getRowCount()) {
+ int ti = provider.getRowCount() - 20;
+ if(ti < 0) ti = 0;
+ table.setTopIndex(ti);
}
+ table.remove(provider.getRowCount(), table.getItemCount()- 1);
if(r >= 0) try {
table.setSelection(r);
} catch (SWTException e) {