use of org.talend.designer.runtime.visualization.internal.actions.CopyAction in project tdi-studio-se by Talend.
the class NotificationDetailsDialog method createTree.
/**
* Creates the tree.
*
* @param composite The parent composite
*/
private void createTree(Composite composite) {
composite.setLayout(new FillLayout());
detailsViewer = new TreeViewer(composite, SWT.MULTI | SWT.FULL_SELECTION);
configureTree(detailsViewer.getTree());
detailsViewer.setContentProvider(new DetailsContentProvider());
detailsViewer.setLabelProvider(new DetailsLabelProvider());
detailsViewer.setInput(new Object());
copyAction = new CopyAction();
copyAction.setActionDefinitionId(null);
detailsViewer.addSelectionChangedListener(copyAction);
}
use of org.talend.designer.runtime.visualization.internal.actions.CopyAction in project tdi-studio-se by Talend.
the class InvokeDialog method createReturnValueViewer.
/**
* Creates the return value viewer.
*
* @param parent The parent composite
*/
private void createReturnValueViewer(Composite parent) {
if (info.getReturnType().equals("void")) {
//$NON-NLS-1$
return;
}
Label label = new Label(parent, SWT.NONE);
label.setText(Messages.returnValueLabel);
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new FillLayout());
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
returnValueViewer = new TreeViewer(composite, SWT.MULTI | SWT.FULL_SELECTION);
configureTree(returnValueViewer.getTree());
returnValueViewer.setContentProvider(new ReturnValueContentProvider());
returnValueViewer.setLabelProvider(new ReturnValueLabelProvider());
copyAction = new CopyAction();
copyAction.setActionDefinitionId(null);
returnValueViewer.addSelectionChangedListener(copyAction);
}
use of org.talend.designer.runtime.visualization.internal.actions.CopyAction in project tdi-studio-se by Talend.
the class HeapHistogramPage method createContextMenu.
/**
* Creates the context menu.
*
* @param actionBars The action bars
*/
private void createContextMenu(IActionBars actionBars) {
final OpenDeclarationAction openAction = OpenDeclarationAction.createOpenDeclarationAction(actionBars);
final CopyAction copyAction = CopyAction.createCopyAction(actionBars);
configureColumnsAction = new ConfigureColumnsAction(this);
heapViewer.addSelectionChangedListener(openAction);
heapViewer.getControl().addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
heapViewer.removeSelectionChangedListener(copyAction);
}
@Override
public void focusGained(FocusEvent e) {
heapViewer.addSelectionChangedListener(copyAction);
}
});
heapViewer.addOpenListener(new IOpenListener() {
@Override
public void open(OpenEvent event) {
openAction.run();
}
});
//$NON-NLS-1$
MenuManager menuMgr = new MenuManager("#PopupMenu");
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
@Override
public void menuAboutToShow(IMenuManager manager) {
manager.add(openAction);
manager.add(copyAction);
manager.add(new Separator());
manager.add(configureColumnsAction);
}
});
Menu menu = menuMgr.createContextMenu(heapViewer.getControl());
heapViewer.getControl().setMenu(menu);
}
use of org.talend.designer.runtime.visualization.internal.actions.CopyAction in project tdi-studio-se by Talend.
the class CpuDumpEditor method contributeToActionBars.
/**
* Contributes to action bars.
*/
private void contributeToActionBars() {
IActionBars actionBars = getEditorSite().getActionBars();
actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, new OpenDeclarationAction());
actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), new FindAction());
actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), new CopyAction());
}
Aggregations