use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class DetecteViewImpactAction method doRun.
@Override
protected void doRun() {
RepositoryNode node = getCurrentRepositoryNode();
if (node == null) {
return;
}
IStructuredSelection selection = new StructuredSelection(node);
// try to check via extension point first.
UpdateManagerProviderDetector.INSTANCE.updateForRepository(selection, true);
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class ConnectionFormComposite method fillFields.
private void fillFields() {
if (connection != null) {
removeListeners();
String repositoryId = connection.getRepositoryId();
if (repositoryId == null || "".equals(repositoryId)) {
if (getRepository() != null) {
connection.setRepositoryId(getRepository().getId());
} else {
connection.setRepositoryId(RepositoryConstants.REPOSITORY_LOCAL_ID);
}
}
IRepositoryFactory repositoriyById = RepositoryFactoryProvider.getRepositoriyById(repositoryId);
repositoryCombo.setSelection(new StructuredSelection(new Object[] { repositoriyById }));
if (getRepository() != null) {
Map<String, LabelText> map = dynamicControls.get(getRepository());
for (String fieldKey : map.keySet()) {
LabelText current = map.get(fieldKey);
String string = connection.getDynamicFields().get(fieldKey);
//$NON-NLS-1$
current.setText(string == null ? "" : string);
}
Map<String, LabelledCombo> map2 = dynamicChoices.get(getRepository());
for (String fieldKey : map2.keySet()) {
Combo combo = map2.get(fieldKey).getCombo();
String value = connection.getDynamicFields().get(fieldKey);
combo.deselectAll();
for (DynamicChoiceBean dynamicChoiceBean : getRepository().getChoices()) {
if (dynamicChoiceBean.getId().equals(fieldKey)) {
combo.select(dynamicChoiceBean.getChoiceIndex(value));
}
}
}
}
//$NON-NLS-1$
nameText.setText((connection.getName() == null ? "" : connection.getName()));
//$NON-NLS-1$
descriptionText.setText((connection.getDescription() == null ? "" : connection.getDescription()));
//$NON-NLS-1$
userText.setText((connection.getUser() == null ? "" : connection.getUser()));
//$NON-NLS-1$
passwordText.setText((connection.getPassword() == null ? "" : connection.getPassword()));
workSpaceText.setText(//$NON-NLS-1$
("".equals(connection.getWorkSpace()) || connection.getWorkSpace() == null) ? getRecentWorkSpace() : connection.getWorkSpace());
addListeners();
}
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class TalendZipFileExportWizard method init.
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
this.selection = currentSelection;
List selectedResources = IDE.computeSelectedResources(currentSelection);
if (!selectedResources.isEmpty()) {
this.selection = new StructuredSelection(selectedResources);
}
// setWindowTitle(DataTransferMessages.DataTransfer_export);
//$NON-NLS-1$
setWindowTitle(Messages.getString("DataTransferMessages.DataTransfer_export"));
// setDefaultPageImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/exportzip_wiz.png"));//$NON-NLS-1$
setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(IDEWorkbenchPlugin.IDE_WORKBENCH, //$NON-NLS-1$
"$nl$/icons/full/wizban/exportzip_wiz.png"));
setNeedsProgressMonitor(true);
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class TalendZipFileExportWizard2 method init.
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
this.selection = currentSelection;
List selectedResources = IDE.computeSelectedResources(currentSelection);
if (!selectedResources.isEmpty()) {
this.selection = new StructuredSelection(selectedResources);
}
// setWindowTitle(DataTransferMessages.DataTransfer_export);
//$NON-NLS-1$
setWindowTitle(Messages.getString("DataTransferMessages.DataTransfer_export"));
// setDefaultPageImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/exportzip_wiz.png"));//$NON-NLS-1$
setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(IDEWorkbenchPlugin.IDE_WORKBENCH, //$NON-NLS-1$
"$nl$/icons/full/wizban/exportzip_wiz.png"));
setNeedsProgressMonitor(true);
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class JobScriptsExportWizard method init.
/*
* (non-Javadoc) Method declared on IWorkbenchWizard.
*/
@Override
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
selection = currentSelection;
List selectedResources = IDE.computeSelectedResources(currentSelection);
if (!selectedResources.isEmpty()) {
selection = new StructuredSelection(selectedResources);
}
populateUIMessage();
}
Aggregations