Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.lastSegment()


            // Add a selection of the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here


            File libDirectory = runtimePath.append("lib").toFile();
            if (libDirectory != null && libDirectory.exists()) {
                for (File file : libDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include jaxb, jaxws and jsr API JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

        // suggested name
        IPath oldPath = URIUtil.toPath(uri);
        // TODO: input.getName() is probably always correct
        suggestedName = isUntitled
            ? input.getName()
            : oldPath.lastSegment();

        // suggested path
        try {
          suggestedPath = isUntitled
              ? ((IFileEditorInput) input).getFile().getWorkspace().getRoot().getPersistentProperty(
View Full Code Here

             * different, the IStorage contract is not being
             * honored
             * (https://bugs.eclipse.org/bugs/show_bug.cgi?
             * id=73098). Favor the name
             */
            if (!storagePath.lastSegment().equals(name)) {
              IPath workingPath = storagePath.addTrailingSeparator();
              location = workingPath.append(name).toString();
            }
            else {
              location = storagePath.makeAbsolute().toString();
View Full Code Here

          if (storagePath != null) {
            // If they are different, the IStorage contract is not
            // being honored
            // (https://bugs.eclipse.org/bugs/show_bug.cgi?id=73098).
            // Favor the name.
            if (!storagePath.lastSegment().equals(name)) {
              IPath workingPath = storagePath.addTrailingSeparator();
              path = workingPath.append(name).toString();
            }
            else {
              path = storagePath.makeAbsolute().toString();
View Full Code Here

            if (delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() == IResourceDelta.ENCODING || delta.getFlags() == IResourceDelta.MARKERS))
              return false;

            IPath path = resource.getFullPath();
            int segmentCount = path.segmentCount();
            if (segmentCount > 1 && path.lastSegment().equals(WEB_XML) && path.segment(segmentCount - 2).equals(WEB_INF)) {
              getInstance().deploymentDescriptorChanged(path);
            }
          }
          else if (resource.getType() == IResource.PROJECT) {
            String name = resource.getName();
View Full Code Here

    for (Iterator it=urls.iterator();it.hasNext();){
      IPath extPath = new Path(((UrlPatternType)it.next()).getValue());
      if (extPath != null){
        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
View Full Code Here

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

View Full Code Here

    for (Iterator it=urls.iterator();it.hasNext();){
      IPath extPath = new Path(((UrlPatternType)it.next()).getValue());
      if (extPath != null){
        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
View Full Code Here

        {
            final IPath path = cpe.getPath();
           
            if( isJSFLibraryContainer( path ) )
            {
                String libId = path.lastSegment();
                JSFLibrary ref = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getJSFLibraryByID(libId);
               
                if( ref != null && ref.isImplementation() )
                {
                    return true;
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.