<?xml version="1.0"?>

<!DOCTYPE ACTIONS SYSTEM "actions.dtd">

<!-- jEdit's TextArea action table                                           -->
<!-- Copyright (C) 2000, 2003 Slava Pestov                                   -->

<!-- :tabSize=8:indentSize=8:noTabs=false:                                   -->
<!-- :folding=indent:collapseFolds=1:                                        -->

<!-- Actions are the 'glue' that binds menu item selections and keystrokes   -->
<!-- to jEdit's APIs. For simplicity and compactness, they are written in    -->
<!-- the BeanShell scripting language.                                       -->

<ACTIONS>
<ACTION NAME="add-explicit-fold">
	<CODE>
		textArea.addExplicitFold();
	</CODE>
</ACTION>

<ACTION NAME="backspace">
	<CODE>
		textArea.backspace();
	</CODE>
</ACTION>

<ACTION NAME="backspace-word">
	<CODE>
		textArea.backspaceWord();
	</CODE>
</ACTION>

<ACTION NAME="backspace-word-std">
	<CODE>
		textArea.backspaceWord(true);
	</CODE>
</ACTION>

<ACTION NAME="backspace-word-std-after">
	<CODE>
		textArea.backspaceWord(true, true);
	</CODE>
</ACTION>

<ACTION NAME="center-caret">
	<CODE>
		textArea.centerCaret();
	</CODE>
</ACTION>

<ACTION NAME="collapse-all-folds">
	<CODE>
		textArea.getDisplayManager().expandFolds(1);
	</CODE>
</ACTION>

<ACTION NAME="collapse-fold">
	<CODE>
		textArea.collapseFold();
	</CODE>
</ACTION>

<ACTION NAME="copy">
	<CODE>
		Registers.copy(textArea,'$');
	</CODE>
</ACTION>

<ACTION NAME="copy-append">
	<CODE>
		Registers.append(textArea,'$',"\n",false);
	</CODE>
</ACTION>

<ACTION NAME="cut">
	<CODE>
		Registers.cut(textArea,'$');
	</CODE>
</ACTION>

<ACTION NAME="cut-append">
	<CODE>
		Registers.append(textArea,'$',"\n",true);
	</CODE>
</ACTION>

<ACTION NAME="delete">
	<CODE>
		textArea.delete();
	</CODE>
</ACTION>

<ACTION NAME="delete-end-line">
	<CODE>
		textArea.deleteToEndOfLine();
	</CODE>
</ACTION>

<ACTION NAME="delete-line">
	<CODE>
		textArea.deleteLine();
	</CODE>
</ACTION>

<ACTION NAME="delete-paragraph">
	<CODE>
		textArea.deleteParagraph();
	</CODE>
</ACTION>

<ACTION NAME="delete-start-line">
	<CODE>
		textArea.deleteToStartOfLine();
	</CODE>
</ACTION>

<ACTION NAME="delete-word">
	<CODE>
		textArea.deleteWord();
	</CODE>
</ACTION>

<ACTION NAME="delete-word-std">
	<CODE>
		textArea.deleteWord(true);
	</CODE>
</ACTION>

<ACTION NAME="document-end">
	<CODE>
		textArea.goToBufferEnd(false);
	</CODE>
</ACTION>

<ACTION NAME="document-home">
	<CODE>
		textArea.goToBufferStart(false);
	</CODE>
</ACTION>

<ACTION NAME="end" NO_RECORD="TRUE">
	<CODE>
		textArea.smartEnd(false);
	</CODE>
</ACTION>

<ACTION NAME="expand-all-folds">
	<CODE>
		textArea.getDisplayManager().expandAllFolds();
		textArea.scrollToCaret(false);
	</CODE>
</ACTION>

<ACTION NAME="expand-fold">
	<CODE>
		textArea.expandFold(true);
	</CODE>
</ACTION>

<ACTION NAME="expand-one-level">
	<CODE>
		textArea.expandFold(false);
	</CODE>
