use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.HotSpotsFilteredTree in project tdi-studio-se by Talend.
the class CpuDumpEditor method createHotSpotsPage.
/**
* Creates the hot spots page.
*/
private void createHotSpotsPage() {
Composite panel = new Composite(getContainer(), SWT.NONE);
panel.setLayout(new FillLayout());
final HotSpotsFilteredTree hotSpotsFilteredTree = new HotSpotsFilteredTree(panel, getEditorSite().getActionBars());
TreeViewer hotSpotsViewer = hotSpotsFilteredTree.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(hotSpotsFilteredTree));
hotSpotsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
hotSpotsFilteredTree.updateStatusLine((IStructuredSelection) event.getSelection());
}
});
hotSpotsViewer.setUseHashlookup(true);
hotSpotsViewer.setInput(cpuModel);
hotSpotsFilteredTree.sortColumn(hotSpotsViewer.getTree().getColumn(1));
int page = addPage(panel);
trees.put(hotSpotsFilteredTree, page);
setPageText(page, Messages.hotSpotsPageLabel);
setPageImage(page, getHotSpotsImage());
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.HotSpotsFilteredTree in project tdi-studio-se by Talend.
the class CpuDumpEditor method createCalleeViewer.
/**
* Create the callee viewer.
*
* @param parent The parent composite
* @param page The page
*/
private void createCalleeViewer(Composite parent, int page) {
final HotSpotsFilteredTree calleeFilteredTree = new HotSpotsFilteredTree(parent, getEditorSite().getActionBars()) {
@Override
public ViewerType getViewerType() {
return ViewerType.Callee;
}
@Override
protected String getMethodColumnName() {
return org.talend.designer.runtime.visualization.internal.ui.properties.cpu.Messages.calleeColumnLabel;
}
@Override
protected String getMethodColumnToolTip() {
return org.talend.designer.runtime.visualization.internal.ui.properties.cpu.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());
}
});
calleeViewer.setUseHashlookup(true);
calleeViewer.setInput(cpuModel);
calleeFilteredTree.sortColumn(calleeViewer.getTree().getColumn(1));
trees.put(calleeFilteredTree, page);
}
use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.HotSpotsFilteredTree in project tdi-studio-se by Talend.
the class CpuDumpEditor method createCallerViewer.
/**
* Creates the caller viewer.
*
* @param parent The parent composite
* @param page The page
*/
private void createCallerViewer(Composite parent, int page) {
final HotSpotsFilteredTree callerFilteredTree = new HotSpotsFilteredTree(parent, getEditorSite().getActionBars()) {
@Override
public ViewerType getViewerType() {
return ViewerType.Caller;
}
@Override
protected String getMethodColumnName() {
return org.talend.designer.runtime.visualization.internal.ui.properties.cpu.Messages.callerColumnLabel;
}
@Override
protected String getMethodColumnToolTip() {
return org.talend.designer.runtime.visualization.internal.ui.properties.cpu.Messages.callerColumnToolTip;
}
};
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());
}
});
callerViewer.setUseHashlookup(true);
callerViewer.setInput(cpuModel);
callerFilteredTree.sortColumn(callerViewer.getTree().getColumn(1));
trees.put(callerFilteredTree, page);
}
Aggregations