congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries
Code IndexAdd Tabnine to your IDE (free)

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

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

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();
  }
  
}
org.eclipse.jst.j2ee.internal.common.classpathJ2EEComponentClasspathContainerUtilsgetDefaultUseWebAppLibraries

Popular methods of J2EEComponentClasspathContainerUtils

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

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
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