Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-11-02 11:39:16 +0000
committerChristian W. Damus2016-11-02 11:39:16 +0000
commitf8f447af81671871bbe1fe4f16a21db08bdc0192 (patch)
tree97993b54e9eb2cab428fe8caa4ab99a57645e8eb /plugins/infra/ui
parente4e98670832ed10f5031b61b955eb28543f105c4 (diff)
downloadorg.eclipse.papyrus-f8f447af81671871bbe1fe4f16a21db08bdc0192.tar.gz
org.eclipse.papyrus-f8f447af81671871bbe1fe4f16a21db08bdc0192.tar.xz
org.eclipse.papyrus-f8f447af81671871bbe1fe4f16a21db08bdc0192.zip
Bug 501833: [Properties] Content-assist does not work on Mac
New utilities were in the widgets package to avoid API impact in the maintenance stream from which they were cherry-picked. https://bugs.eclipse.org/bugs/show_bug.cgi?id=501833 Change-Id: I63f846eb470d1f2302d1e7b9b8b3d4af1c968dc2
Diffstat (limited to 'plugins/infra/ui')
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java1
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/PlatformUIUtils.java (renamed from plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/PlatformUIUtils.java)12
2 files changed, 8 insertions, 5 deletions
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java
index bac77c467d1..902d4da4c1b 100644
--- a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StringEditorWithCompletionWrapper.java
@@ -25,6 +25,7 @@ import org.eclipse.jface.text.contentassist.ICompletionProposalSorter;
import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
import org.eclipse.papyrus.infra.widgets.util.IPapyrusConverter;
import org.eclipse.papyrus.infra.widgets.util.ISetPapyrusConverter;
+import org.eclipse.papyrus.infra.widgets.util.PlatformUIUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.widgets.Composite;
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/PlatformUIUtils.java b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/PlatformUIUtils.java
index 1ac74fdd0ea..9ea469c4ef7 100644
--- a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/PlatformUIUtils.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/PlatformUIUtils.java
@@ -11,7 +11,7 @@
*
*****************************************************************************/
-package org.eclipse.papyrus.infra.widgets.editors;
+package org.eclipse.papyrus.infra.widgets.util;
import java.util.Iterator;
import java.util.Objects;
@@ -45,8 +45,10 @@ import com.google.common.collect.AbstractIterator;
/**
* Some utilities for working with the Eclipse Platform UI.
+ *
+ * @since 3.0
*/
-class PlatformUIUtils {
+public class PlatformUIUtils {
private static final String MODEL_ELEMENT_KEY = "modelElement"; //$NON-NLS-1$
/**
@@ -65,7 +67,7 @@ class PlatformUIUtils {
* @return a stream providing the {@code control} and all of its parent chain,
* in order, up to the topmost control in the shell
*/
- static Stream<Control> parentChain(Control control) {
+ public static Stream<Control> parentChain(Control control) {
Iterator<Control> iterator = new AbstractIterator<Control>() {
private Control next = control;
@@ -101,7 +103,7 @@ class PlatformUIUtils {
* @return the requested service, or {@code null} if it cannot be determined
* (usually because the {@code control} is not in a workbench window)
*/
- static <S> S getService(Control control, Class<S> api) {
+ public static <S> S getService(Control control, Class<S> api) {
Optional<S> result = parentChain(control)
.map(c -> c.getData(MODEL_ELEMENT_KEY))
.filter(MPart.class::isInstance).map(MPart.class::cast)
@@ -169,7 +171,7 @@ class PlatformUIUtils {
* @param action
* the command handler to invoke
*/
- static void handleCommand(Control control, String commandID, String defaultKeystroke, Runnable action) {
+ public static void handleCommand(Control control, String commandID, String defaultKeystroke, Runnable action) {
IBindingService bindingService = PlatformUIUtils.getService(control, IBindingService.class);
Consumer<IBindingService> onBindingsChanged = new Consumer<IBindingService>() {
private KeyListener keyListener;

Back to the top