Find Files In Favorites

21/06/2013 02:09

Netbeans Plugin Site : https://plugins.netbeans.org/plugin/48917/find-files-in-favorites

This Documentation Site : https://adithyantech.webnode.com/netbeans-plugins/find-files-in-favorites


This plugin enables finding (searching) recursively file(s) from the directories that have been added in Netbeans' favorites window.

Need for this plugin

When we check out different modules from our source repositories (cvs, svn and etc), it will contain multiple directories (src, conf, lib and etc) inside it for different purpose.  It is usually recommended to keep the checked-out modules and netbeans project directory separate.

While we are creating projects in netbeans, usually the MODULE_DIR/src is added. Other directories need not be there inside project tree. It is not required usually. Another thing, it is difficult is add all the directories inside the project.

If this is the scenario, searching a file from directories other than src is difficult. Because, other directories will not be added as sources under project. CTRL+O, SHIFT+ALT+O will open java types and files only if they are in project window or in files window respectively.

Therefore, searching a file from non src directories of the modules are difficult.

This plugin tries to solve this issue. You can add all the checked out modules' directory or its parent directory (if you have a habit of having all the checked out modules inside one parent directory. Usually it will be like this) to netbeans' favorites window.

And use this plugin to search for files inside the directories added in favorites window.

Current Features

  1. Narrowing down the results on each Key press in the input text field
  2. Case Sensitive and Case Insensitive Searching
  3. Wildcard support for searching
  4. Support for searching in full file path (including its parent directory names)
  5. Support for regex based searching
  6. Status text field changed to status text area for printing the activities sequencially
  7. Support for opening multiple files at a time
  8. Display of matching files count
  9. Options page for controlling the search behavior. Detailed explanation on various options are given in next section of this documentation. Click Options -> Miscellaneous -> Find Files in Favorites
    • Configuration to include or exclude hidden directories during search
    • Configuration to show the matching directories in the result list
    • Support for adding multiple directory names or directory name patterns as exclude list so that they are not included during search process
    • Support for adding multiple file names or file name patterns as exclude list so that they are not included during the search process
    • Default choice of case sensitivity when you open the "Find Files In Favorites" window
    • Support for configuring the minimum number of characters for triggering the search process

Usage

After you have successfully installed the plugin, you will find "Find Files in Favorites" menu under "Navigate" menu. When you click the menu, you will get a window like the below one. The default shortcut to invoke the window is ALT+SHIFT+S.


 
 


As soon as the window is opened, it will recursively collect the directories (as a background process) and files inside the directories that you have added in your netbeans' favorites window. You need not wait until it does the background process.

As soon as the window is opened, you can type the file name to locate it inside those directories that you have added in your netbeans' favorites window. When you keep typing the file name, the results will be narrowed to match your input. Number of matching results will also be displayed. If the results are displayed when the background file/directory collection is in progress, then the displayed will not have full list. In this scenario, as soon as the background process ends, immediately the results will be recomputed and displayed.

Clicking open after selecting multiple files in the List will open all of them in netbeans' editor window.

Clicking the Case Sensitive check box will perform a search again to match your inputs.

How Search works

This section will explain how the search works when you type some characters in "Enter the search string" text field

Options

When you click Tools -> Options -> Find Files In Favorites, the following window will appear

 

 

Ignore Directory Patterns

  • This option allows you to enter the name or name patterns (only last name and not the full path) of the directories that are to be excluded from the searching process.
  • When some directory name is added, then both the following are excluded from searching
    • The matching directory itself will not be part of search and search result
    • All the files/sub-directories inside the matching directories
  • For ex : If "CVS" is entered as one item, then any directory whose name is "CVS" will be excluded and all its child files/sub-directories are excluded
  • Wildcard characters "*" and "?" are allowed to be entered here. As we are familiar, "*" can be used to represent multiple characters and "?" can be used to represent single character

Ignore File Name Patterns

  • This option allows you to enter file name or file name patterns so that they are excluded from the searching process
  • For ex : If you have added "*.class" as one of the excluded items, then during search operation all the files that match this pattern will not be taken as inputs
  • Wildcard characters "*" and "?" are allowed to be entered here. As we are familiar, "*" can be used to represent multiple characters and "?" can be used to represent single character

Search Inside Hidden directories

  • If it is selected, search process will recursively traverse inside the hidden directories also. 
  • If it is unselected, then hidden directories will no longer be part of search process. The hidden directory itself will not be part of search process.

Show Directories in result list

  • If it is selected, then matching directories will also be shown in the result list.
  • If it is not selected, only the matching files will be shown and directories will not be shown

Case Sensitive by default

  • The "Case sensitive" checkbox in "Find Files In Favorites" will reflect this selection, while opening it

Minimum Trigger Characters For Search

  • The allowed range of this is 3 to 15
  • The default value is 4
  • This value indicates when to do the searching when the user types the characters. i.e., The search process will be done only if the text field "Enter the search String" contains this much characters

Features in Future versions

  1. Using the netbeans' window system for bringing the search window
  2. Showing error / information messages using netbeans' window system
  3. Option to invoke the configuration page from the find window itself
  4. Case-sensitive options for ignored directory and file names/patterns
  5. Having, "Don't close window after open files" check box in the search window

Update History

Changes in Version 2.1.3

  1. Search process started only after typing some minimum characters
  2. Performance improvement done in searching process. When some key is typed, any searching process happening for the previous key is cancelled and new process is started
  3. Doing the work in EventDispatcher Thread avoided
  4. Two new configurations added in Options page
    • Minimum Trigger characters for search
    • Default case sensitiveness while searching

Changes in Version 2.1.1

  1. Support added for Wildcard support for searching
  2. Support added for searching in full file path (including its parent directory names)
  3. Support added for regex based searching
  4. Status text field changed to status text area for printing the activities sequencially

Changes in Version 2.0.2

  1. Netbeans' DialogDisplayer used instead of displaying a standalone JFrame
  2. Some GUI adjustments done in the options panel
  3. Menu item text moved to Bundle.properties

Changes in Version 2.0.0

  1. Configuration page added in Options window with following options
    • Configuration to include or exclude hidden directories during search
    • Configuration to show the matching directories in the result list
    • Support for adding multiple directory names or directory name patterns as exclude list so that they are not included during search process
    • Support for adding multiple file names or file name patterns as exclude list so that they are not included during the search process 
  2. Separate text field, that was there for showing the path of the selected item in the list, is removed. Instead, the path is shown in the result list itself
  3. Stopping of the thread, that is doing the file list collection, done when the window is closed
  4.  Separate label used for showing the initialization status
  5. Some UI changes done
  6. Double clicking the result list opens the editor with selected files
  7. Rendering of result list done to have separate icons for files & directories and the path of the item
  8. Issue fixed to avoid the ConcurrentModificationException
  9. Issue in getting the actual path name of the directories (that are added to Netbeans' favorites window)  fixed

Version 1.3.3

  1. Plugin signed

Version 1.3.2

  1. Plugin version modified
  2. Description modified

Version 1.1.2

  1. First version

 

Back

Search site

© 2013 All rights reserved.