微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。