2.7 FileManager and PowerShell Plugin |
The File Explorer
Figure 2.8 is included in the FileManager
plugin, and can be found in the ’Files’ tab. The composition of the File Explorer is shown in
Figure 2.8.
On top you will find a field for entering the path. By clicking the button at the end of
this field, the drop-down field will list a history of the past entries which can be navigated via a scroll
bar. The up arrow key on the right-hand side of the field moves up the directory structure one directory.
In the ’Wildcard’ field you can enter a filter term for the file display. Leaving
the field empty or entering
*
results in all files being displayed. Entering
*.c;*.h,
for example will result in solely C sources and header files being displayed. Opneing the pull-down field will,
again, list a history of the last entries.
Pressing the Shift key and clicking selects a group of files or directories, pressing the
Ctrl key and clicking selects multiple separate files or directories.
The following operations can be started via the context menu if one or multiple directories are selected in the
File Explorer:
defines the current directory as the root directory.
sets a marker for the directory and stores it as a favourite. This function allows you to
navigate quickly between frequently used directories, also on different network drives.
New
File
creates a new file in the selected directory.
creates a new subdirectory in the selected directory.
The following operations can be started via the context menu if one or multiple files or directories are
selected in the File Explorer:
copies a file/directory and renames it.
opens a dialogue for entering the target directory in which the copied file/directory is to be stored.
moves the selection to the target location.
deletes the selected files/directories.
activates/deactivates the display of hidden system files. When activated, this menu entry is
checkmarked.
update the display of the directory tree.
The following operations can be started via the context menu if one or multiple files are selected in the File
Explorer:
renames the selected file.
Add to active
project
adds the file(s) to the active project.
Note:
The files/directories selected in the File Explorer can be accessed in the PowerShell plugin via the mpaths variable.
The files/directories selected in the File Explorer can be accessed in the PowerShell plugin via the mpaths variable.
User-defined functions can be specified via the menu command ’Settings’
/’Environment’ /’PowerShell’ . In the PowerShell mask, a new function which can be named at
random, is created via the ’New’ button. In the ’ShellCommand Executable’ field, the
executable program is stated, and in the field at the bottom of the window, additional parameters can be passed
to the program. By clicking the function in the context menu or the PowerShell menu, the function is started
and will then process the selected files/directories. The output is redirected to a separate shell window.
For example a menu entry in ’PowerShell’ /’SVN’ and in the context menu
is created for ’SVN’.
$file in this context means
the file selected in the File Explorer,
$mpath the selected
files or directories (see section 3.2).
This and every subsequent command will create a submenu, in this case called
’Extensions’ /’SVN’ /’Add’ . The context menu is extended
accordingly. Clicking the command in the context menu will make the SVN command
add process the selected
files/directories.
TortoiseSVN is a widespread SVN program with integration in the explorer. The program
TortoiseProc.exe of
TortoiseSVN can be started in the command line and dispalys a dialogue to collect user input. So you can
perform the commands, that are available as context menu in the explorer also in the command line. Therefore
you can integrate it also a shell extension in CodeBlocks. For example the command
will diff a selected file in the CodeBlocks file explorer with the SVN base. See
Figure 2.9 how to integrate this command.
Note:
For files that are under SVN control the file explorer shows overlay icons if they are actived via menu ’View’ /’SVN Decorators’ .
For files that are under SVN control the file explorer shows overlay icons if they are actived via menu ’View’ /’SVN Decorators’ .
Figure 2.9: Add a shell extension to the context menu
|
-
Add the name via menu ’Settings’ /’Environment’ /’PowerShell’ . This is shown as entry in the interpreter menu and the context menu.
-
Add parameters of the interpreter
This command will be executed using the selected files or directories as parameter. The selection is accessed
via the variable $mpaths.
This is an easy way to diff files or directories.
Note:
The plug-in supports the use of CodeBlocks variables within the shell extension.
The plug-in supports the use of CodeBlocks variables within the shell extension.
$interpreter
$fname
$fext
$file
Name of the file.
$relfile
Name of the file without path info.
$dir
Name of the selected directory.
$reldir
Name of directory without path info.
$path
Absolute path.
$relpath
Relative path of file or directory.
$mpaths
$inputstr{<msg>}
$parentdir
Note:
The entries of shell extension are also available as context menu in the CodeBlocks editor.
The entries of shell extension are also available as context menu in the CodeBlocks editor.
2.6.10 Sort Search Results
2.8 Browse Tracker
Created: 2010/25/05 11:52 Updated: 2010/25/05 11:52
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH
Author: HighTec EDV-Systeme GmbH
Copyright © 2010 HighTec EDV-Systeme GmbH