public void refresh() { refresh(false); }
private void processModules(Object[] projects) { for (int i = 0; i < projects.length; i++) { IProject project = (IProject) projects[i]; // this block is for Web app Libraries if (J2EEProjectUtilities.isDynamicWebProject(project)) { IClasspathContainer webAppLibrariesContainer = J2EEComponentClasspathContainerUtils.getInstalledWebAppLibrariesContainer(project); // If the container is present, refresh it if (webAppLibrariesContainer != null) { ((FlexibleProjectContainer) webAppLibrariesContainer).refresh(); } } // ******************** The following is for EAR Libraries IClasspathContainer earLibrariesContainer = J2EEComponentClasspathContainerUtils.getInstalledEARLibrariesContainer(project); // If the container is present, refresh it if (earLibrariesContainer != null) { ((J2EEComponentClasspathContainer) earLibrariesContainer).refresh(forceUpdateOnNextRun); } } // [202820] updateDependencyGraph = true; }
public void requestClasspathContainerUpdate(final IPath containerPath, final IJavaProject javaProject, final IClasspathContainer sg) throws CoreException { final String key = containerPath.toString(); final IClasspathEntry[] entries = sg.getClasspathEntries(); for (int i = 0; i < entries.length; i++) { final IClasspathEntry entry = entries[i]; final IPath srcpath = entry.getSourceAttachmentPath(); final IPath srcrootpath = entry.getSourceAttachmentRootPath(); final IClasspathAttribute[] attrs = entry.getExtraAttributes(); if (srcpath != null || attrs.length > 0) { final String eid = entry.getPath().toString(); final ClasspathDecorations dec = new ClasspathDecorations(); dec.setSourceAttachmentPath(srcpath); dec.setSourceAttachmentRootPath(srcrootpath); dec.setExtraAttributes(attrs); decorations.setDecorations(key, eid, dec); } } decorations.save(); final IClasspathContainer container = JavaCore.getClasspathContainer(containerPath, javaProject); ( (J2EEComponentClasspathContainer) container ).refresh( true ); } }