aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2012-03-16 14:49:57 -0400
committerSilenio Quarti2012-03-16 14:49:57 -0400
commit28c088e52ae46fc9da6497a12e25dc62b56ffa40 (patch)
tree91ac5693d071b568ccc3a79c7ccfa2673d760c3c
parent636180aff5bfa10aac67244a1cf386398eb5e399 (diff)
downloadeclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.zip
eclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.tar.gz
eclipse.platform.swt-28c088e52ae46fc9da6497a12e25dc62b56ffa40.tar.xz
Bug 241644 - Text widget with no SWT.BORDER style has no Undo or Select All key bindings
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java
new file mode 100644
index 0000000..47615dd
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSUndoManager.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class NSUndoManager extends NSObject {
+
+public NSUndoManager() {
+ super();
+}
+
+public NSUndoManager(int /*long*/ id) {
+ super(id);
+}
+
+public NSUndoManager(id id) {
+ super(id);
+}
+
+public boolean canRedo() {
+ return OS.objc_msgSend_bool(this.id, OS.sel_canRedo);
+}
+
+public boolean canUndo() {
+ return OS.objc_msgSend_bool(this.id, OS.sel_canUndo);
+}
+
+public void redo() {
+ OS.objc_msgSend(this.id, OS.sel_redo);
+}
+
+public void undo() {
+ OS.objc_msgSend(this.id, OS.sel_undo);
+}
+
+}