</ACTION>

<ACTION NAME="format-paragraph">
	<CODE>
		textArea.formatParagraph();
	</CODE>
</ACTION>

<ACTION NAME="home" NO_RECORD="TRUE">
	<CODE>
		textArea.smartHome(false);
	</CODE>
</ACTION>

<ACTION NAME="indent-lines">
	<CODE>
		textArea.indentSelectedLines();
	</CODE>
</ACTION>

<ACTION NAME="insert-newline">
	<CODE>
		textArea.userInput('\n');
	</CODE>
</ACTION>

<ACTION NAME="insert-tab">
	<CODE>
		textArea.userInput('\t');
	</CODE>
</ACTION>

<ACTION NAME="insert-newline-indent">
	<CODE>
		textArea.insertEnterAndIndent();
	</CODE>
</ACTION>

<ACTION NAME="insert-tab-indent">
	<CODE>
		textArea.insertTabAndIndent();
	</CODE>
</ACTION>

<ACTION NAME="invert-selection">
	<CODE>
		textArea.invertSelection();
	</CODE>
</ACTION>

<ACTION NAME="join-lines">
	<CODE>
		textArea.joinLines();
	</CODE>
</ACTION>

<ACTION NAME="line-comment">
	<CODE>
		textArea.lineComment();
	</CODE>
</ACTION>

<ACTION NAME="line-end">
	<CODE>
		textArea.goToEndOfLine(false);
	</CODE>
</ACTION>

<ACTION NAME="line-home">
	<CODE>
		textArea.goToStartOfLine(false);
	</CODE>
</ACTION>

<ACTION NAME="match-bracket">
	<CODE>
		textArea.goToMatchingBracket();
	</CODE>
</ACTION>

<ACTION NAME="narrow-to-fold">
	<CODE>
		textArea.narrowToFold();
	</CODE>
</ACTION>

<ACTION NAME="narrow-to-selection">
	<CODE>
		textArea.narrowToSelection();
	</CODE>
</ACTION>

<ACTION NAME="next-bracket">
	<CODE>
		textArea.goToNextBracket(false);
	</CODE>
</ACTION>

<ACTION NAME="next-char">
	<CODE>
		textArea.goToNextCharacter(false);
	</CODE>
</ACTION>

<ACTION NAME="next-fold">
	<CODE>
		textArea.goToNextFold(false);
	</CODE>
</ACTION>

<ACTION NAME="next-line">
	<CODE>
		textArea.goToNextLine(false);
	</CODE>
</ACTION>

<ACTION NAME="next-page">
	<CODE>
		textArea.goToNextPage(false);
	</CODE>
</ACTION>

<ACTION NAME="next-paragraph">
	<CODE>
		textArea.goToNextParagraph(false);
	</CODE>
</ACTION>

<ACTION NAME="next-word">
	<CODE>
		textArea.goToNextWord(false,false);
	</CODE>
</ACTION>

<ACTION NAME="next-word-std">
	<CODE>
		textArea.goToNextWord(false,true);
	</CODE>
</ACTION>

<ACTION NAME="overwrite" NO_RECORD="TRUE">
	<CODE>
		textArea.toggleOverwriteEnabled();
	</CODE>
	<IS_SELECTED>
		return textArea.isOverwriteEnabled();
	</IS_SELECTED>
</ACTION>

<ACTION NAME="parent-fold">
	<CODE>
		textArea.goToParentFold();
	</CODE>
</ACTION>

<ACTION NAME="paste">
	<CODE>
		Registers.paste(textArea,'$',false);
	</CODE>
</ACTION>

