Package org.eclipse.sapphire.modeling

Examples of org.eclipse.sapphire.modeling.Path


    {
        @Override
        protected void handleTypedEvent( final PropertyContentEvent event )
        {
            final CreateNormalizedXmlSchemaOp op = (CreateNormalizedXmlSchemaOp) event.property().element();
            final Path sourceFilePath = op.getSourceFile().content();
           
            String folder = null;
            String fileName = null;
           
            if( sourceFilePath != null && sourceFilePath.segmentCount() >= 2 )
            {
                final IFile sourceFile = ResourcesPlugin.getWorkspace().getRoot().getFile( PathBridge.create( sourceFilePath ) );
               
                if( sourceFile.exists() )
                {
View Full Code Here


            {
                return ListFactory.empty();
            }
            else
            {
                return ListFactory.singleton( new Path( root.getLocation().toString() ) );
            }
        }
View Full Code Here

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

            if( root instanceof IWorkspaceRoot )
            {
                if( path.segmentCount() > 0 )
                {
                    final IProject project = ( (IWorkspaceRoot) root ).getProject( path.segment( 0 ) );
                    return new Path( project.getLocation().toString() ).append( path.removeFirstSegments( 1 ) );
                }
            }
            else
            {
                super.convertToAbsolute( path );
View Full Code Here

    public static final class FolderValidationService extends ValidationService
    {
        @Override
        protected Status compute()
        {
            final Path path = context( Value.of( Path.class ) ).content();
           
            if( path != null )
            {
                final String lastSegment = path.lastSegment();
               
                if( lastSegment != null && ! lastSegment.equals( "META-INF" ) )
                {
                    return Status.createWarningStatus( invalidFolder.text() );
                }
View Full Code Here

       
        monitor.beginTask( executeTaskName.text(), 2 );
       
        try
        {
            final Path sourceSchemaFilePath = operation.getSourceFile().content();
           
            final PersistedState state = PersistedStateManager.load( sourceSchemaFilePath );
           
            if( state != null )
            {
View Full Code Here

    {
        final IFile file = context( Element.class ).adapt( IFile.class );
           
        if( file != null )
        {
            return Collections.<Path>singletonList( new Path( file.getParent().getLocation().toPortableString() ) );
        }

        return Collections.emptyList();
    }
View Full Code Here

       
        public FileSystemNode find( final Path path )
        {
            for( FileSystemNode root : this.roots )
            {
                final Path rootPath = new Path( root.getFile().getPath() );
               
                if( rootPath.isPrefixOf( path ) )
                {
                    return root.find( path.makeRelativeTo( rootPath ) );
                }
            }
           
View Full Code Here

        {
            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

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.