Package ro.sync.exml
Class ComponentsValidator
java.lang.Object
ro.sync.exml.ComponentsValidator
Validator interface for menus, toolbars and their actions.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanonicalize(String[] path) Get a path from all the tags.abstract booleanCheck if the debugger perspective is allowed in the current distribution.booleanReturntrueif main files support is available or not.booleanisPerspectiveAllowed(String perspID) Check if the perspective with the given ID is allowed.abstract booleanvalidateAccelAction(String category, String tag) Check if the given accel action is allowed.abstract booleanvalidateComponent(String key) Check if the given component is allowed.abstract booleanvalidateContentType(String contentType) Validate the given content type.booleanvalidateEditorPage(String pageID) Check if the page is available for a certain distributionabstract booleanvalidateLibrary(String library) Validate the given library.abstract booleanvalidateMenuOrTaggedAction(String[] menuOrActionPath) Check if an menu or a tag action from a menu is allowed.abstract booleanvalidateNewEditorTemplate(EditorTemplate editorTemplate) Validate the given template for a new editor in the current distribution.abstract booleanvalidateOption(String optionKey) Validate the given option.abstract booleanvalidateOptionPane(String optionPaneKey) Validate the given option pane.booleanvalidateScenario(String scenarioType) Validate scenario type for the current distribution.abstract booleanvalidateSHMarker(String marker) Check if this marker is allowed in the current distribution.booleanvalidateToolbarComposite(String toolbarCompositeTag) Checks if the toolbar composite is available.abstract booleanvalidateToolbarTaggedAction(String[] toolbarOrAction) Check if an action from a toolbar is allowed.
-
Field Details
-
SEP
Separator for menus and actions.- See Also:
-
-
Constructor Details
-
ComponentsValidator
public ComponentsValidator()
-
-
Method Details
-
validateMenuOrTaggedAction
Check if an menu or a tag action from a menu is allowed.- Parameters:
menuOrActionPath- The tag of the menu/action and the tags of its parent menus if any. The last component is the current one. A menu path is an array ofStrings representing the Tags, ending with the current menu tag, ornull.- Returns:
trueif the action is allowed.
-
validateToolbarTaggedAction
Check if an action from a toolbar is allowed.- Parameters:
toolbarOrAction- The tag of the action from a toolbar and the tag of its parent toolbar if any.- Returns:
trueif the action is allowed.
-
validateToolbarComposite
Checks if the toolbar composite is available. A toolbar composite is a toolbar component such as a drop-down list.- Parameters:
toolbarCompositeTag- The tag of the toolbar composite.- Returns:
trueif the toolbar composite is allowed.- Since:
- 17
-
validateComponent
Check if the given component is allowed.- Parameters:
key- Tag identifying the view. Usually one of the constants from MainFrameComponentProvider- Returns:
trueif the view is allowed.
-
validateAccelAction
Check if the given accel action is allowed. An accel action can be uniquely identified so it doesn't matter if it is from a toolbar or menu.- Parameters:
category- The category of the action.tag- The tag of the action.- Returns:
trueif the action is allowed.
-
validateContentType
Validate the given content type.- Parameters:
contentType- The content type. A constant from ContentTypes interface.- Returns:
trueif in the current distribution we support the given content type.
-
validateOptionPane
Validate the given option pane.- Parameters:
optionPaneKey- The option pane key. A constant defined in OptionTags.- Returns:
trueif in the current distribution we should add the given option pane in the option tree.
-
validateOption
Validate the given option.- Parameters:
optionKey- The option key. A constant defined in OptionTags.- Returns:
trueif in the current distribution we should add the given option in the option page.
-
validateLibrary
Validate the given library.- Parameters:
library- The library.- Returns:
trueif in the current distribution we should add the given library in the about dialog.
-
validateNewEditorTemplate
Validate the given template for a new editor in the current distribution.- Parameters:
editorTemplate- The editor template.- Returns:
trueif it is allowed.
-
isDebuggerPerspectiveAllowed
public abstract boolean isDebuggerPerspectiveAllowed()Check if the debugger perspective is allowed in the current distribution. Also seeisPerspectiveAllowed(String).- Returns:
trueif the debugger functionality is allowed.
-
isPerspectiveAllowed
Check if the perspective with the given ID is allowed. Also seeisDebuggerPerspectiveAllowed().- Parameters:
perspID- Perspective ID. See the constants fromUIPerspectives.- Returns:
trueif the perspective is allowed.- Since:
- 22
-
validateSHMarker
Check if this marker is allowed in the current distribution.- Parameters:
marker- The marker to be checked. A constant from SHMarker class.- Returns:
trueif the marker is allowed.
-
validateEditorPage
Check if the page is available for a certain distribution- Parameters:
pageID- The page ID- Returns:
trueif the editor page is available.- Since:
- 16
-
canonicalize
Get a path from all the tags.- Parameters:
path- The tags for the action/menu/toolbar and its menu/toolbar ancestors.- Returns:
- A path that can be used to identify it.
-
isMasterFilesSupportAvailable
public boolean isMasterFilesSupportAvailable()Returntrueif main files support is available or not.- Returns:
- Return
trueif main files support is available or not.
-
validateScenario
Validate scenario type for the current distribution.- Parameters:
scenarioType- The scenario type.- Returns:
trueif the scenario is allowed,falseotherwise.- Since:
- 26.1
-