Class CommonAttributeContentTreeComponent
- java.lang.Object
-
- com._1c.g5.aef2.components.Component<M,P>
-
- com._1c.g5.aef2.standard.components.StandardComponent<M,P>
-
- com._1c.g5.aef2.standard.components.AbstractControlComponent<M,P,VM>
-
- com._1c.g5.v8.dt.ui.aef.component.DtDynamicTreeComponent<Object,NavigatorTreeModel,TreeViewModel,ITreeParameterization>
-
- com._1c.g5.v8.dt.ui.aef.component.NavigatorTreeComponent
-
- com._1c.g5.v8.dt.md.ui.aef.components.CommonAttributeContentTreeComponent
-
- All Implemented Interfaces:
IComponent<NavigatorTreeModel>
,IEventChannel
,ComponentSearch.IIdentifierHost
,ILabelProviderListener
public class CommonAttributeContentTreeComponent extends NavigatorTreeComponent
The AEF 2.0 tree component for the common attribute content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
CommonAttributeContentTreeComponent.CommonAttributeContentMapper
Extended mapper for the navigator content.protected class
CommonAttributeContentTreeComponent.CommonAttributeContentViewModelAdapter
Content view model adapter which is responsible for tracking of the view model changes-
Nested classes/interfaces inherited from class com._1c.g5.v8.dt.ui.aef.component.NavigatorTreeComponent
NavigatorTreeComponent.NavigatorMapper
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Field Summary
Fields Modifier and Type Field Description protected static Pair<CommonAttributeUse,ItemViewModel>
COMMON_ATTRIBUTE_USE__AUTO_DONT_USE_STATE
protected static Pair<CommonAttributeUse,ItemViewModel>
COMMON_ATTRIBUTE_USE__AUTO_USE_STATE
protected static Pair<CommonAttributeUse,ItemViewModel>
COMMON_ATTRIBUTE_USE__DONT_USE_STATE
protected static Pair<CommonAttributeUse,ItemViewModel>
COMMON_ATTRIBUTE_USE__USE_STATE
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.component.DtDynamicTreeComponent
active, currentSelection
-
-
Constructor Summary
Constructors Constructor Description CommonAttributeContentTreeComponent(ITreeParameterization parameterization)
Creates new component.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CommonAttributeContentViewModel
createCommonAttributeViewModel()
Creates an empty instance of the common attribute view modelprotected IAefTreeContentProvider<TreeItemViewModel>
createContentProvider()
CreatesIAefTreeContentProvider
instance.static NavigatorContentProviderStateManager
createProjectContentProviderState(CommonAttribute commonAttribute, boolean showOnlyUsed, Map<org.eclipse.xtext.naming.QualifiedName,CommonAttributeContentItem> cacheContent, org.eclipse.core.resources.IProject project, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IBmEmfIndexManager bmEmfIndexManager, IFilteredNavigatorContentProvider filteredNavigatorContentProvider)
CreatesNavigatorContentProviderStateManager
withIEObjectTrie
contains content of theCommonAttribute
protected IViewModelsMapper<Object,TreeItemViewModel>
createTreeMapper()
Gets or createsIMapper
instance.protected TreeViewModel
createTreeViewModel()
Creates view model instance.void
dispose()
Disposes this component, its view models and its child components.protected Optional<CommonAttributeContentItem>
getContentItem(MdObject mdObject)
Gets the content item which corresponds the given MD object, if any.protected CommonAttributeContentModel
getContentModel()
Gets the content model of the common attributeprotected List<Pair<CommonAttributeUse,ItemViewModel>>
getUseInput(CommonAttribute commonAttribute, CommonAttributeContentItemViewModel itemViewModel)
Gets the input from the view model of the USE fieldprotected void
processEvent(IEvent event)
Processes the received event from component.void
setEnabled(boolean enabled)
Sets the component enable state.void
updateViewModels()
Updates view models of the component.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.NavigatorTreeComponent
getComponent, getId, trackObjectFeatureChanges
-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.DtDynamicTreeComponent
createControlViewModel, disposeViewModels, getContentProvider, getMapper, labelProviderChanged, processDoubleClickEvent, setMulti, setSelection
-
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
createViewModels, getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData
-
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setFocus, updateViewModelStatus
-
Methods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
-
-
-
Field Detail
-
COMMON_ATTRIBUTE_USE__USE_STATE
protected static final Pair<CommonAttributeUse,ItemViewModel> COMMON_ATTRIBUTE_USE__USE_STATE
-
COMMON_ATTRIBUTE_USE__DONT_USE_STATE
protected static final Pair<CommonAttributeUse,ItemViewModel> COMMON_ATTRIBUTE_USE__DONT_USE_STATE
-
COMMON_ATTRIBUTE_USE__AUTO_USE_STATE
protected static final Pair<CommonAttributeUse,ItemViewModel> COMMON_ATTRIBUTE_USE__AUTO_USE_STATE
-
COMMON_ATTRIBUTE_USE__AUTO_DONT_USE_STATE
protected static final Pair<CommonAttributeUse,ItemViewModel> COMMON_ATTRIBUTE_USE__AUTO_DONT_USE_STATE
-
-
Constructor Detail
-
CommonAttributeContentTreeComponent
public CommonAttributeContentTreeComponent(ITreeParameterization parameterization)
Creates new component.- Parameters:
parameterization
- the parameterization, cannot benull
-
-
Method Detail
-
createProjectContentProviderState
public static NavigatorContentProviderStateManager createProjectContentProviderState(CommonAttribute commonAttribute, boolean showOnlyUsed, Map<org.eclipse.xtext.naming.QualifiedName,CommonAttributeContentItem> cacheContent, org.eclipse.core.resources.IProject project, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, IBmEmfIndexManager bmEmfIndexManager, IFilteredNavigatorContentProvider filteredNavigatorContentProvider)
CreatesNavigatorContentProviderStateManager
withIEObjectTrie
contains content of theCommonAttribute
- Parameters:
commonAttribute
-CommonAttribute
for gettingMdObject
from it content, cannot benull
showOnlyUsed
-true
if need to show content filter by use,false
otherwisecacheContent
- special cache of the content ofCommonAttribute
, key isQualifiedName
of theMdObject
inCommonAttribute
content, value is correspondenceCommonAttributeContentItem
, cannot benull
project
- actualIProject
, cannot benull
qualifiedNameProvider
- actualIQualifiedNameProvider
, cannot benull
filteredNavigatorContentProvider
- actualfilteredNavigatorContentProvider
, cannot benull
- Returns:
NavigatorContentProviderStateManager
withIEObjectTrie
contains content of theCommonAttribute
, nevernull
-
dispose
public void dispose()
Description copied from interface:IComponent
Disposes this component, its view models and its child components.- Specified by:
dispose
in interfaceIComponent<NavigatorTreeModel>
- Overrides:
dispose
in classNavigatorTreeComponent
-
updateViewModels
public void updateViewModels()
Description copied from class:StandardComponent
Updates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModels
in classAbstractControlComponent<NavigatorTreeModel,ITreeParameterization,TreeViewModel>
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from class:StandardComponent
Sets the component enable state.- Overrides:
setEnabled
in classStandardComponent<NavigatorTreeModel,ITreeParameterization>
- Parameters:
enabled
- the new value to set.
-
createTreeViewModel
protected TreeViewModel createTreeViewModel()
Description copied from class:DtDynamicTreeComponent
Creates view model instance.- Overrides:
createTreeViewModel
in classDtDynamicTreeComponent<Object,NavigatorTreeModel,TreeViewModel,ITreeParameterization>
- Returns:
- a newly created view model, cannot be
null
-
createCommonAttributeViewModel
protected CommonAttributeContentViewModel createCommonAttributeViewModel()
Creates an empty instance of the common attribute view model- Returns:
- The instance of the model, may not be
null
-
createTreeMapper
protected IViewModelsMapper<Object,TreeItemViewModel> createTreeMapper()
Description copied from class:DtDynamicTreeComponent
Gets or createsIMapper
instance.- Overrides:
createTreeMapper
in classNavigatorTreeComponent
- Returns:
- the newly created mapper, cannot be
null
-
processEvent
protected void processEvent(IEvent event)
Description copied from class:DtDynamicTreeComponent
Processes the received event from component.- Overrides:
processEvent
in classNavigatorTreeComponent
- Parameters:
event
- the event
-
createContentProvider
protected IAefTreeContentProvider<TreeItemViewModel> createContentProvider()
CreatesIAefTreeContentProvider
instance.- Overrides:
createContentProvider
in classDtDynamicTreeComponent<Object,NavigatorTreeModel,TreeViewModel,ITreeParameterization>
- Returns:
- the newly created content provider, cannot be
null
-
getContentModel
protected CommonAttributeContentModel getContentModel()
Gets the content model of the common attribute- Returns:
- The content model of the common attribute. Never
null
-
getContentItem
protected Optional<CommonAttributeContentItem> getContentItem(MdObject mdObject)
Gets the content item which corresponds the given MD object, if any.- Parameters:
mdObject
- The target MD object. May not benull
- Returns:
- The content item if presents. May not be
null
-
getUseInput
protected List<Pair<CommonAttributeUse,ItemViewModel>> getUseInput(CommonAttribute commonAttribute, CommonAttributeContentItemViewModel itemViewModel)
Gets the input from the view model of the USE field- Parameters:
commonAttribute
- The common attribute to get the model for. May not benull
itemViewModel
- The current item view model- Returns:
- The list of applciable options. Never null
-
-