congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JFileChooser (javax.swing)
  • JFrame (javax.swing)
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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