Examples of FilenameFilter


Examples of com.mucommander.commons.file.filter.FilenameFilter

     */
    @Override
    public void performAction() {
        FileTable      fileTable;
        FileTableModel tableModel;
        FilenameFilter filter;
        int            rowCount;
        boolean        mark;

        // Initialization. Aborts if there is no selected file.
        fileTable  = mainFrame.getActiveTable();
        if((filter = getFilter(fileTable.getSelectedFile(false, true))) == null)
            return;
        tableModel = fileTable.getFileTableModel();
        rowCount   = tableModel.getRowCount();
        mark       = !tableModel.isRowMarked(fileTable.getSelectedRow());

        // Goes through all files in the active table, marking all that match 'filter'.
        for(int i = tableModel.getFirstMarkableRow(); i < rowCount; i++)
            if(filter.accept(tableModel.getCachedFileAtRow(i)))
                tableModel.setRowMarked(i, mark);
        fileTable.repaint();

        // Notify registered listeners that currently marked files have changed on the FileTable
        fileTable.fireMarkedFilesChangedEvent();
View Full Code Here

Examples of java.io.FilenameFilter

  }

  private List<IClasspathEntry> retrieveClasspathEntries(File directory) {
    List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();

    File[] libs = directory.listFiles(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(".jar");
      }     
    });
    if (libs != null) {         
View Full Code Here

Examples of java.io.FilenameFilter

  }
 
  public static final List<IClasspathEntry> retrieveClasspathEntries(File directory) {
    List<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();

    File[] libs = directory.listFiles(new FilenameFilter() {

      public boolean accept(File dir, String name) {
        return name.toLowerCase().endsWith(".jar");
      }
     
View Full Code Here

Examples of java.io.FilenameFilter

  private String[] getThemePacks(File directory) {
    if (directory == null || !directory.exists()) {
      return new String[0];
    }

    return directory.list(new FilenameFilter() {
       public boolean accept(File dir, String name) {
         return name.toLowerCase().endsWith(".zip");
       }
     });
  }
View Full Code Here

Examples of java.io.FilenameFilter

            jarlist.add(new URL("file:" + jar.getAbsolutePath()));
        }

        // add all jar files from the lib/ext directory
        File extdir = new File(libdir, "ext");
        File[] files = extdir.listFiles(new FilenameFilter() {
                public boolean accept(File dir, String name) {
                    String n = name.toLowerCase();
                    return n.endsWith(".jar") || n.endsWith(".zip");
                }
            });
View Full Code Here

Examples of java.io.FilenameFilter

    } else {
      File bundleDirectory = new File(URI.create(urlString)).getParentFile();
      //      System.out.println("bundleDirectory: " +
      // bundleDirectory.getAbsolutePath());

      bundles = bundleDirectory.list(new FilenameFilter() {
        public boolean accept(File dir, String name) {
          return name.startsWith(prefix) && name.endsWith(extension);
        }
      });
    }
   
    HashSet bundleSet = new HashSet();
   
    // Add local first
    File localDir = new File(SystemProperties.getUserPath());
    String localBundles[] = localDir.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.startsWith(prefix) && name.endsWith(extension);
      }
    });
   
      // can be null if user path is borked
   
    if ( localBundles != null ){
     
      bundleSet.addAll(Arrays.asList(localBundles));
    }
   
    // Add AppDir 2nd
    File appDir = new File(SystemProperties.getApplicationPath());
    String appBundles[] = appDir.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.startsWith(prefix) && name.endsWith(extension);
      }
    });
   
View Full Code Here

Examples of java.io.FilenameFilter

    if(styles != null)
      return styles;
    StringBuffer path = new StringBuffer(baseStylePath);
    path.append(name);
    File fPath = new File(path.toString());
    String[] css_files = fPath.list(new FilenameFilter() {
      public boolean accept(File dir, String name) {
        return name.endsWith(".css") && !name.startsWith("_");
      }
    });
    styles = new ArrayList();
View Full Code Here

Examples of java.io.FilenameFilter

                path = path.append("j2ee13");
            }
            URL librarySetURL = FileLocator.find(bundle, path, null);                       
            try {
                File librarySetsDir = new File(FileLocator.toFileURL(librarySetURL).getPath());
                File[] jars = librarySetsDir.listFiles(new FilenameFilter() {
                   
                    public boolean accept(File dir, String name) {
                        return name.endsWith(".jar");
                    }
                });
View Full Code Here

Examples of java.io.FilenameFilter

 
  @NotBound
  public String[] getTomcatLibraryNames() {
    File dir = _wgaRuntime.getCatalinaLibDir().getLocation().toFile();
    String[] names;   
    names = dir.list(new FilenameFilter() {

      public boolean accept(File dir, String name) {
          return name.endsWith(".jar");
      }
     
View Full Code Here

Examples of java.io.FilenameFilter

        ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
        ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
        ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
        BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        for (File subfile: file.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
              return name.endsWith(".bpmn") || name.endsWith("bpmn2");
            }})) {
          kbuilder.add(ResourceFactory.newFileResource(subfile), ResourceType.BPMN2);
        }
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.