Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal RemoveRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(PackageGuids.GuidCodeMaidCommandRemoveRegion, PackageIds.CmdIDCodeMaidRemoveRegion))
 {
     _codeModelHelper = CodeModelHelper.GetInstance(package);
     _removeRegionLogic = RemoveRegionLogic.GetInstance(package);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal RemoveRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandRemoveRegion, (int)PkgCmdIDList.CmdIDCodeMaidRemoveRegion))
 {
     _codeModelHelper = CodeModelHelper.GetInstance(package);
     _removeRegionLogic = RemoveRegionLogic.GetInstance(package);
 }
Esempio n. 3
0
        public static void ClassInitialize(TestContext testContext)
        {
            _codeModelHelper = CodeModelHelper.GetInstance(TestEnvironment.Package);
            Assert.IsNotNull(_codeModelHelper);

            _removeRegionLogic = RemoveRegionLogic.GetInstance(TestEnvironment.Package);
            Assert.IsNotNull(_removeRegionLogic);
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeReorderManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeReorderManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelManager = CodeModelManager.GetInstance(_package);
            _undoTransactionHelper = new UndoTransactionHelper(_package, "CodeMaid Reorganize");

            _generateRegionLogic = GenerateRegionLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic = InsertBlankLinePaddingLogic.GetInstance(_package);
            _removeRegionLogic = RemoveRegionLogic.GetInstance(_package);
        }
Esempio n. 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeCleanupManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeCleanupManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelManager = CodeModelManager.GetInstance(_package);
            _codeReorderManager = CodeReorderManager.GetInstance(_package);
            _undoTransactionHelper = new UndoTransactionHelper(_package, "CodeMaid Cleanup");

            _codeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(_package);
            _commentFormatLogic = CommentFormatLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic = InsertBlankLinePaddingLogic.GetInstance(_package);
            _insertExplicitAccessModifierLogic = InsertExplicitAccessModifierLogic.GetInstance();
            _insertWhitespaceLogic = InsertWhitespaceLogic.GetInstance(_package);
            _removeRegionLogic = RemoveRegionLogic.GetInstance(_package);
            _removeWhitespaceLogic = RemoveWhitespaceLogic.GetInstance(_package);
            _updateLogic = UpdateLogic.GetInstance(_package);
            _usingStatementCleanupLogic = UsingStatementCleanupLogic.GetInstance(_package);
        }
Esempio n. 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeCleanupManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeCleanupManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelManager      = CodeModelManager.GetInstance(_package);
            _codeReorderManager    = CodeReorderManager.GetInstance(_package);
            _undoTransactionHelper = new UndoTransactionHelper(_package, "CodeMaid Cleanup");

            _codeCleanupAvailabilityLogic      = CodeCleanupAvailabilityLogic.GetInstance(_package);
            _commentFormatLogic                = CommentFormatLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic       = InsertBlankLinePaddingLogic.GetInstance(_package);
            _insertExplicitAccessModifierLogic = InsertExplicitAccessModifierLogic.GetInstance();
            _insertWhitespaceLogic             = InsertWhitespaceLogic.GetInstance(_package);
            _removeRegionLogic          = RemoveRegionLogic.GetInstance(_package);
            _removeWhitespaceLogic      = RemoveWhitespaceLogic.GetInstance(_package);
            _updateLogic                = UpdateLogic.GetInstance(_package);
            _usingStatementCleanupLogic = UsingStatementCleanupLogic.GetInstance(_package);
        }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeCleanupManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeCleanupManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelManager          = CodeModelManager.GetInstance(_package);
            _codeReorganizationManager = CodeReorganizationManager.GetInstance(_package);
            _commandHelper             = CommandHelper.GetInstance(_package);

            _codeCleanupAvailabilityLogic      = CodeCleanupAvailabilityLogic.GetInstance(_package);
            _commentFormatLogic                = CommentFormatLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic       = InsertBlankLinePaddingLogic.GetInstance(_package);
            _insertExplicitAccessModifierLogic = InsertExplicitAccessModifierLogic.GetInstance();
            _insertWhitespaceLogic             = InsertWhitespaceLogic.GetInstance(_package);
            _fileHeaderLogic            = FileHeaderLogic.GetInstance(_package);
            _removeRegionLogic          = RemoveRegionLogic.GetInstance(_package);
            _removeWhitespaceLogic      = RemoveWhitespaceLogic.GetInstance(_package);
            _updateLogic                = UpdateLogic.GetInstance(_package);
            _usingStatementCleanupLogic = UsingStatementCleanupLogic.GetInstance(_package);
        }
Esempio n. 8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CodeCleanupManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeCleanupManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelManager = CodeModelManager.GetInstance(_package);
            _codeReorganizationManager = CodeReorganizationManager.GetInstance(_package);
            _commandHelper = CommandHelper.GetInstance(_package);

            _codeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(_package);
            _commentFormatLogic = CommentFormatLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic = InsertBlankLinePaddingLogic.GetInstance(_package);
            _insertExplicitAccessModifierLogic = InsertExplicitAccessModifierLogic.GetInstance();
            _insertWhitespaceLogic = InsertWhitespaceLogic.GetInstance(_package);
            _fileHeaderLogic = FileHeaderLogic.GetInstance(_package);
            _removeRegionLogic = RemoveRegionLogic.GetInstance(_package);
            _removeWhitespaceLogic = RemoveWhitespaceLogic.GetInstance(_package);
            _updateLogic = UpdateLogic.GetInstance(_package);
            _usingStatementCleanupLogic = UsingStatementCleanupLogic.GetInstance(_package);
        }
Esempio n. 9
0
 /// <summary>
 /// Gets an instance of the <see cref="RemoveRegionLogic" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="RemoveRegionLogic" /> class.</returns>
 internal static RemoveRegionLogic GetInstance(CodeMaidPackage package)
 {
     return(_instance ?? (_instance = new RemoveRegionLogic(package)));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SpadeContextRemoveRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal SpadeContextRemoveRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandSpadeContextRemoveRegion, (int)PkgCmdIDList.CmdIDCodeMaidSpadeContextRemoveRegion))
 {
     _removeRegionLogic = RemoveRegionLogic.GetInstance(package);
 }
Esempio n. 11
0
 /// <summary>
 /// Gets an instance of the <see cref="RemoveRegionLogic" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="RemoveRegionLogic" /> class.</returns>
 internal static RemoveRegionLogic GetInstance(CodeMaidPackage package)
 {
     return _instance ?? (_instance = new RemoveRegionLogic(package));
 }