/jEdit/tags/jedit-4-2-pre4/bsh/commands/importCommands.bsh
Unknown | 39 lines | 31 code | 8 blank | 0 comment | 0 complexity | f23de37110f427c79cb0ad0984cb40d8 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- /**
- Import scripted or compiled BeanShell commands in the following package
- in the classpath. You may use either "/" path or "." package notation.
- e.g.
- <pre>
- // equivalent
- importCommands("/bsh/commands")
- importCommands("bsh.commands")
- <pre>
- When searching for a command each path will be checked for first, a file
- named 'command'.bsh and second a class file named 'command'.class.
- <p/>
- You may add to the BeanShell classpath using the addClassPath() or
- setClassPath() commands and then import them as usual.
- <pre>
- addClassPath("mycommands.jar");
- importCommands("/mypackage/commands");
- </pre>
- <p/>
- If a relative path style specifier is used then it is made into an absolute
- path by prepending "/". Later imports take precedence over earlier ones.
- <p/>
- Imported commands are scoped just like imported clases.
- <p/>
- @method void importCommands( resource path | package name )
- */
- bsh.help.importCommands = "usage: importCommands( string )";
- importCommands( path )
- {
- this.caller.namespace.importCommands( path );
- }