Package ro.sync.contentcompletion.xml
Interface SchemaManagerFilter
-
- All Superinterfaces:
Extension
- All Known Implementing Classes:
DITASchemaManagerFilter
,DITAValSchemaManagerFilter
,DocbookSchemaManagerFilter
,SchemaManagerFilterBase
,StyleGuideSchemaManagerFilterBase
,XHTMLSchemaManagerFilter
@API(type=EXTENDABLE, src=PUBLIC) public interface SchemaManagerFilter extends Extension
Interface for objects used to filter the editor content completion schema manager proposals. This should be implemented if the list of content completion proposals must be filtered based on some criteria or some new entries need to be added.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<CIAttribute>
filterAttributes(java.util.List<CIAttribute> attributes, WhatAttributesCanGoHereContext context)
Filters the attributes proposed by the editor content completion schema manager.java.util.List<CIValue>
filterAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context)
Filters the attribute values proposed by the editor content completion schema manager.java.util.List<CIElement>
filterElements(java.util.List<CIElement> elements, WhatElementsCanGoHereContext context)
Filters the elements proposed by the editor content completion schema manager.java.util.List<CIValue>
filterElementValues(java.util.List<CIValue> elementValues, Context context)
Filters the element values proposed by the editor content completion schema manager.-
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
-
-
-
Method Detail
-
filterElements
java.util.List<CIElement> filterElements(java.util.List<CIElement> elements, WhatElementsCanGoHereContext context)
Filters the elements proposed by the editor content completion schema manager. The original list of elements is obtained by examining the current document schema and determining what possible elements can be inserted in the current context. For example ifperson
is the currentCIElement
, and the list of children contains the elementsname
andaddress
, the result of choosing the person entry from the content completion window will be the insertion of the following sequence:<person> <name>...</name> <address>...</address> </person>
name
CIElement can be replaced by a new one which returns a list with two new CIElements,firstName
andlastName
, on theCIElement.getGuessElements()
method call. The new generated sequence would be:<person> <name> <firstName>...</firstName> <lastName>...</lastName> </name> <address>...</address> </person>
- Parameters:
elements
- The list of elements (CIElement
) to be filtered.context
- TheWhatElementsCanGoHereContext
where the list of elements is requested. Ifnull
then the given list of content completion elements contains global elements.- Returns:
- The filtered list of
CIElement
ornull
if all elements are rejected by the filter.
-
filterAttributes
java.util.List<CIAttribute> filterAttributes(java.util.List<CIAttribute> attributes, WhatAttributesCanGoHereContext context)
Filters the attributes proposed by the editor content completion schema manager. The original list of attributes is obtained by examining the current document schema and determining what attributes can be inserted in the current element and taking into account the list of existing attributes.- Parameters:
attributes
- The list of attributes (CIAttribute
) to be filtered. Can be NULLcontext
- TheWhatAttributesCanGoHereContext
where the list of attributes is requested.- Returns:
- The filtered list of
CIAttribute
ornull
if all attributes are rejected by the filter.
-
filterAttributeValues
java.util.List<CIValue> filterAttributeValues(java.util.List<CIValue> attributeValues, WhatPossibleValuesHasAttributeContext context)
Filters the attribute values proposed by the editor content completion schema manager. The original list of attribute values is obtained by examining the current document schema and determining what values are permitted for the current attribute. If the attribute type was an enumeration, then a list with the tokens of the enumeration will be returned for that attribute.- Parameters:
attributeValues
- The list of attribute values (CIValue
) to be filtered.context
- TheWhatPossibleValuesHasAttributeContext
where the list of attribute values is requested.- Returns:
- The filtered list of
CIValue
representing possible values of the attribute ornull
if all values are rejected by the filter.
-
filterElementValues
java.util.List<CIValue> filterElementValues(java.util.List<CIValue> elementValues, Context context)
Filters the element values proposed by the editor content completion schema manager. The original list of element values is obtained by examining the current document schema and determining what values are permitted for the current element. If the element type was an enumeration, then a list with the values of the enumeration will be returned for that element.
-
-