Removed various comments
Change-Id: Ia6de0fd8ee730310befcb9848c3549fef5063cad
Signed-off-by: Vincenzo Caselli <vincenzo.caselli@rcp-vision.com>
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/emf/parsley/web/servlets/Application.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/emf/parsley/web/servlets/Application.java
index 246a313..c5a3f57 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/emf/parsley/web/servlets/Application.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/emf/parsley/web/servlets/Application.java
@@ -71,46 +71,6 @@
application.display = new Display();
application.shell = new Shell(application.display);
- // final CyclicBarrier barrier = new CyclicBarrier(2);
- // Thread thread = new Thread() {
- // @Override
- // public void run() {
- // try {
- // application.display = Display.getDefault();
- // application.shell = new Shell(application.display);
- // barrier.await();
- // while (!application.shell.isDisposed()) {
- // if (!application.display.readAndDispatch()) {
- // application.display.sleep();
- // }
- // }
- // } catch (Exception e) {
- // e.printStackTrace();
- // }
- // }
- // };
- // thread.setDaemon(true);
- // thread.start();
- // try {
- // barrier.await();
- // } catch (Exception e) {
- // e.printStackTrace();
- // }
- //
- // Composite composite = new Composite();
- //
- // Text text = new Text(composite, 0);
- //
- // System.out.println("creato Text");
-
- // ServletContext servletContext = request.getServletContext();
- // ApplicationContextImpl applicationContext =
- // ApplicationContextImpl.getFrom(servletContext);
- // ServiceContext context = new ServiceContext(request, null, applicationContext);
- // context.setServiceStore(new ServiceStore());
- // ContextProvider.setContext(context);
- // application.display = new Display();
- // application.shell = new Shell(application.display);
}
return application;
@@ -141,10 +101,6 @@
return id2objectMap.get(id);
}
- // public ParsleyWebGuiceModule getModule() {
- // return module;
- // }
-
public Injector getInjector() {
return injector;
}
@@ -161,10 +117,6 @@
return resourceSet;
}
- // public AdapterFactoryEditingDomain getAdapterFactoryEditingDomain() {
- // return adapterFactoryEditingDomain;
- // }
-
public Shell getShell() {
return shell;
}
@@ -173,8 +125,4 @@
return display;
}
- // public void syncExec(Runnable runnable) {
- // runnable.run();
- // }
-
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/SWT.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/SWT.java
index 7c4759f..1438941 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/SWT.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/SWT.java
@@ -86,6 +86,6 @@
public static final int COMMAND = 1 << 22;
public static void error(int code) {
- System.err.println(code); /// +
+ System.err.println("SWT error: "+code); /// +
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/StyledText.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/StyledText.java
index c4d49c2..9362d4a 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/StyledText.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/StyledText.java
@@ -22,17 +22,6 @@
}
static int checkStyle(int style) {
- // if ((style & SWT.SINGLE) != 0) {
- // style &= ~(SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.MULTI);
- // } else {
- // style |= SWT.MULTI;
- // if ((style & SWT.WRAP) != 0) {
- // style &= ~SWT.H_SCROLL;
- // }
- // }
- // style |= SWT.NO_REDRAW_RESIZE | SWT.DOUBLE_BUFFERED | SWT.NO_BACKGROUND;
- // /* Clear SWT.CENTER to avoid the conflict with SWT.EMBEDDED */
- // return style & ~SWT.CENTER;
return style;
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/TableTreeItem.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/TableTreeItem.java
index 8db71bc..943dc05 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/TableTreeItem.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/custom/TableTreeItem.java
@@ -59,31 +59,6 @@
super(parent, style);
this.parent = parent;
this.parentItem = parentItem;
- // if (parentItem == null) {
- //
- // /* Root items are visible immediately */
- // int tableIndex = parent.addItem(this, index);
- // tableItem = new TableItem(parent.getTable(), style, tableIndex);
- // tableItem.setData(TableTree.ITEMID, this);
- // addCheck();
- // /*
- // * Feature in the Table. The table uses the first image that is inserted into the table
- // * to size the table rows. If the user is allowed to insert the first image, this will
- // * cause the +/- images to be scaled. The fix is to insert a dummy image to force the
- // * size.
- // */
- // if (parent.sizeImage == null) {
- // int itemHeight = parent.getItemHeight();
- // parent.sizeImage = new Image(parent.getDisplay(), itemHeight, itemHeight);
- // GC gc = new GC(parent.sizeImage);
- // gc.setBackground(parent.getBackground());
- // gc.fillRectangle(0, 0, itemHeight, itemHeight);
- // gc.dispose();
- // tableItem.setImage(0, parent.sizeImage);
- // }
- // } else {
- // parentItem.addItem(this, index);
- // }
}
public TableTree getParent() {
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/layout/GridData.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/layout/GridData.java
index 65641d1..b9904b2 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/layout/GridData.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/layout/GridData.java
@@ -26,25 +26,6 @@
public GridData(int style) {
super();
- // if ((style & VERTICAL_ALIGN_BEGINNING) != 0)
- // verticalAlignment = BEGINNING;
- // if ((style & VERTICAL_ALIGN_CENTER) != 0)
- // verticalAlignment = CENTER;
- // if ((style & VERTICAL_ALIGN_FILL) != 0)
- // verticalAlignment = FILL;
- // if ((style & VERTICAL_ALIGN_END) != 0)
- // verticalAlignment = END;
- // if ((style & HORIZONTAL_ALIGN_BEGINNING) != 0)
- // horizontalAlignment = BEGINNING;
- // if ((style & HORIZONTAL_ALIGN_CENTER) != 0)
- // horizontalAlignment = CENTER;
- // if ((style & HORIZONTAL_ALIGN_FILL) != 0)
- // horizontalAlignment = FILL;
- // if ((style & HORIZONTAL_ALIGN_END) != 0)
- // horizontalAlignment = END;
- // grabExcessHorizontalSpace = (style & GRAB_HORIZONTAL) != 0;
- // grabExcessVerticalSpace = (style & GRAB_VERTICAL) != 0;
- /// +
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Button.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Button.java
index 8003c01..d354ebc 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Button.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Button.java
@@ -32,18 +32,10 @@
if ((style & SWT.ARROW) != 0)
return;
text = string;
- /* This code is intentionally commented */
- // if (OS.COMCTL32_MAJOR < 6) {
- // if (text.length () == 0 && image != null) {
- // _setImage (image);
- // return;
- // }
- // }
_setText(string);
}
public void setSelection(boolean selected) {
- System.out.println("Button.setSelection(" + selected + ")");
this.selected = selected;
}
@@ -63,77 +55,12 @@
}
void _setText(String text) {
- System.out.println(text);
- // int oldBits = OS.GetWindowLong(handle, OS.GWL_STYLE), newBits = oldBits;
- // if (OS.COMCTL32_MAJOR >= 6) {
- // newBits &= ~(OS.BS_LEFT | OS.BS_CENTER | OS.BS_RIGHT);
- // if ((style & SWT.LEFT) != 0)
- // newBits |= OS.BS_LEFT;
- // if ((style & SWT.CENTER) != 0)
- // newBits |= OS.BS_CENTER;
- // if ((style & SWT.RIGHT) != 0)
- // newBits |= OS.BS_RIGHT;
- // if (imageList != null) {
- // BUTTON_IMAGELIST buttonImageList = new BUTTON_IMAGELIST();
- // buttonImageList.himl = imageList.getHandle();
- // if (text.length() == 0) {
- // if ((style & SWT.LEFT) != 0)
- // buttonImageList.uAlign = OS.BUTTON_IMAGELIST_ALIGN_LEFT;
- // if ((style & SWT.CENTER) != 0)
- // buttonImageList.uAlign = OS.BUTTON_IMAGELIST_ALIGN_CENTER;
- // if ((style & SWT.RIGHT) != 0)
- // buttonImageList.uAlign = OS.BUTTON_IMAGELIST_ALIGN_RIGHT;
- // } else {
- // buttonImageList.uAlign = OS.BUTTON_IMAGELIST_ALIGN_LEFT;
- // buttonImageList.margin_left = computeLeftMargin();
- // buttonImageList.margin_right = MARGIN;
- // newBits &= ~(OS.BS_CENTER | OS.BS_RIGHT);
- // newBits |= OS.BS_LEFT;
- // }
- // OS.SendMessage(handle, OS.BCM_SETIMAGELIST, 0, buttonImageList);
- // }
- // } else {
- // newBits &= ~(OS.BS_BITMAP | OS.BS_ICON);
- // }
- // if (newBits != oldBits) {
- // OS.SetWindowLong(handle, OS.GWL_STYLE, newBits);
- // OS.InvalidateRect(handle, null, true);
- // }
- // /*
- // * Bug in Windows. When a Button control is right-to-left and is disabled, the first pixel
- // * of the text is clipped. The fix is to append a space to the text.
- // */
- // if ((style & SWT.RIGHT_TO_LEFT) != 0) {
- // if (OS.COMCTL32_MAJOR < 6 || !OS.IsAppThemed()) {
- // text = OS.IsWindowEnabled(handle) ? text : text + " ";
- // }
- // }
- // TCHAR buffer = new TCHAR(getCodePage(), text, true);
- // OS.SetWindowText(handle, buffer);
- // if ((state & HAS_AUTO_DIRECTION) != 0) {
- // updateTextDirection(AUTO_TEXT_DIRECTION);
- // }
}
public void setImage(Image image) {
- System.out.println("Button.setImage()");
- // checkWidget ();
- // if (image != null && image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
- // if ((style & SWT.ARROW) != 0) return;
- // this.image = image;
- // /* This code is intentionally commented */
- // // if (OS.COMCTL32_MAJOR < 6) {
- //// if (image == null || text.length () != 0) {
- //// _setText (text);
- //// return;
- //// }
- // // }
- // _setImage (image);
- /// +
}
public boolean getSelection() {
- System.out.println();
return selected;
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Combo.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Combo.java
index 310c4a9..9c88035 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Combo.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Combo.java
@@ -55,91 +55,22 @@
}
public int getSelectionIndex() {
- // checkWidget ();
- // if (noSelection) return -1;
- // return (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
return -1; /// +
}
public void clearSelection() {
- // checkWidget ();
- // OS.SendMessage (handle, OS.CB_SETEDITSEL, 0, -1);
- /// +
}
public void deselectAll() {
- // checkWidget();
- // OS.SendMessage(handle, OS.CB_SETCURSEL, -1, 0);
- // sendEvent(SWT.Modify);
- // // widget could be disposed at this point
- // clearSegments(false);
- // clearSegmentsCount--;
- /// +
}
public void removeAll() {
- // checkWidget ();
- // OS.SendMessage (handle, OS.CB_RESETCONTENT, 0, 0);
- // sendEvent (SWT.Modify);
- // if (isDisposed ()) return;
- // if ((style & SWT.H_SCROLL) != 0) setScrollWidth (0);
- /// +
}
public void setItems(String[] items) {
- System.out.println();
this.items = Arrays.asList(items);
- System.out.println(this.items);
- // checkWidget ();
- // if (items == null) error (SWT.ERROR_NULL_ARGUMENT);
- // for (int i=0; i<items.length; i++) {
- // if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT);
- // }
- // RECT rect = null;
- // long /*int*/ hDC = 0, oldFont = 0, newFont = 0;
- // int newWidth = 0;
- // if ((style & SWT.H_SCROLL) != 0) {
- // rect = new RECT ();
- // hDC = OS.GetDC (handle);
- // newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
- // if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
- // setScrollWidth (0);
- // }
- // OS.SendMessage (handle, OS.CB_RESETCONTENT, 0, 0);
- // int codePage = getCodePage ();
- // for (int i=0; i<items.length; i++) {
- // String string = items [i];
- // TCHAR buffer = new TCHAR (codePage, string, true);
- // int code = (int)/*64*/OS.SendMessage (handle, OS.CB_ADDSTRING, 0, buffer);
- // if (code == OS.CB_ERR) error (SWT.ERROR_ITEM_NOT_ADDED);
- // if (code == OS.CB_ERRSPACE) error (SWT.ERROR_ITEM_NOT_ADDED);
- // if ((style & SWT.H_SCROLL) != 0) {
- // int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
- // OS.DrawText (hDC, buffer, -1, rect, flags);
- // newWidth = Math.max (newWidth, rect.right - rect.left);
- // }
- // }
- // if ((style & SWT.H_SCROLL) != 0) {
- // if (newFont != 0) OS.SelectObject (hDC, oldFont);
- // OS.ReleaseDC (handle, hDC);
- // setScrollWidth (newWidth + 3);
- // }
- // sendEvent (SWT.Modify);
- // // widget could be disposed at this point
- /// +
}
public void select(int index) {
- // checkWidget ();
- // int count = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCOUNT, 0, 0);
- // if (0 <= index && index < count) {
- // int selection = (int)/*64*/OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0);
- // int code = (int)/*64*/OS.SendMessage (handle, OS.CB_SETCURSEL, index, 0);
- // if (code != OS.CB_ERR && code != selection) {
- // sendEvent (SWT.Modify);
- // // widget could be disposed at this point
- // }
- // }
- System.out.println("Combo.select(" + index + ")");
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Control.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Control.java
index 4da54f3..ee45bcb 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Control.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Control.java
@@ -34,22 +34,6 @@
}
void createHandle() {
- // long /* int */ hwndParent = widgetParent();
- // handle = OS.CreateWindowEx(widgetExtStyle(), windowClass(), null, widgetStyle(),
- // OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0, hwndParent, 0, OS.GetModuleHandle(null),
- // widgetCreateStruct());
- // if (handle == 0)
- // error(SWT.ERROR_NO_HANDLES);
- // int bits = OS.GetWindowLong(handle, OS.GWL_STYLE);
- // if ((bits & OS.WS_CHILD) != 0) {
- // OS.SetWindowLongPtr(handle, OS.GWLP_ID, handle);
- // }
- // if (OS.IsDBLocale && hwndParent != 0) {
- // long /* int */ hIMC = OS.ImmGetContext(hwndParent);
- // OS.ImmAssociateContext(handle, hIMC);
- // OS.ImmReleaseContext(hwndParent, hIMC);
- // }
- /// +
}
void createWidget() {
@@ -57,60 +41,28 @@
foreground = background = -1;
checkOrientation(parent);
createHandle();
- /// +
- // checkBackground();
- // checkBuffered();
- // checkComposited();
- // register();
- // subclass();
- // setDefaultFont();
- // checkMirrored();
- // checkBorder();
- // checkGesture();
- // if ((state & PARENT_BACKGROUND) != 0) {
- // setBackground();
- // }
}
public void setEnabled(boolean enabled) {
- // checkWidget ();
- // Control control = null;
- // boolean fixFocus = false;
- // if (!enabled) {
- // if (display.focusEvent != SWT.FocusOut) {
- // control = display.getFocusControl ();
- // fixFocus = isFocusAncestor (control);
- // }
- // }
- // enableWidget (enabled);
- // if (fixFocus) fixFocus (control);
- /// +
}
public boolean getEnabled() {
- // checkWidget();
- // return OS.IsWindowEnabled(handle);
return true; /// +
}
public boolean isEnabled() {
- // checkWidget ();
- // return getEnabled() && parent.isEnabled();
return true; /// +
}
public void setLayoutData(Object layoutData) {
- // checkWidget ();
this.layoutData = layoutData;
}
public Object getLayoutData () {
-// checkWidget ();
return layoutData;
}
public void addKeyListener(KeyListener listener) {
- // checkWidget();
if (listener == null)
error(SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
@@ -119,12 +71,10 @@
}
public Shell getShell() {
- // checkWidget();
return parent.getShell();
}
public void addDisposeListener(DisposeListener listener) {
- // checkWidget();
if (listener == null)
error(SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
@@ -133,37 +83,6 @@
public void setRedraw(boolean redraw) {
- // checkWidget ();
- // if (drawCount == 0) {
- // int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
- // if ((bits & OS.WS_VISIBLE) == 0) state |= HIDDEN;
- // }
- // if (redraw) {
- // if (--drawCount == 0) {
- // long /*int*/ topHandle = topHandle ();
- // OS.SendMessage (topHandle, OS.WM_SETREDRAW, 1, 0);
- // if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0);
- // if ((state & HIDDEN) != 0) {
- // state &= ~HIDDEN;
- // OS.ShowWindow (topHandle, OS.SW_HIDE);
- // if (handle != topHandle) OS.ShowWindow (handle, OS.SW_HIDE);
- // } else {
- // if (OS.IsWinCE) {
- // OS.InvalidateRect (topHandle, null, true);
- // if (handle != topHandle) OS.InvalidateRect (handle, null, true);
- // } else {
- // int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
- // OS.RedrawWindow (topHandle, null, 0, flags);
- // }
- // }
- // }
- // } else {
- // if (drawCount++ == 0) {
- // long /*int*/ topHandle = topHandle ();
- // OS.SendMessage (topHandle, OS.WM_SETREDRAW, 0, 0);
- // if (handle != topHandle) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
- // }
- // }
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/DateTime.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/DateTime.java
index d80983c..3b6253b 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/DateTime.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/DateTime.java
@@ -18,12 +18,7 @@
}
static int checkStyle(int style) {
- // style &= ~(SWT.H_SCROLL | SWT.V_SCROLL);
- // style = checkBits(style, SWT.DATE, SWT.TIME, SWT.CALENDAR, 0, 0, 0);
- // style = checkBits(style, SWT.MEDIUM, SWT.SHORT, SWT.LONG, 0, 0, 0);
- // if ((style & SWT.DATE) == 0)
- // style &= ~SWT.DROP_DOWN;
- return style; /// +
+ return style;
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Decorations.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Decorations.java
index 255bfb4..b4a7674 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Decorations.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Decorations.java
@@ -26,8 +26,5 @@
void createWidget() {
super.createWidget();
- // swFlags = OS.IsWinCE ? OS.SW_SHOWMAXIMIZED : OS.SW_SHOWNOACTIVATE;
- // hAccel = -1;
- /// +
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Display.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Display.java
index 35c266f..997278f 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Display.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Display.java
@@ -35,7 +35,6 @@
}
public static Display getCurrent() {
- // return findDisplay (Thread.currentThread ());
return getDefault(); /// +
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/List.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/List.java
index a268416..d039ce6 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/List.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/List.java
@@ -17,8 +17,6 @@
public class List extends Scrollable {
static final int INSET = 3;
- // static final long /* int */ ListProc;
- // static final TCHAR ListClass = new TCHAR(0, "LISTBOX", true);
boolean addedUCC = false; // indicates whether Bidi UCC were added; 'state & HAS_AUTO_DIRECTION'
// isn't a sufficient indicator
@@ -27,51 +25,19 @@
}
public void add(String string) {
- // checkWidget();
if (string == null)
error(SWT.ERROR_NULL_ARGUMENT);
- // TCHAR buffer = new TCHAR(getCodePage(), string, true);
- // int result = (int) /* 64 */OS.SendMessage(handle, OS.LB_ADDSTRING, 0, buffer);
- // if (result == OS.LB_ERR)
- // error(SWT.ERROR_ITEM_NOT_ADDED);
- // if (result == OS.LB_ERRSPACE)
- // error(SWT.ERROR_ITEM_NOT_ADDED);
- // if ((style & SWT.H_SCROLL) != 0)
- // setScrollWidth(buffer, true);
- /// +
}
public void add(String string, int index) {
- // checkWidget();
if (string == null)
error(SWT.ERROR_NULL_ARGUMENT);
- // if (index == -1)
- // error(SWT.ERROR_INVALID_RANGE);
- // TCHAR buffer = new TCHAR(getCodePage(), string, true);
- // int result = (int) /* 64 */OS.SendMessage(handle, OS.LB_INSERTSTRING, index, buffer);
- // if (result == OS.LB_ERRSPACE)
- // error(SWT.ERROR_ITEM_NOT_ADDED);
- // if (result == OS.LB_ERR) {
- // int count = (int) /* 64 */OS.SendMessage(handle, OS.LB_GETCOUNT, 0, 0);
- // if (0 <= index && index <= count) {
- // error(SWT.ERROR_ITEM_NOT_ADDED);
- // } else {
- // error(SWT.ERROR_INVALID_RANGE);
- // }
- // }
- // if ((style & SWT.H_SCROLL) != 0)
- // setScrollWidth(buffer, true);
- /// +
}
public void addSelectionListener(SelectionListener listener) {
- // checkWidget();
if (listener == null)
error(SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
- // addListener(SWT.Selection, typedListener);
- // addListener(SWT.DefaultSelection, typedListener);
- /// +
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Scrollable.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Scrollable.java
index a757b4f..5855c10 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Scrollable.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Scrollable.java
@@ -21,10 +21,5 @@
void createWidget() {
super.createWidget();
- // if ((style & SWT.H_SCROLL) != 0)
- // horizontalBar = createScrollBar(SWT.H_SCROLL);
- // if ((style & SWT.V_SCROLL) != 0)
- // verticalBar = createScrollBar(SWT.V_SCROLL);
- /// +
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Shell.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Shell.java
index bbb5aa2..cdafe4b 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Shell.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Shell.java
@@ -32,43 +32,29 @@
public Shell(Display display, int style) {
this(display, null, style, 0, false);
- System.out.println();
}
public Shell(Shell parent) {
- // this(parent, OS.IsWinCE ? SWT.NONE : SWT.DIALOG_TRIM);
- System.out.println();
}
public Shell(Shell parent, int style) {
- // this(parent != null ? parent.display : null, parent, style, 0, false);
- System.out.println();
}
public static Shell win32_new(Display display, long /* int */ handle) {
- System.out.println();
return new Shell(display, null, SWT.NO_TRIM, handle, true);
}
public static Shell internal_new(Display display, long /* int */ handle) {
- System.out.println();
return new Shell(display, null, SWT.NO_TRIM, handle, false);
}
Shell(Display display, Shell parent, int style, long /* int */ handle, boolean embedded) {
super();
- // checkSubclass(); ///+
if (display == null)
display = Display.getCurrent();
if (display == null)
display = Display.getDefault();
- // if (!display.isValidThread()) {
- // error(SWT.ERROR_THREAD_INVALID_ACCESS);
- // }
- // if (parent != null && parent.isDisposed()) {
- // error(SWT.ERROR_INVALID_ARGUMENT);
- // }
this.center = parent != null && (style & SWT.SHEET) != 0;
this.style = checkStyle(parent, style);
this.parent = parent;
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Table.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Table.java
index 055f8d5..7586e6f 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Table.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Table.java
@@ -31,7 +31,7 @@
}
public int getItemCount() {
- return 1; /// +
+ return 1;
}
void createItem(TableItem item, int index) {}
@@ -43,38 +43,9 @@
void createItem(TableColumn column, int index) {}
public int indexOf(TableItem item) {
- // checkWidget();
if (item == null)
error(SWT.ERROR_NULL_ARGUMENT);
- // TODO - find other loops that can be optimized
- // if (keys == null) {
- // int count = (int) /* 64 */OS.SendMessage(handle, OS.LVM_GETITEMCOUNT, 0, 0);
- // if (1 <= lastIndexOf && lastIndexOf < count - 1) {
- // if (_getItem(lastIndexOf, false) == item)
- // return lastIndexOf;
- // if (_getItem(lastIndexOf + 1, false) == item)
- // return ++lastIndexOf;
- // if (_getItem(lastIndexOf - 1, false) == item)
- // return --lastIndexOf;
- // }
- // if (lastIndexOf < count / 2) {
- // for (int i = 0; i < count; i++) {
- // if (_getItem(i, false) == item)
- // return lastIndexOf = i;
- // }
- // } else {
- // for (int i = count - 1; i >= 0; --i) {
- // if (_getItem(i, false) == item)
- // return lastIndexOf = i;
- // }
- // }
- // } else {
- // for (int i = 0; i < keyCount; i++) {
- // if (items[i] == item)
- // return keys[i];
- // }
- // }
- return -1; /// +
+ return -1;
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Text.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Text.java
index 44b84a7..13b2646 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Text.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Text.java
@@ -63,7 +63,6 @@
public void setEditable(boolean editable) {}
public void addModifyListener(ModifyListener listener) {
- // checkWidget();
if (listener == null)
error(SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
@@ -71,18 +70,9 @@
}
public int getCaretPosition() {
- return 0; /// +
+ return 0;
}
public void clearSelection() {
- // checkWidget ();
- // if (OS.IsWinCE) {
- // int[] end = new int[1];
- // OS.SendMessage(handle, OS.EM_GETSEL, (int[]) null, end);
- // OS.SendMessage(handle, OS.EM_SETSEL, end[0], end[0]);
- // } else {
- // OS.SendMessage(handle, OS.EM_SETSEL, -1, 0);
- // }
- /// +
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Tree.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Tree.java
index d828d60..29069db 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Tree.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Tree.java
@@ -41,7 +41,6 @@
void createItem(TreeItem item, long /* int */ hParent, long /* int */ hInsertAfter, long /* int */ hItem) {
- /// +
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/TreeItem.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/TreeItem.java
index 62e12e3..66e0ced 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/TreeItem.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/TreeItem.java
@@ -65,12 +65,6 @@
return OS.TVI_FIRST;
Tree parent = parentItem.parent;
long /* int */ hwnd = parent.handle, hParent = parentItem.handle;
- // long /* int */ hFirstItem = OS.SendMessage(hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD,
- // hParent);
- // long /* int */ hItem = parent.findItem(hFirstItem, index - 1);
- // if (hItem == 0)
- // SWT.error(SWT.ERROR_INVALID_RANGE);
- // return hItem;
return 0; /// +
}
@@ -82,11 +76,7 @@
if (index == 0)
return OS.TVI_FIRST;
long /* int */ hwnd = parent.handle;
- // long /*int*/ hFirstItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);
- // long /*int*/ hItem = parent.findItem (hFirstItem, index - 1);
- // if (hItem == 0) SWT.error (SWT.ERROR_INVALID_RANGE);
- // return hItem;
- return 0; /// +
+ return 0;
}
}
diff --git a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Widget.java b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Widget.java
index 1d01f4a..dca8bcf 100644
--- a/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Widget.java
+++ b/plugins/org.eclipse.emf.parsley.web.servlets/src/org/eclipse/swt/widgets/Widget.java
@@ -163,7 +163,6 @@
public void reskin(int flags) {
- // checkWidget();
reskinWidget();
if ((flags & SWT.ALL) != 0)
reskinChildren(flags);
@@ -172,12 +171,10 @@
void reskinChildren(int flags) {}
public Object getData() {
- // checkWidget();
return (state & KEYED_DATA) != 0 ? ((Object[]) data)[0] : data;
}
public Object getData(String key) {
- // checkWidget();
if (key == null)
error(SWT.ERROR_NULL_ARGUMENT);
if ((state & KEYED_DATA) != 0) {