Tabnine Logo
J2EEComponentClasspathContainerUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
J2EEComponentClasspathContainerUtils
in
org.eclipse.jst.j2ee.internal.common.classpath

Best Java code snippets using org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainerUtils (Showing top 12 results out of 315)

origin: org.eclipse/org.eclipse.jst.j2ee

public static FlexibleProjectContainer getInstalledWebAppLibrariesContainer(IProject project){
  IClasspathContainer container = getInstalledContainer(project, J2EEComponentClasspathUpdater.WEB_APP_LIBS_PATH);
  FlexibleProjectContainer webAppLibrariesContainer = null;
  if (null != container && container instanceof FlexibleProjectContainer) {
    webAppLibrariesContainer = (FlexibleProjectContainer) container;
  }
  return webAppLibrariesContainer;
}

origin: org.eclipse/org.eclipse.jst.j2ee

/**
 * Returns the existing classpath container if it is already on the classpath. This will not
 * create a new container.
 * 
 * @param jproj
 * @param classpathContainerID
 * @return
 */
public IClasspathEntry getExistingContainer(IJavaProject jproj, IPath classpathContainerPath) {
  return J2EEComponentClasspathContainerUtils.getInstalledContainerEntry(jproj, classpathContainerPath);
}
origin: org.eclipse/org.eclipse.jst.j2ee

if(J2EEComponentClasspathContainerUtils.getDefaultUseEARLibraries()){
  final IPath earLibContainer = new Path(J2EEComponentClasspathContainer.CONTAINER_ID);
  addToClasspath(jproj, JavaCore.newContainerEntry(earLibContainer));
origin: org.eclipse/org.eclipse.jst.j2ee

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;
}

origin: org.eclipse/org.eclipse.jst.j2ee

public IClasspathEntry[] getClasspathEntries() {
  if(!isUpdating){
    if(this != J2EEComponentClasspathContainerUtils.getInstalledEARLibrariesContainer(javaProject.getProject())){
      try {
        isUpdating = true;
        update();
      } finally{
        isUpdating = false;
      }
    }
  }
  return entries;
}
origin: org.eclipse/org.eclipse.jst.j2ee.ui

private void removeOldWebContainerIfNecessary(IProject webProj) {
  IJavaProject jproj = JemProjectUtilities.getJavaProject(webProj);
  final IClasspathEntry[] current;
  try {
    current = jproj.getRawClasspath();
    List updatedList = new ArrayList();
    boolean useDefaultWebAppLibraries = J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries();
    for (int i = 0; i < current.length; i++) {
      IClasspathEntry entry = current[i];
      // the web container is added to the classpath if:
      // 1. they don't have an entry for WEB_LIB_CONTAINER AND
      // 2. they have an entry for WEB_LIB_PATH BUT
      // they do not have the preference checked to use the Web App classpath container
      if ((entry.getPath().toString().indexOf(WEB_LIB_CONTAINER) == -1) && 
          ((entry.getPath().toString().indexOf(WEB_LIB_PATH) == -1) || !useDefaultWebAppLibraries))
        updatedList.add(entry);
    }
    IClasspathEntry[] updated = (IClasspathEntry[])updatedList.toArray(new IClasspathEntry[updatedList.size()]);
    jproj.setRawClasspath(updated, null);
    jproj.save(null, true);
  } catch (JavaModelException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
  
}
origin: org.eclipse/org.eclipse.jst.j2ee

boolean useJDTToControlExport = J2EEComponentClasspathContainerUtils.getDefaultUseEARLibrariesJDTExport();
if(useJDTToControlExport){
origin: org.eclipse/org.eclipse.jst.jee

if(J2EEComponentClasspathContainerUtils.getDefaultUseEARLibraries()){
  final IPath earLibContainer = new Path(J2EEComponentClasspathContainer.CONTAINER_ID);
  addToClasspath(jproj, JavaCore.newContainerEntry(earLibContainer));
origin: org.eclipse/org.eclipse.jst.j2ee.ejb

if(J2EEComponentClasspathContainerUtils.getDefaultUseEARLibraries()){
  final IPath earLibContainer = new Path(J2EEComponentClasspathContainer.CONTAINER_ID);
  addToClasspath(jproj, JavaCore.newContainerEntry(earLibContainer));
origin: org.eclipse/org.eclipse.jst.j2ee

public static J2EEComponentClasspathContainer getInstalledEARLibrariesContainer(IProject project) {
  IClasspathContainer container = getInstalledContainer(project, J2EEComponentClasspathContainer.CONTAINER_PATH);
  J2EEComponentClasspathContainer earLibrariesContainer = null;
  if (null != container && container instanceof J2EEComponentClasspathContainer) {
    earLibrariesContainer = (J2EEComponentClasspathContainer) container;
  }
  return earLibrariesContainer;
}
origin: org.eclipse/org.eclipse.jst.j2ee

public static IClasspathContainer getInstalledContainer(IProject project, IPath containerPath) {
  IJavaProject jproj = JavaCore.create(project);
  IClasspathEntry entry = getInstalledContainerEntry(jproj, containerPath);
  IClasspathContainer container = null;
  if (entry != null) {
    try {
      container = JavaCore.getClasspathContainer(containerPath, jproj);
    } catch (JavaModelException e) {
      J2EEPlugin.getDefault().getLogger().logError(e);
    }
  }
  return container;
}
origin: org.eclipse/org.eclipse.jst.j2ee

if(J2EEComponentClasspathContainerUtils.getDefaultUseEARLibraries()){
  final IPath earLibContainer = new Path(J2EEComponentClasspathContainer.CONTAINER_ID);
  addToClasspath(jproj, JavaCore.newContainerEntry(earLibContainer));
org.eclipse.jst.j2ee.internal.common.classpathJ2EEComponentClasspathContainerUtils

Most used methods

  • getDefaultUseEARLibraries
  • getDefaultUseEARLibrariesJDTExport
  • getDefaultUseWebAppLibraries
  • getInstalledContainer
  • getInstalledContainerEntry
  • getInstalledEARLibrariesContainer
  • getInstalledWebAppLibrariesContainer

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now