Bug 512159 - [CTabFolder] Several getter methods in CTabFolder do not
use checkWidget()

Not sure why these methods do not use checkWidget. The last commit
message for Silenio is: "restore HEAD after accidental deletion by error
in automated build script" which is not very informative.

Leo:
While reviewing, I found a bunch of other places that had checkWidget()
commented out.
The original commit that added them has an empty log message
and is not linked to bugzilla: 
    6a87ceb8219d8d816e8c34a66f6f56af4e43ead7
	Author: Veronika Irvine <veronika>
	Date:   Fri Feb 15 13:55:04 2002 +0000
    *** empty log message ***
I can only presume that it might have been done so that fields
can be accessed on the same thread without having to get the UI
thread for convienience. But for sake of consistency, we should
have these checks in all public methods.

Change-Id: I719fb7edf56fd6bface0eaf1b501856af0996b74
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
index daabafb..b5839cb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
@@ -191,7 +191,7 @@
  * @return SWT.LEFT, SWT.RIGHT or SWT.CENTER
  */
 public int getAlignment() {
-	//checkWidget();
+	checkWidget();
 	return align;
 }
 /**
@@ -202,7 +202,7 @@
  * @since 3.6
  */
 public int getBottomMargin() {
-	//checkWidget();
+	checkWidget();
 	return bottomMargin;
 }
 /**
@@ -211,7 +211,7 @@
  * @return the image of the label or null
  */
 public Image getImage() {
-	//checkWidget();
+	checkWidget();
 	return image;
 }
 /**
@@ -222,7 +222,7 @@
  * @since 3.6
  */
 public int getLeftMargin() {
-	//checkWidget();
+	checkWidget();
 	return leftMargin;
 }
 /**
@@ -233,7 +233,7 @@
  * @since 3.6
  */
 public int getRightMargin() {
-	//checkWidget();
+	checkWidget();
 	return rightMargin;
 }
 /**
@@ -278,7 +278,7 @@
  * @return the text of the label or null
  */
 public String getText() {
-	//checkWidget();
+	checkWidget();
 	return text;
 }
 @Override
@@ -294,7 +294,7 @@
  * @since 3.6
  */
 public int getTopMargin() {
-	//checkWidget();
+	checkWidget();
 	return topMargin;
 }
 private void initAccessible() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index ecffcf5..bd847d3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -910,7 +910,7 @@
  * </ul>
  */
 public CTabItem getItem (int index) {
-	//checkWidget();
+	checkWidget();
 	if (index  < 0 || index >= items.length)
 		SWT.error(SWT.ERROR_INVALID_RANGE);
 	return items [index];
@@ -927,7 +927,7 @@
  *	</ul>
  */
 public CTabItem getItem (Point pt) {
-	//checkWidget();
+	checkWidget();
 	if (items.length == 0) return null;
 	runUpdate();
 	Point size = getSize();
@@ -951,7 +951,7 @@
  *	</ul>
  */
 public int getItemCount(){
-	//checkWidget();
+	checkWidget();
 	return items.length;
 }
 /**
@@ -965,7 +965,7 @@
  *	</ul>
  */
 public CTabItem [] getItems() {
-	//checkWidget();
+	checkWidget();
 	CTabItem[] tabItems = new CTabItem [items.length];
 	System.arraycopy(items, 0, tabItems, 0, items.length);
 	return tabItems;
@@ -1171,7 +1171,7 @@
  *	</ul>
  */
 public CTabItem getSelection() {
-	//checkWidget();
+	checkWidget();
 	if (selectedIndex == -1) return null;
 	return items[selectedIndex];
 }
@@ -1219,7 +1219,7 @@
  *	</ul>
  */
 public int getSelectionIndex() {
-	//checkWidget();
+	checkWidget();
 	return selectedIndex;
 }
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index 0c2b5b6..4485878 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -145,7 +145,7 @@
  * </ul>
  */
 public Rectangle getBounds () {
-	//checkWidget();
+	checkWidget();
 	parent.runUpdate();
 	return new Rectangle(x, y, width, height);
 }
@@ -208,7 +208,7 @@
  * </ul>
  */
 public CTabFolder getParent () {
-	//checkWidget();
+	checkWidget();
 	return parent;
 }
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
index 8c27412..8ced0a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/SashForm.java
@@ -112,7 +112,7 @@
  */
 @Override
 public int getOrientation() {
-	//checkWidget();
+	checkWidget();
 	return (sashStyle & SWT.VERTICAL) != 0 ? SWT.HORIZONTAL : SWT.VERTICAL;
 }
 /**
@@ -146,7 +146,7 @@
  * @return the control that currently is maximized or null
  */
 public Control getMaximizedControl(){
-	//checkWidget();
+	checkWidget();
 	return this.maxControl;
 }
 /**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
index e984826..64f9216 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ScrolledComposite.java
@@ -209,7 +209,7 @@
  * @return the Always Show Scrollbars flag value
  */
 public boolean getAlwaysShowScrollBars() {
-	//checkWidget();
+	checkWidget();
 	return alwaysShowScroll;
 }
 
@@ -289,7 +289,7 @@
  * @return the control displayed in the content area
  */
 public Control getContent() {
-	//checkWidget();
+	checkWidget();
 	return content;
 }
 
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
index 3cd10b8..7e5f559 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
@@ -211,7 +211,7 @@
 * @return the control in the content area of the pane or null
 */
 public Control getContent() {
-	//checkWidget();
+	checkWidget();
 	return content;
 }
 /**
@@ -221,7 +221,7 @@
 * @return the control in the top center of the pane or null
 */
 public Control getTopCenter() {
-	//checkWidget();
+	checkWidget();
 	return topCenter;
 }
 /**
@@ -231,7 +231,7 @@
 * @return the control in the top left corner of the pane or null
 */
 public Control getTopLeft() {
-	//checkWidget();
+	checkWidget();
 	return topLeft;
 }
 /**
@@ -241,7 +241,7 @@
 * @return the control in the top right corner of the pane or null
 */
 public Control getTopRight() {
-	//checkWidget();
+	checkWidget();
 	return topRight;
 }
 void onDispose(Event event) {