Last updated 2004-06-28 by Roedy
Green ©1996-2004 Canadian Mind Products
Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
You are here : home : Java Glossary : S words : SlickEdit.
SlickEditUnfortunately it use the same extension vpj as Visual Café for its project files. You can download updates from support | patches on their website.
Make sure you regularly back up the binary file vslick/vslick.sta. It contains your complete configuration. If it goes, all your tools bars go to.
I prefer to cut and paste, doing the editing of the file list string in the editor. Here is the one I use:
You will probably want to configure tab to space conversion and trailing blank suppression while you are there.
The command you associate with your new custom icon is whatever you would type on the command line at the bottom of the screen, not a bit of slickC code, e.g. you would fill in edit C:\env\todo.txt rather than edit('c:\env\todo.txt') or insert-java-main rather than insert_java_main().
A good place to find a the names of built in commands you can use on the command line is in Tools | Configuration | Key Bindings even if you don't want to bind a key. Not all SlickC functions work on the command line.
The toolbars are locked from inadvertent changes except when the View ToolBars dialog is active. Then you can rearrange the icons, or drag them off the tool bar to remove them.
The Message is just the toolip text.
You create your own bitmap icons as BMP files and use them just like the builtin ones on toolbars. Use grey 192,192,192 as your background. BMP files don't have a formal transparent background the way GIFs do. Make them all 23x21. Make sure you have backup copies of the bitmaps outside the vslick\bitmaps directory which you may lose on reinstall. Also make a record of the bitmap names, command, and tooltip text so you can reconstruct it if you lose the menu bar.
Here is a little script you can save in a *.e file, then load to create a new command called cdm which changes the directory then brings up the open file dialog box on that directory. To install the command, load the *.e file, with load macro, and it will stay installed forever, (or at least until you unload it.) You can then create an associated icon on the toolbar for one click open. You can define several such commands in a single *.e file.
SlickC macro language usevs some very strange language constructs and odd terminology. defmain and batch macro refer to a type of nameless procedure. All you can do is load it and execute it once. Usually it defines the the values for many configuration constants. procedure is much like a Java method, except that it usually takes a variable number of parameters, and the types of the parameters are deduced dynamically by the procedure. command is a procedure that can be bound to a keystroke, with rules about the contexts in which it is valid to call it.
Macros you create by recording keystrokes are stored in vslick/macros/vusrmacs.e. They generate compilable SlickC code.
Here is a simple macro to generate the boilerplate for a Java main method:
#include "slick.sh"
/**
* Define conditions under which the insert_java_main
* command will work.
*
* @param cmdui
* @param target_wid
* @param command
* @return enabled or disabled.
*/
int _OnUpdate_insert_java_main(CMDUI cmdui,int target_wid,_str command)
{
if ( !target_wid || !target_wid._isEditorCtl()) {
return(MF_GRAYED);
}
return((target_wid.p_extension=='java')?MF_ENABLED:MF_GRAYED);
}
/**
* Generate a java main method by typing insert_java_main on the command line.
* Command can also be hooked to a button, or to a keystroke.
*
* @return
*/
_command insert_java_main() name_info(','VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL)
{
if ( p_extension!='java' ) {
// Check to see if we are in java mode. If not, exit
message( nls( 'Command not allowed while not in java mode' ) );
return('');
}
insert_line( '/**' );
insert_line( ' * test harness' );
insert_line( ' *' );
insert_line( ' * @param args not used' );
insert_line( ' */' );
insert_line( 'public static void main ( String[] args )' );
insert_line( ' {' );
insert_line( ' }' );
}
home |
Canadian Mind Products | |||
| mindprod.com IP:[24.87.56.253] | ||||
| Your IP:[80.134.30.163] | ||||
| You are visitor number 4548. | ||||
| Please send errors, omissions and suggestions | ||||
| to improve this page to Roedy Green. | ||||
| You can get a fresh copy of this page from: | or possibly from your local J: drive mirror: | |||
| http://mindprod.com/jgloss/slickedit.html | J:\mindprod\jgloss\slickedit.html | |||