Freeware
Freeware
My Freeware

Shareware
Shareware
My Shareware
PCMag Utilities

Special Sections
Combined List
Reviews
Developer Tools

Resources
Web Sites
Newsletters
Newsgroups
Organizations
SIA Awards

Quick Links
gbAnimator
gbCase
gbCodeLib
gbSnippets
gbGallery
gbNavigate
gbOfficeTimer
gbPlot
gbRegistry
gbReplace
gbSIRTS
gbSnippets
gbStreet
gbText
gbVRML
gbWebCam
gbXML

GBIC >> Software >> gbProcedureLibrary
gbProcedureLibrary

gbProcedureLibrary scans source code files from a specified folder and it's subfolders, extracting all procedures it finds into a Procedure Library. The procedures are indexed for easy browsing, searching an viewing. Duplicates procedures are identified. Bookmarking of procedures is supported.

As used in this Help document, the term Procedures is used to mean any of the following PowerBASIC coding structures:

Sub, Function, Callback, Thread, Macro, FastProc, Class, Type, Enum, Union, Interface, Method, and Property.

gbProcedureLibrary displays a list of all procedures in a ListView control. Displayed properties include procedure title, parent file, date, line count, and others. Selecting a procedure from the list displays the procedure code in the embedded source code editor. Alternately, the parent file of the procedure may be displayed in the source code editor.

A second code editor is available for split screen viewing of a long procedure, or for dual viewing of two different procedures at the same time.

The embedded source editors offer advanced features - syntax highlighting, call tips, autocompletion, brace highlighting, code folding, and indentation guidelines are just some of the features provided.

In addition to browsing, the user may search the library. Searches can be limited to the procedure title or to the entire procedure code content. Results of searches are displayed in a "Results" ListView, located above the list of all procedures.

The Results ListView is used to contain the results of a search, a list of all bookmarked procedures, and a list of all unique (no dupes) procedures in the library.

Procedures may also be sent to an editor/IDE of the user's choice, such as the PowerBASIC IDE, for further editing or compilation.

Finally, gbProcedureLibrary can be used as the editor for a single, external source code file. A file can be opened into a source code editor, modified, and then saved to disk.

Download (v1.1, 1.0MB)

To install, just unzip the contents of the distribution file into a folder of its own!

Key Feature List

gbProcedureLibrary provides a variety of features.
  • Builds List of Procedures From Files
  • User Selects Procedures to Include in Library
  • Supports Sub, Function, Callback, Thread, Macro, FastProc, Class, Type, Enum, Union, Interface, Method, and Property coding structures
  • Scan/Sort Procedure List
  • View Selected Procedures in Source Code Editor
  • View File Containing Procedures in Source Code Editor
  • User-Specified Starting Folder (Including SubFolders)
  • User-Specified Source File Types (*.bas, *.inc default)
  • Code Extraction from HTML Files
  • Persistence Display Between Sessions (Main List and Results List)
  • Duplicate Procedures Identification
  • Unique Procedure List
  • Search Procedures (Name or Content)
  • Case Sensitive Searches
  • Advanced Source Code Editor
  • Split Screen Editor Mode
  • Dual Procedure Editor Mode
  • Open Procedures in PowerBASIC Editor
  • Open/Save Individual Files
  • Local and Online Help

Advanced Editor Features

  • Syntax Highlighting
  • Source Code Formatting
  • Open PowerBASIC Help at Highlighted Word
  • Undo/Redo (Unlimited)
  • Syntax Highlighting
  • Brace Highlighting
  • Indentation Guidelines
  • AutoIndentation
  • Call Tips (optionally Persistent)
  • AutoCompletion
  • Code Folding
  • Line Numbers
  • Active URLs
  • Code Case (Upper/Lower/Mixed/As Typed)

Using gbProcedureLibrary

The basics of using gbProcedureLibrary are very straightforward. Just select the file types to index and the folder to index. Then Press "Build" to fill the left side of the window with a list of all procedures gbProcedureLibrary finds in the start folder and in its subfolders.

By default, all PowerBASIC structures are included in the library. The default file types to be searched are *.bas and *.inc. Code extraction from HTML files is also supported.

The Results List, located above the Proceduring List, is used to display one of three additional lists - procedures identified from a Search, procedures which have been bookmarked, or a list of unique procedures.

