PBExtensions.bundle

What am I?

PBExtensions is a work in progress.   PBExtensions.bundle is a ProjectBuilder.app loadable bundle which adds various features which I find useful to ProjectBuilder. If you find these useful please let me know.  Any suggestions (for more extensions) are welcome, as are bug reports. You can contact the author at:

Eric Peyton
epeyton@cmg.fcnbd.com

*** INSTALLATION ***

1)  Place this bundle some place where it can always be found.  (I suggest ~/Library/PBBundles).  
2)  Then start ProjectBuilder and point the bundle loader (in Preferences...;Bundles) to your PBExtensions.bundle.
3)  Restart ProjectBuilder

*** Features ***

1) There should be a new "Recent Projects" menu on the main menu.  This will show you the projects that you have opened in ProjectBuilder.  These are ordered most recent to the top.  By clicking on one of these menu items it should open up the specified project.

2) There should also be a new "PBExtensions..." menu item under Info.  This will allow you to set the preferences for the menu and other extensions.  This panel was supposed to be loaded by ProjectBuilder's Preferences menu, however it seems that this feature doesn't work in 4.2.  The code is still in there however and when Apple provides personalized Preferences panels to the public this will be implemented in PBExtensions.

3)  Under the Tools menu there are menu items for launching Icon Builder (Only on Openstep, not Rhapsody), File Merge, and Interface Builder .  Because Services is still 3.3 based, it's nice to have these applications accessible.

4)  You can now set the color used by Project Builder when breaking on a specific line.  If you check the box, Use My Debugging Color, in Preferences, the color selected will be used.  This code is from Bill Bumgarner's PBDHColor bundle.  Thanks Bill.

5)  You can set Project Builder to save the Open Projects on exit.  The next time you open Project Builder the previously open projects will be opened as well.

6)   You can control the number of items that appear on the Recent Projects menu. This number defaults to twenty.  Set it to a larger value to see the menu items.

7)   PB Pasteboard (Openstep version only).  OK I don't want any bug reports about this one.  This is a feature that Apple left in, I just turned it on and gave it a menu item.  I have fixed some of the most glaring errors, but it still isn't perfect.  On the Edit menu there is now a PB Pasteboard menu item(Cmd-V).  When you click on this you will see a panel.  This panel shows you up to the last 30 things that you have copied.  This panel will not come up if you don't have a project up, and it won't come up if you haven't copied anything into the pasteboard yet.  It works OK.  But don't send me bug reports about it.  (For those emacs fans, this is the PB kill ring)

8)  Comments extension.  An easy one, I don't expect it'll get much mileage, but what the heck, I threw it in anyway.  Under the Edit menu is a new menu Comments.  This has 2 items, Comment Selected and Uncomment Selected.  These do exactly what they say they do.  If you Comment Selected it throws a /* */ around whatever you have selected.  It doesn't go through to make sure you're not commenting comments, etc, etc.  Uncomment selected blows away all /*, */, and // inside the selected block of code.  These menu items aren't smart enough to make sure you're inside a .m, .c, .h, etc.  It'll do what it can.

9)  Comments extension (part 2) (only if you have perl)

Bill Bumgarner provided a perl script for formatting comments.  If you have perl and want "intelligent" commenting turned on there is now a setting in the prefs panel which does this.  The features of the perl script are listed below.  You can turn this off and still use the commenting that PBExtensions provides if you see fit.

format_comment features:

# - auto wraps to $lineLength characters per line.
# - indents all comments based on indention of first line
# - can re-format existing c comments
# - if the first line contains /*, the characters following the '/*' but
#     not including any random text will be used to determine the format
#     of the comment
# - /*- will create a comment with a row of ----'s at the beginning/end
# - /*= same, but with =====
# - /*+ same, but with +++++
# - /*" surround comment with /*" and "*/ for use with autodoc
# - "" same as above
# - /** create double bullets down left side
# - /*** triple bullets
# - // line left side w/'//'
# - /***= triple bullets w/ =========== at begin/end.

10)  New menu item.  Tools:Launcher:Clear Window.  This allows you to clear the GDB Window of all text.  It does not retain the current buffer.  This is anothe major hack,  this one provided by Matt Ash.  Thanks Matt.

*** FUTURE FEATURES ***

I would like any suggestions but here is what I am thinking.

->  Add a macro language for scripting, and playback and record, like most other high quality editors have.
->  Add lines of code counter and viewer.  See PBCodeCount, repackaged version of count
->  Add ability to time amount of time spent actually in a project
->  Add Gdb stack browser (?? About feasibility)  See PBGDBExtensions
->  Add a graphical representation of a project view (Subclasses, superclasses, uses, etc.)
->  Integrate autodoc with PB (Add ability to turn comments into autocomments as well).
->  Add ability to compare current file vs. saved version.
->  Add ability to make all Headers Public Headers.
->  Add Bookmarks.  Want to be able to set and review bookmarks in my code
->  Add Customizable toolbars to the app.  I think this should be a separate bundle
->  Add ability to include more GDB Commands.  I.e. Run until line #, etc.  See PBGDBExtensions

*** POSSIBLE FEATURES ***  (If someone asks for them)

->  Add ability to compress/expand code like in old Edit.app.  May not be helpful to most, but I liked that feature a lot for code browsing.
->  Add ability to open multiple projects at one time (Project Groups).
->  Add ability to sort recent projects alphabetically instead of in "last opened" order.

*** Known Bugs ***

->  Add ability to not open autoloaded projects when you double click on a PB.project and you have PBExtensions set to open previous state.

Let me know if you find any.

Eric Peyton
epeyton@cmg.fcnbd.com

*** COPYRIGHT ***

PBExtensions is copyright 1997 Eric Peyton.  I reserve all rights to this piece of software.  All code written by other authors is used with their permission, and is their responsibility.  I take no responsibility for any damage this software, through omission or error, causes.  This software is provided as is and with no warranty.