/** * Returns the associated resource. * <p> * This method only returns a meaningful result if the history contains * refactorings of a single project. * </p> * * @return the associated resource, or <code>null</code> if the * refactoring history contains workspace refactoring descriptors * only, or if it contains refactoring descriptors from multiple * projects. */ public final IResource getResource() { try { final ResourceTraversal[] traversals= getTraversals(null, null); if (traversals.length > 0) { final IResource[] resources= traversals[0].getResources(); if (resources.length > 0) return resources[0]; } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } return null; }
/** * Returns the associated resource. * <p> * This method only returns a meaningful result if the history contains * refactorings of a single project. * </p> * * @return the associated resource, or <code>null</code> if the * refactoring history contains workspace refactoring descriptors * only, or if it contains refactoring descriptors from multiple * projects. */ public final IResource getResource() { try { final ResourceTraversal[] traversals= getTraversals(null, null); if (traversals.length > 0) { final IResource[] resources= traversals[0].getResources(); if (resources.length > 0) return resources[0]; } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } return null; }
/** * Returns the associated resource. * <p> * This method only returns a meaningful result if the history contains * refactorings of a single project. * </p> * * @return the associated resource, or <code>null</code> if the * refactoring history contains workspace refactoring descriptors * only, or if it contains refactoring descriptors from multiple * projects. */ public final IResource getResource() { try { final ResourceTraversal[] traversals= getTraversals(null, null); if (traversals.length > 0) { final IResource[] resources= traversals[0].getResources(); if (resources.length > 0) return resources[0]; } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } return null; }