/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * @see IPackageFragment#getCompilationUnits() */ @Override public ICompilationUnit[] getCompilationUnits() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_BINARY) { return NO_COMPILATION_UNITS; } ArrayList list = getChildrenOfType(COMPILATION_UNIT); ICompilationUnit[] array= new ICompilationUnit[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of all class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getAllClassFiles() */ public IClassFile[] getAllClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; }
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of all class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getAllClassFiles() */ @Override public IClassFile[] getAllClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; }
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a the collection of class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getClassFiles() */ public IClassFile[] getClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); IClassFile[] array= new IClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of ordinary class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getOrdinaryClassFiles() */ @Override public IOrdinaryClassFile[] getOrdinaryClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_ORDINARY_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); for (Iterator iterator = list.iterator(); iterator.hasNext();) { if (iterator.next() instanceof ModularClassFile) iterator.remove(); } IOrdinaryClassFile[] array= new IOrdinaryClassFile[list.size()]; list.toArray(array); return array; } /**
/** * Returns a collection of ordinary class files in this - a folder package fragment which has a root * that has its kind set to <code>IPackageFragmentRoot.K_Source</code> does not * recognize class files. * * @see IPackageFragment#getOrdinaryClassFiles() */ @Override public IOrdinaryClassFile[] getOrdinaryClassFiles() throws JavaModelException { if (getKind() == IPackageFragmentRoot.K_SOURCE) { return NO_ORDINARY_CLASSFILES; } ArrayList list = getChildrenOfType(CLASS_FILE); for (Iterator iterator = list.iterator(); iterator.hasNext();) { if (iterator.next() instanceof ModularClassFile) iterator.remove(); } IOrdinaryClassFile[] array= new IOrdinaryClassFile[list.size()]; list.toArray(array); return array; } /**
protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }
protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }
protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }
protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }
protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }
@Override protected IStatus validateExistence(IResource underlyingResource) { // check that the name of the package is valid (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=108456) if (!isValidPackageName()) return newDoesNotExistStatus(); // check whether this pkg can be opened if (underlyingResource != null && !resourceExists(underlyingResource)) return newDoesNotExistStatus(); // check that it is not excluded (https://bugs.eclipse.org/bugs/show_bug.cgi?id=138577) int kind; try { kind = getKind(); } catch (JavaModelException e) { return e.getStatus(); } if (kind == IPackageFragmentRoot.K_SOURCE && Util.isExcluded(this)) return newDoesNotExistStatus(); return JavaModelStatus.VERIFIED_OK; } }