<oXygen/> XML Editor User Guide

Text editor specific actions

<oXygen/> provides user actions common in any text editor:

Undoing and redoing user actions

  • Edit->Undo (Ctrl+Z)or the toolbar button Undo to reverse a maximum of 100 editing actions to return to the preceding state. Complex operations like "Replace All", "Indent selection", etc are treated as a single undo event.

  • Edit->Redo (Ctrl+Shift+Z)or the toolbar button Redo to recreate a maximum of 100 editing actions that were undone by the Undo function.

Copying and pasting text

  • Edit->Cut (Ctrl+X)or the toolbar button Cut to remove the current selected node from the document and places it in the clipboard.

  • Edit->Copy (Ctrl+C)or the toolbar button Copy to place a copy of the current selection in the clipboard.

  • Edit->Paste (Ctrl+V)or the toolbar button Paste to place the current clipboard content into the document at the cursor position.

  • Edit->Select All (Ctrl+A) selects the entire body of the current document, including whitespace preceding the first and following the last character.

Finding and replacing text in the current file

The Find and Replace option ( Find->Find/Replace... (Ctrl+F) or the toolbar button Find/Replace ) enables you to define "search for" or "search for and replace" operations on the current document. The replace operation can bind Perl 5-like regexp group variables ($1, $2, etc.) from the find match.

  • find occurrences of a word or string of characters including white spaces and highlight the position in the editor.

  • replace occurrences of target defined in the Find field with a word or string of characters, including white spaces, defined in the Replace field.

  • find all occurrences of a word or string of characters including white spaces and return a result list to the Message Panel.

  • replace all occurrences of a word or string of characters including white spaces.

Figure 4.39. Find/Replace Dialog

Find/Replace Dialog

Complete the dialog as follows:

Text to find

The target character string to search for.

Replace with

The character string with which to replace the target. It may contain '{$NEWLINE}' which at the replace time will insert a new line character.

XPath

The XPath 2.0 expression entered in this combo is used to restrict the search scope. It is applied only at the first search ommand (Find, Replace, Find all, Replace to end) after the user changes the content of this combo so that he is able to replace tag names covered by the current XPath expression.

Direction

Specify if the search direction is from current position to end of file (forward direction) or to start of file (backward direction).

Scope

Specify if the search is executed on all file or only on the lines that were selected when the dialog was invoked. If the selection was on a single line the search is executed on all the file.

Find

Execute a find operation for the next occurrence of the target and stop.

Replace

Execute a replace operation for the target followed by a find operation for the next occurance.

Find all

Executes a find operation and returns all results to the Message Panel.

Replace to end

Execute a replace operation starting from current target until the end of the document, in the direction specified by the current selection of the Direction switch (forward or backward).

Case sensitive

When checked, operations are case sensitive.

Whole words only

When checked only whole occurrences of a word will be included in the operation.

Find in tags

When checked, operation will include content of the start and end tags of the XML elements.

Regular Expression

When checked allows using any regular expression in PERL syntax.

From file start

Starts the operation from start of file, position 0:0.

Wrap around

Continues the find from the start (end) of the document after reaching the end (start) if the search is in forward (backward) direction.

Find->Find next (F3) performs another search in forward direction using the last search configuration.

Find->Find previous (Shift+F3) performs another search in backward direction using the last search configuration.

Finding and replacing text in multiple files

The Find and Replace in Files option ( Find->Find/Replace in Files... or the toolbar button Find/Replace in Files ) enables you to define "search for" or "search for and replace" operations across a number of files. The replace operation can bind Perl 5-like regexp group variables ($1, $2, etc.) from the search match. You can cancel a long operation at any time by pressing the Cancel button of the progress dialog displayed while the operation is executed.

Figure 4.40. Search/Replace in Files

Search/Replace in Files

Complete the dialog as follows:

Text to Find

The target character string to search for.

Case Sensitive

When checked, operations are case sensitive.

Whole words only

When checked only whole occurrences of a word will be included in the operation.

Find in tags

When checked, operation will include content of the start and end tags of the XML elements.

Regular Expression

When checked allows using any regular expression in PERL syntax.

Replace with

The character string with which to replace the target. It may contain '{$NEWLINE}' which at the replace time will insert a new line character.

Make Backups with extension

In the replace process <oXygen/> makes backup files of the modified files. The default extension is *bak, but you can change extension as you prefer.

Specified Path

Choose the search path

Path of current file

Use the path of the current file

Project Files (File Filter)

Search the files from the current project using the specified file filter.

Selected project files

Search only in the selected files of the current opened project

[Note]Note

The search is performed only on local files. If you have added to the project remote files from an FTP or Webdav server these will be skipped from the search.

Find All

