当前位置: 首页>>代码示例>>Java>>正文


Java PolyRule类代码示例

本文整理汇总了Java中edu.mit.blocks.codeblocks.PolyRule的典型用法代码示例。如果您正苦于以下问题:Java PolyRule类的具体用法?Java PolyRule怎么用?Java PolyRule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PolyRule类属于edu.mit.blocks.codeblocks包,在下文中一共展示了PolyRule类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadBlockLanguage

import edu.mit.blocks.codeblocks.PolyRule; //导入依赖的package包/类
/**
 * Loads all the block genuses, properties, and link rules of
 * a language specified in the pre-defined language def file.
 * @param root Loads the language specified in the Element root
 */
public void loadBlockLanguage(final Element root) {
    /* MUST load shapes before genuses in order to initialize
     connectors within each block correctly */
    BlockConnectorShape.loadBlockConnectorShapes(root);

    //load genuses
    BlockGenus.loadBlockGenera(workspace, root);

    //load rules
    BlockLinkChecker.addRule(workspace, new CommandRule(workspace));
    BlockLinkChecker.addRule(workspace, new SocketRule());
    BlockLinkChecker.addRule(workspace, new PolyRule(workspace));
    BlockLinkChecker.addRule(workspace, new StackRule(workspace));
    BlockLinkChecker.addRule(workspace, new ParamRule());

    //set the dirty flag for the language definition file
    //to false now that the lang file has been loaded
    langDefDirty = false;
}
 
开发者ID:heqichen,项目名称:openblocks,代码行数:25,代码来源:WorkspaceController.java


注:本文中的edu.mit.blocks.codeblocks.PolyRule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。