RuleEditorPanel.java 文件源码

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

项目:incubator-netbeans 作者:
@Override
protected JPopupMenu createPopupMenu() {
    FeatureDescriptor fd = getSelection();
    if (fd != null) {
        if (fd instanceof RuleEditorNode.DeclarationProperty) {
            //property
            //
            //actions:
            //remove
            //hide
            //????
            //custom popop for the whole panel
            JPopupMenu pm = new JPopupMenu();

            if(!addPropertyMode) {
                pm.add(new GoToSourceAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
                pm.addSeparator();
                pm.add(new RemovePropertyAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
            }

            return pm;

        } else if (fd instanceof RuleEditorNode.PropertyCategoryPropertySet) {
            //property category
            //TODO possibly add "add property" action which would
            //preselect the css category in the "add property dialog".
        }
    }

    //no context popup - create the generic popup
    return genericPopupMenu;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号