mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix bug 104506: StringIndexOutOfBoundsException
This commit is contained in:
parent
6cc20b8467
commit
ad2b990865
1 changed files with 14 additions and 10 deletions
|
@ -127,11 +127,13 @@ public class CElementSorter extends ViewerSorter {
|
||||||
return MACROS;
|
return MACROS;
|
||||||
} else if (element instanceof INamespace) {
|
} else if (element instanceof INamespace) {
|
||||||
String name = ((ICElement)element).getElementName();
|
String name = ((ICElement)element).getElementName();
|
||||||
if (name.startsWith("__")) { //$NON-NLS-1$
|
if( name.length() > 0 ) {
|
||||||
return NAMESPACES_SYSTEM;
|
if (name.startsWith("__")) { //$NON-NLS-1$
|
||||||
}
|
return NAMESPACES_SYSTEM;
|
||||||
if (name.charAt(0) == '_') {
|
}
|
||||||
return NAMESPACES_RESERVED;
|
if (name.charAt(0) == '_') {
|
||||||
|
return NAMESPACES_RESERVED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NAMESPACES;
|
return NAMESPACES;
|
||||||
} else if (element instanceof IUsing) {
|
} else if (element instanceof IUsing) {
|
||||||
|
@ -170,11 +172,13 @@ public class CElementSorter extends ViewerSorter {
|
||||||
return INCLUDEREFERENCES;
|
return INCLUDEREFERENCES;
|
||||||
} else if (element instanceof ICElement) {
|
} else if (element instanceof ICElement) {
|
||||||
String name = ((ICElement)element).getElementName();
|
String name = ((ICElement)element).getElementName();
|
||||||
if (name.startsWith("__")) { //$NON-NLS-1$
|
if( name.length() > 0 ) {
|
||||||
return CELEMENTS_SYSTEM;
|
if (name.startsWith("__")) { //$NON-NLS-1$
|
||||||
}
|
return CELEMENTS_SYSTEM;
|
||||||
if (name.charAt(0) == '_') {
|
}
|
||||||
return CELEMENTS_RESERVED;
|
if (name.charAt(0) == '_') {
|
||||||
|
return CELEMENTS_RESERVED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return CELEMENTS;
|
return CELEMENTS;
|
||||||
} else if (element instanceof IFile) {
|
} else if (element instanceof IFile) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue