Package ro.sync.ecss.extensions.dita
Class DITAExtensionsBundle
java.lang.Object
ro.sync.ecss.extensions.api.ExtensionsBundle
ro.sync.ecss.extensions.dita.DITAExtensionsBundle
- All Implemented Interfaces:
ContextKeyManagerProvider,Extension
- Direct Known Subclasses:
DITAMapExtensionsBundle,LWDITAExtensionsBundle
@API(type=INTERNAL,
src=PUBLIC)
public class DITAExtensionsBundle
extends ExtensionsBundle
implements ContextKeyManagerProvider
The DITA framework extensions bundle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContextKeyManagerThe key manager that is context aware and is used to resolve key refs.protected final ContextKeyManagerProviderThe provider for the key manager which is context aware and is used to resolve key refs. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theAuthorExtensionStateListenerwhich will be notified when the Author extension where it is defined is activated and deactivated during the detection process.Creates a newAuthorReferenceResolverinstance used to expand content references.Creates a newAuthorTableCellSepProviderinstance responsible for providing information about the table cells painting their separators.Creates a newAuthorTableCellSpanProviderinstance responsible for providing information about the table cells spanning.Creates a newAuthorTableColumnWidthProviderinstance responsible for providing information and for handling modifications regarding table width and column widths.protected ContextKeyManagerCreate a context key manager to be used when resolving keyrefs.A custom implementation to handle editing properties of an author node.Creates a newElementLocatorProviderinstance responsible for providing an implementation of anElementLocatorbased on the structure of a link.Create a handler which gets notified when external resources need to be inserted in the Author page.Creates a newIDTypeRecognizerinstance responsible for providing an implementation which can recognize ID declarations and references.Creates a newLinkTextResolverinstance responsible for resolving a specific link marked in the CSS file and returning a text content from the targeted location.Creates a newSchemaManagerFilterinstance used to filter the content completion proposals from the schema manager.Create a handler which gets notified when external resources need to be inserted in the Text page.Create an XML node customizer used for custom nodes rendering in the Author outline, Text page outline, Author bread crumb, content completion window or the DITA Map view.customizeImageTooltipDescription(AuthorNode contextNode, AuthorAccess authorAccess, String computedDescription) Customize the tooltip description when hovering over an image.customizeLinkTooltipDescription(URL currentEditorURL, AuthorNode contextNode, String linkHref, AuthorAccess authorAccess, String computedDescription) Customize the tooltip description when hovering over a link.Creates a special handler for author actions events (such as key events).Get anAuthorImageDecorator.If Schema Aware mode is active in Oxygen, all actions that can generate invalid content will be redirected toward this support.Get theAuthorTableOperationsHandlerinstance responsible for handling table operations.Get a processor for Author Document Fragments in the clipboard (which will be pasted, dropped, etc).This should never returnnullif theOptionsStoragesupport it is intended to be used.getHelpPageID(String currentEditorPage) Get the help page ID for this particular framework extensions bundle.Returns the keys manager.Creates a newProfilingConditionalTextProviderinstance responsible for providing custom support regarding profiling and conditional text.Get a helper for the spell checker.Get an unique attributes creator and identifier.booleanisContentReference(AuthorNode node) Check if this node references another node which should replace it entirely.resolveCustomAttributeValue(CustomAttributeValueContext attributeValueEditingContext) Resolve a custom attribute value to an URL which will be opened by Oxygen.resolveCustomHref(URL currentEditorURL, AuthorNode contextNode, String linkHref, AuthorAccess authorAccess) When clicking a href the bundle can custom solve the href to an URL.Methods inherited from class ro.sync.ecss.extensions.api.ExtensionsBundle
createAttributesValueEditor, createAuthorAWTDndListener, createAuthorBreadCrumbCustomizer, createAuthorOutlineCustomizer, createAuthorPreloadProcessor, createAuthorStylesFilter, createAuthorSWTDndListener, createCustomAttributeValueEditor, createTextSWTDndListener, getDocumentTypeName, getWebappExtensionsProvier, resolveCustomHref, resolveCustomHref, setDocumentTypeName
-
Field Details
-
keyManager
The key manager that is context aware and is used to resolve key refs. -
keyManagerProvider
The provider for the key manager which is context aware and is used to resolve key refs.
-
-
Constructor Details
-
DITAExtensionsBundle
public DITAExtensionsBundle()
-
-
Method Details
-
createAuthorExtensionStateListener
Description copied from class:ExtensionsBundleReturns theAuthorExtensionStateListenerwhich will be notified when the Author extension where it is defined is activated and deactivated during the detection process. This method is called each time the Document Type association where the Author extension and the extensions bundle are defined matches a document opened in an Author page.- Overrides:
createAuthorExtensionStateListenerin classExtensionsBundle- Returns:
- A new
AuthorExtensionStateListenerinstance. - See Also:
-
createContextKeyManager
Create a context key manager to be used when resolving keyrefs. The key manager may resolve keys depending on the editing session context. The current implementation checks theDITAAccess.DITA_ROOT_MAP_URL_ATTRIBUTEand if it was set, the specified map is used. Otherwise, it uses the default ditamap in Autor.- Parameters:
context- The editing session context.- Returns:
- The key manager.
-
getClipboardFragmentProcessor
Description copied from class:ExtensionsBundleGet a processor for Author Document Fragments in the clipboard (which will be pasted, dropped, etc).- Overrides:
getClipboardFragmentProcessorin classExtensionsBundle- Returns:
- a processor for Author Document Fragments in the clipboard (which will be pasted, dropped, etc).
- See Also:
-
createAuthorReferenceResolver
Description copied from class:ExtensionsBundleCreates a newAuthorReferenceResolverinstance used to expand content references. The method is called each time an opened document in an Author editor page matches the document type association where the extensions bundle is defined.- Overrides:
createAuthorReferenceResolverin classExtensionsBundle- Returns:
- A new
AuthorReferenceResolverinstance. - See Also:
-
createAuthorTableCellSpanProvider
Description copied from class:ExtensionsBundleCreates a newAuthorTableCellSpanProviderinstance responsible for providing information about the table cells spanning. The table cell span provider is not reused between different tables. The method is called for each table in the document so a new instance should be provided each time.- Overrides:
createAuthorTableCellSpanProviderin classExtensionsBundle- Returns:
- A new
AuthorTableCellSpanProviderinstance. - See Also:
-
createAuthorTableColumnWidthProvider
Description copied from class:ExtensionsBundleCreates a newAuthorTableColumnWidthProviderinstance responsible for providing information and for handling modifications regarding table width and column widths. The table column width provider is not reused between different tables. The method is called for each table in the document so a new instance should be provided each time.- Overrides:
createAuthorTableColumnWidthProviderin classExtensionsBundle- Returns:
- A new
AuthorTableColumnWidthProviderinstance. - See Also:
-
createAuthorTableCellSepProvider
Description copied from class:ExtensionsBundleCreates a newAuthorTableCellSepProviderinstance responsible for providing information about the table cells painting their separators. The table cell separators provider is not reused between different tables. The method is called for each table in the document so a new instance should be provided each time.- Overrides:
createAuthorTableCellSepProviderin classExtensionsBundle- Returns:
- A new
AuthorTableCellSepProviderinstance. - See Also:
-
getDescription
- Specified by:
getDescriptionin interfaceExtension- Returns:
- The description of the extension.
- See Also:
-
getDocumentTypeID
Description copied from class:ExtensionsBundleThis should never returnnullif theOptionsStoragesupport it is intended to be used. If this returnsnullyou will not be able to addOptionListeneror store and retrieve any options at all.- Specified by:
getDocumentTypeIDin classExtensionsBundle- Returns:
- The unique identifier of the Document Type.
- See Also:
-
getUniqueAttributesIdentifier
Description copied from class:ExtensionsBundleGet an unique attributes creator and identifier.- Overrides:
getUniqueAttributesIdentifierin classExtensionsBundle- Returns:
- The unique attributes identifier
- See Also:
-
createElementLocatorProvider
Description copied from class:ExtensionsBundleCreates a newElementLocatorProviderinstance responsible for providing an implementation of anElementLocatorbased on the structure of a link. TheElementLocatoris capable of locating an element pointed by the supplied link. This method is called each time an element needs to be located based on a link specification.- Overrides:
createElementLocatorProviderin classExtensionsBundle- Returns:
- A new
ElementLocatorProviderinstance. - See Also:
-
customizeLinkTooltipDescription
public String customizeLinkTooltipDescription(URL currentEditorURL, AuthorNode contextNode, String linkHref, AuthorAccess authorAccess, String computedDescription) Description copied from class:ExtensionsBundleCustomize the tooltip description when hovering over a link.- Overrides:
customizeLinkTooltipDescriptionin classExtensionsBundle- Parameters:
currentEditorURL- The current document URLcontextNode- The context nodelinkHref- The link href.authorAccess- The Author accesscomputedDescription- The already computed description. Usually something like: "Click to open: URL"- Returns:
- The customized description.
- See Also:
-
customizeImageTooltipDescription
public String customizeImageTooltipDescription(AuthorNode contextNode, AuthorAccess authorAccess, String computedDescription) Description copied from class:ExtensionsBundleCustomize the tooltip description when hovering over an image.- Overrides:
customizeImageTooltipDescriptionin classExtensionsBundle- Parameters:
contextNode- The context nodeauthorAccess- The Author accesscomputedDescription- The already computed description.- Returns:
- The customized description.
- See Also:
-
resolveCustomHref
public URL resolveCustomHref(URL currentEditorURL, AuthorNode contextNode, String linkHref, AuthorAccess authorAccess) throws IOException, CustomResolverException Description copied from class:ExtensionsBundleWhen clicking a href the bundle can custom solve the href to an URL.- Overrides:
resolveCustomHrefin classExtensionsBundle- Parameters:
currentEditorURL- The URL of the current editor.contextNode- The context node in which the href needs to be computed.linkHref- The link href as derrived from the CSSauthorAccess- The Author Access.- Returns:
- The resolved absolute URL if null if the default behavior will be performed
- Throws:
CustomResolverException- If the link is recognized by the extensions bundle, but could not be mapped to an URL. It offers a solution to the user. This solution is invoked when the user clicks on the error message.IOException- If the link is recognized by the extensions bundle, but could not be mapped to an URL.- See Also:
-
getAuthorSchemaAwareEditingHandler
Description copied from class:ExtensionsBundleIf Schema Aware mode is active in Oxygen, all actions that can generate invalid content will be redirected toward this support. The support can either resolve a specific case, let the default implementation take place or reject the edit entirely by throwing anInvalidEditException. It is recommended to extend classAuthorSchemaAwareEditingHandlerAdapterin order to be protected from any API additions that may occur in interfaceAuthorSchemaAwareEditingHandler.- Overrides:
getAuthorSchemaAwareEditingHandlerin classExtensionsBundle- Returns:
- A custom editing handler for schema aware actions, or null if there is no handler and the default processing should take place.
- See Also:
-
createSchemaManagerFilter
Description copied from class:ExtensionsBundleCreates a newSchemaManagerFilterinstance used to filter the content completion proposals from the schema manager. This method is called each time the document type where the extensions bundle is defined matches a document opened in an editor.- Overrides:
createSchemaManagerFilterin classExtensionsBundle- Returns:
- A new
SchemaManagerFilterinstance. - See Also:
-
createExternalObjectInsertionHandler
Description copied from class:ExtensionsBundleCreate a handler which gets notified when external resources need to be inserted in the Author page. The usual usage for this is to get notified when URLs are dropped from the project or DITA Maps manager in the Author page.- Overrides:
createExternalObjectInsertionHandlerin classExtensionsBundle- Returns:
- The External URLs handler
- See Also:
-
createTextPageExternalObjectInsertionHandler
Description copied from class:ExtensionsBundleCreate a handler which gets notified when external resources need to be inserted in the Text page. The usual usage for this is to get notified when URLs are dropped from the project or DITA Maps manager in the Text page.- Overrides:
createTextPageExternalObjectInsertionHandlerin classExtensionsBundle- Returns:
- The External URLs handler
- See Also:
-
isContentReference
Description copied from class:ExtensionsBundleCheck if this node references another node which should replace it entirely. This is used in the tables to replace conreffed table rows entirely- Overrides:
isContentReferencein classExtensionsBundle- Parameters:
node- The node- Returns:
trueif this node references another node which should replace it entirely.- See Also:
-
getProfilingConditionalTextProvider
Description copied from class:ExtensionsBundleCreates a newProfilingConditionalTextProviderinstance responsible for providing custom support regarding profiling and conditional text.- Overrides:
getProfilingConditionalTextProviderin classExtensionsBundle- Returns:
- A new
ProfilingConditionalTextProviderinstance. - See Also:
-
createXMLNodeCustomizer
Description copied from class:ExtensionsBundleCreate an XML node customizer used for custom nodes rendering in the Author outline, Text page outline, Author bread crumb, content completion window or the DITA Map view.- Overrides:
createXMLNodeCustomizerin classExtensionsBundle- Returns:
- The XML node customizer.
- See Also:
-
getAuthorTableOperationsHandler
Description copied from class:ExtensionsBundleGet theAuthorTableOperationsHandlerinstance responsible for handling table operations.- Overrides:
getAuthorTableOperationsHandlerin classExtensionsBundle- Returns:
- Author table operations handler.
- See Also:
-
createLinkTextResolver
Description copied from class:ExtensionsBundleCreates a newLinkTextResolverinstance responsible for resolving a specific link marked in the CSS file and returning a text content from the targeted location. This text content will be presented as a static text associated with the link in author page. This resolver will be used when function oxy_link-text() is encountered inside the CSS rules on the 'content' property.- Overrides:
createLinkTextResolverin classExtensionsBundle- Returns:
- A new
LinkTextResolverinstance. - See Also:
-
createIDTypeRecognizer
Description copied from class:ExtensionsBundleCreates a newIDTypeRecognizerinstance responsible for providing an implementation which can recognize ID declarations and references. This method is called each time an ID must be recognized or certain ID-aware searches or refactory actions are performed.- Overrides:
createIDTypeRecognizerin classExtensionsBundle- Returns:
- A new
IDTypeRecognizerinstance. - See Also:
-
getKeyManager
Returns the keys manager.- Returns:
- Returns the keys manager.
-
getAuthorActionEventHandler
Description copied from class:ExtensionsBundleCreates a special handler for author actions events (such as key events). These events normally have built-in handling but this handler gets a chance to perform something different.- Overrides:
getAuthorActionEventHandlerin classExtensionsBundle- Returns:
- An event handler.
- See Also:
-
getAuthorImageDecorator
Description copied from class:ExtensionsBundleGet anAuthorImageDecorator. Permits decoration of the images that are displayed in the Author view. For instance it can overlay some meta-information over the image.- Overrides:
getAuthorImageDecoratorin classExtensionsBundle- Returns:
- An
AuthorImageDecorator, ornull. - See Also:
-
createEditPropertiesHandler
Description copied from class:ExtensionsBundleA custom implementation to handle editing properties of an author node. For example when a user double clicks on an element tag we will invoke this extension and a specific dialog can be presented.- Overrides:
createEditPropertiesHandlerin classExtensionsBundle- Returns:
- An implementation that can edit the properties of nodes.
- See Also:
-
getHelpPageID
Description copied from class:ExtensionsBundleGet the help page ID for this particular framework extensions bundle. If the returned help page ID is an URL, a web browser will be opened pointing to that URL when the user presses F1 in the dialog or when using the Help button. If the returned help page ID is an identifier, when help is invoked, the application will open the Oxygen User's Manual and locate this identifier inside it.- Overrides:
getHelpPageIDin classExtensionsBundle- Parameters:
currentEditorPage- The current editor page mode (Text/Grid/Author/Schema), one of the constants in the "ro.sync.exml.editor.EditorPageConstants" interface.- Returns:
- The help page ID, by default no help page ID is returned.
- See Also:
-
getContextKeyManager
- Specified by:
getContextKeyManagerin interfaceContextKeyManagerProvider- Returns:
- The context key manager.
- See Also:
-
resolveCustomAttributeValue
Description copied from class:ExtensionsBundleResolve a custom attribute value to an URL which will be opened by Oxygen. This method is called when the "Open File at Cursor" action is called in the Text editor page.- Overrides:
resolveCustomAttributeValuein classExtensionsBundle- Parameters:
attributeValueEditingContext- The editing context.- Returns:
- The URL which should be opened as a result of "Open File at Cursor" being invoked on the attribute value.
- See Also:
-
getSpellCheckerHelper
Description copied from class:ExtensionsBundleGet a helper for the spell checker.- Overrides:
getSpellCheckerHelperin classExtensionsBundle- Returns:
- Helper utilities implemented at framework level.
- See Also:
-