Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path.removeLastSegments()


    if (!projectText.equals("")) {//$NON-NLS-1$

      try {
        IJavaProject javaProject = JavaCore.create(Util.getProject(projectText));
        IPath moduleXmlPath = new Path(moduleText);
        IPath packageFragmentPath = new Path("/").append(projectText).append(moduleXmlPath.removeLastSegments(1));//$NON-NLS-1$
        if (isImplCreation)
          packageFragmentPath = packageFragmentPath.append("server");//$NON-NLS-1$
        else
          packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
View Full Code Here


    if (!projectText.equals("")) {//$NON-NLS-1$

      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

    IPackageFragment packageFragment = null;
    if(!projectText.equals("")) {//$NON-NLS-1$
      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);
      }
View Full Code Here

    if(!projectText.equals("")) {//$NON-NLS-1$

      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$
        if(isImplCreation)
          packageFragmentPath = packageFragmentPath.append("server");//$NON-NLS-1$
        else
          packageFragmentPath = packageFragmentPath.append("client");//$NON-NLS-1$
        packageFragment = project.findPackageFragment(packageFragmentPath);
View Full Code Here

    if(!projectText.equals("")) {//$NON-NLS-1$
     
      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

    // resolve to absolute url : this need not exact location of css file. It is important that absurl is not null.
    String ref = getElement().getAttribute(HTML40Namespace.ATTR_NAME_HREF);
    String absurl = (resolver != null && ref != null && ref.length() > 0) ? resolver.getLocationByURI(ref, true) : null;
    if ((absurl == null) || (absurl.length() == 0)) {
      IPath basePath = new Path(baseModel.getBaseLocation());
      URLHelper helper = new URLHelper(basePath.removeLastSegments(1).toString());
      absurl = helper.toAbsolute(ref == null ? "" : ref);//$NON-NLS-1$
    }
    if ((absurl == null) || (absurl.length() == 0)) {
      absurl = ref;
    }
View Full Code Here

        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
          return extPath.toString();       
        }
      }
View Full Code Here

                if (ext == null)
                {
                    String lastSeg = extPath.lastSegment();
                    if (lastSeg != null && lastSeg.equals("*")) //$NON-NLS-1$
                    {
                        return extPath.removeLastSegments(1).toString();
                    }

                    return extPath.toString();
                }
            }
View Full Code Here

        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
          return extPath.toString();       
        }
      }
View Full Code Here

                if (ext == null)
                {
                    String lastSeg = extPath.lastSegment();
                    if (lastSeg != null && lastSeg.equals("*")) //$NON-NLS-1$
                    {
                        return extPath.removeLastSegments(1).toString();
                    }

                    return extPath.toString();
                }
            }
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.