To run a search, enter a search term in the dropdown combobox and press Enter, or press one of the two search buttons. The left search button, and Enter, search the procedure names for the search term. The right search button searches the content of all procedures for the search term. Case sensitive searching is supported.

gbProcedureLibrary provides two very powerful source code editors, called the Left (Main) and Right editors. Select a procedure from the library list to display it in the Left editor. The Right editor is used to display split screen and dual views. Display of a single, or two, editors is controlled via the toolbar buttons.

While file editing is not the primary purpose of gbProcedureLibrary, an external source code file may be opened in either editor. And at any time, the contents of either editor may be saved to an external file.

A copy of all discovered procedures is kept in the Procedures Library, which may not be edited directly by gbProcedureLibrary.

Source Code Editors

The state-of-the-art editing features are available in both gbProcedureLibrary editors, and are discussed in this section

Syntax Highlighting
Colors are used to distinguish keywords, strings, and comments from the rest of the snippet content. User may select all highlighting colors.

The list of PowerBASIC keywords is kept in the file keywords.txt in the support_files subfolder. That file may be edited as desired.

Unlimited Undo/Redo
The text editor supports undo/redo actions, limited only by the amount of memory available on your PC. Undo/redo actions are taken by pressing the appropriate toolbar button. If an action is not available, the toolbar button will be grayed out.

Brace Highlighting
This feature highlights the matching parenthesis, ( or ), when the cursor is placed in front one of the character. An alternate highlighting is also applied if no matching parenthesis is found.

Indentation Guidelines
The code editor can display vertical lines that correspond to a standard indentation, which by default is 3 spaces. The vertical lines can help you align code, or it can help you scan code to find starting and ending lines of code pairs, such as If/End If.

Greenbar Effect
In the early days of computing, source code was printed on wide paper whose lines were alternately given white and green background colors. The alternating background colors made it easier for the eye to track across lines of code.

The greenbar display provides a similar effect by alternating (every 3 lines) between white and gray line backgrounds.

AutoIndentation
When the user presses enter, the cursor will be placed at the same level of indentation as the line where enter was pressed. However, if the line begins with one of several code constructs, indentation will be made one level lower than the current line.

Code constructs which result in extra indentation include:

   If             For
   Else           Do
   Select         Loop
   Case           While

Call Tips
When a PowerBASIC function is typed in by the user, the text editor can display a popup label containing a list of the arguments allowed by the function. Some examples of call tips are shown in the image to the right.

When the popup label is displayed, the user continues typing, filling in the argument list per the displayed syntax. Pressing a space bar will remove the display.

If the user enables Persistent Call Tips. the keyword sequence and the call tip text are displayed permanently in the StatusBar, until the user takes another action which reports status to the StatusBar.

The user may modify the list of recognized functions and the corresponding argument syntax/list that is displayed. See the three files words1.txt, words2.txt, and words3.txt in the support_files subfolder for more information.

Persistent Call Tips
Places a copy of the Call Tip into the StatusBar that persists even when the Call Tip disappears from the screen.


AutoCompletion
PowerBASIC keywords are often used in combination with one another, such as "Control Add" or "Thread Get Priority". When the user types in a PowerBASIC keyword that is part of a combination, a popup list of allowed keywords needed to finish the combination, is displayed. The user can select from that list (press TAB) or simply continue typing.

The user may modify the list of recognized keyword combinations. See the two files members1.txt and members2.txt in the support_files subfolder for more information.

Code Folding
When reviewing code it can be convenient to hide the code within procedures and other code constructs. This is called folding and is demonstrated in the image below. Code constructs may be folded by clicking on the minus symbol in the margin, or unfolded by clicking on the plus symbol in the margin. The toolbar provides buttons for folding/unfolding all constructs in a snippet.

The code constructs which gbProcedureLibrary recognizes are:

   Type        End Type                 Class       End Class
   Macro       End Macro                Interface   End Interface
   Sub         End Sub                  Method      End Method
   Function    End Function             Property    End Property
   Callback    End Function             Union       End Union

In general, folding can also be applied to lesser structures, such as Select/End Select, but that level of folding is not currently supported by gbProcedureLibrary.

Open Help to Highlighted Word
Once a word is selected, the PowerBASIC Help file may be opened to the corresponding Help file topic.

Line Numbers
The text editor supports the display of line numbers, contained in a left margin that is separate from the text.

Active Links
gbProcedureLibrary supports hypertext links. Just as in a browser, the links are highlighted and underlined, needing only to be clicked to open the link location. Simply type in an HTTP address and click on the link to open the URL in your default browser. An

    http://www.garybeene.com

