0
Есть главный класс Java с оценкой заводной sciptКак установить gdsl заводной базовый сценарий объект
Binding binding = new Binding();
binding.setProperty("text", "some text");
CompilerConfiguration configuration = new CompilerConfiguration();
configuration.setScriptBaseClass(MyBaseClass.class.getName());
GroovyShell groovyShell = new GroovyShell(binding, configuration);
result = groovyShell.evaluate(file);
Чтобы иметь автозаполнение заводных скриптов в идее (и других Идах), я использую gdsl файл
def ctx = context(scope: scriptScope())
contributor(ctx) {
property name: "text", type: "java.lang.String"
method name: 'annotate', type: 'void', params: [closure: 'groovy.lang.Closure']
}
Но Я хотел бы добавить gdsl MyBaseClass, чтобы получить подсказки IDE и автозаполнение всеми моими методами класса.