diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-04-05 13:53:30 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2013-04-08 10:03:53 +0300 |
commit | 453099e29f5d6ca12f448eb9bb4264efd087ebf3 (patch) | |
tree | d34d261b08f314134e420ea1bf7acb04febe470f /client-compiler | |
parent | 708319b840380a9d96c510d5e24f2890071ec470 (diff) | |
download | vaadin-framework-453099e29f5d6ca12f448eb9bb4264efd087ebf3.tar.gz vaadin-framework-453099e29f5d6ca12f448eb9bb4264efd087ebf3.zip |
Require implementing hasTooltip if there's custom tooltip logic (#11052)
Change-Id: I3038b97d9a7c7e144a325ce87aa849309b9b31c4
Diffstat (limited to 'client-compiler')
3 files changed, 0 insertions, 69 deletions
diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java b/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java index 2be3bf5a16..f8aa586064 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java @@ -334,22 +334,6 @@ public class ConnectorBundleLoaderFactory extends Generator { writeGetters(logger, w, bundle); writeSerializers(logger, w, bundle); writeDelegateToWidget(logger, w, bundle); - writeHasGetTooltip(logger, w, bundle); - } - - /** - * @deprecated As of 7.0.1. This is just a hack to avoid breaking backwards - * compatibility and will be removed in Vaadin 7.1 - */ - @Deprecated - private void writeHasGetTooltip(TreeLogger logger, SplittingSourceWriter w, - ConnectorBundle bundle) { - Set<JClassType> types = bundle.getHasGetTooltip(); - for (JClassType type : types) { - w.println("store.setHasGetTooltipInfo(%s);", - getClassLiteralString(type)); - w.splitIfNeeded(); - } } private void writeDelegateToWidget(TreeLogger logger, diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java index f6dc982f15..cbdd3e89aa 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java @@ -63,7 +63,6 @@ public class ConnectorBundle { private final Set<JClassType> needsGwtConstructor = new HashSet<JClassType>(); private final Set<JClassType> visitedTypes = new HashSet<JClassType>(); private final Set<JClassType> needsProxySupport = new HashSet<JClassType>(); - private final Set<JClassType> hasGetTooltip = new HashSet<JClassType>(); private final Map<JClassType, Set<String>> identifiers = new HashMap<JClassType, Set<String>>(); private final Map<JClassType, Set<JMethod>> needsReturnType = new HashMap<JClassType, Set<JMethod>>(); @@ -620,37 +619,4 @@ public class ConnectorBundle { return Collections.unmodifiableSet(needsDelegateToWidget); } - /** - * @deprecated As of 7.0.1. This is just a hack to avoid breaking backwards - * compatibility and will be removed in Vaadin 7.1 - */ - @Deprecated - public Set<JClassType> getHasGetTooltip() { - return Collections.unmodifiableSet(hasGetTooltip); - } - - /** - * @deprecated As of 7.0.1. This is just a hack to avoid breaking backwards - * compatibility and will be removed in Vaadin 7.1 - */ - @Deprecated - public void setHasGetTooltip(JClassType type) { - if (!isHasGetTooltip(type)) { - hasGetTooltip.add(type); - } - } - - /** - * @deprecated As of 7.0.1. This is just a hack to avoid breaking backwards - * compatibility and will be removed in Vaadin 7.1 - */ - @Deprecated - private boolean isHasGetTooltip(JClassType type) { - if (hasGetTooltip.contains(type)) { - return true; - } else { - return previousBundle != null - && previousBundle.isHasGetTooltip(type); - } - } }
\ No newline at end of file diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java index 662ecf872b..4de9d2ae99 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java @@ -47,25 +47,6 @@ public class WidgetInitVisitor extends TypeVisitor { bundle.setNeedsReturnType(type, getWidget); } - // Hack to detect when getTooltipInfo has a custom implementation - // #11051 - JClassType getTooltipParamType = type.getOracle().findType( - "com.google.gwt.dom.client.Element"); - JMethod getTooltipInfoMethod = findInheritedMethod(type, - "getTooltipInfo", getTooltipParamType); - if (getTooltipInfoMethod == null) { - logger.log(Type.ERROR, "Could not find getTooltipInfo in " - + type.getQualifiedSourceName()); - throw new UnableToCompleteException(); - } - JClassType enclosingType = getTooltipInfoMethod.getEnclosingType(); - if (!enclosingType.getQualifiedSourceName().equals( - AbstractComponentConnector.class.getCanonicalName())) { - logger.log(Type.WARN, type.getQualifiedSourceName() - + " has overridden getTooltipInfo"); - bundle.setHasGetTooltip(type); - } - // Check state properties for @DelegateToWidget JMethod getState = findInheritedMethod(type, "getState"); JClassType stateType = getState.getReturnType().isClass(); |