本文整理汇总了C#中CodeMaidPackage类的典型用法代码示例。如果您正苦于以下问题:C# CodeMaidPackage类的具体用法?C# CodeMaidPackage怎么用?C# CodeMaidPackage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodeMaidPackage类属于命名空间,在下文中一共展示了CodeMaidPackage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CommentFormatCommand
/// <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);
}
开发者ID:reima,项目名称:codemaid,代码行数:11,代码来源:CommentFormatCommand.cs
示例2: RemoveRegionCommand
/// <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);
}
开发者ID:Mediomondo,项目名称:codemaid,代码行数:11,代码来源:RemoveRegionCommand.cs
示例3: CleaningUpdateViewModel
/// <summary>
/// Initializes a new instance of the <see cref="CleaningUpdateViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="activeSettings">The active settings.</param>
public CleaningUpdateViewModel(CodeMaidPackage package, Settings activeSettings)
: base(package, activeSettings)
{
Mappings = new SettingsToOptionsList(ActiveSettings, this)
{
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateAccessorsToBothBeSingleLineOrMultiLine, x => UpdateAccessorsToBothBeSingleLineOrMultiLine),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateEndRegionDirectives, x => UpdateEndRegionDirectives),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCPlusPlus, x => UpdateFileHeaderCPlusPlus),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSharp, x => UpdateFileHeaderCSharp),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSS, x => UpdateFileHeaderCSS),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderFSharp, x => UpdateFileHeaderFSharp),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderHTML, x => UpdateFileHeaderHTML),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJavaScript, x => UpdateFileHeaderJavaScript),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJSON, x => UpdateFileHeaderJSON),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderLESS, x => UpdateFileHeaderLESS),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPHP, x => UpdateFileHeaderPHP),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPowerShell, x => UpdateFileHeaderPowerShell),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderR, x => UpdateFileHeaderR),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderSCSS, x => UpdateFileHeaderSCSS),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderTypeScript, x => UpdateFileHeaderTypeScript),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderVB, x => UpdateFileHeaderVisualBasic),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXAML, x => UpdateFileHeaderXAML),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXML, x => UpdateFileHeaderXML),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateSingleLineMethods, x => UpdateSingleLineMethods)
};
}
开发者ID:reima,项目名称:codemaid,代码行数:31,代码来源:CleaningUpdateViewModel.cs
示例4: CodeModelManager
/// <summary>
/// Initializes a new instance of the <see cref="CodeModelManager" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
private CodeModelManager(CodeMaidPackage package)
{
_package = package;
_codeModelBuilder = CodeModelBuilder.GetInstance(_package);
_codeModelCache = new CodeModelCache();
}
开发者ID:reima,项目名称:codemaid,代码行数:11,代码来源:CodeModelManager.cs
示例5: CleanupActiveCodeCommand
/// <summary>
/// Initializes a new instance of the <see cref="CleanupActiveCodeCommand" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
internal CleanupActiveCodeCommand(CodeMaidPackage package)
: base(package,
new CommandID(PackageGuids.GuidCodeMaidCommandCleanupActiveCode, PackageIds.CmdIDCodeMaidCleanupActiveCode))
{
CodeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(Package);
CodeCleanupManager = CodeCleanupManager.GetInstance(Package);
}
开发者ID:reima,项目名称:codemaid,代码行数:11,代码来源:CleanupActiveCodeCommand.cs
示例6: WindowEventListener
/// <summary>
/// Initializes a new instance of the <see cref="WindowEventListener" /> class.
/// </summary>
/// <param name="package">The package hosting the event listener.</param>
internal WindowEventListener(CodeMaidPackage package)
: base(package)
{
// Store access to the window events, otherwise events will not register properly via DTE.
WindowEvents = Package.IDE.Events.get_WindowEvents(null);
WindowEvents.WindowActivated += WindowEvents_WindowActivated;
}
开发者ID:reima,项目名称:codemaid,代码行数:11,代码来源:WindowEventListener.cs
示例7: RemoveRegionCommand
/// <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);
}
开发者ID:reima,项目名称:codemaid,代码行数:11,代码来源:RemoveRegionCommand.cs
示例8: DocumentEventListener
/// <summary>
/// Initializes a new instance of the <see cref="DocumentEventListener" /> class.
/// </summary>
/// <param name="package">The package hosting the event listener.</param>
internal DocumentEventListener(CodeMaidPackage package)
: base(package)
{
// Store access to the document events, otherwise events will not register properly via DTE.
DocumentEvents = Package.IDE.Events.DocumentEvents;
DocumentEvents.DocumentClosing += DocumentEvents_DocumentClosing;
}
开发者ID:agamat,项目名称:codemaid,代码行数:11,代码来源:DocumentEventListener.cs
示例9: BaseCommand
/// <summary>
/// Initializes a new instance of the <see cref="BaseCommand" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="id">The id for the command.</param>
protected BaseCommand(CodeMaidPackage package, CommandID id)
: base(BaseCommand_Execute, id)
{
Package = package;
BeforeQueryStatus += BaseCommand_BeforeQueryStatus;
}
开发者ID:adontz,项目名称:codemaid,代码行数:12,代码来源:BaseCommand.cs
示例10: CommentFormatCommand
/// <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);
}
开发者ID:stevenha,项目名称:codemaid,代码行数:11,代码来源:CommentFormatCommand.cs
示例11: CleanupOpenCodeCommand
/// <summary>
/// Initializes a new instance of the <see cref="CleanupOpenCodeCommand" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
internal CleanupOpenCodeCommand(CodeMaidPackage package)
: base(package,
new CommandID(GuidList.GuidCodeMaidCommandCleanupOpenCode, (int)PkgCmdIDList.CmdIDCodeMaidCleanupOpenCode))
{
CodeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(Package);
CodeCleanupManager = CodeCleanupManager.GetInstance(Package);
}
开发者ID:adontz,项目名称:codemaid,代码行数:11,代码来源:CleanupOpenCodeCommand.cs
示例12: SpadeContextInsertRegionCommand
/// <summary>
/// Initializes a new instance of the <see cref="SpadeContextInsertRegionCommand" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
internal SpadeContextInsertRegionCommand(CodeMaidPackage package)
: base(package,
new CommandID(GuidList.GuidCodeMaidCommandSpadeContextInsertRegion, (int)PkgCmdIDList.CmdIDCodeMaidSpadeContextInsertRegion))
{
_generateRegionLogic = GenerateRegionLogic.GetInstance(package);
_undoTransactionHelper = new UndoTransactionHelper(package, "CodeMaid Insert Region");
}
开发者ID:adontz,项目名称:codemaid,代码行数:11,代码来源:SpadeContextInsertRegionCommand.cs
示例13: FormattingViewModel
/// <summary>
/// Initializes a new instance of the <see cref="FormattingViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="activeSettings">The active settings.</param>
public FormattingViewModel(CodeMaidPackage package, Settings activeSettings)
: base(package, activeSettings)
{
Mappings = new SettingsToOptionsList(ActiveSettings, this)
{
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentRunDuringCleanup, x => CommentRunDuringCleanup),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentSkipWrapOnLastWord, x => CommentSkipWrapOnLastWord),
new SettingToOptionMapping<int, int>(x => ActiveSettings.Formatting_CommentWrapColumn, x => CommentWrapColumn),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlAlignParamTags, x => CommentXmlAlignParamTags),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlKeepTagsTogether, x => CommentXmlKeepTagsTogether),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceSingleTags, x => CommentXmlSpaceSingleTags),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceTags, x => CommentXmlSpaceTags),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitAllTags, x => CommentXmlSplitAllTags),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitSummaryTagToMultipleLines, x => CommentXmlSplitSummaryTagToMultipleLines),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlTagsToLowerCase, x => CommentXmlTagsToLowerCase),
new SettingToOptionMapping<int, int>(x => ActiveSettings.Formatting_CommentXmlValueIndent, x => CommentXmlValueIndent)
};
_editorProperties = Package.IDE.Properties["FontsAndColors", "TextEditor"];
var property = _editorProperties.Item("FontsAndColorsItems");
var fontsAndColorsItems = (EnvDTE.FontsAndColorsItems)property.Object;
_commentColors = fontsAndColorsItems.Item("Comment");
PropertyChanged += (sender, args) => UpdatePreviewText();
}
开发者ID:AmakJ,项目名称:codemaid,代码行数:30,代码来源:FormattingViewModel.cs
示例14: CleaningFileTypesViewModel
/// <summary>
/// Initializes a new instance of the <see cref="CleaningFileTypesViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="activeSettings">The active settings.</param>
public CleaningFileTypesViewModel(CodeMaidPackage package, Settings activeSettings)
: base(package, activeSettings)
{
Mappings = new SettingsToOptionsList(ActiveSettings, this)
{
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_ExcludeT4GeneratedCode, x => ExcludeT4GeneratedCode),
new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_ExclusionExpression, x => ExclusionExpression),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCPlusPlus, x => IncludeCPlusPlus),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCSharp, x => IncludeCSharp),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCSS, x => IncludeCSS),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeEverythingElse, x => IncludeEverythingElse),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeFSharp, x => IncludeFSharp),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeHTML, x => IncludeHTML),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeJavaScript, x => IncludeJavaScript),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeJSON, x => IncludeJSON),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeLESS, x => IncludeLESS),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludePHP, x => IncludePHP),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludePowerShell, x => IncludePowerShell),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeR, x => IncludeR),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeSCSS, x => IncludeSCSS),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeTypeScript, x => IncludeTypeScript),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeVB, x => IncludeVisualBasic),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeXAML, x => IncludeXAML),
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeXML, x => IncludeXML)
};
}
开发者ID:reima,项目名称:codemaid,代码行数:31,代码来源:CleaningFileTypesViewModel.cs
示例15: TextEditorEventListener
/// <summary>
/// Initializes a new instance of the <see cref="TextEditorEventListener" /> class.
/// </summary>
/// <param name="package">The package hosting the event listener.</param>
internal TextEditorEventListener(CodeMaidPackage package)
: base(package)
{
// Store access to the text editor events, otherwise events will not register properly
// via DTE.
TextEditorEvents = Package.IDE.Events.TextEditorEvents;
TextEditorEvents.LineChanged += TextEditorEvents_LineChanged;
}
开发者ID:agamat,项目名称:codemaid,代码行数:12,代码来源:TextEditorEventListener.cs
示例16: ReorganizeActiveCodeCommand
/// <summary>
/// Initializes a new instance of the <see cref="ReorganizeActiveCodeCommand" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
internal ReorganizeActiveCodeCommand(CodeMaidPackage package)
: base(package,
new CommandID(PackageGuids.GuidCodeMaidCommandReorganizeActiveCode, PackageIds.CmdIDCodeMaidReorganizeActiveCode))
{
CodeReorganizationManager = CodeReorganizationManager.GetInstance(Package);
_codeReorganizationAvailabilityLogic = CodeReorganizationAvailabilityLogic.GetInstance(Package);
}
开发者ID:reima,项目名称:codemaid,代码行数:12,代码来源:ReorganizeActiveCodeCommand.cs
示例17: FormattingViewModel
/// <summary>
/// Initializes a new instance of the <see cref="FormattingViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
public FormattingViewModel(CodeMaidPackage package)
: base(package)
{
_editorProperties = Package.IDE.Properties["FontsAndColors", "TextEditor"];
var property = _editorProperties.Item("FontsAndColorsItems");
var fontsAndColorsItems = (EnvDTE.FontsAndColorsItems)property.Object;
_commentColors = fontsAndColorsItems.Item("Comment");
}
开发者ID:robin-fischer,项目名称:codemaid,代码行数:12,代码来源:FormattingViewModel.cs
示例18: GetTopUIHierarchyItem
/// <summary>
/// Gets the top level (solution) UI hierarchy item.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <returns>The top level (solution) UI hierarchy item, otherwise null.</returns>
internal static UIHierarchyItem GetTopUIHierarchyItem(CodeMaidPackage package)
{
var solutionExplorer = GetSolutionExplorer(package);
return solutionExplorer.UIHierarchyItems.Count > 0
? solutionExplorer.UIHierarchyItems.Item(1)
: null;
}
开发者ID:reima,项目名称:codemaid,代码行数:13,代码来源:UIHierarchyHelper.cs
示例19: FindingViewModel
/// <summary>
/// Initializes a new instance of the <see cref="FindingViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="activeSettings">The active settings.</param>
public FindingViewModel(CodeMaidPackage package, Settings activeSettings)
: base(package, activeSettings)
{
Mappings = new SettingsToOptionsList(ActiveSettings, this)
{
new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Finding_TemporarilyOpenSolutionFolders, x => TemporarilyOpenSolutionFolders)
};
}
开发者ID:reima,项目名称:codemaid,代码行数:13,代码来源:FindingViewModel.cs
示例20: SwitchingViewModel
/// <summary>
/// Initializes a new instance of the <see cref="SwitchingViewModel" /> class.
/// </summary>
/// <param name="package">The hosting package.</param>
/// <param name="activeSettings">The active settings.</param>
public SwitchingViewModel(CodeMaidPackage package, Settings activeSettings)
: base(package, activeSettings)
{
Mappings = new SettingsToOptionsList(ActiveSettings, this)
{
new SettingToOptionMapping<string, string>(x => ActiveSettings.Switching_RelatedFileExtensionsExpression, x => RelatedFileExtensionsExpression)
};
}
开发者ID:reima,项目名称:codemaid,代码行数:13,代码来源:SwitchingViewModel.cs
注:本文中的CodeMaidPackage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论