Here is a collection of some plugins I made for use at work that can come to use for someone else.
Please note that these plugins should be considered to be in PRE ALPHA stage as I haven't had the time to 'battle-test' them for long.
Something that really bothered me during developing plugins for N++ was the need to make a UI for each and everyone of them
to handle settings, with all that that entails (actual UI, save/load, etc), and I solved it by making SolutionHub.
SolutionHub (as all my plugins has some connection to a solution/project) handles all my file indexing and settings needs.
All my other plugins communicate with SolutionHub through N++'s 'message to plugin'. If you as a developer want to interface
with the plugin, I provided some information in the SolutionHub section below.
Before you start downloading and thinking everything going to work, here is a reminder. SolutionHub is the center of all my plugins
and any of my plugins will not work if you do not have this (I will include it in all download packages for now). But this also means
that I clutter down you 'Plugins' menu with 2 extra plugins (SolutionHub + SolutionHub UI) when all you really wanted was Open File In Solution.
TortoiseSVN works without SolutionHub but you loose the root directory aspect of the plugin (no commits/logs/updates on a project basis).
SolutionTools also works without SolutionHub the results will probably not be what you expect without SolutionHub+OFIS.
Below is some plugins (the ones that make sense to release to the public) and some basic information about them.
Please note that some of them have config files that can be tweaked so be sure to look in the Plugins menu of the commands in each plugin.
As of now I have not documented the the config files but you should be able to figure it out my nameing conventions.
To 'install' them just Unzip/Unrar to where you have installed your N++ (into the /plugins/-folder.)
Keyboard shortcuts can be assigned in N++ by 'Settings->Shortcut mapper...->Plugin commands'.
And by looking at the changelog it has become easier to modify the context-menu (right click in editor window).
I have packaged all plugins for download here, delete the ones that you do not need/want.
I know the documentation is lacking, keep me posted and I will keep updating it.
NOTE : I will always keep the most up-to-date versions linked here, and they MIGHT be newer than the ones through the PluginManager, check out changelogs and links in the 'Downloads' section below.
Open File In Solution (V2)
If you have used Eclipse or Visual Assist(VAX) in Visual Studio you know what this is all about.
If not it lets you index specific folders and possible specific types of resources (xml-, cpp, py-files) for a fast indexing of files.
It is basically a updated version of what I have previously released with some minor modification and fixes.
Here is some of them (in no particular order) :
- Ability to search whole filename (i.e. path+filename) (use '\' as the first character in one of the searchstrings, see screenshots).
- Exclude filter while searching (use '-exclude_string').
- Instead of setting up a include filter of files to be included in the solution, you now can setup a exclude filter instead.
This can be easier for some if you want all files included except files with extension X, Y. (this is a SolutionHub feature if we want to get technical)
- No more stupid character limit on include/exclude filters. (this is SolutionHub feature if we want to get technical, again).
- Ability to tweak the colors used in the UI(if my color choices hurt your eyes).
- If you select/highlight something in N++ and open the OFIS dialog that string will be used as a search string. This is not a new
feature but previously the characters that would be stripped from the selected text was hardcoded someplace deep inside OFIS.
Now you can set your own set of allowed characters and everyone will be much happier.
- Ability to multi-select(and thereby multi-open). This is not a new feature per se but I do not think it is/was documented. I do have changed how
multiselect works with 'shift+arrow keys' work though (like in Visual Assist). It might seem a little quirky the way it(navigation with keys) works,
but it was the way I wanted it to work(it's a feature :)).
Key shortcuts :
- Page up/down : Scroll one page up/down
- Page up/down + (ctrl OR shift) : To top/bottom
- Arrow up/down : Move selection up/down
- Arrow up/down + (ctrl OR shift) : Multi select (first selection becomes the pivotpoint)
New in R194 :
Ability to prefix selected uppercase character(when opening OFIS with a selected text in N++). Default is active and prefix set to ' '(space)
as it yields best searches in most cases.
For example :
Your working in a file that uses class MyClass, you select 'MyClass' and open OFIS.
Previously you should have searched for 'myclass', now with prefixes (default ' ') you will search for 'my class'.
If you have a naming scheme like 'MyClass' is implemented in files named 'my_class' you would not previously have found it.
The prefix is optional and what prefix so append is configurable (check settings in plugin menu).
*NOTE* : Please read the 'SolutionHub UI' section on how to setup a solution.
Screenshots here and here and here.
There is probably 10 of these already on the internets, but none of them(that I have seen) have the concept of a root directory.
That makes them useless in my opinion because then you have to navigate to the root directory and update (for the whole trunk) that
takes time and that time I could have spent doing real stuff, like coding.
Currently supports the following :
On project/solution basis : Update, Commit, Log.
On file basis : Diff, Log, Commit, Edit Conflicts, Resolve, Add, Revert, Remove, Rename [,lock, unlock](R195)
If you would like any more exposed let me know.
New in version R186
Added configuration file as secondary means of getting the install directory of Tortoise SVN. As the Visual Studio SVN plugin I started using made
my plugin fail to get the installpath of Tortoise SVN. If it can fail for me chances are that others will experience it to.
NOTE : If you want the project/solution aspect of the Tortoise SVN plugin to work you need to enter the root directory of you project/solution
as a attribute. The attributes name is 'svn_root_dir', look at the SolutionHub UI screenshot to see an example. You ALSO have to setup a connection
to the Tortoise SVN plugin for the solution (screenshot again, in the upper list).
As SolutionHub do not have a UI by default, this is my provided 'base-UI'. It is basically a big sorry excuse for a UI that I
provided to get you started. As previously stated, all communication to SolutionHub goes through messages and the UI is no exception.
If you feel compelled to make a 'real'/'working' UI I won't stop you (documentation in the SolutionHub section). So do not come mailing saying the
taborder is all f-d up thank you very much.
Here is a screenshot of the beast
*NOTE* When it says 'edit/enter' something in a listview, double-click on field to get a edit-field *NOTE*
Basic usage instructions follow :
- Click 'New Solution' to clear all stuff (if you have one selected)
- Enter the name of the solution
- Click in the first column(with the icon) to get a dialog which lets you choose what directory to include.
- Click the checkboxes that applies to the directory (monitored means that I will try to figure out what files is added/deleted/renamed)
- NOTE : Adding a recursive directory with a filefilter AND adding a subfolder with different file filter (probably) will not work like you thought(so dont).
- Enter a include/exclude filter if you do not want every filetype to be included.
- The file filter works on extensions ONLY and seperate each new extension with a '.' (see screenshot)
- Repeat the steps for all directories you want.
- Save the solution.
- The Solution should now appear in the upper list. If not there can be two causes :
1) I implemented something very wrong.
2) UAC do not let me save the file because you either is not an administrator or haven't run N++ as administrator.
My vote is always on (2) but I might be wrong :).
Now you are done with the solution-setup part. You have only setup some directories and they are now indexed, now we (probably) want to use this
information somehow, for example with Open File In Solution plugin. As you can see by looking at the screenshot I have entered some 'connections',
that means that the plugins will use this solution when communicating with the SolutionHub. There is also a list available connections that you can
enter (if I (or anybody else for that matter) make more plugins that uses the SolutionHub). For example enter 'ofis' (if you wanted to use this plugin that is)
and now when you open the OFIS dialog it displays the files in this solution. If you later want to switch which solution you want to work with you open
the SolutionHub UI again and set 'ofis' to another solution.
*NOTE* Make sure to save your connections once changed *NOTE*
NOTE : There is currently an incorrect configuration in the PluginManager which fails to install the SolutionHubUI. You can download it here. Follow 'install'-directions above.
This is the place where I wanted to implement some helper functions to make my(or yours?) life easier. I did not want OFIS to turn into a
giant monolithic mountain of poo so I placed them here instead.
A 'goto file' implementation. Ex. stand on a line, press whatever shortcut you have bound to the GOTO command on a line like :
and I will guesstimate what file you wanted to open. It is attached to OFIS so if my initial guesswork does not find the file, I will look in the indexed
solution that OFIS uses. If no file was found it 'fails' silently.
New in R193, use Ctrl+Left Mouse click on line instead of shortcut.
Added configurable priority based fileswitching in R193 (most common used when switching .h<->.cpp).
User configurable what extensions map to which targets and in what order. C&P from documentation :
Works as following :
1) strip extension of current file
2) check 'extension'-array as defined below, inorder. The filename part
of the file will be concatenated with whats defined in the array.
Note : if you have some schemes that file with extension ".h" has
it's implementation in files "_impl.hpp" then put it here.
When you then switch from ".hpp" the same rules apply(check
3) if no file was found found in the current directory then a search through the
'ofis'-connection where the same logic applies.
NOTE : This is just some examples, feel free to add new ones or change order.
"h" : [ ".inl", "_impl.hpp", ".c", ".cpp", ".cxx" ],
"c" : [ ".h", ".hpp" ],
"cxx" : [ ".h", ".hpp" ],
"cpp" : [ ".h", ".hpp" ],
"inl" : [ ".h", ".hpp" ]
If you have some other uses you want to be implemented let me know.
This is the plugin that binds all (my) plugins together. If you are a developer and wants to interface with
it, the communication interfaces is (sparsely) documented in the links below. I will keep updating the documentation given feedback.
The headers that is needed can be downloaded here.
Documentation of SolutionHub Communication Interface
Documentation of SolutionHub Config/Settings Communication Interface
The whole N++ team and its great community.
Thell Fowler for getting me started with his plugin interface.
Everybody that sent me nice responses to my initial plugin(OFIS).
Enno Rehling for getting me back to develop my plugins with his sweet email :).
If you have any questions/suggestions do not hesitate to contact me.
Incase you missed the links above.
Plugins (Contains ALL plugins, individual plugin downloads below)
Individual plugins (you can check your revision by looking at the 'About'-dialogs title of your plugin(s).
SolutionHub : R186
SolutionHub UI : R176
Open File In Solution : R194
Tortoise SVN : R195
Solution Tools: R193