*/
@Override
public String getText(Object element) {
if (element instanceof ExternalProjectFragment) {
ExternalProjectFragment fragment = (ExternalProjectFragment) element;
String name = LanguageModelInitializer
.getPathName(EnvironmentPathUtils.getLocalPath(fragment
.getPath()));
if (name != null) {
return name;
}
return fragment.toStringWithAncestors();
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=295256
if (element instanceof IProjectFragment) {
IProjectFragment fragment = (IProjectFragment) element;
return fragment.getElementName();
}
// end
if (element instanceof IncludePath) {
Object entry = ((IncludePath) element).getEntry();