use of org.eclipse.jface.viewers.TreeNodeContentProvider in project pmd-eclipse-plugin by pmd.
the class CPDView method init.
/*
* @see org.eclipse.ui.ViewPart#init(org.eclipse.ui.IViewSite)
*/
@Override
public void init(IViewSite site) throws PartInitException {
super.init(site);
contentProvider = new TreeNodeContentProvider();
labelProvider = new CPDViewLabelProvider();
doubleClickListener = new CPDViewDoubleClickEventListener(this);
tooltipListener = new CPDViewTooltipListener(this);
}
use of org.eclipse.jface.viewers.TreeNodeContentProvider in project xtext-eclipse by eclipse.
the class OutlinePage method showBusyStatus.
/**
* @since 2.8
*/
protected void showBusyStatus() {
TreeViewer treeViewer = getTreeViewer();
treeViewer.setLabelProvider(busyLabelProvider);
treeViewer.setContentProvider(new TreeNodeContentProvider());
treeViewer.setInput(new TreeNode[] { new TreeNode("Loading...") });
}
use of org.eclipse.jface.viewers.TreeNodeContentProvider in project pmd-eclipse-plugin by pmd.
the class CPDView2 method init.
/*
* @see org.eclipse.ui.ViewPart#init(org.eclipse.ui.IViewSite)
*/
@Override
public void init(IViewSite site) throws PartInitException {
super.init(site);
contentProvider = new TreeNodeContentProvider();
labelProvider = new CPDViewLabelProvider2();
measureListener = new Listener() {
public void handleEvent(Event event) {
captureColumnWidths();
}
};
resizeListener = new Listener() {
public void handleEvent(Event event) {
int width = treeViewer.getTree().getBounds().width;
messageColumn.setWidth(width - SPAN_COLUMN_WIDTH);
captureColumnWidths();
treeViewer.refresh();
}
};
nameWidthsByName = new HashMap<String, int[]>();
}
Aggregations