<ACTION NAME="prev-bracket">
	<CODE>
		textArea.goToPrevBracket(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-char">
	<CODE>
		textArea.goToPrevCharacter(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-fold">
	<CODE>
		textArea.goToPrevFold(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-line">
	<CODE>
		textArea.goToPrevLine(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-page">
	<CODE>
		textArea.goToPrevPage(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-paragraph">
	<CODE>
		textArea.goToPrevParagraph(false);
	</CODE>
</ACTION>

<ACTION NAME="prev-word">
	<CODE>
		textArea.goToPrevWord(false,false);
	</CODE>
</ACTION>

<ACTION NAME="prev-word-std">
	<CODE>
		textArea.goToPrevWord(false,true);
	</CODE>
</ACTION>

<ACTION NAME="prev-word-std-after">
	<CODE>
		textArea.goToPrevWord(false,true,true);
	</CODE>
</ACTION>

<ACTION NAME="range-comment">
	<CODE>
		textArea.rangeComment();
	</CODE>
</ACTION>

<ACTION NAME="redo">
	<CODE>
		buffer.redo(textArea);
	</CODE>
</ACTION>

<ACTION NAME="remove-trailing-ws">
	<CODE>
		textArea.removeTrailingWhiteSpace();
	</CODE>
</ACTION>

<ACTION NAME="scroll-down-line">
	<CODE>
		textArea.scrollDownLine();
	</CODE>
</ACTION>

<ACTION NAME="scroll-down-page">
	<CODE>
		textArea.scrollDownPage();
	</CODE>
</ACTION>

<ACTION NAME="scroll-to-current-line">
	<CODE>
		if(!textArea.getDisplayManager().isLineVisible(
			textArea.getCaretLine()))
		{
			textArea.getDisplayManager().expandFold(
				textArea.getCaretLine(),true);
		}
		textArea.scrollToCaret(true);
		textArea.requestFocus();
	</CODE>
</ACTION>

<ACTION NAME="scroll-up-line">
	<CODE>
		textArea.scrollUpLine();
	</CODE>
</ACTION>

<ACTION NAME="scroll-up-page">
	<CODE>
		textArea.scrollUpPage();
	</CODE>
</ACTION>

<ACTION NAME="select-all">
	<CODE>
		textArea.selectAll();
	</CODE>
</ACTION>

<ACTION NAME="select-block">
	<CODE>
		textArea.selectBlock();
	</CODE>
</ACTION>

<ACTION NAME="select-fold">
	<CODE>
		textArea.selectFold();
	</CODE>
</ACTION>

<ACTION NAME="select-home" NO_RECORD="TRUE">
	<CODE>
		textArea.smartHome(true);
	</CODE>
</ACTION>

<ACTION NAME="select-end" NO_RECORD="TRUE">
	<CODE>
		textArea.smartEnd(true);
	</CODE>
</ACTION>

<ACTION NAME="select-line">
	<CODE>
		textArea.selectLine();
	</CODE>
</ACTION>

<ACTION NAME="select-paragraph">
	<CODE>
		textArea.selectParagraph();
	</CODE>
</ACTION>

<ACTION NAME="select-word">
	<CODE>
		textArea.selectWord();
	</CODE>
</ACTION>

<ACTION NAME="select-document-end">
	<CODE>
		textArea.goToBufferEnd(true);
	</CODE>
</ACTION>

<ACTION NAME="select-document-home">
	<CODE>
		textArea.goToBufferStart(true);
	</CODE>
</ACTION>

<ACTION NAME="select-line-home">
	<CODE>
		textArea.goToStartOfLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-line-end">
	<CODE>
		textArea.goToEndOfLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-bracket">
	<CODE>
		textArea.goToNextBracket(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-char">
	<CODE>
		textArea.goToNextCharacter(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-line">
	<CODE>
		textArea.goToNextLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-page">
	<CODE>
		textArea.goToNextPage(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-paragraph">
	<CODE>
		textArea.goToNextParagraph(true);
	</CODE>
</ACTION>

<ACTION NAME="select-next-word">
	<CODE>
		textArea.goToNextWord(true,false);
	</CODE>
</ACTION>

<ACTION NAME="select-next-word-std">
	<CODE>
		textArea.goToNextWord(true,true);
	</CODE>
</ACTION>

<ACTION NAME="select-none">
	<CODE>
		s = textArea.getSelectionAtOffset(textArea.getCaretPosition());
		if(s == null)
			textArea.selectNone();
		else
			textArea.removeFromSelection(s);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-bracket">
	<CODE>
		textArea.goToPrevBracket(true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-char">
	<CODE>
		textArea.goToPrevCharacter(true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-line">
	<CODE>
		textArea.goToPrevLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-page">
	<CODE>
		textArea.goToPrevPage(true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-paragraph">
	<CODE>
		textArea.goToPrevParagraph(true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-word">
	<CODE>
		textArea.goToPrevWord(true,false);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-word-std">
	<CODE>
		textArea.goToPrevWord(true,true);
	</CODE>
</ACTION>

<ACTION NAME="select-prev-word-std-after">
	<CODE>
		textArea.goToPrevWord(true,true,true);
	</CODE>
</ACTION>

<ACTION NAME="select-visible-home">
	<CODE>
		textArea.goToFirstVisibleLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-visible-end">
	<CODE>
		textArea.goToLastVisibleLine(true);
	</CODE>
</ACTION>

<ACTION NAME="select-whitespace-end">
	<CODE>
		textArea.goToEndOfWhiteSpace(true);
	</CODE>
</ACTION>

<ACTION NAME="select-whitespace-home">
	<CODE>
		textArea.goToStartOfWhiteSpace(true);
	</CODE>
</ACTION>

<ACTION NAME="shift-left">
	<CODE>
		textArea.shiftIndentLeft();
	</CODE>
</ACTION>

<ACTION NAME="shift-right">
	<CODE>
		textArea.shiftIndentRight();
	</CODE>
</ACTION>

<ACTION NAME="show-context-menu">
	<CODE>
		textArea.showPopupMenu();
	</CODE>
</ACTION>

<ACTION NAME="spaces-to-tabs">
	<CODE>
		textArea.spacesToTabs();
	</CODE>
</ACTION>

<ACTION NAME="tabs-to-spaces">
	<CODE>
		textArea.tabsToSpaces();
	</CODE>
</ACTION>

<ACTION NAME="to-lower">
	<CODE>
		textArea.toLowerCase();
	</CODE>
</ACTION>

<ACTION NAME="to-upper">
	<CODE>
		textArea.toUpperCase();
	</CODE>
</ACTION>

<ACTION NAME="toggle-line-numbers">
	<CODE>
		textArea.getGutter().toggleExpanded();
	</CODE>
	<IS_SELECTED>
		return textArea.getGutter().isExpanded();
	</IS_SELECTED>
</ACTION>

<ACTION NAME="toggle-multi-select">
	<CODE>
		textArea.toggleMultipleSelectionEnabled();
	</CODE>
	<IS_SELECTED>
		return textArea.isMultipleSelectionEnabled();
	</IS_SELECTED>
</ACTION>

<ACTION NAME="toggle-rect-select">
	<CODE>
		textArea.toggleRectangularSelectionEnabled();
	</CODE>
	<IS_SELECTED>
		return textArea.isRectangularSelectionEnabled();
	</IS_SELECTED>
</ACTION>

<ACTION NAME="undo">
	<CODE>
		buffer.undo(textArea);
	</CODE>
</ACTION>

<ACTION NAME="vertical-paste">
	<CODE>
		Registers.paste(textArea,'$',true);
	</CODE>
</ACTION>

<ACTION NAME="visible-end">
	<CODE>
		textArea.goToLastVisibleLine(false);
	</CODE>
</ACTION>

<ACTION NAME="visible-home">
	<CODE>
		textArea.goToFirstVisibleLine(false);
	</CODE>
</ACTION>

<ACTION NAME="whitespace-end">
	<CODE>
		textArea.goToEndOfWhiteSpace(false);
	</CODE>
</ACTION>

<ACTION NAME="whitespace-home">
	<CODE>
		textArea.goToStartOfWhiteSpace(false);
	</CODE>
</ACTION>

</ACTIONS>
