protected List<IFile> findGeneratedJavaClassFiles(IJavaElement element) { Region region = new Region(); region.add(element); List<IFile> result = Lists.newLinkedList(); for (IResource res : JavaCore.getGeneratedResources(region, false)) if (res instanceof IFile) result.add((IFile) res); return result; }
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList<IType> types = this.files.get(o); if (types == null) { types = new ArrayList<>(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList<IType> types = this.files.get(o); if (types == null) { types = new ArrayList<>(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList types = (ArrayList)this.files.get(o); if (types == null) { types = new ArrayList(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList<IType> types = this.files.get(o); if (types == null) { types = new ArrayList<>(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList types = (ArrayList)this.files.get(o); if (types == null) { types = new ArrayList(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Initializes the file, package and project regions */ protected void initializeRegions() { IType[] allTypes = getAllTypes(); for (int i = 0; i < allTypes.length; i++) { IType type = allTypes[i]; Openable o = (Openable) ((JavaElement) type).getOpenableParent(); if (o != null) { ArrayList types = (ArrayList)this.files.get(o); if (types == null) { types = new ArrayList(); this.files.put(o, types); } types.add(type); } IPackageFragment pkg = type.getPackageFragment(); this.packageRegion.add(pkg); IJavaProject declaringProject = type.getJavaProject(); if (declaringProject != null) { this.projectRegion.add(declaringProject); } checkCanceled(); } } /**
/** * Creates a TypeHierarchy on the types in the specified region, * considering first the given working copies, * using the projects in the given region for a name lookup context. If a specific * type is also specified, the type hierarchy is pruned to only * contain the branch including the specified type. */ public RegionBasedTypeHierarchy(IRegion region, ICompilationUnit[] workingCopies, IType type, boolean computeSubtypes) { super(type, workingCopies, (IJavaSearchScope)null, computeSubtypes); Region newRegion = new Region(); IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]); } this.region = newRegion; if (elements.length > 0) this.project = elements[0].getJavaProject(); } /*
/** * Creates a TypeHierarchy on the types in the specified region, * considering first the given working copies, * using the projects in the given region for a name lookup context. If a specific * type is also specified, the type hierarchy is pruned to only * contain the branch including the specified type. */ public RegionBasedTypeHierarchy(IRegion region, ICompilationUnit[] workingCopies, IType type, boolean computeSubtypes) { super(type, workingCopies, (IJavaSearchScope)null, computeSubtypes); Region newRegion = new Region(); IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]); } this.region = newRegion; if (elements.length > 0) this.project = elements[0].getJavaProject(); } /*
IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]);
IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]);
IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]);
/** * Creates a TypeHierarchy on the types in the specified region, * considering first the given working copies, * using the projects in the given region for a name lookup context. If a specific * type is also specified, the type hierarchy is pruned to only * contain the branch including the specified type. */ public RegionBasedTypeHierarchy(IRegion region, ICompilationUnit[] workingCopies, IType type, boolean computeSubtypes) { super(type, workingCopies, (IJavaSearchScope)null, computeSubtypes); Region newRegion = new Region(); IJavaElement[] elements = region.getElements(); for (int i = 0, length = elements.length; i < length; i++) { newRegion.add(elements[i]); } this.region = newRegion; if (elements.length > 0) this.project = elements[0].getJavaProject(); } /*