public WorkingSetCompareEntry(IAdaptable a) { if (a instanceof IJavaElement) { init((IJavaElement) a); } else if (a instanceof IResource) { init((IResource) a); } else if (a instanceof RequiredProjectWrapper) { RequiredProjectWrapper wrapper= (RequiredProjectWrapper) a; IJavaProject proj= wrapper.getParentClassPathContainer().getJavaProject(); // the project reference is treated like an internal JAR. // that means it will only appear if the parent container project is in the working set IResource fakeInternal= proj.getProject().getFile(wrapper.getProject().getElementName() + "-fake-jar.jar"); //$NON-NLS-1$ init(proj.getPackageFragmentRoot(fakeInternal)); } else if (a instanceof IJarEntryResource) { init((IJarEntryResource)a); } else { IJavaElement je= a.getAdapter(IJavaElement.class); if (je != null) { init(je); } else { IResource resource= a.getAdapter(IResource.class); if (resource != null) { init(resource); } else { fResourcePath= null; fJavaElement= null; } } } }
public WorkingSetCompareEntry(IAdaptable a) { if (a instanceof IJavaElement) { init((IJavaElement) a); } else if (a instanceof IResource) { init((IResource) a); } else if (a instanceof RequiredProjectWrapper) { RequiredProjectWrapper wrapper= (RequiredProjectWrapper) a; IJavaProject proj= wrapper.getParentClassPathContainer().getJavaProject(); // the project reference is treated like an internal JAR. // that means it will only appear if the parent container project is in the working set IResource fakeInternal= proj.getProject().getFile(wrapper.getProject().getElementName() + "-fake-jar.jar"); //$NON-NLS-1$ init(proj.getPackageFragmentRoot(fakeInternal)); } else { IJavaElement je= (IJavaElement) a.getAdapter(IJavaElement.class); if (je != null) { init(je); } else { IResource resource= (IResource) a.getAdapter(IResource.class); if (resource != null) { init(resource); } else { fResourcePath= null; fJavaElement= null; } } } }
public WorkingSetCompareEntry(IAdaptable a) { if (a instanceof IJavaElement) { init((IJavaElement) a); } else if (a instanceof IResource) { init((IResource) a); } else if (a instanceof RequiredProjectWrapper) { RequiredProjectWrapper wrapper= (RequiredProjectWrapper) a; IJavaProject proj= wrapper.getParentClassPathContainer().getJavaProject(); // the project reference is treated like an internal JAR. // that means it will only appear if the parent container project is in the working set IResource fakeInternal= proj.getProject().getFile(wrapper.getProject().getElementName() + "-fake-jar.jar"); //$NON-NLS-1$ init(proj.getPackageFragmentRoot(fakeInternal)); } else if (a instanceof IJarEntryResource) { init((IJarEntryResource)a); } else { IJavaElement je= a.getAdapter(IJavaElement.class); if (je != null) { init(je); } else { IResource resource= a.getAdapter(IResource.class); if (resource != null) { init(resource); } else { fResourcePath= null; fJavaElement= null; } } } }