use of org.eclipse.linuxtools.rpm.ui.editor.parser.SpecfilePackageContainer in project linuxtools by eclipse.
the class SpecfileLabelProvider method getText.
@Override
public String getText(Object element) {
// $NON-NLS-1$
String str = "";
if (element instanceof SpecfileSection) {
SpecfileSection specfileSection = (SpecfileSection) element;
str = specfileSection.toString();
} else if (element instanceof Specfile) {
str = ((Specfile) element).getName();
} else if (element instanceof SpecfilePackageContainer) {
str = Messages.SpecfileLabelProvider_0;
} else if (element instanceof SpecfilePreamble) {
str = Messages.SpecfileLabelProvider_1;
} else if (element instanceof SpecfileElement) {
SpecfileElement specfileElement = (SpecfileElement) element;
str = specfileElement.getName();
} else if (element instanceof String) {
str = (String) element;
} else if (element instanceof SpecfilePackage) {
str = ((SpecfilePackage) element).getName();
}
return filterMacros(str.trim());
}
Aggregations