Package org.netbeans.modules.jarpackager

Examples of org.netbeans.modules.jarpackager.ContentMemberList


            new NotifyDescriptor.Message(
            dataobjectnotfoundexception.toString() ) );
        }
       
        // Create an empty content member list for the jar content.
        ContentMemberList contentmemberlist = new ContentMemberList();
       
       
       
       
        //        // Get file object of the service implementation.
        //        FileObject fileobjectManifest = repository.find(
        //        ooservicedata.getOuterClass().getName().getQualifier(),
        //        "manifest",
        //        "mf" );
        //
        //        // Could the service implementation not be found?
        //        if ( fileobjectManifest == null ) {
        //            // Show message.
        //            TopManager.getDefault().notify(
        //            new NotifyDescriptor.Message(
        //            "Error: No file found. Package:" +
        //            ooservicedata.getOuterClass().getName().getQualifier()
        //            + ", Name:"
        //            + "manifest.mf" ) );
        //
        //            // Exit the method.
        //            return;
        //        }
        //
        //        // Create an empty data object.
        //        DataObject dataobjectManifest = null;
        //
        //        try {
        //            // Find the data object of the file object.
        //            dataobjectManifest = DataObject.find( fileobjectManifest );
        //        }
        //        catch( DataObjectNotFoundException dataobjectnotfoundexception ) {
        //            dataobjectnotfoundexception.printStackTrace();
        //        }
        //
        //        // Add the data object of the service implementation to the list.
        //        contentmemberlist.addMember( dataobjectManifest );
       
       
        // Create an empty manifest object.
        Manifest manifest = null;
       
        try {
            // Create the manifest with a given system file.
            //            TopManager.getDefault().notify(
            //            new NotifyDescriptor.Message(
            //            stringSystemDirectory
            ////            + File.separator + "META-INF"
            //            + File.separator + stringManifestFile ) );
           
            manifest = new Manifest( new FileInputStream(
            stringSystemDirectory
            //            + File.separator + "META-INF"
            + File.separator + "MANIFEST_" + ooservicedata.getClassName()
            + ".TXT" ) );
           
            //            Iterator iterator =
            //            manifest.getMainAttributes().values().iterator();
            //
            //            for ( int intIndexAttributes = 0;
            //            iterator.hasNext();
            //            intIndexAttributes++ ) {
            //                TopManager.getDefault().notify(
            //                new NotifyDescriptor.Message(
            //                "Attribute: " + iterator.next().toString() + "\n" ) );
            //            }
           
        }
        catch( FileNotFoundException filenotfoundexception ) {
            // Show message.
            TopManager.getDefault().notify(
            new NotifyDescriptor.Message(
            filenotfoundexception.toString() ) );
        }
        catch( IOException ioexception ) {
            // Show message.
            TopManager.getDefault().notify(
            new NotifyDescriptor.Message(
            ioexception.toString() ) );
        }
       
        // Get the vector containing the interfaces.
        Vector vectorInterfaces = ooservicedata.getIDLInterfaces();
       
        // Add all Java interfaces to the content list.
        for ( int intIndexInterfaces = 0;
        intIndexInterfaces < vectorInterfaces.size();
        intIndexInterfaces++ ) {
            // Get the interface.
            IDLInterface idlinterface = ( IDLInterface )
            vectorInterfaces.elementAt( intIndexInterfaces );
           
            // Get the interface name.
            String stringInterfaceName =
            idlinterface.getIdentifierName().getName();
           
            // Get the package.
            String stringPackage =
            idlinterface.getIdentifierName().getQualifier();
           
//            // Get index of first package separator.
//            int intIndexFirstPackageSeparator = stringPackage.indexOf( '.' );
//           
//            // Declare root package string.
//            String stringRootPackage = null;
//           
//            // Get root package.
//            if ( intIndexFirstPackageSeparator != -1 ) {
//                stringRootPackage = stringPackage.substring( 0,
//                intIndexFirstPackageSeparator );
//            }
//            else {
//                stringRootPackage = stringPackage;
//            }
////            String stringRootPackage = stringPackage.substring( 0,
////            intIndexFirstPackageSeparator );
           
            // Create an empty file object.
            FileObject fileobjectIDL = null;
           
            // Get directory.
//            fileobjectIDL = filesystemOutput.find( stringRootPackage, null, null );
            fileobjectIDL = filesystemOutput.find( stringPackage,
            stringInterfaceName, "idl" );
           
            //            // Get file object of the service implementation.
            //            fileobjectIDL = repository.find( stringPackage,
            //            stringInterfaceName, "java" );
           
            // Could the file object not be found?
            if ( fileobjectIDL == null ) {
                // Show message.
                TopManager.getDefault().notify(
                new NotifyDescriptor.Message(
//                "Error: No package found. Package:" + stringRootPackage ) );
                "Error: No file found. Package:" + stringPackage + ", Name:"
                + stringInterfaceName ) );
               
                continue;
            }
           
            // Create an empty data object.
            DataObject dataobjectIDL = null;
           
            try {
                // Find the data object of the file object.
                dataobjectIDL = DataObject.find( fileobjectIDL );
            }
            catch( DataObjectNotFoundException dataobjectnotfoundexception ) {
                // Show message.
                TopManager.getDefault().notify(
                new NotifyDescriptor.Message(
                dataobjectnotfoundexception.toString() ) );
            }
           
            // Add the data object of the service implementation to the list.
            contentmemberlist.addMember( dataobjectIDL );
        }
       
        // Add the data object of the service implementation to the list.
        contentmemberlist.addMember( dataobject );
       
        // Create an empty file output stream.
        FileOutputStream fileoutputstream = null;
       
        try {
View Full Code Here

TOP

Related Classes of org.netbeans.modules.jarpackager.ContentMemberList

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.