예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommentFormatCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CommentFormatCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(PackageGuids.GuidCodeMaidCommandCommentFormat, PackageIds.CmdIDCodeMaidCommentFormat))
 {
     _undoTransactionHelper = new UndoTransactionHelper(package, "CodeMaid Format Comment");
     _commentFormatLogic = CommentFormatLogic.GetInstance(package);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommentFormatCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CommentFormatCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandCommentFormat, (int)PkgCmdIDList.CmdIDCodeMaidCommentFormat))
 {
     _undoTransactionHelper = new UndoTransactionHelper(package, "Format Comment");
     _commentFormatLogic = CommentFormatLogic.GetInstance(package);
 }
예제 #3
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);
        }
예제 #4
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);
        }
예제 #5
0
 public static void ClassInitialize(TestContext testContext)
 {
     _commentFormatLogic = CommentFormatLogic.GetInstance(TestEnvironment.Package);
     Assert.IsNotNull(_commentFormatLogic);
 }
 /// <summary>
 /// Gets an instance of the <see cref="CommentFormatLogic"/> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="CommentFormatLogic"/> class.</returns>
 internal static CommentFormatLogic GetInstance(CodeMaidPackage package)
 {
     return(_instance ?? (_instance = new CommentFormatLogic(package)));
 }
예제 #7
0
 /// <summary>
 /// Gets an instance of the <see cref="CommentFormatLogic" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="CommentFormatLogic" /> class.</returns>
 internal static CommentFormatLogic GetInstance(CodeMaidPackage package)
 {
     return _instance ?? (_instance = new CommentFormatLogic(package));
 }