Toolbar

All gbProcedureLibrary features and settings are accessed through the toolbar buttons.

Here's a description of the functions provided by the toolbar.

    Show Library Displays the Procedure Library and Search controls
    Open Displays a dialog for selectiong the folder from which to extract procedures
    Open Builds the procedure library
    Cancel Build Cancels any active procedure library build
    Single View Displays only the Left editor
    Split Screen Displays both editors, with the same procedure in each editor. Changes to one editor are reflected in the other.
    Dual View Displays both editors, with a different procedure in each editor.
    Undo Removes the latest change made in the text editor
    Redo Reverses the last Undo action.
    Fold Folds all procedures in the procedure's Compilable Example
    UnFold UnFolds all procedures in the procedure's Compilable Example
    Indent Indent the selected lines
    Outdent Un-indent (outdent) the selected lines
    Comment Comment the selected lines
    UnComment UnComment the selected lines
    Copy Copies selected content from the Left editor
    Print Prints the content of the Left editor
    Open In IDE Opens snippet's Compilable Example (uses default BAS editor)
    Font Opens the Font dialog
    Settings Displays summary information about the Procedure Library and gbProcedureLibrary settings
    Help Opens this online Help page

Toolbar DropDown Menus

The dropdown menus associated with the toolbar buttons are described here:

Build Procedure Library

  • Show Duplicates - Displays visual markers in the procedure listings, showing which procedures are duplicates of one another. Note that the effectiveness of this depends on how the user sorts the lists.
  • Case Sensitive Searches
  • Set File Types to Search - Sets the file extensions which will be searched for procedures
  • Set Text Editor - Select the text editor to use when displaying the Procedure Library (per the menu option above)
  • Open Error Report - When extracting procedure names, any procedure whose end line is not discovered is listed in a text file. This menu option opens that text file in Notepad.
  • Open Procedure Library - Opens the Procedure Library (a text file) in the user-selected text editor. Notepad is the default text editor.

Open in IDE

  • Select IDE - Select the external source code editor used when the "Open in PowerBASIC IDE is selected
  • Select PowerBASIC Help File - Select the Help file used when the "Open Selection in PowerBASIC Help" menu is selected

Settings

  • Use Syntax Highlighting - Toggles use of syntax highlighting
  • Auto Copy - Copies procedures to the clipboard when the procedure is selected

    Settings - Editor
    These includes individual settings plus four second level menu groups:
  • Line Numbers - Toggles display of line numbers in the editor margins
  • Indentation Guides - Vertical lines display at indentation levels as a visual guide for the user
  • AutoIndent - When pressing Enter, has the editor indent to the appropriate level
  • Brace Highlighting - Toggles color display of matching (and orphan) braces
  • Alternating Line Colors - Toggle painting the background of every 3 lines as a different color. Line colors can help the user follow long lines of code more easily.
  • Enable Hyperlinks - Located and activates URLs embedded in source code
  • Call Tips - Displays a list of procedure arguments as the user types in a procedure name
  • Call Tip Persistence - Displays persistent Call Tips in the statusbar
  • AutoCompletion - Displays a list of possible keywords matching letters the user has typed
  • Code Folding - Toggles hiding code between 1st/last lines of procedures

    Settings - Colors
    These set the colors for syntax highlighting:
  • Keyword Color - Set the color used to display keywords
  • Comment Color - Set the color used to display comments
  • String Color - Set the color used to display strings
  • Number Color - Set the color used to display numbers
  • Operators Color - Set the color used to display operators

    Settings - Code Case
    These set the code case that will be used with syntax highlighting:
  • As Types - No case change. Displays as typed by the user.
  • Mixed - Display keywords as mixed text
  • Upper - Display keywords as upper text
  • Lower - Display keywords as lower case

    Settings - Formatting
    These are used to control various aspects of formatting source code:
  • Manage Blank Lines - Controls the location and count of blank lines
  • Set Indent Spaces Count - Determine the number of spaces per indentation level
  • Set Max Blank LInes - Maximum number of consecutive blank lines
  • Set Pre-Procedure Blanks - Number of blank lines before a procedure
  • Set Tab to Spaces Count - Number of spaces used to replace a TAB character

Help

  • Local Help - Open a local copy of gbProcedureLibrary help.

Context Menus

The context menus associated with the various gbProcedureLibrary controls are described here:

