use of org.talend.core.model.repository.IRepositoryEditorInput in project tdi-studio-se by Talend.
the class JobSettingsView method retrieveBusiness.
private IRepositoryViewObject retrieveBusiness(IEditorPart businessPart) {
if (CorePlugin.getDefault().getDiagramModelService().isBusinessDiagramEditor(businessPart)) {
IRepositoryViewObject lastVersion = null;
selectedModel = CorePlugin.getDefault().getDiagramModelService().getBusinessEditorSelection(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor());
try {
IRepositoryEditorInput input = CorePlugin.getDefault().getDiagramModelService().getBusinessDiagramEditorInput(businessPart);
if (input != null) {
RepositoryNode node = input.getRepositoryNode();
if (node != null) {
lastVersion = node.getObject();
} else {
lastVersion = CorePlugin.getDefault().getProxyRepositoryFactory().getLastVersion(input.getItem().getProperty().getId());
}
}
return lastVersion;
} catch (PersistenceException e) {
ExceptionHandler.process(e);
}
}
return null;
}
Aggregations