Executes a find operation and returns the result list to the Message Pane

Replace All

Replaces all occurrences of the target contained in the specified files.

[Warning]Use this option with caution.

Global search and replace across all project files does not open the files containing the targets, nor does it prompt on a per occurrence basis, to confirm that a replace operation must be performed. As the operation simply matches the string defined in the find field, this may result in replacement of matching strings that were not originally intended to be replaced.

Using Check Spelling

The Check Spelling option ( Edit->Check Spelling (F4) or the toolbar button Check spelling ) enables you to perform the check spelling on the current document:

Figure 4.41. Check Spelling Dialog

Check Spelling Dialog

Complete the dialog as follows:

Unrecognized Word

Contains the word that cannot be found in the selected dictionary. The word is also highlighted in the XML document.

Replace with

The character string which is suggested to replace the unrecognized word.

Guess

Displays a list of words suggested to replace the unknown word. Double clicking a word in this list automatically inserts it in the document and continues the spell checking process.

Dictionary

Displays a list with the available dictionaries.

Replace

Replaces the currently highlighted word in the XML document, with the selected word in the "Replace with" field.

Replace All

Replaces all occurrences of the currently highlighted word in the XML document, with the selected word in the "Replace with" field.

Ignore

Allows you to continue checking the document while ignoring the first occurrence of the unknown word. The same word will be flagged again if it appears in the document.

Ignore all

Ignores all instances of the unknown word in the whole document.

Learn

Includes the unrecognized word in the list of valid words so that the spell checker will no longer consider it for correction.

Options

Sets the configuration options of the Spell Checker.

Begin at caret position

When checked, the spell checker begins checking from the current cursor position.

OK

Closes the Spell Checker dialog.

Figure 4.42. Options Dialog

Options Dialog

The Options dialog contains the global check spelling options:

Case sensitive

When checked, operations ignore capitalization errors.

Ignore mixed case words

When checked, operations do not check words containing case mixing (e.g. "SpellChecker").

Ignore word with digits

When checked, the Spell Checker do not check words containing digits (e.g. "b2b").

Ignore Duplicates

When checked, the Spell Checker do not signal two successive identical words as an error.

Ignore URL

When checked, ignores words looking like URL or file names (e.g. "www.oxygenxml.com" or "c:\boot.ini") .

Check punctuation

When checked, punctuation checking is enabled: misplaced white space and wrong sequences, like a dot following a comma, are detected.

Enable auto replace

Enables the "Replace Always" feature.

Allow compounds words

When checked, all words formed by concatenating two legal words with an hyphen are accepted. If the language allows it, two words concatenated without hyphen are also accepted.

Allow general prefixes

When checked, a word formed by concatenating a registered prefix and a legal word is accepted. For example if "mini-" is a registered prefix, accepts "mini-computer".

Allow file extensions

When checked, accepts any word ending with registered file extensions (e.g. "myfile.txt", "index.html" etc.).

Suggestion

This option indicates the type of spell checker accuracy, which may be: "Favour speed over quality", "Normal" and "Favour quality over speed".

<oXygen/> provides dictionaries only for the languages English (EN, GB, CA, US), French (FR, BE, CA, CH) and German in the form of .dar files located in the directory [oXygen-install-dir]/dicts. A pre-built dictionary can be added by copying the corresponding .dar archive to the same directory and restarting <oXygen/>. A dictionary can be built with the tool available at http://www.xmlmind.com/spellchecker/dictbuilder.shtml.

Learned words are stored into an persistent learned-words dictionary with the .tdi extensions located in [user-home-dir]/spell directory ([user-home-dir]/.spell directory on Mac OS X). There is one dictionary for each language-country variant combination. If the Learn button is pressed by mistake the only possibility to delete the learned word from the learned-words dictionary is to edit this dictionary manually and restart <oXygen/> because the spell-check component does not allow its editing by the user interface.

[Note]Note

The Czech check spelling dictionary may be downloaded from http://www.kosek.cz/sw/xxe/cs.dar

Printing a file

File->Print (Ctrl+P) displays the Page Setup dialog used to define the page size and orientation properties for printing.

Inserting a file at caret position

Document+File->Insert file... inserts in a file under the current position of the caret in the current document.

Opening edited file in system application

Document+File->Open in system application opens edited file with default application associated on current machine.

Opening the file at caret position

Document+File->Open file at cursor : Opens in a new panel the file with the name under the current position of the caret in the current document.

Exiting the <oXygen/> XML Editor

File->Exit (Ctrl+Q) : Terminates the <oXygen/> XML Editor. Session information such as the current Project, open Documents and Option settings is made persistent. When the <oXygen/> editor is re-opened, the persistence information returns to the last saved state.