use of org.eclipse.jface.viewers.StyledString in project flux by eclipse.
the class Strings method markJavaElementLabelLTR.
/**
* Adds special marks so that that the given styled Java element label is readable in a BiDi
* environment.
*
* @param styledString the styled string
* @return the processed styled string
* @since 3.6
*/
public static StyledString markJavaElementLabelLTR(StyledString styledString) {
if (!USE_TEXT_PROCESSOR)
return styledString;
String inputString = styledString.getString();
String string = TextProcessor.process(inputString, JAVA_ELEMENT_DELIMITERS);
if (string != inputString)
insertMarks(styledString, inputString, string);
return styledString;
}
use of org.eclipse.jface.viewers.StyledString in project flux by eclipse.
the class Strings method markLTR.
/**
* Adds special marks so that that the given styled string is readable in a BiDi environment.
*
* @param styledString the styled string
* @return the processed styled string
* @since 3.4
*/
public static StyledString markLTR(StyledString styledString) {
if (!USE_TEXT_PROCESSOR)
return styledString;
String inputString = styledString.getString();
String string = TextProcessor.process(inputString);
if (string != inputString)
insertMarks(styledString, inputString, string);
return styledString;
}
use of org.eclipse.jface.viewers.StyledString in project flux by eclipse.
the class Strings method markLTR.
/**
* Adds special marks so that that the given styled string is readable in a BiDi environment.
*
* @param styledString the styled string
* @param delimiters the additional delimiters
* @return the processed styled string
* @since 3.4
*/
public static StyledString markLTR(StyledString styledString, String delimiters) {
if (!USE_TEXT_PROCESSOR)
return styledString;
String inputString = styledString.getString();
String string = TextProcessor.process(inputString, delimiters);
if (string != inputString)
insertMarks(styledString, inputString, string);
return styledString;
}
use of org.eclipse.jface.viewers.StyledString in project che by eclipse.
the class JavaElementLabels method getStyledElementLabel.
/**
* Returns the styled label for a Java element with the flags as defined by this class.
*
* @param element the element to render
* @param flags the rendering flags
* @return the label of the Java element
*
* @since 3.4
*/
public static StyledString getStyledElementLabel(IJavaElement element, long flags) {
StyledString result = new StyledString();
getElementLabel(element, flags, result);
return Strings.markJavaElementLabelLTR(result);
}
use of org.eclipse.jface.viewers.StyledString in project che by eclipse.
the class CompletionProposalCollector method createAnnotationAttributeReferenceProposal.
private IJavaCompletionProposal createAnnotationAttributeReferenceProposal(CompletionProposal proposal) {
StyledString displayString = fLabelProvider.createLabelWithTypeAndDeclaration(proposal);
ImageDescriptor descriptor = fLabelProvider.createMethodImageDescriptor(proposal);
String completion = String.valueOf(proposal.getCompletion());
JavaCompletionProposal javaProposal = new JavaCompletionProposal(completion, proposal.getReplaceStart(), getLength(proposal), getImage(descriptor), displayString, computeRelevance(proposal));
if (fJavaProject != null)
javaProposal.setProposalInfo(new AnnotationAtttributeProposalInfo(fJavaProject, proposal));
return javaProposal;
}
Aggregations