public DetailFormatter getAssociatedDetailFormatter(IJavaType type) { String typeName = ""; //$NON-NLS-1$ try { while (type instanceof IJavaArrayType) { type = ((IJavaArrayType)type).getComponentType(); } if (type instanceof IJavaClassType) { typeName = type.getName(); } else { return null; } } catch (DebugException e) {return null;} return (DetailFormatter)fDetailFormattersMap.get(typeName); }
if (((IJavaArrayType)value.getJavaType()).getComponentType() instanceof IJavaReferenceType) { int length = value.getLength();
/** * Resolves and returns the source element to open or <code>null</code> if none. * * @param e selected element to resolve a source element for * @return the source element to open or <code>null</code> if none * @throws CoreException */ protected Object resolveSourceElement(Object e) throws CoreException { Object source = null; IAdaptable element= (IAdaptable) e; IDebugElement dbgElement= getDebugElement(element); if (dbgElement != null) { IJavaType type = getTypeToOpen(dbgElement); while (type instanceof IJavaArrayType) { type = ((IJavaArrayType)type).getComponentType(); } if (type != null) { source = JavaDebugUtils.resolveType(type); if (source == null) { //resort to looking through the workspace projects for the //type as the source locators failed. source = findTypeInWorkspace(type.getName()); } } } return source; }
if (javaValue instanceof IJavaArray) { IJavaArrayType arrType = (IJavaArrayType) javaValue.getJavaType(); IJavaType compType = arrType.getComponentType(); while (compType instanceof IJavaArrayType) { compType = ((IJavaArrayType)compType).getComponentType();