Package org.eclipse.sapphire.modeling

Examples of org.eclipse.sapphire.modeling.Path


        {
            return Collections.emptyList();
        }
        else
        {
            return Collections.singletonList( new Path( project.getLocation().toPortableString() ) );
        }
    }
View Full Code Here


       
        for( IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects() )
        {
            if( project.isAccessible() )
            {
                paths.add( new Path( project.getLocation().toPortableString() ) );
            }
        }
       
        return paths.result();
    }
View Full Code Here

    {
        for( IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects() )
        {
            if( project.isAccessible() )
            {
                final Path location = new Path( project.getLocation().toPortableString() );
               
                if( location.isPrefixOf( path ) )
                {
                    return new Path( project.getName() ).append( path.makeRelativeTo( location ) );
                }
            }
        }
       
        return null;
View Full Code Here

            {
                if( project.isAccessible() )
                {
                    if( projectName.equals( project.getName() ) )
                    {
                        return new Path( project.getLocation().toPortableString() ).append( path.removeFirstSegments( 1 ) );
                    }
                }
            }
        }
       
View Full Code Here

    @Override
    public List<Path> roots()
    {
        final List<Path> roots = new ArrayList<Path>();
       
        roots.add( new Path( "c:/Windows" ) );
        roots.add( new Path( "c:/Program Files" ) );
       
        return roots;
    }
View Full Code Here

    }

    @Override
    public List<Path> roots()
    {
        final Path root = context( TestElement.class ).getRootPath().content();
        return ListFactory.<Path>start().add( root ).result();
    }
View Full Code Here

        final DirectoryDialog dialog = new DirectoryDialog( ( (FormComponentPresentation) context ).shell() );
        dialog.setText( property.definition().getLabel( true, CapitalizationType.FIRST_WORD_ONLY, false ) );
        dialog.setMessage( createBrowseDialogMessage( property.definition().getLabel( true, CapitalizationType.NO_CAPS, false ) ) );
       
        final Value<?> value = (Value<?>) property;
        final Path path = (Path) value.content();
       
        if( path != null )
        {
            File f = new File( path.toOSString() );
           
            while( f != null && ! f.exists() )
            {
                f = f.getParentFile();
            }
View Full Code Here

       
        final FileDialog dialog = new FileDialog( ( (FormComponentPresentation) context ).shell() );
        dialog.setText( property.definition().getLabel( true, CapitalizationType.FIRST_WORD_ONLY, false ) );
       
        final Value<?> value = (Value<?>) property;
        final Path path = (Path) value.content();
       
        if( path != null && path.segmentCount() > 1 )
        {
            dialog.setFilterPath( path.removeLastSegments( 1 ).toOSString() );
            dialog.setFileName( path.lastSegment() );
        }
       
        final List<String> extensions;
       
        if( this.fileExtensionService == null )
View Full Code Here

        return new org.eclipse.core.runtime.Path( path.toString() );
    }
   
    public static Path create( final IPath path )
    {
        return new Path( path.toString() );
    }
View Full Code Here

            {
                return wsroot;
            }
            else
            {
                final Path root = new Path( reference );
               
                if( root.segmentCount() == 1 )
                {
                    return wsroot.getProject( root.segment( 0 ) );
                }
                else
                {
                    return wsroot.getFolder( PathBridge.create( root ) );
                }
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.Path

Copyright © 2018 www.massapicom. 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.