summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2009-02-09 18:15:12 +0000
committerSilenio Quarti <silenio>2009-02-09 18:15:12 +0000
commit0adc472ebbbbd8348d157250af92fb091d48102f (patch)
tree37105b8fcc7abb191e8924d0fe734f7d3522f2f9
parent1e84b1898a8ca7226d168bcdae8533355c450ab5 (diff)
downloadeclipse.platform.swt-0adc472ebbbbd8348d157250af92fb091d48102f.tar.gz
eclipse.platform.swt-0adc472ebbbbd8348d157250af92fb091d48102f.tar.xz
eclipse.platform.swt-0adc472ebbbbd8348d157250af92fb091d48102f.zip
code assist in debug variables view does not show text
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java15
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java34
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java38
4 files changed, 48 insertions, 47 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index 1592ed914b..46fcaf31f0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -193,7 +193,11 @@ int calculateWidth (TableItem[] items, int index, GC gc) {
return width;
}
-boolean checkData (TableItem item, boolean redraw) {
+boolean checkData (TableItem item) {
+ return checkData (item, indexOf (item));
+}
+
+boolean checkData (TableItem item, int index) {
if (item.cached) return true;
if ((style & SWT.VIRTUAL) != 0) {
item.cached = true;
@@ -205,9 +209,7 @@ boolean checkData (TableItem item, boolean redraw) {
//widget could be disposed at this point
currentItem = null;
if (isDisposed () || item.isDisposed ()) return false;
- if (redraw) {
- if (!setScrollWidth (item)) item.redraw (-1);
- }
+ if (!setScrollWidth (item)) item.redraw (-1);
}
return true;
}
@@ -2667,8 +2669,9 @@ void tableView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*lon
}
int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
- TableItem item = _getItem ((int)/*64*/rowIndex);
- checkData (item, false);
+ int index = (int)/*64*/rowIndex;
+ TableItem item = _getItem (index);
+ checkData (item, index);
if (checkColumn != null && aTableColumn == checkColumn.id) {
NSNumber value;
if (item.checked && item.grayed) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java
index 759961401b..1dab2c24a3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java
@@ -242,7 +242,7 @@ void destroyWidget () {
*/
public Color getBackground () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return background != null ? background : parent.getBackground ();
}
@@ -261,7 +261,7 @@ public Color getBackground () {
*/
public Color getBackground (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getBackground ();
if (cellBackground == null || cellBackground [index] == null) return getBackground ();
@@ -283,7 +283,7 @@ public Color getBackground (int index) {
*/
public Rectangle getBounds () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
NSTableView tableView = (NSTableView) parent.view;
NSRect rect = tableView.rectOfRow (parent.indexOf (this));
return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
@@ -303,7 +303,7 @@ public Rectangle getBounds () {
*/
public Rectangle getBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
NSTableView tableView = (NSTableView) parent.view;
@@ -331,7 +331,7 @@ public Rectangle getBounds (int index) {
*/
public boolean getChecked () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
return checked;
}
@@ -350,7 +350,7 @@ public boolean getChecked () {
*/
public Font getFont () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return font != null ? font : parent.getFont ();
}
@@ -370,7 +370,7 @@ public Font getFont () {
*/
public Font getFont (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getFont ();
if (cellFont == null || cellFont [index] == null) return getFont ();
@@ -391,7 +391,7 @@ public Font getFont (int index) {
*/
public Color getForeground () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return foreground != null ? foreground : parent.getForeground ();
}
@@ -411,7 +411,7 @@ public Color getForeground () {
*/
public Color getForeground (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getForeground ();
if (cellForeground == null || cellForeground [index] == null) return getForeground ();
@@ -432,14 +432,14 @@ public Color getForeground (int index) {
*/
public boolean getGrayed () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
return grayed;
}
public Image getImage () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return super.getImage ();
}
@@ -457,7 +457,7 @@ public Image getImage () {
*/
public Image getImage (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getImage ();
if (images != null) {
if (0 <= index && index < images.length) return images [index];
@@ -481,7 +481,7 @@ public Image getImage (int index) {
*/
public Rectangle getImageBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
NSTableView tableView = (NSTableView) parent.view;
@@ -510,7 +510,7 @@ public Rectangle getImageBounds (int index) {
*/
public int getImageIndent () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return 0;
}
@@ -538,7 +538,7 @@ public Table getParent () {
public String getText () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return super.getText ();
}
@@ -556,7 +556,7 @@ public String getText () {
*/
public String getText (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getText ();
if (strings != null) {
if (0 <= index && index < strings.length) {
@@ -585,7 +585,7 @@ public String getText (int index) {
*/
public Rectangle getTextBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
NSTableView tableView = (NSTableView) parent.view;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index 4e6550d1f0..f639836026 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -245,7 +245,7 @@ int calculateWidth (TreeItem[] items, int index, GC gc, boolean recurse) {
return width;
}
-boolean checkData (TreeItem item, boolean redraw) {
+boolean checkData (TreeItem item) {
if (item.cached) return true;
if ((style & SWT.VIRTUAL) != 0) {
item.cached = true;
@@ -258,9 +258,7 @@ boolean checkData (TreeItem item, boolean redraw) {
//widget could be disposed at this point
ignoreRedraw = false;
if (isDisposed () || item.isDisposed ()) return false;
- if (redraw) {
- if (!setScrollWidth (item)) item.redraw (-1);
- }
+ if (!setScrollWidth (item)) item.redraw (-1);
}
return true;
}
@@ -1620,7 +1618,7 @@ void outlineView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*l
int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) {
TreeItem item = (TreeItem) display.getWidget (itemID);
- checkData (item, false);
+ checkData (item);
if (checkColumn != null && tableColumn == checkColumn.id) {
NSNumber value;
if (item.checked && item.grayed) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
index d271083ad2..6f2727ce56 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
@@ -425,7 +425,7 @@ void destroyWidget () {
*/
public Color getBackground () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return background != null ? background : parent.getBackground ();
}
@@ -444,7 +444,7 @@ public Color getBackground () {
*/
public Color getBackground (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getBackground ();
if (cellBackground == null || cellBackground [index] == null) return getBackground ();
@@ -464,7 +464,7 @@ public Color getBackground (int index) {
*/
public Rectangle getBounds () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
parent.checkItems ();
NSOutlineView outlineView = (NSOutlineView) parent.view;
NSRect rect = outlineView.rectOfRow (outlineView.rowForItem (handle));
@@ -487,7 +487,7 @@ public Rectangle getBounds () {
*/
public Rectangle getBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
parent.checkItems ();
@@ -517,7 +517,7 @@ public Rectangle getBounds (int index) {
*/
public boolean getChecked () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
return checked;
}
@@ -553,7 +553,7 @@ public boolean getExpanded () {
*/
public Font getFont () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return font != null ? font : parent.getFont ();
}
@@ -573,7 +573,7 @@ public Font getFont () {
*/
public Font getFont (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getFont ();
if (cellFont == null || cellFont [index] == null) return getFont ();
@@ -595,7 +595,7 @@ public Font getFont (int index) {
*/
public Color getForeground () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return foreground != null ? foreground : parent.getForeground ();
}
@@ -615,7 +615,7 @@ public Color getForeground () {
*/
public Color getForeground (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count -1) return getForeground ();
if (cellForeground == null || cellForeground [index] == null) return getForeground ();
@@ -637,14 +637,14 @@ public Color getForeground (int index) {
*/
public boolean getGrayed () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
return grayed;
}
public Image getImage () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return super.getImage ();
}
@@ -664,7 +664,7 @@ public Image getImage () {
*/
public Image getImage (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getImage ();
if (images != null) {
if (0 <= index && index < images.length) return images [index];
@@ -689,7 +689,7 @@ public Image getImage (int index) {
*/
public Rectangle getImageBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
parent.checkItems ();
@@ -727,7 +727,7 @@ public Rectangle getImageBounds (int index) {
public TreeItem getItem (int index) {
checkWidget ();
if (index < 0) error (SWT.ERROR_INVALID_RANGE);
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index >= itemCount) error (SWT.ERROR_INVALID_RANGE);
return parent._getItem (this, index, true);
}
@@ -745,7 +745,7 @@ public TreeItem getItem (int index) {
*/
public int getItemCount () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return itemCount;
}
@@ -767,7 +767,7 @@ public int getItemCount () {
*/
public TreeItem [] getItems () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
TreeItem [] result = new TreeItem [itemCount];
for (int i=0; i<itemCount; i++) {
result [i] = parent._getItem (this, i, true);
@@ -816,7 +816,7 @@ public TreeItem getParentItem () {
public String getText () {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
return super.getText ();
}
@@ -836,7 +836,7 @@ public String getText () {
*/
public String getText (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getText ();
if (strings != null) {
if (0 <= index && index < strings.length) {
@@ -864,7 +864,7 @@ public String getText (int index) {
*/
public Rectangle getTextBounds (int index) {
checkWidget ();
- if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
+ if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if (!(0 <= index && index < Math.max (1, parent.columnCount))) return new Rectangle (0, 0, 0, 0);
parent.checkItems ();