PackageFragmentRoot.getParent
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.eclipse.jdt.internal.core.PackageFragmentRoot.getParent (Showing top 20 results out of 315)

  • Common ways to obtain PackageFragmentRoot
private void myMethod () {
PackageFragmentRoot p =
  • String handleIdentifier;(PackageFragmentRoot) JavaCore.create(handleIdentifier)
  • IJavaElement element;(PackageFragmentRoot) element.getAncestor(ancestorType)
  • IJavaProject iJavaProject;IFile iFile;(PackageFragmentRoot) iJavaProject.getPackageFragmentRoot(iFile.getParent())
  • Smart code suggestions by Codota
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: org.eclipse.tycho/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: org.eclipse.jdt/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: trylimits/Eclipse-Postfix-Code-Completion

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentRootPath;
if (entry != null && (sourceAttachmentRootPath = entry.getSourceAttachmentRootPath()) != null)
origin: org.eclipse.jdt/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentPath;
if (entry != null && (sourceAttachmentPath = entry.getSourceAttachmentPath()) != null)
origin: org.eclipse.tycho/org.eclipse.jdt.core

IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(path);
IPath sourceAttachmentPath;
if (entry != null && (sourceAttachmentPath = entry.getSourceAttachmentPath()) != null)
origin: org.eclipse.jdt/org.eclipse.jdt.core

SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException {
  IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath());
  String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding();
  SourceMapper mapper = new SourceMapper(
    sourcePath,
    rootPath == null ? null : rootPath.toOSString(),
    getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options
    encoding);

  return mapper;
}

origin: org.eclipse.tycho/org.eclipse.jdt.core

SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException {
  IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath());
  String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding();
  SourceMapper mapper = new SourceMapper(
    sourcePath,
    rootPath == null ? null : rootPath.toOSString(),
    getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options
    encoding);

  return mapper;
}
/*
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException {
  IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath());
  String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding();
  SourceMapper mapper = new SourceMapper(
    sourcePath,
    rootPath == null ? null : rootPath.toOSString(),
    getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options
    encoding);

  return mapper;
}
/*
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException {
  IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath());
  String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding();
  SourceMapper mapper = new SourceMapper(
    sourcePath,
    rootPath == null ? null : rootPath.toOSString(),
    getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options
    encoding);

  return mapper;
}
/*
origin: trylimits/Eclipse-Postfix-Code-Completion

SourceMapper createSourceMapper(IPath sourcePath, IPath rootPath) throws JavaModelException {
  IClasspathEntry entry = ((JavaProject) getParent()).getClasspathEntryFor(getPath());
  String encoding = (entry== null) ? null : ((ClasspathEntry) entry).getSourceAttachmentEncoding();
  SourceMapper mapper = new SourceMapper(
    sourcePath,
    rootPath == null ? null : rootPath.toOSString(),
    getJavaProject().getOptions(true),// cannot use workspace options if external jar is 1.5 jar and workspace options are 1.4 options
    encoding);

  return mapper;
}
/*
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
}
/**
origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
}
/**
origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
}
/**
origin: trylimits/Eclipse-Postfix-Code-Completion

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
}
/**
origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
@Override
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
  if (org.eclipse.jdt.internal.compiler.util.Util.isJrt(path.toOSString())) {
    buff.append(JavaElement.JEM_MODULE);
    escapeMementoName(buff, getElementName());
  }
}
/**
origin: org.eclipse.tycho/org.eclipse.jdt.core

/**
 * @see JavaElement#getHandleMemento(StringBuffer)
 */
protected void getHandleMemento(StringBuffer buff) {
  IPath path;
  IResource underlyingResource = getResource();
  if (underlyingResource != null) {
    // internal jar or regular root
    if (resource().getProject().equals(getJavaProject().getProject())) {
      path = underlyingResource.getProjectRelativePath();
    } else {
      path = underlyingResource.getFullPath();
    }
  } else {
    // external jar
    path = getPath();
  }
  ((JavaElement)getParent()).getHandleMemento(buff);
  buff.append(getHandleMementoDelimiter());
  escapeMementoName(buff, path.toString());
  if (org.eclipse.jdt.internal.compiler.util.Util.isJrt(path.toOSString())) {
    buff.append(getHandleMementoDelimiter());
    escapeMementoName(buff, getElementName());
  }
}
/**
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

private ClasspathLocation mapToClassPathLocation( JavaModelManager manager, PackageFragmentRoot root) {
  ClasspathLocation cp = null;
  IPath path = root.getPath();
  try {
    if (root.isArchive()) {
      ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry();
      cp = new ClasspathJar(manager.getZipFile(path), rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true));
    } else {
      Object target = JavaModel.getTarget(path, true);
      if (target != null) {
        if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
          cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars());
        } else {
          ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry();
          cp = ClasspathLocation.forBinaryFolder((IContainer) target, false, rawClasspathEntry.getAccessRuleSet(),
                            ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true));
        }
      }
    }
  } catch (CoreException e1) {
    // problem opening zip file or getting root kind
    // consider root corrupt and ignore
  }
  return cp;
}

org.eclipse.jdt.internal.corePackageFragmentRootgetParent

Popular methods of PackageFragmentRoot

  • fullExclusionPatternChars
  • fullInclusionPatternChars
  • getPackageFragment
  • internalPath
  • <init>
    Constructs a package fragment root which is the root of the java package directory hierarchy.
  • computeChildren
    Compute the package fragment children of this package fragment root.
  • computeFolderChildren
    Starting at this folder, create package fragments and add the fragments that are not excluded to the
  • createElementInfo
    Returns a new element info for this element.
  • createSourceMapper
  • determineKind
    Returns the root's kind - K_SOURCE or K_BINARY, defaults to K_SOURCE if it is not on the classpath.
  • escapeMementoName
  • exists
  • escapeMementoName,
  • exists,
  • findSourceAttachmentRecommendation,
  • getElementInfo,
  • getElementName,
  • getHandleMementoDelimiter,
  • getJavaModel,
  • getJavaProject,
  • getKind

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)