Package org.openide.filesystems

Examples of org.openide.filesystems.Repository


    }

    private FileSystem addDocumentToRepository(File rootFile, boolean writeable)
        throws IOException, PropertyVetoException
    {
        Repository repo = Repository.getDefault();
        OpenOfficeDocFileSystem oofs;
        oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile);
        if(oofs != null)
            repo.removeFileSystem(oofs);
        oofs = new OpenOfficeDocFileSystem();
        oofs.setDocument(rootFile);
        repo.addFileSystem(oofs);
        return oofs;
    }
View Full Code Here


    }

    private FileSystem addDocumentToRepository(File rootFile, boolean writeable)
        throws IOException, PropertyVetoException
    {
        Repository repo = Repository.getDefault();
        OpenOfficeDocFileSystem oofs;
        oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile);
        if(oofs != null)
            repo.removeFileSystem(oofs);
        oofs = new OpenOfficeDocFileSystem();
        oofs.setDocument(rootFile);
        repo.addFileSystem(oofs);
        return oofs;
    }
View Full Code Here

    }

    private FileSystem addDocumentToRepository(File rootFile, boolean writeable)
        throws IOException, PropertyVetoException
    {
        Repository repo = Repository.getDefault();
        OpenOfficeDocFileSystem oofs;
        oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile);
        if(oofs != null)
            repo.removeFileSystem(oofs);
        oofs = new OpenOfficeDocFileSystem();
        oofs.setDocument(rootFile);
        repo.addFileSystem(oofs);
        return oofs;
    }
View Full Code Here

    }

    private FileSystem addDocumentToRepository(File rootFile, boolean writeable)
        throws IOException, PropertyVetoException
    {
        Repository repo = Repository.getDefault();
        OpenOfficeDocFileSystem oofs;
        oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile);
        if(oofs != null)
            repo.removeFileSystem(oofs);
        oofs = new OpenOfficeDocFileSystem();
        oofs.setDocument(rootFile);
        repo.addFileSystem(oofs);
        return oofs;
    }
