use of org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider in project erlide_eclipse by erlang.
the class ErlangSearchResultPage method configureTreeViewer.
@Override
protected void configureTreeViewer(final TreeViewer viewer) {
viewer.setUseHashlookup(true);
innerLabelProvider = new SearchResultLabelProvider(this, SearchResultLabelProvider.SHOW_LABEL, true);
viewer.setLabelProvider(new DecoratingStyledCellLabelProvider(innerLabelProvider, PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), null));
viewer.setContentProvider(new ErlangSearchTreeContentProvider(viewer, this));
viewer.setComparator(new DecoratorIgnoringViewerSorter(innerLabelProvider));
fContentProvider = (IErlSearchContentProvider) viewer.getContentProvider();
addDragAdapters(viewer);
}
use of org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider in project erlide_eclipse by erlang.
the class ErlangSearchResultPage method configureTableViewer.
@Override
protected void configureTableViewer(final TableViewer viewer) {
viewer.setUseHashlookup(true);
viewer.setLabelProvider(new DecoratingStyledCellLabelProvider(getInnerLabelProvider(), PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(), null));
viewer.setContentProvider(new ErlangSearchTableContentProvider(this));
viewer.setComparator(new DecoratorIgnoringViewerSorter(getInnerLabelProvider()));
fContentProvider = (IErlSearchContentProvider) viewer.getContentProvider();
addDragAdapters(viewer);
}
use of org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider in project tmdm-studio-se by Talend.
the class RepositoryViewObjectCheckedWidget method installColumns.
private void installColumns() {
treeViewer.getTree().setHeaderVisible(true);
//
TreeViewerColumn nameColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
nameColumn.getColumn().setWidth(320);
nameColumn.getColumn().setText(Messages.ConsistencyConflict_name);
ILabelDecorator labelDecorator = RepositoryPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
DecoratingStyledCellLabelProvider consistencyLabelProvider = new DecoratingStyledCellLabelProvider(new MDMRepositoryLabelProvider(), labelDecorator, null);
nameColumn.setLabelProvider(consistencyLabelProvider);
// compare result
TreeViewerColumn resultColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
resultColumn.getColumn().setWidth(120);
resultColumn.getColumn().setText(Messages.ConsistencyConflict_compareResult);
resultColumn.setLabelProvider(new CompareResultColumnProvider());
//
localTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
localTimeColumn.getColumn().setText(Messages.ConsistencyConflict_retrievalTimestamp);
localTimeColumn.setLabelProvider(new TimeStampColumnProvider(true));
//
serverTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
serverTimeColumn.getColumn().setText(Messages.ConsistencyConflict_serverTimestamp);
serverTimeColumn.setLabelProvider(new TimeStampColumnProvider(false));
//
showTimeStampColumns(false);
}
use of org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider in project tmdm-studio-se by Talend.
the class ConsistencyConflictDialog method installColumns.
private void installColumns() {
treeViewer.getTree().setHeaderVisible(true);
nameColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
nameColumn.getColumn().setWidth(320);
nameColumn.getColumn().setText(Messages.ConsistencyConflict_name);
ILabelDecorator labelDecorator = RepositoryPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator();
DecoratingStyledCellLabelProvider consistencyLabelProvider = new DecoratingStyledCellLabelProvider(new MDMRepositoryLabelProvider(), labelDecorator, null) {
@Override
public Color getBackground(Object element) {
IRepositoryViewObject viewObj = (IRepositoryViewObject) element;
return getBackgroundColor(viewObj);
}
};
nameColumn.setLabelProvider(consistencyLabelProvider);
resultColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
resultColumn.getColumn().setWidth(120);
resultColumn.getColumn().setText(Messages.ConsistencyConflict_compareResult);
resultColumn.setLabelProvider(new CompareResultColumnProvider());
//
operationColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
operationColumn.getColumn().setWidth(120);
operationColumn.getColumn().setText(Messages.ConsistencyConflictDialog_Operation);
operationColumn.setLabelProvider(new OperationProvider());
//
localTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
localTimeColumn.getColumn().setText(Messages.ConsistencyConflict_retrievalTimestamp);
localTimeColumn.setLabelProvider(new TimeStampColumnProvider(true));
//
serverTimeColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
serverTimeColumn.getColumn().setText(Messages.ConsistencyConflict_serverTimestamp);
serverTimeColumn.setLabelProvider(new TimeStampColumnProvider(false));
//
showTimeStampColumns(false);
}
use of org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider in project egit by eclipse.
the class CommitViewerComparator method createStatusLabelProvider.
private static CellLabelProvider createStatusLabelProvider() {
CommitStatusLabelProvider baseProvider = new CommitStatusLabelProvider();
ProblemLabelDecorator decorator = new ProblemLabelDecorator(null);
return new DecoratingStyledCellLabelProvider(baseProvider, decorator, null) {
@Override
public String getToolTipText(Object element) {
return ((CommitItem) element).status.getText();
}
};
}
Aggregations