private int getDepth(ITypeHierarchy hierarchy, IType input) { int count= 0; IType superType= hierarchy.getSuperclass(input); while (superType != null) { count++; superType= hierarchy.getSuperclass(superType); } return count; }
private int getDepth(ITypeHierarchy hierarchy, IType input) { int count= 0; IType superType= hierarchy.getSuperclass(input); while (superType != null) { count++; superType= hierarchy.getSuperclass(superType); } return count; }
private int getDepth(ITypeHierarchy hierarchy, IType input) { int count= 0; IType superType= hierarchy.getSuperclass(input); while (superType != null) { count++; superType= hierarchy.getSuperclass(superType); } return count; }
@Override protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // don't handle interfaces } return null; }
protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // dont handle interfaces } return null; }
@Override protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // dont handle interfaces } return null; }
@Override protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // dont handle interfaces } return null; }
protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // don't handle interfaces } return null; }
@Override protected IType getParentType(IType type) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { return hierarchy.getSuperclass(type); // don't handle interfaces } return null; }
@Override public Object getParent(final Object element) { if (element instanceof IType) return fHierarchy.getSuperclass((IType) element); if (element instanceof IMember) return ((IMember) element).getDeclaringType(); Assert.isTrue(false, "Should not get here"); //$NON-NLS-1$ return null; }
private IStatus checkException(final IType type) throws JavaModelException { ITypeHierarchy hierarchy= type.newSupertypeHierarchy(new NullProgressMonitor()); IType curr= type; while (curr != null) { String name= curr.getFullyQualifiedName(); if ("java.lang.Throwable".equals(name)) //$NON-NLS-1$ return StatusInfo.OK_STATUS; curr= hierarchy.getSuperclass(curr); } return JavaUIStatus.createError(IStatus.ERROR, RefactoringMessages.ChangeExceptionsControl_not_exception, null); }
private IStatus checkException(final IType type) throws JavaModelException { ITypeHierarchy hierarchy= type.newSupertypeHierarchy(new NullProgressMonitor()); IType curr= type; while (curr != null) { String name= curr.getFullyQualifiedName(); if ("java.lang.Throwable".equals(name)) //$NON-NLS-1$ return StatusInfo.OK_STATUS; curr= hierarchy.getSuperclass(curr); } return JavaUIStatus.createError(IStatus.ERROR, RefactoringMessages.ChangeExceptionsControl_not_exception, null); }
public Object getParent(final Object element) { if (element instanceof IType) return fHierarchy.getSuperclass((IType) element); if (element instanceof IMember) return ((IMember) element).getDeclaringType(); Assert.isTrue(false, "Should not get here"); //$NON-NLS-1$ return null; }
@Override public Object getParent(final Object element) { if (element instanceof IType) return fHierarchy.getSuperclass((IType) element); if (element instanceof IMember) return ((IMember) element).getDeclaringType(); Assert.isTrue(false, "Should not get here"); //$NON-NLS-1$ return null; }
private IStatus checkException(final IType type) throws JavaModelException { ITypeHierarchy hierarchy= type.newSupertypeHierarchy(new NullProgressMonitor()); IType curr= type; while (curr != null) { String name= curr.getFullyQualifiedName(); if ("java.lang.Throwable".equals(name)) //$NON-NLS-1$ return StatusInfo.OK_STATUS; curr= hierarchy.getSuperclass(curr); } return JavaUIStatus.createError(IStatus.ERROR, RefactoringMessages.ChangeExceptionsControl_not_exception, null); }
protected void loadSuperTypeHierarchy() throws JavaModelException { ITypeHierarchy superTypeHierarchy = m_type.newSupertypeHierarchy(null); IType firstType = superTypeHierarchy.getSuperclass(m_type); if (S2eUtils.exists(firstType)) { String superTypeFqn = firstType.getFullyQualifiedName(); if (!IScoutRuntimeTypes.DynamicNls.equals(superTypeFqn) && !Object.class.getName().equals(superTypeFqn)) { m_propertySupport.setProperty(PROP_SUPER_TYPE, firstType); } } }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }
private void setReceiverToSupertype() { try { final IMethod m = ctx.getEnclosingMethod().orNull(); if (m == null || JdtFlags.isStatic(m)) { return; } final IType type = m.getDeclaringType(); final ITypeHierarchy hierarchy = SuperTypeHierarchyCache.getTypeHierarchy(type); receiverType = hierarchy.getSuperclass(type); } catch (final Exception e) { RecommendersPlugin.logError(e, "Failed to resolve super type of %s", ctx.getEnclosingElement()); } }