Search in sources :

Example 1 with ISVNUiProviderService

use of org.talend.core.ui.services.ISVNUiProviderService in project tdi-studio-se by Talend.

the class JobSettingsView method getSelection.

/*
     * (non-Javadoc)
     *
     * @see org.talend.designer.core.ui.views.properties.IJobSettingsView#getSelection()
     */
@Override
public ISelection getSelection() {
    ISVNUiProviderService service = null;
    if (PluginChecker.isSVNProviderPluginLoaded()) {
        service = (ISVNUiProviderService) GlobalServiceRegister.getDefault().getService(ISVNUiProviderService.class);
    }
    if (currentSelectedTab == null) {
        return null;
    }
    IDynamicProperty dc = currentSelectedTab.getPropertyComposite();
    if (dc instanceof ProcessVersionComposite) {
        return ((ProcessVersionComposite) dc).getSelection();
    } else if (service != null && service.isSVNHistoryComposite(dc)) {
        return service.getSVNHistorySelection(dc);
    } else if (CorePlugin.getDefault().getDiagramModelService().isInstanceOfBusinessAssignmentComposite(dc)) {
        IRepositoryView repositoryView = RepositoryManagerHelper.findRepositoryView();
        if (repositoryView != null) {
            return repositoryView.getViewer().getSelection();
        }
    }
    return null;
}
Also used : ProcessVersionComposite(org.talend.designer.core.ui.views.jobsettings.tabs.ProcessVersionComposite) IDynamicProperty(org.talend.core.ui.properties.tab.IDynamicProperty) ISVNUiProviderService(org.talend.core.ui.services.ISVNUiProviderService) IRepositoryView(org.talend.repository.ui.views.IRepositoryView)

Aggregations

IDynamicProperty (org.talend.core.ui.properties.tab.IDynamicProperty)1 ISVNUiProviderService (org.talend.core.ui.services.ISVNUiProviderService)1 ProcessVersionComposite (org.talend.designer.core.ui.views.jobsettings.tabs.ProcessVersionComposite)1 IRepositoryView (org.talend.repository.ui.views.IRepositoryView)1