Examples of findPackageFragmentRoot()


Examples of org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoot()

    SourceParameters parameters = new SourceParameters();
    IJavaProject javaProject = m_lastEditor.getJavaProject();
    {
      parameters.m_constant = new SourceClassParameters();
      SourceClassParameters constant = parameters.m_constant;
      constant.m_sourceFolder = javaProject.findPackageFragmentRoot(new Path("/TestProject/src"));
      constant.m_package =
          javaProject.findPackageFragment(new Path("/TestProject/src/test/client"));
      constant.m_packageFolder = (IFolder) constant.m_package.getUnderlyingResource();
      constant.m_packageName = constant.m_package.getElementName();
      constant.m_className = "MyConstants";
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoot()

   */
  private boolean isOnClasspath(IPackageFragmentRoot root)
      throws JavaModelException {
    IPath path = root.getPath();
    IJavaProject project = root.getJavaProject();
    return project.findPackageFragmentRoot(path) != null;
  }

  private void processPackageFragment(ITypeVisitor visitor,
      IPackageFragment fragment, IProgressMonitor monitor)
      throws JavaModelException {
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoot()

        // A resource can also be a java element in the case of
        // exclusion and inclusion filters. We therefore exclude Java
        // elements from the list of non-Java resources.
        if (isFolderOnClasspath) {
          if (javaProject.findPackageFragmentRoot(member.getFullPath()) == null) {
            nonJavaResources.add(member);
          }
        }
        else if (!javaProject.isOnClasspath(member)) {
          nonJavaResources.add(member);
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoot()

      public boolean isSelectedValid(Object element) {
        try {
          if (element instanceof IJavaProject) {
            IJavaProject jproject= (IJavaProject)element;
            IPath path= jproject.getProject().getFullPath();
            return (jproject.findPackageFragmentRoot(path) != null);
          } else if (element instanceof IPackageFragmentRoot) {
            return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE);
          }
          return true;
        } catch (JavaModelException e) {
View Full Code Here

Examples of org.eclipse.jdt.core.IJavaProject.findPackageFragmentRoot()

      public boolean isSelectedValid(Object element) {
        try {
          if (element instanceof IJavaProject) {
            IJavaProject jproject= (IJavaProject)element;
            IPath path= jproject.getProject().getFullPath();
            return (jproject.findPackageFragmentRoot(path) != null);
          } else if (element instanceof IPackageFragmentRoot) {
            return (((IPackageFragmentRoot)element).getKind() == IPackageFragmentRoot.K_SOURCE);
          }
          return true;
        } catch (JavaModelException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.