use of eu.esdihumboldt.hale.ui.functions.groovy.internal.InstanceBuilderCompletions in project hale by halestudio.
the class GroovyCreatePage method createConfiguration.
@Override
protected SourceViewerConfiguration createConfiguration() {
InstanceBuilderCompletions targetCompletions = new InstanceBuilderCompletions(definitionImages) {
@Override
protected TypeDefinition getTargetType() {
Type typeEntity = (Type) CellUtil.getFirstEntity(getWizard().getUnfinishedCell().getTarget());
if (typeEntity != null) {
return typeEntity.getDefinition().getDefinition();
}
return null;
}
};
HelperFunctionsCompletions functionCompletions = new HelperFunctionsCompletions(HaleUI.getServiceProvider().getService(HelperFunctionsService.class));
return new SimpleGroovySourceViewerConfiguration(colorManager, ImmutableList.of(BINDING_BUILDER, BINDING_INDEX, BINDING_TARGET, BINDING_TARGET_TYPE, BINDING_CELL, BINDING_LOG, BINDING_CELL_CONTEXT, BINDING_FUNCTION_CONTEXT, BINDING_TRANSFORMATION_CONTEXT, BINDING_HELPER_FUNCTIONS), ImmutableList.of(targetCompletions, functionCompletions));
}
use of eu.esdihumboldt.hale.ui.functions.groovy.internal.InstanceBuilderCompletions in project hale by halestudio.
the class GroovyTransformationPage method createConfiguration.
@Override
protected SourceViewerConfiguration createConfiguration() {
InstanceBuilderCompletions targetCompletions = new InstanceBuilderCompletions(definitionImages) {
@Override
protected TypeDefinition getTargetType() {
Property targetProperty = (Property) CellUtil.getFirstEntity(getWizard().getUnfinishedCell().getTarget());
if (targetProperty != null) {
return targetProperty.getDefinition().getDefinition().getPropertyType();
}
return null;
}
};
HelperFunctionsCompletions functionCompletions = new HelperFunctionsCompletions(HaleUI.getServiceProvider().getService(HelperFunctionsService.class));
return new SimpleGroovySourceViewerConfiguration(colorManager, ImmutableList.of(BINDING_BUILDER, BINDING_TARGET, BINDING_SOURCE_TYPES, BINDING_TARGET_TYPE, BINDING_CELL, BINDING_LOG, BINDING_CELL_CONTEXT, BINDING_FUNCTION_CONTEXT, BINDING_TRANSFORMATION_CONTEXT, BINDING_HELPER_FUNCTIONS), ImmutableList.of(targetCompletions, functionCompletions));
}
use of eu.esdihumboldt.hale.ui.functions.groovy.internal.InstanceBuilderCompletions in project hale by halestudio.
the class GroovyRetypePage method createConfiguration.
@Override
protected SourceViewerConfiguration createConfiguration() {
InstanceBuilderCompletions targetCompletions = new InstanceBuilderCompletions(definitionImages) {
@Override
protected TypeDefinition getTargetType() {
Type typeEntity = (Type) CellUtil.getFirstEntity(getWizard().getUnfinishedCell().getTarget());
if (typeEntity != null) {
return typeEntity.getDefinition().getDefinition();
}
return null;
}
};
HelperFunctionsCompletions functionCompletions = new HelperFunctionsCompletions(HaleUI.getServiceProvider().getService(HelperFunctionsService.class));
return new SimpleGroovySourceViewerConfiguration(colorManager, ImmutableList.of(BINDING_BUILDER, BINDING_SOURCE, BINDING_TARGET, BINDING_SOURCE_TYPES, BINDING_TARGET_TYPE, BINDING_CELL, BINDING_LOG, BINDING_CELL_CONTEXT, BINDING_FUNCTION_CONTEXT, BINDING_TRANSFORMATION_CONTEXT, BINDING_HELPER_FUNCTIONS), ImmutableList.of(targetCompletions, functionCompletions));
}
Aggregations