LPEX
4.4.0

Package com.ibm.lpex.alef.preferences

This package provides Eclipse platform preference pages for the LPEX editors.

See:
          Description

Class Summary
AppearancePreferencePage Preference page for LPEX's default palette, font, and editor style settings.
BlockPreferencePage Preference page for LPEX's default block settings.
ComparePreferencePage Preference page for LPEX's default compare settings.
ControlsPreferencePage Preference page for LPEX's default controls settings.
FindTextPreferencePage Preference page for LPEX's default find-text settings.
LpexBasePreferencePage The main page of LPEX Editor preferences.
LpexFieldEditorPreferencePage LPEX abstract preference page that hosts field editors.
ParserAssociationsPreferencePage Preference page for LPEX's parser associations.
ParsersPreferencePage Preference page for document parser settings.
ParserStylesPreferencePage Preference page for customization of document parser styles.
PrintPreferencePage Preference page for LPEX's default print settings.
SavePreferencePage Preference page with save-related settings for one LPEX view, or default settings for the editor.
SequenceNumbersPreferencePage Preference page with sequence-numbers settings for one LPEX view, or default settings for the editor.
SourceEncodingPreferencePage Source encoding preference page for an LPEX document.
TabsPreferencePage Preference page for LPEX's default tabs setting.
UserActionsPreferencePage Preference page for user actions.
UserCommandsPreferencePage Preference page for user commands.
UserKeyActionsPreferencePage Preference page for user key definitions.
UserMouseActionsPreferencePage Preference page for user mouse-event definitions.
UserProfilePreferencePage Preference page for LPEX's user profile.
ViewBasePreferencePage The main page of preferences for an LPEX view.
ViewParserPreferencePage Parser preference page for an LPEX view.
 

Package com.ibm.lpex.alef.preferences Description

This package provides Eclipse platform preference pages for the LPEX editors.

Here's a brief overview of the relation between the preference pages of the LPEX Editor and those of an LPEX-based editor provided by a solution plug-in.

Sample LPEX Editor items in the Preferences dialog

1 - Workbench-scoped LPEX settings.

These are the LPEX Editor preference pages, contributed by the LPEX Editor plug-in's plugin.xml file.  The settings are global in scope.  They will be in effect for all the LPEX-based solutions installed in the workbench.

The current settings (default.xxx editor parameters) are stored in the LPEX Editor plug-in preferences (for example, C:\eclipse\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.ibm.lpex.prefs).  They modify any hard-coded values and install-profile settings shipped with the editor.  The editor install profile may be extended by the using solutions plug-ins (see extendInstallProfile()).  Changes in the LPEX Editor preference pages affect all the views which use the default value of these settings.  Views which are set a particular value (that is, a view-scoped parameter setting), either programmatically by the solution plug-in or manually by the user, are not affected.

The "Restore Defaults" button resets the preferences of a page to the initial (usually, install) values, and may clear custom default settings.  The "Reset" button restores the preferences to the value in effect when the preference page was opened.

In Eclipse, preference pages are defined via plugin.xml files, and read in before any plug-in code is run.  This makes it impossible for an LPEX-based solution plug-in to contribute programmatically (via a call to an LPEX method) the LPEX preference pages (optionally inside its own).  It is mainly as a result of this limitation that the LPEX Editor preference pages are in a separate category in the Eclipse "Preferences" dialog.

2 - Document-scoped LPEX settings.

These are one preference node (and subnodes) per each document opened and activated in the editor.  Document-scoped preference pages are created for the primary view of each open document.  LPEX adds/removes these dynamically in the Eclipse preferences dialog.  These settings are only used for the current edit session of the document.

The document-scoped preferences pages may be subclassed by a solution plug-in.  See createViewPreferencePage().

A solution plug-in may also contribute its own custom document-scoped preferences, in addition to the LPEX built-in ones.  See createViewPreferenceNodes() and LpexViewPreferenceNode.

3 - Solution-scoped settings.

These are the solution plug-in preference pages, contributed by the solution plug-in's plugin.xml.

4 - Solution-scoped LPEX settings.

Certain LPEX-related settings may be solution-specific.  The solution editor plug-in should keep the set of its own editor settings in a PreferenceStore (or similar mechanism), and use these settings when a document is opened in the plug-in.  The user should be able to change these settings via the Eclipse "Preferences" dialog.

"File Open" in the above example is the (base) preference page, with file settings for an edit view opened in the particular solution plug-in.  It comprises settings such as:  sequence numbers, source encoding, save text limit, and save trimming of trailing blanks.  It is contributed by the solution plug-in's plugin.xml.  These settings are scoped to a particular solution, are stored in that solution plug-in's PreferenceStore, and are read by the solution and applied via the initializeLpexView() hook of LpexTextEditor.


LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.