Contextual Menu Actions in Text Mode
When editing XML documents in Text mode, Oxygen XML Developer plugin
provides the following actions in the contextual menu (many of them also appear in the
submenus of the Document menu):
Cut,
Copy,
Paste
- Executes the typical editing actions on the currently selected content.
- Copy XPath
- Copies the XPath expression of the current element or attribute from the current editor
to the clipboard.
Toggle
Comment (Ctrl Shift Comma (Meta Shift Comma on OS X))
- Comments the current selection of the current editor. If the selection already contains
a comment the action removes the comment from around the selection. If there is no
selection in the current editor and the cursor is not positioned inside a comment the
current line is commented. If the cursor is positioned inside a comment then the commented
text is uncommented.
- Go to submenu
- This submenu includes the following actions:
Go to
Matching Tag (Ctrl Shift
G)
- Moves the cursor to the end tag that matches the start tag, or vice versa.
- Go after Next Tag (Ctrl Close Bracket (Meta Close Bracket on OS X))
- Moves the cursor to the end of the next tag.
- Go after Previous Tag (Ctrl Open Bracket (Meta Open Bracket on OS X))
- Moves the cursor to the end of the previous tag.
- Select submenu
- This submenu allows you to select the following:
- Element
- Selects the entire element at the current cursor position.
- Content
- Selects the entire content of the element at the current cursor position, excluding
the start and end tag. Performing this action repeatedly will result in the
selection of the content of the ancestor of the currently selected element
content.
- Attributes
- Selects all the attributes of the element at the current cursor position.
- Parent
- Selects the parent of the element at the current cursor position.
- Source submenu
- This submenu includes the following actions:
Shift
Right
- Shifts the currently selected block to the right.
Shift
Left
- Shifts the currently selected block to the left.
Indent selection (Ctrl I (Meta I on OS
X))
- Corrects the indentation of the selected block of lines if it does not follow the
current indenting
preferences.
Escape Selection
- Escapes a range of characters by replacing them with the corresponding character
entities.
Unescape Selection
- Replaces the character entities with the corresponding characters.
Format and
Indent Element (Ctrl Shift I
(Meta Shift I on OS X))
- Pretty prints the element that surrounds the current cursor position.
- Convert Hexadecimal Sequence to Character (Ctrl + Shift + H
(Meta + Shift + H on OS X))
-
Converts a sequence of hexadecimal characters to the corresponding Unicode character. A
valid hexadecimal sequence can be composed of 2 to 4 hexadecimal characters, preceded or
not by the 0x or 0X prefix. Examples of valid
sequences: 0x0045, 0X0125, 1253,
265, 43.
To convert a hexadecimal sequence to a character, do one of the following:
- place the cursor at the right side of a valid hexadecimal sequence, then press
Ctrl + Shift + H
(Meta + Shift + H on OS X) on your
keyboard
- select a valid hexadecimal sequence, then press Ctrl + Shift + H
(Meta + Shift + H on OS X) on your
keyboard
- Join and Normalize Lines
- For the current selection, this action joins the lines by replacing the line
separator with a single space character. It also normalizes the whitespaces by
replacing a sequence of such characters with a single space.
Insert
XInclude
- Displays a dialog box that allows you to browse and select the content to be
included and automatically generates the corresponding XInclude instruction.
Note: In the Author mode, this dialog box presents a
preview of the inserted document as an author page in the
preview tab and as a text page in the
Source tab. In the Text mode, the
Source tab is presented.
Import
entities list
- Displays a dialog box that allows you to select a list of files as sources for
external DTD entities. The internal subset of the DOCTYPE declaration of your
document will be updated with the chosen entities. For instance, choosing the files
chapter1.xml and chapter2.xml inserts
the following section in the DOCTYPE:
<!ENTITY chapter1 SYSTEM "chapter1.xml">
<!ENTITY chapter2 SYSTEM "chapter2.xml">
- Canonicalize
- Opens the Canonicalize dialog box that allows you to select
a canonicalization algorithm to standardize the format of the document.
- Sign
- Opens the Sign dialog box that allows you to configure a
digital signature for the document.
- Verify Signature
- Allows you to specify the location of a file to verify its digital signature.
- Manage Highlighted Content submenu
- This submenu is available from the contextual menu when it is invoked from a highlight
after you perform a search operation or apply an XPath expression that highlights more
than one result. The following options are available in this submenu:
- Modify All
- Allows you to modify (in-place) all the occurrences of the selected content. A
thin rectangle replaces the highlights and allows you to start editing. If matches
with different letter cases are found, a dialog box is displayed that allows you
select whether you want to modify only matches with the same letter case or all
matches.
- Surround All
- Surround the highlighted content with a specific tag. This option opens the
Tag dialog box. The Specify the tag
drop-down menu presents all the available elements that you can choose from.
- Remove All
- Removes all the highlighted content.
- Modify All Matches
- Use this option to modify (in-place) all the occurrences of the selected content (or the
contiguous fragment in which the cursor is located). When you use this option, a thin
rectangle replaces the highlights and allows you to start editing. If matches with
different letter cases are found, a dialog box is displayed that allows you select whether
you want to modify only matches with the same letter case or all matches.
Show
Definition (Ctrl
Shift Enter)
- Moves the cursor to the definition of the current element or attribute in the schema
(DTD, XML Schema, Relax NG schema) associated with the edited XML document. If the current
attribute is a "type" belonging to the "http://www.w3.org/2001/XMLSchema-instance" namespace, the
cursor is moved in the XML schema to the definition of the type referenced in the value of
the attribute.
- Refactoring submenu
- This submenu includes the following actions:
Rename
Element
- The element from the cursor position, and any elements with the same name, can be
renamed according with the options from the Rename dialog
box.
Rename
Prefix (Alt Shift
P)
- The prefix of the element from the cursor position, and any elements with the same
prefix, can be renamed according with the options from the
Rename dialog box.
- If you select the Rename current element prefix option,
the application will recursively traverse the current element and all its
children.
Note: For example, to change the
xmlns:p1="ns1" association in the current element to
xmlns:p5="ns1", if the xmlns:p1="ns1"
association is applied on the parent element, then Oxygen XML Developer plugin will
introduce xmlns:p5="ns1" as a new declaration in the current
element and will change the prefix from p1 to
p5. If p5 is already associated with
another namespace in the current element, then the conflict will be displayed
in a dialog box. By pressing OK, the prefix is modified
from p1 to p5 without inserting a new
declaration.
- If you select the Rename current prefix in all document
option, the application will apply the change on the entire document.
- To also apply the action inside attribute values, check the Rename
also attribute values that start with the same prefix
checkbox.
Surround with submenu
- Presents a drop-down menu that allows you to choose a tag to surround a selected
portion of content.
Surround with Tags (Alt + Shift +
E )
- Allows you to choose a tag that encloses a selected portion of content. If there
is no selection, the start and end tags are inserted at the cursor position.
- If the Cursor position between tags option is enabled in
the Content Completion Preferences page, the cursor is placed between the
start and end tag.
- If the Cursor position between tags option is disabled
in the Content Completion Preferences page, the cursor is placed at the end
of the start tag, in an insert-attribute position.
Surround with (Alt +
Shift + /)
- Surround the selected content with the last tag used.
Delete element tags (Alt +
Shift + ,)
- Deletes the start and end tag of the current element.
Split
element
- Split the element from the cursor position into two identical elements. The cursor
must be inside the element.
Join
elements (Alt Shift F
(Meta Alt F on OS X))
- Joins the left and right elements relative to the current cursor position. The
elements must have the same name, attributes, and attributes values.
- Attributes submenu
- Contains predefined XML refactoring operations that pertain to attributes. Oxygen XML Developer plugin considers the editing context to get the names and namespaces of
the element or attribute for which the contextual menu was invoked, and uses this
information to preconfigure some of the parameter values for the selected refactoring
operation.
-
- Add/Change attribute
- Allows you to change the value of an attribute or insert a new one.
- Delete attribute
- Allows you to remove one or more attributes.
- Rename attribute
- Allows you to rename an attribute.
- Replace in attribute value
- Allows you to search for a text fragment inside an attribute value and change
the fragment to a new value.
- Elements submenu
- Contains predefined XML refactoring operations that pertain to elements. Oxygen XML Developer plugin considers the editing context to get the names and namespaces of
the element or attribute for which the contextual menu was invoked, and uses this
information to preconfigure some of the parameter values for the selected refactoring
operation.
-
- Delete element
- Allows you to delete elements.
- Delete element content
- Allows you to delete the content of elements.
- Insert element
- Allows you to insert new elements.
- Rename element
- Allows you to rename elements.
- Unwrap element
- Allows you to remove the surrounding tags of elements, while keeping the content
unchanged.
- Wrap element
- Allows you to surround elements with element tags.
- Wrap element content
- Allows you to surround the content of elements with element tags.
- Fragments submenu
- Contains predefined XML refactoring operations that pertain to XML fragments. Oxygen XML Developer plugin considers the editing context to get the names and namespaces of
the element or attribute for which the contextual menu was invoked, and uses this
information to preconfigure some of the parameter values for the selected refactoring
operation.
-
- Insert XML fragment
- Allows you to insert an XML fragment.
- Replace element content with XML fragment
- Allows you to replace the content of elements with an XML fragment.
- Replace element with XML fragment
- Allows you to replace elements with an XML fragment.
- Manage IDs submenu
- This submenu is available for XML documents that have an associated DTD, XML Schema, or
Relax NG schema. It includes the following actions:
Rename in
- Renames the ID and all its occurrences. Selecting this action opens the
Rename XML ID dialog box. This dialog box lets you insert the new
ID value and choose the scope of the
rename operation. For a preview of the changes you are about to make, click
Preview. This opens the Preview dialog
box, which presents a list with the files that contain changes and a preview zone of these
changes.
- Rename in File
- Renames the ID you are editing and all its occurrences from the current file.
Search
References
- Searches for the references of the ID. By default, the scope of this action is the
current project. If you configure a scope using the Select the scope for the
Search and Refactor operations dialog box, this scope will be used
instead.
- Search References in
- Searches for the references of the ID. Selecting this action opens the Select the scope for the Search and
Refactor operations.
Search Declarations
- Searches for the declaration of the ID reference. By default, the scope of this action
is the current project. If you configure a scope using the Select the scope for the
Search and Refactor operations dialog box, this scope will be used
instead.
- Search Declarations in
- Searches for the declaration of the ID reference. Selecting this action opens the
Select the scope for the Search
and Refactor operations.
Search Occurrences in file
- Searches for the declaration an references of the ID in the current document.
- Quick Assist (Ctrl 1 (Meta 1 on OS
X))
- Available when the cursor is inside an ID or IDREF, this action opens the Quick Assist
window that allows you to select some search and refactoring actions for the selected ID
or IDREF.
- Open File at Cursor
- Opens the file at the cursor position in a new panel. If the file path represents a
directory path, it will be opened in system file browser. If the file at the specified
location does not exist, an error dialog box is displayed and it includes a
Create new file button that starts the New
document wizard. This allows you to choose the type or the template for the
file. If the action succeeds, the file is created with the referenced location and name
and is opened in a new editor panel.
- Resource Hierarchy
- Opens the Resource Hierarchy/Dependencies view that allows you to
see the resource hierarchy for an XML document.
- Resource Dependencies
- Opens the Resource Hierarchy/Dependencies view that allows you to
see the resource dependencies for an XML document.
developerEclipse17.1