Altova XMLSpy 2022 Professional Edition

XMLSpy Entry Points in Eclipse

Home Prev Top Next

The following entry points in Eclipse can be used to access XMLSpy functionality:


XMLSpy Perspective, which provides XMLSpy's GUI features within the Eclipse GUI.

XMLSpy menu and toolbar


XMLSpy Perspective

In Eclipse, a perspective is a configured GUI view with functionality from various applications. When the XMLSpy Plugin for Eclipse is integrated in Eclipse, a default XMLSpy perspective is automatically created. This perspective is a GUI that includes XMLSpy's GUI elements: its editing views, menus, entry helpers, and other sidebars.


When a file having a filetype associated with XMLSpy is opened (.xml, for example), this file can be edited in the XMLSpy perspective. Similarly, a file of another filetype can be opened in another perspective in Eclipse. Additionally, for any active file, you can switch the perspective, thus allowing you to edit or process that file in another environment. There are therefore two main advantage of perspectives:


1.Being able to quickly change the working environment of the active file, and

2.Being able to switch between files without having to open a new development environment (the associated environment is available in a perspective)


Working with the XMLSpy perspective involves the following:


Switching to the XMLSpy perspective.

Setting preferences for the XMLSpy perspective.

Customizing the XMLSpy perspective.


Switching to the XMLSpy perspective

In Eclipse, select the command Window | Perspective | Open Perspective | Other. In the dialog that pops up (screenshot below), select XMLSpy, and click Open.


The empty window or the active document will now have the XMLSpy perspective. This is how the user switches the perspective via the menu. To access a perspective faster from another perspective, the required perspective can be listed in the Open Perspective submenu, above the Other item; this setting is in the customization dialog (see further below).


Perspectives can also be switched when a file is opened or made active. The perspective of the application associated with a file's filetype will be automatically opened when that file is opened for the first time. Before the perspective is switched, a dialog appears asking whether you wish to have the default perspective automatically associated with this filetype. Check the Do Not Ask Again option if you wish to associate the perspective with the filetype without having to be prompted each time a file of this filetype is opened and then click OK.


Setting preferences for the XMLSpy perspective

The preferences of a perspective include: (i) a setting to automatically change the perspective when a file of an associated filetype is opened (see above), and (ii) options for including or excluding individual XMLSpy toolbars. To access the Preferences dialog, select the command Window | Preferences. In the list of perspectives in the left pane, select XMLSpy, then select the required preferences. Finish by clicking OK.


Customizing the XMLSpy perspective

The customization options enable you to determine what shortcuts and commands are included in the perspective. To access the Customize Perspective dialog of a perspective (screenshot below shows dialog for the XMLSpy perspective), make the perspective active (in this case the XMLSpy perspective), and select the command Window | Perspective | Customize Perspective.

In the Tool Bar Visibility and Menu Visibility tabs, you can specify which toolbars and menus are to be displayed. In the Action Set Availability tab, you can add action sets to their parent menus and to the toolbar. If you wish to enable an action group, check its check box. In the Shortcuts tab of the Customize Perspective dialog, you can set shortcuts for submenus. Select the required submenu in the Submenus combo box. Then select a shortcut category, and check the shortcuts you wish to include for the perspective. Click Apply & Close to complete the customization and for the changes to take effect.


XMLSpy menu and toolbar

The XMLSpy menu contains commands that are relevant to XMLSpy. In the standalone version of XMLSpy, some of these commands are in the File menu. The XMLSpy toolbar contains the following buttons (screenshot below).


These are for, from left: (i) opening the XMLSpy Help, and (ii) accessing XMLSpy commands (as an alternative to accessing them from the XMLSpy menu).


Note:Toolbar commands are not supported. If you have set up a toolbar command in XMLSpy that runs a command or script, then this toolbar command will not be available in the plug-in.


XMLSpy file formats and behavior of Eclipse views

When certain file types recognized by XMLSpy are active (in focus) in Eclipse,  the "Elements", "Attributes", and "Entities" views appear with a name that is meaningful for that format. For example, when a .css file is active, the "Elements" view appears with the name "CSS Outline". The following table illustrates how view names change based on the active file:


When this file format is active...

The "Elements" view becomes...

The "Attributes" view becomes..

The "Properties" view becomes...


CSS Outline

CSS Properties

HTML Elements

.xquery, .xq

XQuery Keywords

XQuery Variables

XQuery Functions






If you close any of these views, you can restore them later using the menu command Window | Show View. Note, however, that views are displayed in this menu with their generic name (that is, "Elements", "Attributes", and "Entities"). So, for example, in order to restore the view "CSS Outline", you would select Show View | Elements.


As an alternative, reset the XMLSpy perspective to its default values, from Window | Reset Perspective.


© 2016-2022 Altova GmbH