Examples of findPackageFragment()


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

     
      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
   
View Full Code Here

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

          packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$

        IFolder folder = javaProject.getProject().getFolder(packageFragmentPath.removeFirstSegments(1));
        if (!folder.exists())
          folder.create(true, true, null);
        packageFragment = javaProject.findPackageFragment(packageFragmentPath);
      } catch (Exception e) {
        Activator.logException(e);
      }
    }
View Full Code Here

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

      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
View Full Code Here

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

      try {
        IJavaProject project = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
      } catch (JavaModelException e) {
        Activator.logException(e);
      }
    }
    return packageFragment;
View Full Code Here

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

    {
      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";
      constant.m_fullClassName = "test.client.MyConstants";
      constant.m_exists = false;
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaProject.findPackageFragment()

    JavaProject project = (JavaProject) this.compilationUnit.getJavaProject();
    do {
      String testedName = new String(searchedName, 0, index);
      IJavaElement fragment = null;
      try {
        fragment = project.findPackageFragment(testedName);
      } catch (JavaModelException e) {
        return name;
      }
      if (fragment != null) {
        return testedName;
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaProject.findPackageFragment()

    JavaProject project = (JavaProject) this.compilationUnit.getJavaProject();
    do {
      String testedName = new String(searchedName, 0, index);
      IJavaElement fragment = null;
      try {
        fragment = project.findPackageFragment(testedName);
      } catch (JavaModelException e) {
        return name;
      }
      if (fragment != null) {
        return testedName;
View Full Code Here

Examples of org.eclipse.jdt.internal.core.JavaProject.findPackageFragment()

    JavaProject project = (JavaProject) this.compilationUnit.getJavaProject();
    do {
      String testedName = new String(searchedName, 0, index);
      IJavaElement fragment = null;
      try {
        fragment = project.findPackageFragment(testedName);
      } catch (JavaModelException e) {
        return name;
      }
      if (fragment != null) {
        return testedName;
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.