public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
@Override public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
public IJavaElement[] getChildrenForCategory(String category) throws JavaModelException { IJavaElement[] children = getChildren(); int length = children.length; if (length == 0) return NO_ELEMENTS; SourceTypeElementInfo info = (SourceTypeElementInfo) getElementInfo(); HashMap categories = info.getCategories(); if (categories == null) return NO_ELEMENTS; IJavaElement[] result = new IJavaElement[length]; int index = 0; for (int i = 0; i < length; i++) { IJavaElement child = children[i]; String[] elementCategories = (String[]) categories.get(child); if (elementCategories != null) for (int j = 0, length2 = elementCategories.length; j < length2; j++) { if (elementCategories[j].equals(category)) result[index++] = child; } } if (index == 0) return NO_ELEMENTS; if (index < length) System.arraycopy(result, 0, result = new IJavaElement[index], 0, index); return result; } /**
public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**
public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**
@Override public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**
public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**
public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**
public String[] getCategories() throws JavaModelException { IType type = (IType) getAncestor(IJavaElement.TYPE); if (type == null) return CharOperation.NO_STRINGS; if (type.isBinary()) { return CharOperation.NO_STRINGS; } else { SourceTypeElementInfo info = (SourceTypeElementInfo) ((SourceType) type).getElementInfo(); HashMap map = info.getCategories(); if (map == null) return CharOperation.NO_STRINGS; String[] categories = (String[]) map.get(this); if (categories == null) return CharOperation.NO_STRINGS; return categories; } } /**