Examples of JARStructure


Examples of com.alee.utils.reflection.JarStructure

        // Creating structure using any of classes contained inside jar
        progress.setText ( "Creating source files structure..." );
        final List<String> extensions = Arrays.asList ( ".java", ".png", ".gif", ".jpg", ".txt", ".xml" );
        final List<String> packages = Arrays.asList ( "com/alee", "licenses" );
        final JarStructure jarStructure = ReflectUtils.getJarStructure ( ExamplesManager.class, extensions, packages, listener );

        // Updating some of package icons
        jarStructure.setPackageIcon ( WebLookAndFeelDemo.class.getPackage (), new ImageIcon ( WebLookAndFeel.getImages ().get ( 0 ) ) );
        for ( final ExampleGroup exampleGroup : getExampleGroups () )
        {
            jarStructure.setClassIcon ( exampleGroup.getClass (), ( ImageIcon ) exampleGroup.getGroupIcon () );
        }

        return jarStructure;
    }
View Full Code Here

Examples of com.alee.utils.reflection.JarStructure

                    jarFile = FileUtils.downloadFile ( jarUrl.toString (), File.createTempFile ( "jar_file", ".tmp" ), listener );
                }

                // Creating
                final JarEntry jarEntry = new JarEntry ( JarEntryType.jarEntry, jarFile.getName () );
                final JarStructure jarStructure = new JarStructure ( jarEntry );
                jarStructure.setJarLocation ( jarFile.getAbsolutePath () );

                // Reading all entries and parsing them into structure
                final ZipInputStream zip = new ZipInputStream ( jarUrl.openStream () );
                ZipEntry zipEntry;
                while ( ( zipEntry = zip.getNextEntry () ) != null )
View Full Code Here

Examples of com.alee.utils.reflection.JarStructure

    private Component createLibrariesTab ()
    {
        try
        {
            // Parsing jar structure
            final JarStructure structure = ReflectUtils.getJarStructure ( getClass () );

            // Retrieving required files
            final JarEntry licensesFolder = structure.getRoot ().getChildByName ( "licenses" );
            final JarEntry librariesDataFile = licensesFolder.getChildByName ( "libraries.data" );

            // Retrieving additional data for used libraries
            final String librariesDataText = FileUtils.readToString ( structure.getEntryInputStream ( librariesDataFile ) );
            final Map<String, String> librariesData = parseUrls ( librariesDataText );

            // Parsing available libraries info
            final WebPanel librariesPanel = new WebPanel ( new VerticalFlowLayout ( 0, 5 ) );
            librariesPanel.setMargin ( 5 );
            for ( final JarEntry child : licensesFolder.getChilds () )
            {
                if ( child.getName ().endsWith ( ".txt" ) )
                {
                    final String data = librariesData.get ( child.getName () );
                    final int i = data.indexOf ( LIBRARY_DATA_SEPARATOR );
                    final String name = data.substring ( 0, i );
                    final String url = data.substring ( i + LIBRARY_DATA_SEPARATOR.length () );

                    final WebLabel nameLabel = new WebLabel ( name );
                    SwingUtils.setBoldFont ( nameLabel );

                    // Library license file
                    final WebLinkLabel fileLink = new WebLinkLabel ( child.getName () );
                    fileLink.setLink ( new Runnable ()
                    {
                        @Override
                        public void run ()
                        {
                            try
                            {
                                final String license = FileUtils.readToString ( structure.getEntryInputStream ( child ) );
                                final WebPopup licensePopup = new WebPopup ();
                                final WebTextArea textArea = new WebTextArea ( license );
                                textArea.setEditable ( false );
                                licensePopup.add ( new WebScrollPane ( textArea, false ) );
                                licensePopup.showPopupAsModal ( fileLink, true, true );
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

    {
        VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(esbArchive);
        VFSStructuralDeployersImpl structuralDeployers = new VFSStructuralDeployersImpl();
        VFSStructureBuilder builder = new VFSStructureBuilder();
        structuralDeployers.setStructureBuilder(builder);
        StructureDeployer[] deployers = new StructureDeployer[]{new JARStructure()};
        for (StructureDeployer deployer : deployers)
        {
            structuralDeployers.addDeployer(deployer);
        }
        return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

      return (VFSDeploymentContext) structuralDeployers.determineStructure(deployment);
   }

   protected Deployment createDefaultDeployment() throws Exception
   {
      return createDeployment(new DeclaredStructure(), new ChildFileStructure(), new JARStructure());
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

      return determineStructureWithStructureDeployers(deployment, structureDeployer);
   }
  
   protected VFSDeploymentContext determineStructureWithAllStructureDeployers(VFSDeployment deployment) throws Exception
   {
      return determineStructureWithStructureDeployers(deployment, new FileStructure(), new WARStructure(), new JARStructure());
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

   }

   @SuppressWarnings("deprecation")
   protected VFSDeploymentContext determineStructure(VFSDeployment deployment) throws Exception
   {
      return determineStructureWithStructureDeployers(deployment, new MockEarStructureDeployer(), new JARStructure(), new DirectoryStructure());
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

         }
      };
      gs.setShortCircuitFilter(top);
      gs.addGroup("lib");
      gs.addGroup("lib/nested");
      return determineStructureWithStructureDeployers(deployment, new MockEarStructureDeployer(), new JARStructure(), gs);
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

   }

   @SuppressWarnings("deprecation")
   protected VFSDeploymentContext determineStructure(VFSDeployment deployment) throws Exception
   {
      return determineStructureWithStructureDeployers(deployment, new MockEarStructureDeployer(), new JARStructure(), new DirectoryStructure());
   }
View Full Code Here

Examples of org.jboss.deployers.vfs.plugins.structure.jar.JARStructure

         }
      };
      gs.setShortCircuitFilter(top);
      gs.addGroup("jars");
      gs.addGroup("wars");
      return determineStructureWithStructureDeployers(deployment, new JARStructure(), new WARStructure(), gs);
   }
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.