@Override public IPropertyDescriptor[] getPropertyDescriptors() { IPropertyDescriptor[] superDescriptors = super.getPropertyDescriptors(); int superLength = superDescriptors.length; IPropertyDescriptor[] fileDescriptors = new IPropertyDescriptor[superLength + 1]; System.arraycopy(superDescriptors, 0, fileDescriptors, 0, superLength); fileDescriptors[superLength] = getInitialPropertyDescriptor(); return fileDescriptors; }
@Override public IPropertyDescriptor[] getPropertyDescriptors() { if (isPathVariable(element)) { return propertyDescriptorsLinkVariable; } return propertyDescriptors; }
@Override public <T> T getAdapter(Object o, Class<T> adapterType) { if (adapterType.isInstance(o)) { return adapterType.cast(o); } if (adapterType == IPropertySource.class) { if (o instanceof IResource) { IResource resource = (IResource) o; if (resource.getType() == IResource.FILE) { return adapterType.cast(new FilePropertySource((IFile) o)); } return adapterType.cast(new ResourcePropertySource((IResource) o)); } } return null; }
@Override public Object getPropertyValue(Object key) { Object returnValue = (key.equals(IBasicPropertyConstants.P_TEXT)) ? TextProcessor .process(element.getName()) : super.getPropertyValue(key); if (returnValue != null) { return returnValue; } if (key.equals(IResourcePropertyConstants.P_SIZE_RES)) { return IDEResourceInfoUtils.getSizeString(element); } return null; } }
private IPropertySource getProperties(IJavaElement element) { IResource resource= getResource(element); if (resource == null) return new JavaElementProperties(element); if (resource.getType() == IResource.FILE) return new FilePropertySource((IFile) resource); return new ResourcePropertySource(resource); }
private IPropertySource getProperties(IJavaElement element) { IResource resource= getResource(element); if (resource == null) return new JavaElementProperties(element); if (resource.getType() == IResource.FILE) return new FilePropertySource((IFile) resource); return new ResourcePropertySource(resource); }
private IPropertySource getProperties(IJavaElement element) { IResource resource= getResource(element); if (resource == null) return new JavaElementProperties(element); if (resource.getType() == IResource.FILE) return new FilePropertySource((IFile) resource); return new ResourcePropertySource(resource); }