use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.
the class InstanceExportAdvisor method prepareProvider.
/**
* @see IOAdvisor#prepareProvider(IOProvider)
*/
@Override
public void prepareProvider(InstanceWriter provider) {
super.prepareProvider(provider);
// set target schema
SchemaService ss = getService(SchemaService.class);
provider.setTargetSchema(ss.getSchemas(SchemaSpaceID.TARGET));
// set instances to export
InstanceService is = getService(InstanceService.class);
provider.setInstances(is.getInstances(DataSet.TRANSFORMED));
}
use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.
the class InstanceServiceSource method getCurrentState.
/**
* @see ISourceProvider#getCurrentState()
*/
@Override
public Map<String, Object> getCurrentState() {
InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
ProjectService ps = PlatformUI.getWorkbench().getService(ProjectService.class);
Map<String, Object> result = new HashMap<String, Object>();
result.put(HAS_TRANSFORMED_INSTANCES, hasTransformedInstances(is));
result.put(HAS_SOURCE_INSTANCES, hasSourceInstances(is));
result.put(HAS_SOURCE_RESOURCES, hasSourceResources(ps));
return result;
}
use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.
the class InstanceServiceSource method dispose.
/**
* @see ISourceProvider#dispose()
*/
@Override
public void dispose() {
InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
is.removeListener(instanceListener);
ProjectService ps = PlatformUI.getWorkbench().getService(ProjectService.class);
ps.removeListener(projectServiceListener);
}
use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.
the class ToggleTransformationHandler method execute.
/**
* @see IHandler#execute(ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
is.setTransformationEnabled(!is.isTransformationEnabled());
return null;
}
use of eu.esdihumboldt.hale.ui.service.instance.InstanceService in project hale by halestudio.
the class TransformationToggleState method dispose.
/**
* @see org.eclipse.core.commands.State#dispose()
*/
@Override
public void dispose() {
InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
is.removeListener(instanceListener);
}
Aggregations