NetBeans平台提示JavaFix API用法

时间:2014-12-31 17:30:18

标签: netbeans-platform

我正在尝试创建一个转换JUL日志语句的NetBeans提示模块:

LOG.log(Level.INFO, "Blah {0} Blah", param);

到Groovy日志语句:

log.info "Blah ${param} Blah"

我有提示,但我不知道如何使用org.netbeans.spi.java.hints.JavaFix API执行转换:

    @Override
    protected void performRewrite(TransformationContext tc) {            
        WorkingCopy wc = tc.getWorkingCopy();
        TreePath statementPath = tc.getPath();

        //perform the required transformation ...
    }

0 个答案:

没有答案