DocumentViewPanel.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:incubator-netbeans 作者:
/**
 * Select corresponding node in the document view tree upon change of the
 * rule editor's content.
 *
 * A. The RuleNode holds instances of Rule-s from the model instance which
 * was created as setContext(file) was called on the view panel. B. The
 * 'rule' argument here is from an up-to-date model.
 *
 */
private void setSelectedRule(RuleHandle handle) {
    try {
        Node foundRuleNode = findLocation(manager.getRootContext(), handle);
        Node[] toSelect = foundRuleNode != null ? new Node[]{foundRuleNode} : new Node[0];
        manager.setSelectedNodes(toSelect);
    } catch (PropertyVetoException ex) {
        //no-op
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号