use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ConfigureCpuProfilerAction in project tdi-studio-se by Talend.
the class AbstractTabPage method createMessageLabel.
/**
* Creates the message label.
*/
private void createMessageLabel() {
messagePage = new Composite(this, SWT.NONE);
messagePage.setLayout(new GridLayout(3, false));
messagePage.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
FormToolkit toolkit = new FormToolkit(Display.getDefault());
toolkit.createLabel(messagePage, Messages.patckagesNotSpecifiedMsg);
Hyperlink hyperlink = toolkit.createHyperlink(messagePage, Messages.selectPackagesMsg, SWT.NONE);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
new ConfigureCpuProfilerAction(cpuSection).run();
}
});
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ConfigureCpuProfilerAction in project tdi-studio-se by Talend.
the class HotSpotsTabPage method createHotSpotsViewer.
/**
* Creates the hot spots viewer.
*
* @param composite The parent composite
* @param propertySheet The property sheet
*/
private void createHotSpotsViewer(Composite composite, PropertySheet propertySheet) {
filteredTree = new HotSpotsFilteredTree(composite, propertySheet.getViewSite().getActionBars()) {
@Override
protected void addMenus(IMenuManager manager) {
manager.add(new Separator());
manager.add(new ConfigureCpuProfilerAction(cpuSection));
}
};
TreeViewer hotSpotsViewer = filteredTree.getViewer();
hotSpotsViewer.setContentProvider(new AbstractContentProvider() {
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof ICpuModel) {
return ((ICpuModel) inputElement).getHotSpotRoots();
}
return new Object[0];
}
});
hotSpotsViewer.setLabelProvider(new HotSpotsLabelProvider(filteredTree));
hotSpotsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
filteredTree.updateStatusLine((IStructuredSelection) event.getSelection());
}
});
filteredTree.sortColumn(hotSpotsViewer.getTree().getColumn(1));
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ConfigureCpuProfilerAction in project tdi-studio-se by Talend.
the class CallerCalleeTabPage method createCalleeViewer.
/**
* Creates the callee viewer.
*
* @param parent The parent composite
* @param propertySheet The property sheet
*/
private void createCalleeViewer(Composite parent, PropertySheet propertySheet) {
calleeFilteredTree = new HotSpotsFilteredTree(parent, propertySheet.getViewSite().getActionBars()) {
@Override
protected void addMenus(IMenuManager manager) {
manager.add(new Separator());
manager.add(new ConfigureCpuProfilerAction(cpuSection));
}
@Override
public ViewerType getViewerType() {
return ViewerType.Callee;
}
@Override
protected String getMethodColumnName() {
return Messages.calleeColumnLabel;
}
@Override
protected String getMethodColumnToolTip() {
return Messages.calleeColumnToolTip;
}
};
TreeViewer calleeViewer = calleeFilteredTree.getViewer();
calleeViewer.setContentProvider(new AbstractContentProvider() {
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof ICpuModel) {
return ((ICpuModel) inputElement).getCallees();
}
return new Object[0];
}
});
calleeViewer.setLabelProvider(new HotSpotsLabelProvider(calleeFilteredTree));
calleeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
calleeFilteredTree.updateStatusLine((IStructuredSelection) event.getSelection());
}
});
calleeFilteredTree.sortColumn(calleeViewer.getTree().getColumn(1));
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ConfigureCpuProfilerAction in project tdi-studio-se by Talend.
the class CallTreeTabPage method createCallTreeViewer.
/**
* Creates the call tree viewer.
*
* @param composite The parent composite
* @param propertySheet The property sheet
*/
private void createCallTreeViewer(Composite composite, PropertySheet propertySheet) {
filteredTree = new CallTreeFilteredTree(composite, propertySheet.getViewSite().getActionBars()) {
@Override
protected void addMenus(IMenuManager manager) {
super.addMenus(manager);
manager.add(new Separator());
manager.add(new ConfigureCpuProfilerAction(cpuSection));
}
};
TreeViewer callTreeViewer = filteredTree.getViewer();
callTreeViewer.setContentProvider(new CallTreeContentProvider());
callTreeViewer.setLabelProvider(new CallTreeLabelProvider(callTreeViewer));
callTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
filteredTree.updateStatusLine((IStructuredSelection) event.getSelection());
}
});
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.actions.ConfigureCpuProfilerAction in project tdi-studio-se by Talend.
the class CallerCalleeTabPage method createCallerViewer.
/**
* Creates the caller viewer.
*
* @param parent The parent composite
* @param propertySheet The property sheet
*/
private void createCallerViewer(Composite parent, PropertySheet propertySheet) {
callerFilteredTree = new HotSpotsFilteredTree(parent, propertySheet.getViewSite().getActionBars()) {
@Override
protected void addMenus(IMenuManager manager) {
manager.add(new Separator());
manager.add(new ConfigureCpuProfilerAction(cpuSection));
}
@Override
public ViewerType getViewerType() {
return ViewerType.Caller;
}
@Override
protected String getMethodColumnName() {
return Messages.callerColumnLabel;
}
@Override
protected String getMethodColumnToolTip() {
return Messages.calleeColumnToolTip;
}
};
TreeViewer callerViewer = callerFilteredTree.getViewer();
callerViewer.setContentProvider(new AbstractContentProvider() {
@Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof ICpuModel) {
return ((ICpuModel) inputElement).getCallers();
}
return new Object[0];
}
});
callerViewer.setLabelProvider(new HotSpotsLabelProvider(callerFilteredTree));
callerViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
callerFilteredTree.updateStatusLine((IStructuredSelection) event.getSelection());
}
});
callerFilteredTree.sortColumn(callerViewer.getTree().getColumn(1));
}
Aggregations