/// <summary>
        /// Constuctor.
        /// </summary>
        /// <param name="viewModelStore">The store this view model belongs to.</param>
        /// <param name="modelTreeView">Domain model tree view.</param>
        public ModelTreeViewModel(ViewModelStore viewModelStore, ModelContextViewModel modelContextVM, DomainModelTreeView modelTreeView)
            : base(viewModelStore)
        {
            this.rootNodeVMs = new ObservableCollection<RootNodeViewModel>();
            this.rootNodeVMsRO = new ReadOnlyObservableCollection<RootNodeViewModel>(rootNodeVMs);

            this.modelContextVM = modelContextVM;
            this.modelTreeView = modelTreeView;
            this.selectedVMS = new Collection<object>();
            this.contextMenuOperations = new Collection<MenuItemViewModel>();

            addNewDomainPropertyCommand = new DelegateCommand(AddNewDomainPropertyCommand_Executed);
            addNewDomainClassCommand = new DelegateCommand(AddNewDomainClassCommand_Executed);
            addNewEmbeddingRSCommand = new DelegateCommand(AddNewEmbeddingRSCommand_Executed);
            addNewEmbeddingRSToExistantCommand = new DelegateCommand(AddNewEmbeddingRSToExistantCommand_Executed);
            addNewReferenceRSCommand = new DelegateCommand(AddNewReferenceRSCommand_Executed);
            addNewReferenceRSToRSCommand = new DelegateCommand(AddNewReferenceRSToRSCommand_Executed);
            addNewInheritanceRSCommand = new DelegateCommand(AddNewInheritanceRSCommand_Executed);
            addNewDerivedElementCommand = new DelegateCommand(AddNewDerivedElementCommand_Executed);

            deleteCommand = new DelegateCommand(DeleteCommand_Executed, DeleteCommand_CanExecute);

            showTemplateHelperCommand = new DelegateCommand(ShowTemplateHelperCommand_Executed);
            /*
            copyCommand = new DelegateCommand(CopyCommand_Executed, CopyCommand_CanExecute);
            pasteCommand = new DelegateCommand(PasteCommand_Executed, PasteCommand_CanExecute);
            */

            bringTreeHereCommand = new DelegateCommand(BringTreeHereCommand_Executed);
            splitTreeCommand = new DelegateCommand(SplitTreeCommand_Executed);
            moveUpCommand = new DelegateCommand(MoveUpCommand_Executed);
            moveDownCommand = new DelegateCommand(MoveDownCommand_Executed);

            viewPropertiesCommand = new DelegateCommand(ViewPropertiesCommand_Executed);

            addMappingToNewRelShapeClassCommand = new DelegateCommand(AddMappingToNewRelShapeClassCommand_Executed);
            addMappingToExtRelShapeClassCommand = new DelegateCommand(AddMappingToExtRelShapeClassCommand_Executed);
            addMappingToNewShapeClassCommand = new DelegateCommand(AddMappingToNewShapeClassCommand_Executed);
            addMappingToExtShapeClassCommand = new DelegateCommand(AddMappingToExtShapeClassCommand_Executed);
            addMappingToNewMappingShapeClassCommand = new DelegateCommand(AddMappingToNewMappingShapeClassCommand_Executed);
            addMappingToExtMappingShapeClassCommand = new DelegateCommand(AddMappingToExtMappingShapeClassCommand_Executed);

            UpdateOperations();

            foreach (RootNode n in modelTreeView.RootNodes)
                this.AddRootNode(n);

            this.EventManager.GetEvent<SelectionChangedEvent>().Subscribe(new Action<SelectionChangedEventArgs>(OnSelectionChanged));
            Subscribe();
        }
 /// <summary>
 /// Constuctor.
 /// </summary>
 /// <param name="viewModelStore">The store this view model belongs to.</param>
 /// <param name="modelTreeView">Domain model tree view.</param>
 public OptimizationModelTreeViewModel(ViewModelStore viewModelStore, DomainModelTreeView modelTreeView)
     : base(viewModelStore, null, modelTreeView)
 {
 }