public ModelContextViewModel(ViewModelStore viewModelStore, ModelContext modelContext, BaseMainViewModel mainViewModel)
            : base(viewModelStore, false)
        {
            this.modelContext = modelContext;
            this.mainViewModel = mainViewModel;

            this.selectModelContextCommand = new DelegateCommand(SelectModelContextCommand_Executed);

            this.PreInitialize();

            if (modelContext != null)
            {
                this.modelContext.DocumentClosed += new EventHandler(ModelContext_DocumentClosed);
                this.modelContext.DocumentLoaded += new EventHandler(ModelContext_DocumentLoaded);
                this.modelContext.DocumentReloaded += new EventHandler(ModelContext_DocumentLoaded);
            }

            this.executePluginCommand = new DelegateCommand<IPlugin>(ExecutePluginCommandExecuted);
        }