X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.eclipse.ui.rap%2Fsrc%2Forg%2Fargeo%2Feclipse%2Fui%2Fspecific%2FEclipseUiSpecificUtils.java;h=a89b921cdf6a9012bd38107ed647f046d07644f2;hb=0fff629f700e9a9c742b6fe3874d408bee20ed10;hp=1cff2f6913d47787a68068f7f7142599bd337127;hpb=6f440ffe5f042c31ff0f7d75e0441e7af024fdd3;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.eclipse.ui.rap/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java b/org.argeo.eclipse.ui.rap/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java index 1cff2f691..a89b921cd 100644 --- a/org.argeo.eclipse.ui.rap/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java +++ b/org.argeo.eclipse.ui.rap/src/org/argeo/eclipse/ui/specific/EclipseUiSpecificUtils.java @@ -1,28 +1,31 @@ -/* - * Copyright (C) 2007-2012 Argeo GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package org.argeo.eclipse.ui.specific; import org.eclipse.jface.viewers.AbstractTableViewer; import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.ColumnViewerToolTipSupport; import org.eclipse.jface.viewers.Viewer; +import org.eclipse.rap.rwt.RWT; +import org.eclipse.swt.widgets.Widget; /** Static utilities to bridge differences between RCP and RAP */ public class EclipseUiSpecificUtils { + public static void setStyleData(Widget widget, Object data) { + widget.setData(RWT.CUSTOM_VARIANT, data); + } + + public static Object getStyleData(Widget widget) { + return widget.getData(RWT.CUSTOM_VARIANT); + } + + public static void setMarkupData(Widget widget) { + widget.setData(RWT.MARKUP_ENABLED, true); + } + + public static void setMarkupValidationDisabledData(Widget widget) { + widget.setData("org.eclipse.rap.rwt.markupValidationDisabled", Boolean.TRUE); + } + /** * TootlTip support is supported only for {@link AbstractTableViewer} in RAP */