View Full Code Here

        aBean.setExecute( false );
        aBean.setCompile( false );
        aBean.setExecute( false );
       
        try {
            Repository repo = TopManager.getDefault().getRepository();
            LocalFileSystem fsl = new LocalFileSystem( aBean );
           
            // Get the file of the documentation directory.
            File fileDocumentation =
            new File( stringSDKDirectory + System.getProperty(
            "file.separator" ) + "docs" + System.getProperty( "file.separator" )
            + "common" + System.getProperty( "file.separator" ) + "ref" );

            if ( fileDocumentation.exists() ) {
                fsl.setRootDirectory( fileDocumentation );
                if ( repo.findFileSystem( fsl.getSystemName() ) == null ) {
                    fsl.setHidden( true );
                    repo.addFileSystem( fsl );
                }
            }
           
            LocalFileSystem localfilesystem = new LocalFileSystem( aBean );
           
            // Get the file of the helper documentation directory.
            File fileDocumentationHelper =
            new File( stringSDKDirectory + System.getProperty(
            "file.separator" ) + "docs" + System.getProperty( "file.separator" )
            + "java" + System.getProperty( "file.separator" ) + "ref" );

            if ( fileDocumentationHelper.exists() ) {
                localfilesystem.setRootDirectory( fileDocumentationHelper );
                if ( repo.findFileSystem(
                localfilesystem.getSystemName() ) == null ) {
                    localfilesystem.setHidden( true );
                    repo.addFileSystem( localfilesystem );
                }
            }
           
            File aFile = new File( stringOfficeDirectory + System.getProperty(
            "file.separator") + "program" + System.getProperty(
            "file.separator") + "classes" );
            String [] aList = aFile.list( new OOExtensionFilter( ".jar" ) );
           
            for(int i = 0; i < aList.length; i++ ) {
                JarFileSystem fs = new JarFileSystem();
                fs.setJarFile( new File( stringOfficeDirectory
                + System.getProperty(
                "file.separator") + "program" + System.getProperty(
                "file.separator" ) +"classes"
                + System.getProperty( "file.separator" ) + aList[ i ] ) );
               
//                System.out.println( stringOfficeDirectory
//                + System.getProperty(
//                "file.separator") + "program" + System.getProperty(
//                "file.separator" ) +"classes"
//                + System.getProperty( "file.separator" ) + aList[ i ] );
               
                // Set hidden state of the JAR filesystem.
                fs.setHidden( true );
                   
                if ( repo.findFileSystem( fs.getSystemName() ) == null ) {
                    repo.addFileSystem( fs );
                }
               
//                FileObject fileobject = repo.findResource( "jurt.jar" );
//                FileObject fileobject = fs.getRoot();
//               
View Full Code Here

   
    public static void uninstallFiles( String stringSDKDirectory,
    String stringOfficeDirectory ) {
       
        try {
            Repository repo=TopManager.getDefault().getRepository();
            LocalFileSystem fsl=new LocalFileSystem();
            fsl.setRootDirectory( new File( stringSDKDirectory
            + System.getProperty("file.separator") + "docs"
            + System.getProperty("file.separator") +"common"
            + System.getProperty("file.separator") +"ref"));
            if (repo.findFileSystem(fsl.getSystemName()) != null) {
                repo.removeFileSystem(repo.findFileSystem(fsl.getSystemName()));
            }
           
            File aFile = new File( stringOfficeDirectory + System.getProperty(
            "file.separator" ) + "program" + System.getProperty(
            "file.separator" ) + "classes" );
            String [] aList = aFile.list( new OOExtensionFilter( ".jar" ) );
           
            for( int i = 0; i < aList.length; i++ ) {
                JarFileSystem fs = new JarFileSystem();
                fs.setJarFile( new File( stringOfficeDirectory
                + System.getProperty( "file.separator" ) + "program"
                + System.getProperty( "file.separator" ) + "classes"
                + System.getProperty( "file.separator" ) + aList[ i ] ) );
                if ( repo.findFileSystem( fs.getSystemName() ) != null ) {
                    repo.removeFileSystem( repo.findFileSystem(
                    fs.getSystemName() ) );
                }
            }
        }
        catch(Exception e){
View Full Code Here

        }
        return "";
    }
   
    public final static String getFilesystemName(File aFile) {
        Repository Repository = TopManager.getDefault().getRepository();
        Enumeration eFilesystems = Repository.getFileSystems();
        while (eFilesystems.hasMoreElements())
        { FileSystem aFileSystem = (FileSystem) eFilesystems.nextElement();
         
          if (aFile.getPath().indexOf(aFileSystem.getDisplayName()) != -1) {
              return aFileSystem.getDisplayName();
View Full Code Here

     * @param stringSystemDirectory Output directory.
     */
    public final static void createJarContent( OOServiceData ooservicedata,
    String stringSystemDirectory, FileSystem filesystemOutput ) {
        // Get the default repository.
        Repository repository = TopManager.getDefault().getRepository();
       
        // Get file object of the service implementation.
        FileObject fileobject = filesystemOutput.find(
        ooservicedata.getPackage(),
//        ooservicedata.getOuterClass().getName().getQualifier(),
View Full Code Here

    }

    private FileSystem addDocumentToRepository(File rootFile, boolean writeable)
        throws IOException, PropertyVetoException
    {
        Repository repo = Repository.getDefault();
        OpenOfficeDocFileSystem oofs;
        oofs = (OpenOfficeDocFileSystem)getMountedDocument(rootFile);
        if(oofs != null)
            repo.removeFileSystem(oofs);
        oofs = new OpenOfficeDocFileSystem();
        oofs.setDocument(rootFile);
        repo.addFileSystem(oofs);
        return oofs;
    }
View Full Code Here

            //honor 57874 contact
            //http://wiki.netbeans.org/ProjectVersioning
            //the code is slightly deprecated and could be updated, but it
            //still works.
            try {
                Repository repository  = Repository.getDefault();
                FileSystem sfs = repository.getDefaultFileSystem();
                FileObject fo = sfs.findResource("Projects/Actions")// NOI18N
                if (fo != null) {
                    DataObject dobj = DataObject.find(fo);
                    FolderLookup actionRegistry = new FolderLookup((DataFolder)dobj);
                    Lookup.Template query = new Lookup.Template(Object.class);
View Full Code Here

TOP

Related Classes of org.openide.filesystems.Repository

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.