use of org.talend.designer.runtime.visualization.internal.actions.ShowInTimelineAction in project tdi-studio-se by Talend.
the class AttributesTab method createViewer.
/**
* Creates the viewer.
*
* @param propertySheet The property sheet
*/
private void createViewer(PropertySheet propertySheet) {
filteredTree = new PropertiesFilteredTree(this, propertySheet.getViewSite().getActionBars()) {
private ShowInTimelineAction showInTimelineAction;
@Override
protected List<Action> createActions(IActionBars actionBars) {
List<Action> actions = new ArrayList<Action>();
CopyAction copyAction = CopyAction.createCopyAction(actionBars);
actions.add(copyAction);
showInTimelineAction = new MyShowInTimelineAction(section);
actions.add(showInTimelineAction);
return actions;
}
@Override
public void menuAboutToshow() {
// do nothing
}
};
viewer = filteredTree.getViewer();
filteredTree.setEditingSupport(new MyEditingSupport(viewer));
contentProvider = new AttributeContentProvider();
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new AttributeLabelProvider(viewer));
viewer.setInput(new Object());
}
use of org.talend.designer.runtime.visualization.internal.actions.ShowInTimelineAction in project tdi-studio-se by Talend.
the class OverviewSection method createControls.
/*
* @see AbstractJvmPropertySection#createControls(Composite)
*/
@Override
protected void createControls(final Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
composite.setLayout(layout);
viewer = new PropertiesFilteredTree(composite, getActionBars()) {
private ShowInTimelineAction showInTimelineAction;
@Override
protected List<Action> createActions(IActionBars actionBars) {
List<Action> actions = new ArrayList<Action>();
CopyAction copyAction = CopyAction.createCopyAction(actionBars);
actions.add(copyAction);
showInTimelineAction = new MyShowInTimelineAction(OverviewSection.this);
actions.add(showInTimelineAction);
return actions;
}
@Override
public void menuAboutToshow() {
// do nothing
}
}.getViewer();
viewer.setContentProvider(new OverviewContentProvider(overviewProperties));
viewer.setLabelProvider(new OverviewLabelProvider());
((Tree) viewer.getControl()).addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
storeTreeExpansionState();
}
});
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.OVERVIEW_PAGE);
}
Aggregations