Package com.alee.utils.reflection

Examples of com.alee.utils.reflection.JarEntry


        {
            @Override
            public Component getListCellRendererComponent ( final JList list, final Object value, final int index, final boolean isSelected,
                                                            final boolean cellHasFocus )
            {
                final JarEntry entry = ( JarEntry ) value;
                final WebListElement renderer =
                        ( WebListElement ) super.getListCellRendererComponent ( list, value, index, isSelected, cellHasFocus );
                renderer.setIcon ( entry.getIcon () );
                renderer.setText ( entry.getName () );
                return renderer;
            }
        } );
        classSearchHintsList.addMouseListener ( new MouseAdapter ()
        {
View Full Code Here


    private void openSelectedHint ()
    {
        if ( classSearchHintsList.getSelectedIndex () != -1 )
        {
            final JarEntry entry = ( JarEntry ) classSearchHintsList.getSelectedValue ();
            hideClassSearchPopup ();
            viewEntry ( entry );
        }
    }
View Full Code Here

    public void updateClassPath ( final JarEntry lastEntry, final boolean openInEditor )
    {
        classPath.removeAll ();

        // Root element
        final JarEntry root = jarStructure.getRoot ();
        final WebBreadcrumbButton rootElement = new WebBreadcrumbButton ();
        rootElement.setIcon ( root.getIcon () );
        TooltipManager.setTooltip ( rootElement, root.getIcon (), jarStructure.getJarLocation () );
        rootElement.addActionListener ( new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
View Full Code Here

            }
            else
            {
                if ( word != null )
                {
                    final JarEntry classByName = jarStructure.findEntryByName ( word );
                    if ( classByName != null && ( classByName.getType ().equals ( JarEntryType.classEntry ) ||
                            classByName.getType ().equals ( JarEntryType.javaEntry ) ) && classByName != entry )
                    {
                        value = new LinkGeneratorResult ()
                        {
                            @Override
                            public HyperlinkEvent execute ()
View Full Code Here

    @Override
    public void removeTabAt ( int index )
    {
        super.removeTabAt ( index );

        JarEntry removed = data.get ( index );
        ids.remove ( index );
        data.remove ( index );
        fireViewClosed ( removed );
    }
View Full Code Here

                    // Remote jar-file
                    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 () );
View Full Code Here

     * @param zipEntry  ZIP entry
     */
    private static void parseElement ( final JarEntry jarEntry, final String entryName, final ZipEntry zipEntry )
    {
        final String[] path = entryName.split ( "/" );
        JarEntry currentLevel = jarEntry;
        for ( int i = 0; i < path.length; i++ )
        {
            if ( i < path.length - 1 )
            {
                // We are getting deeper into packages
                JarEntry child = currentLevel.getChildByName ( path[ i ] );
                if ( child == null )
                {
                    child = new JarEntry ( JarEntryType.packageEntry, path[ i ], currentLevel );
                    child.setZipEntry ( zipEntry );
                    currentLevel.addChild ( child );
                }
                currentLevel = child;
            }
            else
            {
                // We reached last element
                final JarEntry newEntry = new JarEntry ( getJarEntryType ( path[ i ] ), path[ i ], currentLevel );
                newEntry.setZipEntry ( zipEntry );
                currentLevel.addChild ( newEntry );
            }
        }
    }
View Full Code Here

        {
            // 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 );
View Full Code Here

TOP

Related Classes of com.alee.utils.reflection.JarEntry

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.