Java 类org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider 实例源码

项目:dsl-devkit    文件:AbstractHoverTest.java   
/**
 * 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;
            }
          }
        }
      }
    }
  }
}
项目:n4js    文件:N4JSUiModule.java   
/**
 * Bind custom IEObjectHoverProvider.
 */
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return N4JSHoverProvider.class;
}
项目:z80editor    文件:Z80UiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return z80EObjectHoverProvider.class;
}
项目:bts    文件:EgyDslUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return BTSEObjectHover.class;
}
项目:statecharts    文件:SGenUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return HelpHoverProvider.class;
}
项目:statecharts    文件:STextUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return CustomCSSHelpHoverProvider.class;
}
项目:plan    文件:PlanUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
       return PlanHoverProvider.class;
}
项目:PHDL    文件:PhdlUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return PhdlEObjectHoverProvider.class;
}
项目:openhab-hdl    文件:RulesUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return ActionEObjectHoverProvider.class;
}
项目:openhab-hdl    文件:ScriptUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return ActionEObjectHoverProvider.class;
}
项目:gama    文件:GamlUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return GamlHoverProvider.class;
}
项目:yang-design-studio    文件:YangUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return yangHoverProvider.class;
}
项目:antlr4ide    文件:Antlr4UiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
  return Antlr4HoverProvider.class;
}
项目:jkind-xtext    文件:JKindUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return JKindEObjectHoverProvider.class;
}
项目:packtpub-xtext-book-examples    文件:ExpressionsUiModule.java   
public Class<? extends IEObjectHoverProvider> bindIEObjectHoverProvider() {
    return ExpressionsEObjectHoverProvider.class;
}
项目:dsl-devkit    文件:AbstractHoverTest.java   
/**
 * 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);
}