use of org.eclipse.jface.viewers.StyledString in project cubrid-manager by CUBRID.
the class NavigatorTreeLabelProvider method getStyledText.
public StyledString getStyledText(Object element) {
String text = getText(element);
StyledString styledString = new StyledString(text);
return styledString;
}
use of org.eclipse.jface.viewers.StyledString in project ow by vtst.
the class SoyLabelProvider method text.
StyledString text(SoyFile obj) {
// We are careful about null, because we don't know all possible cases.
Resource resource = obj.eResource();
String label = messages.getString("soy_file");
if (resource != null) {
URI uri = resource.getURI();
if (uri != null)
label = (label + " [" + uri.lastSegment() + "]");
}
return new StyledString(label, rootStyler);
}
use of org.eclipse.jface.viewers.StyledString in project ow by vtst.
the class LessLabelProvider method text.
StyledString text(StyleSheet obj) {
// We are careful about null, because we don't know all possible cases.
Resource resource = obj.eResource();
String label = messages.getString("stylesheet");
if (resource != null) {
URI uri = resource.getURI();
if (uri != null)
label = (label + " [" + uri.lastSegment() + "]");
}
return new StyledString(label, rootStyler);
}
use of org.eclipse.jface.viewers.StyledString in project ow by vtst.
the class AbstractCompletionProposal method getStyledDisplayString.
@Override
public StyledString getStyledDisplayString() {
StyledString result = new StyledString();
result.append(completionString);
return result;
}
use of org.eclipse.jface.viewers.StyledString in project bndtools by bndtools.
the class RunBundlesPart method getLabelProvider.
@Override
protected IBaseLabelProvider getLabelProvider() {
return new VersionedClauseLabelProvider() {
@Override
public void update(ViewerCell cell) {
Object element = cell.getElement();
if (element instanceof Builder) {
@SuppressWarnings("resource") Builder builder = (Builder) element;
StyledString label = new StyledString(builder.getBsn(), StyledString.QUALIFIER_STYLER);
cell.setText(label.getString());
cell.setStyleRanges(label.getStyleRanges());
cell.setImage(projectImg);
} else {
super.update(cell);
}
}
};
}
Aggregations