summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdan Gheorghe <gheorghe@ca.ibm.com>2012-04-16 13:53:16 -0400
committerBogdan Gheorghe <gheorghe@ca.ibm.com>2012-04-16 13:53:16 -0400
commit73e2afa450446525852491565c5efa3c5c4214ce (patch)
tree8dfaa5d79f9cb98ee53e9d48ea6008131630e770
parentc544b70c0083cf5c094cf4fc8b7ba7f940bb71b0 (diff)
downloadeclipse.platform.swt-73e2afa450446525852491565c5efa3c5c4214ce.tar.gz
eclipse.platform.swt-73e2afa450446525852491565c5efa3c5c4214ce.tar.xz
eclipse.platform.swt-73e2afa450446525852491565c5efa3c5c4214ce.zip
Bug 376826 Text#removeSegmentListener inconsistent with other code
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java2
38 files changed, 125 insertions, 125 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
index 56af838495..0c73f60583 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
@@ -168,7 +168,7 @@ public RGB open() {
}
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
int /*long*/ jniRef = OS.NewGlobalRef(this);
- if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
rgb = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index 3b3685417a..48f170723e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -1866,7 +1866,7 @@ NSBezierPath getPath(Region region) {
NSBezierPath getPath(int /*long*/ region) {
Callback callback = new Callback(this, "regionToRects", 4);
- if (callback.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ if (callback.getAddress() == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
NSBezierPath path = NSBezierPath.bezierPath();
path.retain();
OS.QDRegionToRects(region, OS.kQDParseRegionFromTopLeft, callback.getAddress(), path.id);
@@ -3447,7 +3447,7 @@ void setBackground () {
public void setBackground (Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
float /*double*/ [] background = color != null ? color.handle : null;
if (equals (background, this.background)) return;
@@ -3480,7 +3480,7 @@ public void setBackground (Color color) {
*/
public void setBackgroundImage (Image image) {
checkWidget();
- if (image != null && image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if (image == backgroundImage) return;
backgroundImage = image;
updateBackgroundImage();
@@ -3728,7 +3728,7 @@ public boolean setFocus () {
public void setFont (Font font) {
checkWidget();
if (font != null) {
- if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (font.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
this.font = font;
setFont (font != null ? font.handle : defaultFont().handle);
@@ -3760,7 +3760,7 @@ void setFont (NSFont font) {
public void setForeground (Color color) {
checkWidget();
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
}
float /*double*/ [] foreground = color != null ? color.handle : null;
if (equals (foreground, this.foreground)) return;
@@ -3883,7 +3883,7 @@ public void setLocation (Point location) {
public void setMenu (Menu menu) {
checkWidget();
if (menu != null) {
- if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (menu.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((menu.style & SWT.POP_UP) == 0) {
error (SWT.ERROR_MENU_NOT_POP_UP);
}
@@ -3932,7 +3932,7 @@ public void setOrientation (int orientation) {
public boolean setParent (Composite parent) {
checkWidget();
if (parent == null) error (SWT.ERROR_NULL_ARGUMENT);
- if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (parent.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if (this.parent == parent) return true;
if (!isReparentable ()) return false;
releaseParent ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index aaa56decf5..fdb541c106 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -2980,7 +2980,7 @@ void initFonts () {
* @noreference This method is not intended to be referenced by clients.
*/
public int /*long*/ internal_new_GC (GCData data) {
- if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
+ if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
if (screenWindow == null) {
NSWindow window = (NSWindow) new NSWindow ().alloc ();
NSRect rect = new NSRect();
@@ -3023,7 +3023,7 @@ public int /*long*/ internal_new_GC (GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
- if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
+ if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
}
boolean isBundled () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
index 6f495953d2..4ea031b11c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
@@ -228,7 +228,7 @@ public String open () {
if (filterExtensions != null && filterExtensions.length != 0) {
delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
jniRef = OS.NewGlobalRef(this);
- if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
NSPopUpButton widget = (NSPopUpButton)new NSPopUpButton().alloc();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
index f408589761..b71a193269 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
@@ -164,7 +164,7 @@ public FontData open () {
panel.setPanelFont(font.handle, false);
SWTPanelDelegate delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
int /*long*/ jniRef = OS.NewGlobalRef(this);
- if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
panel.setDelegate(delegate);
fontData = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
index 462e01071a..bae736816b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
@@ -212,7 +212,7 @@ public int open () {
if ((style & SWT.SHEET) != 0) {
delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
jniRef = OS.NewGlobalRef(this);
- if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (jniRef == 0) error(SWT.ERROR_NO_HANDLES);
OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
alert.beginSheetModalForWindow(parent.view.window (), delegate, OS.sel_panelDidEnd_returnCode_contextInfo_, 0);
display.setModalDialog(this);
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 8e8ffcdc4d..eefaff8501 100644
--- 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
@@ -695,7 +695,7 @@ void releaseWidget () {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Color oldColor = background;
if (oldColor == color) return;
@@ -726,7 +726,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
@@ -782,7 +782,7 @@ public void setChecked (boolean checked) {
public void setFont (Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -815,7 +815,7 @@ public void setFont (Font font) {
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
@@ -852,7 +852,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Color oldColor = foreground;
if (oldColor == color) return;
@@ -883,7 +883,7 @@ public void setForeground (Color color) {
public void setForeground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java
index 6c3af051eb..1a0ba011cc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java
@@ -238,7 +238,7 @@ void releaseWidget () {
public void setMenu (Menu menu) {
checkWidget ();
if (menu != null) {
- if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (menu.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((menu.style & SWT.POP_UP) == 0) {
error (SWT.ERROR_MENU_NOT_POP_UP);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index 5bb6fff95b..6f3dd94b05 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -1466,7 +1466,7 @@ public void removeModifyListener (ModifyListener listener) {
public void removeSegmentListener (SegmentListener listener) {
checkWidget ();
- if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
eventTable.unhook (SWT.Segments, listener);
}
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 826b3669fe..6b3d8be986 100644
--- 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
@@ -337,7 +337,7 @@ public void clear (int index, boolean all) {
checkWidget ();
int count = getItemCount ();
if (index < 0 || index >= count)
- SWT.error (SWT.ERROR_INVALID_RANGE);
+ error (SWT.ERROR_INVALID_RANGE);
parent.clear (this, index, all);
}
@@ -1054,7 +1054,7 @@ void sendExpand (boolean expand, boolean recurse) {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Color oldColor = background;
if (oldColor == color) return;
@@ -1086,7 +1086,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
@@ -1174,7 +1174,7 @@ public void setExpanded (boolean expanded) {
public void setFont (Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -1207,7 +1207,7 @@ public void setFont (Font font) {
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
@@ -1245,7 +1245,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Color oldColor = foreground;
if (oldColor == color) return;
@@ -1277,7 +1277,7 @@ public void setForeground (Color color) {
public void setForeground (int index, Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.columnCount);
if (0 > index || index > count - 1) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
index ddb8b1c687..d78ce6ff55 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java
@@ -100,7 +100,7 @@ boolean drawCaret () {
int /*long*/ window = parent.paintWindow ();
if (OS.USE_CAIRO) {
int /*long*/ cairo = OS.gdk_cairo_create(window);
- if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (cairo == 0) error(SWT.ERROR_NO_HANDLES);
Cairo.cairo_set_source_rgb(cairo, 1, 1, 1);
Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_DIFFERENCE);
if (image != null && !image.isDisposed() && image.mask == 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 19189adbe5..561dfa3a59 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -269,10 +269,10 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
int /*long*/ hadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
if (hadj == 0) error (SWT.ERROR_NO_HANDLES);
scrolledHandle = OS.gtk_scrolled_window_new (hadj, vadj);
- if (scrolledHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
}
handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_fixed_set_has_window (handle, true);
OS.GTK_WIDGET_SET_FLAGS(handle, OS.GTK_CAN_FOCUS);
if ((style & SWT.EMBEDDED) == 0) {
@@ -305,7 +305,7 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
}
if ((style & SWT.EMBEDDED) != 0) {
socketHandle = OS.gtk_socket_new ();
- if (socketHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (socketHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_container_add (handle, socketHandle);
}
if ((style & SWT.NO_REDRAW_RESIZE) != 0 && (style & SWT.RIGHT_TO_LEFT) == 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index c6f013ead7..2d8e940cd4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -451,13 +451,13 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system());
int /*long*/ xDrawable = OS.GDK_PIXMAP_XID(real_drawable [0]);
int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width [0], height [0]);
- if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (surface == 0) error(SWT.ERROR_NO_HANDLES);
Cairo.cairo_save(cairo);
Cairo.cairo_rectangle(cairo, destX , destY, destWidth, destHeight);
Cairo.cairo_clip(cairo);
Cairo.cairo_translate(cairo, destX, destY);
int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface(surface);
- if (pattern == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (pattern == 0) error(SWT.ERROR_NO_HANDLES);
Cairo.cairo_pattern_set_filter(pattern, Cairo.CAIRO_FILTER_BEST);
Cairo.cairo_set_source(cairo, pattern);
if (gcData.alpha != 0xFF) {
@@ -3224,7 +3224,7 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) {
public int /*long*/ internal_new_GC (GCData data) {
checkWidget ();
int /*long*/ window = paintWindow ();
- if (window == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (window == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ gc;
if (OS.USE_CAIRO) {
gc = OS.gdk_cairo_create (window);
@@ -3721,7 +3721,7 @@ public void setBackground (Color color) {
if (((state & BACKGROUND) == 0) && color == null) return;
GdkColor gdkColor = null;
if (color != null) {
- if (color.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
gdkColor = color.handle;
}
boolean set = false;
@@ -3801,7 +3801,7 @@ void setBackgroundColor (GdkColor color) {
*/
public void setBackgroundImage (Image image) {
checkWidget ();
- if (image != null && image.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (image != null && image.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
if (image == backgroundImage) return;
this.backgroundImage = image;
if (backgroundImage != null) {
@@ -4032,7 +4032,7 @@ public void setFont (Font font) {
if (font == null) {
fontDesc = defaultFont ().handle;
} else {
- if (font.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (font.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
fontDesc = font.handle;
}
if (font == null) {
@@ -4069,7 +4069,7 @@ public void setForeground (Color color) {
if (((state & FOREGROUND) == 0) && color == null) return;
GdkColor gdkColor = null;
if (color != null) {
- if (color.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
gdkColor = color.handle;
}
boolean set = false;
@@ -4206,8 +4206,8 @@ public void setOrientation (int orientation) {
*/
public boolean setParent (Composite parent) {
checkWidget ();
- if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- if (parent.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ if (parent == null) error (SWT.ERROR_NULL_ARGUMENT);
+ if (parent.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (this.parent == parent) return true;
if (!isReparentable ()) return false;
OS.gtk_widget_realize (parent.handle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
index 19fa5cfde1..1b13bef3f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
@@ -231,7 +231,7 @@ Control computeTabRoot () {
void createAccelGroup () {
if (accelGroup != 0) return;
accelGroup = OS.gtk_accel_group_new ();
- if (accelGroup == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (accelGroup == 0) error (SWT.ERROR_NO_HANDLES);
//FIXME - what should we do for Decorations
int /*long*/ shellHandle = topHandle ();
OS.gtk_window_add_accel_group (shellHandle, accelGroup);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index c63d83d26f..7de69b3574 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -927,13 +927,13 @@ void createDisplay (DeviceData data) {
byte [] type_name = Converter.wcsToMbcs (null, "SwtFixed", true); //$NON-NLS-1$
fixedClassInitCallback = new Callback (getClass (), "fixedClassInitProc", 2); //$NON-NLS-1$
fixedClassInitProc = fixedClassInitCallback.getAddress ();
- if (fixedClassInitProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (fixedClassInitProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
fixedMapCallback = new Callback (getClass (), "fixedMapProc", 1); //$NON-NLS-1$
fixedMapProc = fixedMapCallback.getAddress ();
- if (fixedMapProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (fixedMapProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
fixedSizeAllocateCallback = new Callback (getClass (), "fixedSizeAllocateProc", 2); //$NON-NLS-1$
fixedSizeAllocateProc = fixedSizeAllocateCallback.getAddress ();
- if (fixedSizeAllocateProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (fixedSizeAllocateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
GTypeInfo fixed_info = new GTypeInfo ();
fixed_info.class_size = (short) OS.GtkFixedClass_sizeof ();
fixed_info.class_init = fixedClassInitProc;
@@ -945,17 +945,17 @@ void createDisplay (DeviceData data) {
if (rendererClassInitProc == 0) {
rendererClassInitCallback = new Callback (getClass (), "rendererClassInitProc", 2); //$NON-NLS-1$
rendererClassInitProc = rendererClassInitCallback.getAddress ();
- if (rendererClassInitProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (rendererClassInitProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
if (rendererRenderProc == 0) {
rendererRenderCallback = new Callback (getClass (), "rendererRenderProc", 7); //$NON-NLS-1$
rendererRenderProc = rendererRenderCallback.getAddress ();
- if (rendererRenderProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (rendererRenderProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
if (rendererGetSizeProc == 0) {
rendererGetSizeCallback = new Callback (getClass (), "rendererGetSizeProc", 7); //$NON-NLS-1$
rendererGetSizeProc = rendererGetSizeCallback.getAddress ();
- if (rendererGetSizeProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (rendererGetSizeProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
}
if (text_renderer_type == 0) {
GTypeInfo renderer_info = new GTypeInfo ();
@@ -997,13 +997,13 @@ void createDisplay (DeviceData data) {
/* Initialize the hidden shell */
shellHandle = OS.gtk_window_new (OS.GTK_WINDOW_TOPLEVEL);
- if (shellHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (shellHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_widget_realize (shellHandle);
/* Initialize the filter and event callback */
eventCallback = new Callback (this, "eventProc", 2); //$NON-NLS-1$
eventProc = eventCallback.getAddress ();
- if (eventProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (eventProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.gdk_event_handler_set (eventProc, 0, 0);
filterCallback = new Callback (this, "filterProc", 3); //$NON-NLS-1$
filterProc = filterCallback.getAddress ();
@@ -1020,7 +1020,7 @@ void createDisplay (DeviceData data) {
signalCallback = new Callback (this, "signalProc", 3); //$NON-NLS-1$
signalProc = signalCallback.getAddress ();
- if (signalProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (signalProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.gtk_widget_add_events (shellHandle, OS.GDK_PROPERTY_CHANGE_MASK);
OS.g_signal_connect (shellHandle, OS.property_notify_event, signalProc, PROPERTY_NOTIFY);
}
@@ -2179,7 +2179,7 @@ void initializeSystemColors () {
/* Get Tooltip resources */
int /*long*/ tooltipShellHandle = OS.gtk_window_new (OS.GTK_WINDOW_POPUP);
- if (tooltipShellHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (tooltipShellHandle == 0) error (SWT.ERROR_NO_HANDLES);
byte[] gtk_tooltips = Converter.wcsToMbcs (null, "gtk-tooltips", true); //$NON-NLS-1$
OS.gtk_widget_set_name (tooltipShellHandle, gtk_tooltips);
OS.gtk_widget_realize (tooltipShellHandle);
@@ -2428,7 +2428,7 @@ void initializeCallbacks () {
windowCallback2 = new Callback (this, "windowProc", 2); //$NON-NLS-1$
windowProc2 = windowCallback2.getAddress ();
- if (windowProc2 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (windowProc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closures [Widget.ACTIVATE] = OS.g_cclosure_new (windowProc2, Widget.ACTIVATE, 0);
closures [Widget.ACTIVATE_INVERSE] = OS.g_cclosure_new (windowProc2, Widget.ACTIVATE_INVERSE, 0);
@@ -2462,7 +2462,7 @@ void initializeCallbacks () {
windowCallback3 = new Callback (this, "windowProc", 3); //$NON-NLS-1$
windowProc3 = windowCallback3.getAddress ();
- if (windowProc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (windowProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closures [Widget.BUTTON_PRESS_EVENT] = OS.g_cclosure_new (windowProc3, Widget.BUTTON_PRESS_EVENT, 0);
closures [Widget.BUTTON_PRESS_EVENT_INVERSE] = OS.g_cclosure_new (windowProc3, Widget.BUTTON_PRESS_EVENT_INVERSE, 0);
@@ -2502,7 +2502,7 @@ void initializeCallbacks () {
windowCallback4 = new Callback (this, "windowProc", 4); //$NON-NLS-1$
windowProc4 = windowCallback4.getAddress ();
- if (windowProc4 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (windowProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closures [Widget.DELETE_RANGE] = OS.g_cclosure_new (windowProc4, Widget.DELETE_RANGE, 0);
closures [Widget.DELETE_TEXT] = OS.g_cclosure_new (windowProc4, Widget.DELETE_TEXT, 0);
@@ -2519,7 +2519,7 @@ void initializeCallbacks () {
windowCallback5 = new Callback (this, "windowProc", 5); //$NON-NLS-1$
windowProc5 = windowCallback5.getAddress ();
- if (windowProc5 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (windowProc5 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
closures [Widget.CHANGE_VALUE] = OS.g_cclosure_new (windowProc5, Widget.CHANGE_VALUE, 0);
closures [Widget.EXPAND_COLLAPSE_CURSOR_ROW] = OS.g_cclosure_new (windowProc5, Widget.EXPAND_COLLAPSE_CURSOR_ROW, 0);
@@ -2691,16 +2691,16 @@ public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
* @noreference This method is not intended to be referenced by clients.
*/
public int /*long*/ internal_new_GC (GCData data) {
- if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
+ if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
int /*long*/ root = OS.gdk_get_default_root_window();
int /*long*/ gc;
if (OS.USE_CAIRO) {
gc = OS.gdk_cairo_create (root);
- if (gc == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (gc == 0) error (SWT.ERROR_NO_HANDLES);
//TODO how gdk_gc_set_subwindow is done in cairo?
} else {
gc = OS.gdk_gc_new (root);
- if (gc == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (gc == 0) error (SWT.ERROR_NO_HANDLES);
OS.gdk_gc_set_subwindow (gc, OS.GDK_INCLUDE_INFERIORS);
}
if (data != null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 8810331b8c..9d8a7f20d2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -144,7 +144,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
void createHandle(int index) {
state |= HANDLE | THEME_BACKGROUND;
handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_fixed_set_has_window (handle, true);
OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
layout = new TextLayout (display);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
index 953fe2a94c..e20123010f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
@@ -152,7 +152,7 @@ public int open () {
byte [] buffer = Converter.wcsToMbcs (null, fixPercent (message), true);
handle = OS.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, buffer);
- if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error(SWT.ERROR_NO_HANDLES);
if (parentHandle != 0) {
int /*long*/ pixbufs = OS.gtk_window_get_icon_list (parentHandle);
if (pixbufs != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index 105363bcd0..421730297d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -745,7 +745,7 @@ void releaseWidget () {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground ().equals (color)) return;
GdkColor gdkColor = color != null ? color.handle : null;
@@ -784,7 +784,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground (index).equals (color)) return;
int count = Math.max (1, parent.getColumnCount ());
@@ -875,7 +875,7 @@ public void setChecked (boolean checked) {
public void setFont (Font font){
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -918,7 +918,7 @@ public void setFont (Font font){
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -992,7 +992,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground ().equals (color)) return;
GdkColor gdkColor = color != null ? color.handle : null;
@@ -1031,7 +1031,7 @@ public void setForeground (Color color){
public void setForeground (int index, Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground (index).equals (color)) return;
int count = Math.max (1, parent.getColumnCount ());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index a97bc302f2..75646e91cf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -378,7 +378,7 @@ void applySegments () {
for (int i = 1, length = string == null ? 0 : string.length (); i < nSegments; i++) {
if (event.segments [i] < event.segments [i - 1] || event.segments [i] > length) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
}
char[] segmentsChars = event.segmentsChars;
@@ -1909,7 +1909,7 @@ public void removeModifyListener (ModifyListener listener) {
public void removeSegmentListener (SegmentListener listener) {
checkWidget ();
- if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
eventTable.unhook (SWT.Segments, listener);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 50e21914c5..725ba5a81b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -265,7 +265,7 @@ void createHandle (int index) {
OS.gtk_window_set_type_hint (handle, OS.GDK_WINDOW_TYPE_HINT_TOOLTIP);
} else {
handle = OS.gtk_tooltips_new ();
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
/*
* Bug in Solaris-GTK. Invoking gtk_tooltips_force_window()
* can cause a crash in older versions of GTK. The fix is
@@ -691,7 +691,7 @@ public void setLocation (int x, int y) {
*/
public void setLocation (Point location) {
checkWidget ();
- if (location == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (location == null) error (SWT.ERROR_NULL_ARGUMENT);
setLocation (location.x, location.y);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
index 3c465a50e3..ae1774b853 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
@@ -308,7 +308,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
int yoffset = (int) Math.floor (OS.GTK_WIDGET_Y (widget) + ((OS.GTK_WIDGET_HEIGHT (widget) - OS.GTK_WIDGET_REQUISITION_HEIGHT (widget)) * 0.5) + 0.5);
Rectangle b = image.getBounds();
int /*long*/ gdkImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height);
- if (gdkImagePtr == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (gdkImagePtr == 0) error(SWT.ERROR_NO_HANDLES);
GdkImage gdkImage = new GdkImage();
OS.memmove (gdkImage, gdkImagePtr);
byte[] maskData = new byte [gdkImage.bpl * gdkImage.height];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 6c6ad36fe4..f495ce1fe6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -1147,7 +1147,7 @@ public void removeAll () {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground ().equals (color)) return;
GdkColor gdkColor = color != null ? color.handle : null;
@@ -1187,7 +1187,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getBackground (index).equals (color)) return;
int count = Math.max (1, parent.getColumnCount ());
@@ -1308,7 +1308,7 @@ public void setExpanded (boolean expanded) {
public void setFont (Font font){
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -1351,7 +1351,7 @@ public void setFont (Font font){
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -1426,7 +1426,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground ().equals (color)) return;
GdkColor gdkColor = color != null ? color.handle : null;
@@ -1466,7 +1466,7 @@ public void setForeground (Color color){
public void setForeground (int index, Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
if (_getForeground (index).equals (color)) return;
int count = Math.max (1, parent.getColumnCount ());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
index be00a74d7e..2ed2aa5d0b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java
@@ -202,7 +202,7 @@ public RGB open () {
/* Create the CCHookProc */
Callback callback = new Callback (this, "CCHookProc", 4); //$NON-NLS-1$
int /*long*/ lpfnHook = callback.getAddress ();
- if (lpfnHook == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+ if (lpfnHook == 0) error(SWT.ERROR_NO_MORE_CALLBACKS);
/* Allocate the Custom Colors and initialize to white */
display = parent.display;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index ee86187624..9e44916dc9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1696,7 +1696,7 @@ public int /*long*/ internal_new_GC (GCData data) {
} else {
hDC = OS.BeginPaint (hwnd, data.ps);
}
- if (hDC == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (hDC == 0) error(SWT.ERROR_NO_HANDLES);
if (data != null) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (4, 10)) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
@@ -2140,7 +2140,7 @@ public boolean print (GC gc) {
int /*long*/ clipRgn = 0;
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeNone);
int /*long*/ rgn = Gdip.Region_new();
- if (rgn == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (rgn == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetClip(gdipGraphics, rgn);
if (!Gdip.Region_IsInfinite(rgn, gdipGraphics)) {
clipRgn = Gdip.Region_GetHRGN(rgn, gdipGraphics);
@@ -2149,7 +2149,7 @@ public boolean print (GC gc) {
Gdip.Graphics_SetPixelOffsetMode(gdipGraphics, Gdip.PixelOffsetModeHalf);
float[] lpXform = null;
int /*long*/ matrix = Gdip.Matrix_new(1, 0, 0, 1, 0, 0);
- if (matrix == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+ if (matrix == 0) error(SWT.ERROR_NO_HANDLES);
Gdip.Graphics_GetTransform(gdipGraphics, matrix);
if (!Gdip.Matrix_IsIdentity(matrix)) {
lpXform = new float[6];
@@ -2991,7 +2991,7 @@ public void setBackground (Color color) {
checkWidget ();
int pixel = -1;
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
pixel = color.handle;
}
if (pixel == background) return;
@@ -3198,7 +3198,7 @@ void setCursor () {
*/
public void setCursor (Cursor cursor) {
checkWidget ();
- if (cursor != null && cursor.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (cursor != null && cursor.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
this.cursor = cursor;
if (OS.IsWinCE) {
int /*long*/ hCursor = cursor != null ? cursor.handle : 0;
@@ -3322,7 +3322,7 @@ public void setFont (Font font) {
checkWidget ();
int /*long*/ hFont = 0;
if (font != null) {
- if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (font.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
hFont = font.handle;
}
this.font = font;
@@ -3351,7 +3351,7 @@ public void setForeground (Color color) {
checkWidget ();
int pixel = -1;
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
pixel = color.handle;
}
if (pixel == foreground) return;
@@ -3454,7 +3454,7 @@ public void setLocation (Point location) {
public void setMenu (Menu menu) {
checkWidget ();
if (menu != null) {
- if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (menu.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((menu.style & SWT.POP_UP) == 0) {
error (SWT.ERROR_MENU_NOT_POP_UP);
}
@@ -4496,7 +4496,7 @@ int widgetStyle () {
public boolean setParent (Composite parent) {
checkWidget ();
if (parent == null) error (SWT.ERROR_NULL_ARGUMENT);
- if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (parent.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if (this.parent == parent) return true;
if (!isReparentable ()) return false;
releaseParent ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index 5236fda51e..a36b9e08f8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -147,7 +147,7 @@ public String getMessage () {
* </ul>
*/
public String open () {
- if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
+ if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
int /*long*/ hHeap = OS.GetProcessHeap ();
@@ -180,7 +180,7 @@ public String open () {
/* Create the BrowseCallbackProc */
Callback callback = new Callback (this, "BrowseCallbackProc", 4); //$NON-NLS-1$
int /*long*/ lpfn = callback.getAddress ();
- if (lpfn == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (lpfn == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
/* Make the parent shell be temporary modal */
Dialog oldModal = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 503548affd..91963f5cca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -2098,7 +2098,7 @@ public Monitor [] getMonitors () {
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
int /*long*/ lpfnEnum = callback.getAddress ();
- if (lpfnEnum == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
Monitor [] result = new Monitor [monitorCount];
@@ -2184,7 +2184,7 @@ public Monitor getPrimaryMonitor () {
monitors = new Monitor [4];
Callback callback = new Callback (this, "monitorEnumProc", 4); //$NON-NLS-1$
int /*long*/ lpfnEnum = callback.getAddress ();
- if (lpfnEnum == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (lpfnEnum == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumDisplayMonitors (0, null, lpfnEnum, 0);
callback.dispose ();
Monitor result = null;
@@ -2668,9 +2668,9 @@ int /*long*/ hTabTheme () {
* @noreference This method is not intended to be referenced by clients.
*/
public int /*long*/ internal_new_GC (GCData data) {
- if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
+ if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED);
int /*long*/ hDC = OS.GetDC (0);
- if (hDC == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (hDC == 0) error (SWT.ERROR_NO_HANDLES);
if (data != null) {
int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
if ((data.style & mask) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
index ede8c5d02b..fdf807c513 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
@@ -337,7 +337,7 @@ public String open () {
if (!OS.IsWinCE && USE_HOOK) {
callback = new Callback (this, "OFNHookProc", 4); //$NON-NLS-1$
int /*long*/ lpfnHook = callback.getAddress ();
- if (lpfnHook == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (lpfnHook == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
struct.lpfnHook = lpfnHook;
struct.Flags |= OS.OFN_ENABLEHOOK;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
index 6091a606db..e0b6ca80fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java
@@ -152,7 +152,7 @@ public RGB getRGB () {
* </ul>
*/
public FontData open () {
- if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);
+ if (OS.IsWinCE) error (SWT.ERROR_NOT_IMPLEMENTED);
/* Get the owner HWND for the dialog */
int /*long*/ hwndOwner = parent.handle;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index 5d401d6d75..e7cc653203 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -1288,7 +1288,7 @@ void reskinChildren (int flags) {
checkWidget ();
int pixel = -1;
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
pixel = color.handle;
}
if (pixel == background) return;
@@ -1347,7 +1347,7 @@ void reskinChildren (int flags) {
checkWidget ();
int pixel = -1;
if (color != null) {
- if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (color.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
pixel = color.handle;
}
if (pixel == foreground) return;
@@ -1457,7 +1457,7 @@ public void setLocation (int x, int y) {
*/
public void setLocation (Point location) {
checkWidget ();
- if (location == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (location == null) error (SWT.ERROR_NULL_ARGUMENT);
setLocation (location.x, location.y);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index f76718d46a..3c163a1946 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -5861,7 +5861,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
int /*long*/ [] pBits = new int /*long*/ [1];
int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
- if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index bbeaa14a17..f2a26f3c60 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
@@ -732,7 +732,7 @@ void releaseWidget () {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int pixel = -1;
if (color != null) {
@@ -766,7 +766,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -837,7 +837,7 @@ void setChecked (boolean checked, boolean notify) {
public void setFont (Font font){
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -894,7 +894,7 @@ public void setFont (Font font){
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -957,7 +957,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int pixel = -1;
if (color != null) {
@@ -991,7 +991,7 @@ public void setForeground (Color color){
public void setForeground (int index, Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
index 07a98344f1..a47c108a41 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
@@ -237,7 +237,7 @@ void releaseWidget () {
public void setMenu (Menu menu) {
checkWidget ();
if (menu != null) {
- if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ if (menu.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
if ((menu.style & SWT.POP_UP) == 0) {
error (SWT.ERROR_MENU_NOT_POP_UP);
}
@@ -486,11 +486,11 @@ void updateText () {
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
int /*long*/ [] pBits = new int /*long*/ [1];
int /*long*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
- if (hBitmap == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (hBitmap == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ dstHdc = OS.CreateCompatibleDC (hdc);
int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
int /*long*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
- if (hMask == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (hMask == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ maskHdc = OS.CreateCompatibleDC (hdc);
int /*long*/ oldMask = OS.SelectObject (maskHdc, hMask);
@@ -550,7 +550,7 @@ void updateText () {
iconInfo.hbmColor = hBitmap;
iconInfo.hbmMask = hMask;
int /*long*/ hIcon = OS.CreateIconIndirect (iconInfo);
- if (hIcon == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (hIcon == 0) error (SWT.ERROR_NO_HANDLES);
OS.DeleteObject (hBitmap);
OS.DeleteObject (hMask);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 705c5a0781..02f0f3495f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -475,7 +475,7 @@ void applySegments () {
for (int i = 1; i < nSegments; i++) {
if (event.segments [i] < event.segments [i - 1] || event.segments [i] > length) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
}
int/*64*/ limit = (int/*64*/)OS.SendMessage (handle, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
@@ -1634,7 +1634,7 @@ public void removeModifyListener (ModifyListener listener) {
*/
public void removeSegmentListener (SegmentListener listener) {
checkWidget ();
- if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
eventTable.unhook (SWT.Segments, listener);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
index 33e2103519..655ef3533d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java
@@ -378,7 +378,7 @@ public void setLocation (int x, int y) {
*/
public void setLocation (Point location) {
checkWidget ();
- if (location == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ if (location == null) error (SWT.ERROR_NULL_ARGUMENT);
setLocation (location.x, location.y);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index 17e34b0fe2..e0ab3b2d23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
@@ -514,7 +514,7 @@ public boolean open () {
OS.SetLayeredWindowAttributes (hwndOpaque, 0xFFFFFF, (byte)0xFF, OS.LWA_COLORKEY | OS.LWA_ALPHA);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
int /*long*/ newProcAddress = newProc.getAddress ();
- if (newProcAddress == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
oldOpaqueProc = OS.GetWindowLongPtr (hwndOpaque, OS.GWLP_WNDPROC);
@@ -543,7 +543,7 @@ public boolean open () {
null);
newProc = new Callback (this, "transparentProc", 4); //$NON-NLS-1$
int /*long*/ newProcAddress = newProc.getAddress ();
- if (newProcAddress == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (newProcAddress == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
oldTransparentProc = OS.GetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC);
OS.SetWindowLongPtr (hwndTransparent, OS.GWLP_WNDPROC, newProcAddress);
OS.ShowWindow (hwndTransparent, OS.SW_SHOWNOACTIVATE);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 7761bb7dc5..0c6f19ba9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -5093,8 +5093,8 @@ public void setSortDirection (int direction) {
*/
public void setTopItem (TreeItem item) {
checkWidget ();
- if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- if (item.isDisposed ()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
+ if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
int /*long*/ hItem = item.handle;
int /*long*/ hTopItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == hTopItem) return;
@@ -5907,7 +5907,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
int /*long*/ [] pBits = new int /*long*/ [1];
int /*long*/ memDib = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
- if (memDib == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (memDib == 0) error (SWT.ERROR_NO_HANDLES);
int /*long*/ oldMemBitmap = OS.SelectObject (memHdc, memDib);
int colorKey = 0x0000FD;
POINT pt = new POINT ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index a259212a6f..69ee298fbb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -1072,7 +1072,7 @@ public void removeAll () {
public void setBackground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int pixel = -1;
if (color != null) {
@@ -1107,7 +1107,7 @@ public void setBackground (Color color) {
public void setBackground (int index, Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -1406,7 +1406,7 @@ public void setExpanded (boolean expanded) {
public void setFont (Font font){
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
Font oldFont = this.font;
if (oldFont == font) return;
@@ -1454,7 +1454,7 @@ public void setFont (Font font){
public void setFont (int index, Font font) {
checkWidget ();
if (font != null && font.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
@@ -1510,7 +1510,7 @@ public void setFont (int index, Font font) {
public void setForeground (Color color) {
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int pixel = -1;
if (color != null) {
@@ -1545,7 +1545,7 @@ public void setForeground (Color color) {
public void setForeground (int index, Color color){
checkWidget ();
if (color != null && color.isDisposed ()) {
- SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+ error (SWT.ERROR_INVALID_ARGUMENT);
}
int count = Math.max (1, parent.getColumnCount ());
if (0 > index || index > count - 1) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index 40d8a72222..004079e5a2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -50,7 +50,7 @@ public abstract class Widget {
Display display;
EventTable eventTable;
Object data;
-
+
/* Global state flags */
static final int DISPOSED = 1<<0;
static final int CANVAS = 1<<1;