/** * Build a directory of node hovers indexed by the {@link EObject}. * * @param model * the model for which to build the hover map, must not be {@code null} */ private void buildHoverMap(final EObject model) { // All contained features List<EStructuralFeature> features = model.eClass().getEAllStructuralFeatures(); for (EStructuralFeature feature : features) { if (feature instanceof EReference && model.eIsSet(feature)) { EList<EObject> children = getFeatureValues(model, feature); boolean referenceAdded = false; IEObjectHoverProvider hoverProvider = getHoverProvider(); for (EObject childModelElement : children) { if (!childModelElement.eIsProxy()) { buildHoverMap(childModelElement); Object element = childModelElement.eClass(); Object hover = hoverProvider.getHoverInfo(childModelElement, null, null).getInfo(); if (element != null && hover != null) { addToHoverMap(element, hover.toString()); // also add the hover using the reference feature as key if (!referenceAdded) { addToHoverMap(feature, hover.toString()); referenceAdded = true; } } } } } } }
/** * Bind custom IEObjectHoverProvider. */ public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return N4JSHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return z80EObjectHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return BTSEObjectHover.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return HelpHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return CustomCSSHelpHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return PlanHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return PhdlEObjectHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return ActionEObjectHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return GamlHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return yangHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return Antlr4HoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return JKindEObjectHoverProvider.class; }
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() { return ExpressionsEObjectHoverProvider.class; }
/** * Returns {@link IEObjectHoverProvider} for hover functionality of the editor. * * @return the {@link IEObjectHoverProvider} class for hover functionality, never {@code null} */ protected IEObjectHoverProvider getHoverProvider() { return getXtextTestUtil().get(IEObjectHoverProvider.class); }