Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java')
-rw-r--r--plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java
index fad866056..41c680288 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/editor/TextAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 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
@@ -12,6 +12,7 @@ package org.eclipse.wst.server.ui.internal.editor;
import org.eclipse.jface.action.Action;
import org.eclipse.wst.server.ui.internal.Trace;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
@@ -112,6 +113,15 @@ public class TextAction extends Action {
*/
public void copy() {
Point selection = getControlSelection();
+ Control control = getControl();
+ if (control == null)
+ return;
+
+ if (control instanceof Text) {
+ Text textcontrol = (Text) control;
+ if ((textcontrol.getStyle() & SWT.PASSWORD) != 0) return;
+ }
+
String text = getControlText();
if (selection == null || text == null)
return;
@@ -139,6 +149,15 @@ public class TextAction extends Action {
if (selection == null)
return;
+ Control control = getControl();
+ if (control == null)
+ return;
+
+ if (control instanceof Text) {
+ Text textcontrol = (Text) control;
+ if ((textcontrol.getStyle() & SWT.PASSWORD) != 0) return;
+ }
+
if (selection.y > selection.x) {
copy();
delete();
@@ -245,4 +264,4 @@ public class TextAction extends Action {
}
}
}
-} \ No newline at end of file
+}

Back to the top