This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 8c75521 HOP-2772: Text.showSelection is not implemented in RWT
new 4be3265 Merge pull request #794 from hansva/master
8c75521 is described below
commit 8c755217c6ba98a0aac6331ec369a23d846d6526
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Fri May 7 13:02:39 2021 +0200
HOP-2772: Text.showSelection is not implemented in RWT
---
.../main/java/org/apache/hop/ui/core/widget/TableView.java | 12 +++++++++---
ui/src/main/java/org/apache/hop/ui/core/widget/TextVar.java | 5 ++++-
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java
b/ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java
index b762f6c..c8e3517 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/widget/TableView.java
@@ -2243,7 +2243,9 @@ public class TableView extends Composite {
int newPosition = position + string.length();
edit(rowNr, colNr);
((TextVar) text).setSelection(newPosition);
- ((TextVar) text).showSelection();
+ if (!EnvironmentUtils.getInstance().isWeb()) {
+ ((TextVar) text).showSelection();
+ }
setColumnWidthBasedOnTextField(colNr, useVariables);
};
@@ -2361,9 +2363,13 @@ public class TableView extends Composite {
Text widget = (Text) text;
int idx = widget.getCaretPosition();
widget.selectAll();
- widget.showSelection();
+ if (!EnvironmentUtils.getInstance().isWeb()){
+ widget.showSelection();
+ }
widget.setSelection(0);
- widget.showSelection();
+ if (!EnvironmentUtils.getInstance().isWeb()){
+ widget.showSelection();
+ }
widget.setSelection(idx);
}
}
diff --git a/ui/src/main/java/org/apache/hop/ui/core/widget/TextVar.java
b/ui/src/main/java/org/apache/hop/ui/core/widget/TextVar.java
index 62257bd..edda95e 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/widget/TextVar.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/widget/TextVar.java
@@ -23,6 +23,7 @@ import org.apache.hop.core.variables.IVariables;
import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.ui.core.PropsUi;
import org.apache.hop.ui.core.gui.GuiResource;
+import org.apache.hop.ui.util.EnvironmentUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.KeyListener;
@@ -299,7 +300,9 @@ public class TextVar extends Composite {
}
public void showSelection() {
- wText.showSelection();
+ if (!EnvironmentUtils.getInstance().isWeb()) {
+ wText.showSelection();
+ }
}
public void setVariables(IVariables vars) {