Source Explorer is a tool for building tree-like document maps for documents in various grammars. Each tree node in the map represents a piece of the textual document. The parent-child relationships in the tree are choosen to facilitate understanding of the document and operations with its logically grouped sections. You can move and copy nodes by using drag'n'drop or cut'n'paste functionality. Source Explorer also contains experimental tools for refactoring and the Refactoring Editor which can be used to customize refactoring commands. Source Explorer is available as an addin, fully integrated into Visual Studio 2003 and 2005, or as a standalone application.
The archive contains the following sub-folders:
2003 | The application version that uses .NET Framework 1.1 and plugin for Visual Studio 2003 |
2005 | The application version that uses .NET Framework 2.0 and plugin for Visual Studio 2005 |
Documentation | User guide and help files |
Grammars |
Grammars that the application supports The following grammars are included into this version:
|
RefactoringRules |
Simple Refactoring Rules Refactoring commands are 100% user defined. Some pre-created refactoring rules are included in the archive. |
Unpack the downloaded archive into any directory on your hard drive. We will assume in documentation examples, that the archive was unzipped into the folder C:\SE\ and refer to it as <SE Installation Folder>
Installing standalone application
The standalone version of Source Explorer does not require installation.
If you have .NET Framework 2.0, just run <SE Installation Folder>\2005\app\AppLoader.exe
If you have .NET Framework 1.1, just run <SE Installation Folder>\2003\app\AppLoader.exe
Installing Visual Studio 2003 addin
1. Open the Visual Studio Command Prompt window. To do it, choose the menu
Start -> Microsoft Visual Studio .NET 2003 -> Visual Studio .NET Tools -> Visual Studio .NET 2003 Command Prompt.
2. From the command prompt change current directory to <SE Installation Folder>\2003\plugin
Example:
cd C:\SE\2003\plugin\
3. Run install.bat
Installing Visual Studio 2005 addin
1. Copy the file <SE Installation Folder>\2005\plugin\SourceExplorer.AddIn to My Documents\Visual Studio 2005\Addins.
Example:
copy C:\SE\2003\plugin\SourceExplorer.AddIn C:\Documents and
Settings\<your profile name here>\My Documents\Visual Studio 2005\Addins
2. Modify the copied file so that the <Assembly> attribute contains the path to <SE Installation Folder>\2005\plugin\IvDev.SourceExplorerAddin.dll
Example:
<Assembly>C:\SE\2005\plugin\SourceExplorerAddin2005.dll</Assembly>
3. Run install2005.bat from the /2005/plugin/ folder.
Note: You should get the message that the types are registered successfully . If you do not get the message, regsvr32.exe is probably not in your command search path. In this case, open the Visual Studio Command Prompt window as described in the section Installing Visual Studio 2003 addin above and run install2005.bat from the command prompt.
After you registered the plugin according to the installation instructions, you need to tell Visual Studio Environment to load it and add the corresponding menu item. You only need to do it first time, after that you wil be able to open the SE window using the installed menu item or toolbar command.
Go to the menu Tools->Add-in Manager and check the Source Explorer Addin as shown in the picture. Press OK to close the Add-in Manager window.
After you do it, a new menu item will be created at the top of the Tools menu,
called "Source Explorer Window". Now you can choose this menu every time
when you want to create a new SE window.
Please ensure that the path to the directory with grammars is set and correct. In order to do this please open a new SE window ( Tools-> Source Explorer Window) and open the Preferences dialog by clicking the "Preferences" button on the SE toolbar.
Ensure that the "Root File Location" points to the file "root.xml1". Example: C:\SE\2005\grammars\root.xml1
Ensure that the "Refactoring File Location" points to the file "refactoring.xml". Example: C:\SE\2005\grammars\refactoring.xml
To test that Source Explorer is installed and loaded correctly, open a CSharp, Java, or Xml document and press the "Process Current Document" button on the SE toolbar. You should get the tree for the current document.
After the Source Explorer window is open, you can construct representation tree for the currently open document by pressing the button "Process Current Document" on the SE toolbar. If you change the document from the VS.NET environment AFTER the tree was built and would like to synchronize the tree with the new version of the document, press the button "Refresh" on the toolbar.
Grammars are loaded dynamically when they are required. The grammar that will be used by SE is based on the extension of the open file. It is possible to edit the file "root1.xml1" to map a particular file extension to a particular grammar.Once you have the tree, you can manipulate its nodes and the corresponding document content using the following operations:
When you perform node manipulation, the corresponding textual document content is also updated.
While performing node manipulation operations that involve node insertions, you
will get node insertion dialog which will let you choose how to attach the
node(s) to the target node: Above it, Below it, as its First Child, or as its
Last Child.
When the Smart Drag option is checked in the dialog, Source Explorer attemtps to move/copy nodes while preserving text formatting.
Holding CTRL down when nodes are dropped turns 'MOVE NODES' operation into 'COPY NODES' operation, i.e. nodes are not removed from their previous location.
Warning: If the tree is out of synch with the corresponding document, drag and
drop is disabled. Press the "Refresh" button on the SEToolbar in order to
rebuild the tree.
In order to search, start typing into the textbox as shown in the picture. The list of matching nodes will appear below. Whenever you select a node in search results, it gets selected in the main tree and you navigate to the corresponding place in the document.
Check the Case Sensitive box below to include only exact matches in search results.
In case the document is closed in Visual Studio and re-opened again, SE will
re-attach the existing trees for this document if any. If the document was
modified outside the environment, SE will offer to either use the tree version
and override the open document OR rebuild the tree.
If the particular refactoring operation you selected requires parameters, you
will be presented with the Parameters dialog.
It is possible to edit and create refactoring commands using the Refactoring Editor. To open this window, press the "Edit Refactoring Commands" button on the SE toolbar.
Working with the refactoring command editor is outside the scope of this
document.
Press 2, 3, or 4 on the keyboard to expand the corresponding number of levels of nodes under the currently selected node.