Search Results (ListView)

  • Use as Right Views - Use the text of the selected procedure for viewing in the right side during Dual View mode
  • Bookmark Procedure - Bookmark the selected procedure
  • Clear Bookmark - Remove the bookmark from the selected procedure
  • Clear All Bookmarks - Remove all bookmark from all procedures
  • Show Bookmarked Procedures - Display a list of all bookmarked procedures
  • Show Unique Procedures - Display a list of procedures with all duplicates removed
  • Remove From List - Remove selected procedure from list
  • Clear List - Remove all procedures from the Results list
  • Open Containing File in Left View - Open (in the Left View) the file in which the selected procedure is located.
  • Open Containing File in IDE - Open (in the user-specified IDE) the file in which the selected procedure is located.
  • Open Containing Folder - Opens the folder that contains the file in which the selected procedure is located
Procedure library Listing (ListView)
  • Use as Right Views - Use the text of the selected procedure for viewing in the right side during Dual View mode
  • Bookmark Procedure - Bookmark the selected procedure
  • Clear Bookmark - Remove the bookmark from the selected procedure
  • Clear All Bookmarks - Remove all bookmark from all procedures
  • Show Bookmarked Procedures - Display a list of all bookmarked procedures
  • Show Unique Procedures - Display a list of procedures with all duplicates removed
  • Open Containing File in Left View - Open (in the Left View) the file in which the selected procedure is located.
  • Open Containing File in IDE - Open (in the user-specified IDE) the file in which the selected procedure is located.
  • Open Containing Folder - Opens the folder that contains the file in which the selected procedure is located

Source Code Editors

  • Cut - Delete selected text (all text if no selection) and place on clipboard
  • Copy - Copy selected text (all text if no selection)
  • Paste - Paste text into the editor at the caret
  • Delete - Delete the selected text
  • Clear All - Remove all text in the editor
  • Copy All - Copy all text in the procedure
  • Undo - Undo latest editing action
  • Redo - Restore last undo action
  • Comment - Add comment character to selected lines
  • UnComment - Remove comment character from selected lines
  • Indent - Move code 3 spaces to the right
  • Outdent - Move code 3 spaces to the left
  • Fold All - Hide all procedure code (leaves 1st/last lines of procedure visible)
  • UnFold All - Display all procedure code
  • Remove Blank Lines - Removes blank lines, including lines containing only spaces
  • Left Justify - Removes all spaces on the left side of all lines
  • Format Code - Formats source code, including controlling blank line counts
  • Open External File - Select a file whose content will be displayed in the left editor
  • Save As External File - Save content of the left editor to a user-specified file
  • Open Selection in PowerBASIC Help - Open the user-specified Help file to the topic corresponding to the selected text
  • Open Procedure in PowerBASIC IDE - Save selected text to a temp file. Open that file in a user-specified IDE

Keyboard Shortcuts

The following key combinations are available to the user to access gbProcedureLibrary features:

  • F1 - Help
  • Ctrl+B - Build Procedure Library
  • Ctrl+L - Toggle Display of Library

Other Comments

Comments and suggestions are welcome!

 

 
Languages
Code
Software
3D
Stereograms
Pepsi
Retirement
SciFi
Alibi
Solutions
Tennis
Personal
Introduction
------
VC++
C#
VB.NET
------
VB6
PowerBASIC
REALbasic
freeBASIC
QBasic
------
HTML
CSS
JavaScript
VML
------
Perl
------
Language Comparison
BASIC Dialects
Developer Tools
------
Source Code
Home
Top 100 Snippets
Code Librarians
gbCodeLib
Home
Freeware
My Freeware
Shareware
My Shareware
PCMag Utilities
Reviews
Developer Tools
Home
Concepts
Math
Books
Tutorials
Web Technologies
Source Code
VML
SVG
Stereograms
Home
Overview
Concepts
History
Viewing Tips
Software
Books
Web Sites
Gallery
Algorithms
Home
History
Pepsico Today
Products
Commercials
Users Manual
Images
Web Sites
Home
Background
Advice
Calculators
Online Financial Planner
Activities
Software Tools
Home
Top 10 Books
Awards
Award Winners
My Bookshelf
Home
Home
Home
Instructions
Buddy List
Private Network
Facilities
Tennis Pros
Blog
Webcam
My Opinions
Biography
Family Tree
Nathan
Daniel
Jokes
Movies
Contact Me