use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class PublishOnSpagoExportWizard method init.
/*
* (non-Javadoc) Method declared on IWorkbenchWizard.
*/
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
this.selection = currentSelection;
List selectedResources = IDE.computeSelectedResources(currentSelection);
if (!selectedResources.isEmpty()) {
this.selection = new StructuredSelection(selectedResources);
}
//$NON-NLS-1$
setWindowTitle(Messages.getString("PublishOnSpagoExportWizard.publishJob"));
// 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 SpagicDeployWizard method init.
/*
* (non-Javadoc) Method declared on IWorkbenchWizard.
*/
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
this.selection = currentSelection;
List selectedResources = IDE.computeSelectedResources(currentSelection);
if (!selectedResources.isEmpty()) {
this.selection = new StructuredSelection(selectedResources);
}
//$NON-NLS-1$
setWindowTitle(Messages.getString("SapgicDeployWizard.exporttospagic"));
// 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 MemoryRuntimeComposite method initMonitoringModel.
private void initMonitoringModel() {
final List<IActiveJvm> contructSelections = new ArrayList<IActiveJvm>();
contructSelections.add(currentJvm);
if (currentJvm != null) {
viewPart.getSite().setSelectionProvider(new ProcessViewSelectionProvider(new StructuredSelection(contructSelections)));
}
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class MemoryRuntimeComposite method initContextInput.
@SuppressWarnings("unchecked")
private void initContextInput() {
List<IContext> contextList = (List<IContext>) viewPart.getContextComposite().getContextComboInput();
if (contextList != null) {
contextCombo.setSelection(new StructuredSelection(contextList.get(0)));
contextCombo.setInput(contextList);
ComboViewer processContextComboViewer = viewPart.getContextComposite().getContextComboViewer();
IContext selectedContext = (IContext) ((IStructuredSelection) processContextComboViewer.getSelection()).getFirstElement();
for (int i = 0; i < contextList.size(); i++) {
if (contextList.get(i).getName().equals(selectedContext.getName())) {
contextCombo.getCombo().select(i);
}
}
contextCombo.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
viewPart.getContextComposite().runSelectionChange(event);
}
});
} else {
contextCombo.getCombo().setEnabled(false);
}
}
use of org.eclipse.jface.viewers.StructuredSelection in project tdi-studio-se by Talend.
the class MBeanSashForm method createSashFormControls.
/*
* @see AbstractSashForm#createSashFormControls(SashForm, IActionBars)
*/
@Override
protected void createSashFormControls(SashForm sashForm, final IActionBars actionBars) {
mBeanViewer = new MBeanFilteredTree(sashForm, section).getViewer();
mBeanContentProvider = new MBeanContentProvider();
mBeanViewer.setContentProvider(mBeanContentProvider);
mBeanViewer.setLabelProvider(new MyDecoratingStyledCellLabelProvider());
selectionChangedListener = new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof StructuredSelection) {
mBeanTabFolder.selectionChanged((StructuredSelection) selection);
}
}
};
mBeanViewer.addSelectionChangedListener(selectionChangedListener);
mBeanViewer.setInput(new Object());
mBeanTabFolder = new MBeanTabFolder(sashForm, section);
}
Aggregations