本文整理汇总了C#中IGlyphService类的典型用法代码示例。如果您正苦于以下问题:C# IGlyphService类的具体用法?C# IGlyphService怎么用?C# IGlyphService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGlyphService类属于命名空间,在下文中一共展示了IGlyphService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CallHierarchyProvider
public CallHierarchyProvider(
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
IGlyphService glyphService)
{
_asyncListener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.CallHierarchy);
this.GlyphService = glyphService;
}
示例2: GetCompletions
public override CompletionSet GetCompletions(IGlyphService glyphService)
{
if (_noCompletions) {
return null;
}
if (_importKeywordOnly) {
var completion = new[] { JCompletion(glyphService, "import", null, StandardGlyphGroup.GlyphKeyword) };
return new FuzzyCompletionSet("JImportKeyword", "J", Span, completion, _options, CompletionComparer.UnderscoresLast);
}
var start = _stopwatch.ElapsedMilliseconds;
var completions = GetModules(_namespace, _modulesOnly).Select(m => JCompletion(glyphService, m));
if (_includeStar) {
var completion = new[] { JCompletion(glyphService, "*", "Import all members from the module", StandardGlyphGroup.GlyphArrow) };
completions = completions.Concat(completion);
}
var res = new FuzzyCompletionSet("JFromImports", "J", Span, completions, _options, CompletionComparer.UnderscoresLast);
var end = _stopwatch.ElapsedMilliseconds;
if (/*Logging &&*/ end - start > TooMuchTime) {
Trace.WriteLine(String.Format("{0} lookup time {1} for {2} imports", this, end - start, res.Completions.Count));
}
return res;
}
示例3: SymbolGlyphDeferredContent
public SymbolGlyphDeferredContent(Glyph glyph, IGlyphService glyphService)
{
Contract.ThrowIfNull(glyphService);
_glyph = glyph;
_glyphService = glyphService;
}
示例4: PyCompletion
/// <summary>
/// Constructor used by IPy declarations retrieved from the IPy engine
/// </summary>
internal PyCompletion(Declaration declaration, IGlyphService glyphService)
: base(declaration.Title)
{
this.InsertionText = declaration.Title;
this.Description = declaration.Description;
this.IconSource = glyphService.GetGlyph(GetGroupFromDeclaration(declaration), GetScopeFromDeclaration(declaration));
}
示例5: XmlResourceCompletionSource
/// <summary>
/// Default ctor
/// </summary>
protected XmlResourceCompletionSource(ITextBuffer textBuffer, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService vsEditorAdaptersFactoryService, IGlyphService glyphService)
{
this.textBuffer = textBuffer;
this.serviceProvider = serviceProvider;
this.vsEditorAdaptersFactoryService = vsEditorAdaptersFactoryService;
this.glyphService = glyphService;
}
示例6: RegistryCompletionSource
public RegistryCompletionSource(ITextBuffer buffer, IGlyphService glyphService)
{
_buffer = buffer;
_versionGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphKeyword, StandardGlyphItem.GlyphItemPublic);
_keyGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphClosedFolder, StandardGlyphItem.GlyphItemPublic);
_dataTypeGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupStruct, StandardGlyphItem.GlyphItemPublic);
}
示例7: GetCompletions
public override CompletionSet GetCompletions(IGlyphService glyphService) {
var start = _stopwatch.ElapsedMilliseconds;
var analysis = GetAnalysisEntry();
if (analysis == null) {
return null;
}
var index = VsProjectAnalyzer.TranslateIndex(
Span.GetEndPoint(TextBuffer.CurrentSnapshot).Position,
TextBuffer.CurrentSnapshot,
analysis
);
var completions = analysis.GetAllAvailableMembers(index, GetMemberOptions.None)
.Where(IsExceptionType)
.Select(member => PythonCompletion(glyphService, member))
.OrderBy(completion => completion.DisplayText);
var res = new FuzzyCompletionSet("PythonExceptions", "Python", Span, completions, _options, CompletionComparer.UnderscoresLast);
var end = _stopwatch.ElapsedMilliseconds;
if (/*Logging &&*/ end - start > TooMuchTime) {
Trace.WriteLine(String.Format("{0} lookup time {1} for {2} classes", this, end - start, res.Completions.Count));
}
return res;
}
示例8: CSharpGraphProvider
public CSharpGraphProvider(
IGlyphService glyphService,
SVsServiceProvider serviceProvider,
IProgressionPrimaryWorkspaceProvider workspaceProvider,
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners) :
base(glyphService, serviceProvider, workspaceProvider.PrimaryWorkspace, asyncListeners)
{
}
示例9: JsCompletion
internal static DynamicallyVisibleCompletion JsCompletion(IGlyphService service, MemberResult memberResult, bool quote) {
return new DynamicallyVisibleCompletion(memberResult.Name,
GetInsertionQuote(quote, memberResult.Completion),
memberResult.Documentation,
service.GetGlyph(GetGlyphGroup(memberResult), StandardGlyphItem.GlyphItemPublic),
String.Empty
);
}
示例10: PythonCompletion
internal static DynamicallyVisibleCompletion PythonCompletion(IGlyphService service, MemberResult memberResult) {
return new DynamicallyVisibleCompletion(memberResult.Name,
memberResult.Completion,
() => memberResult.Documentation,
() => service.GetGlyph(memberResult.MemberType.ToGlyphGroup(), StandardGlyphItem.GlyphItemPublic),
Enum.GetName(typeof(PythonMemberType), memberResult.MemberType)
);
}
示例11: PkgdefCompletionSource
public PkgdefCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
{
_buffer = buffer;
_classifier = classifier.GetClassifier(buffer);
_navigator = navigator;
_glyphService = glyphService;
_defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
_snippetGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphCSharpExpansion, StandardGlyphItem.GlyphItemPublic);
}
示例12: CmdCompletionSource
public CmdCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, IGlyphService glyphService, ITextStructureNavigator textStructureNavigator)
{
_buffer = buffer;
_classifier = classifier.GetClassifier(buffer);
_keywordGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupVariable, StandardGlyphItem.GlyphItemPublic);
_environmentGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphAssembly, StandardGlyphItem.GlyphItemPublic);
_labelGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphArrow, StandardGlyphItem.GlyphItemPublic);
_textStructureNavigator = textStructureNavigator;
}
示例13: GetCompletions
public override CompletionSet GetCompletions(IGlyphService glyphService) {
var text = PrecedingExpression;
var completions = GetModules().Select(m => JsCompletion(glyphService, m, _quote));
var res = new FuzzyCompletionSet(CompletionSource.NodejsRequireCompletionSetMoniker, "Node.js", Span, completions, CompletionComparer.UnderscoresFirst, true);
return res;
}
示例14: SpringCompletion
internal SpringCompletion(IGlyphService glyphService, VsExpansion vsExpansion)
: base(vsExpansion.title)
{
this.DisplayText = vsExpansion.shortcut;
this.InsertionText = vsExpansion.title;
this.Description = vsExpansion.description;
this.IconSource = this.GetIconSource(glyphService, SpringCompletionType.Snippet);
this.VsExpansion = vsExpansion;
}
示例15: VsctCompletionSource
public VsctCompletionSource(ITextBuffer buffer, IClassifierAggregatorService classifier, ITextStructureNavigatorSelectorService navigator, IGlyphService glyphService)
{
_buffer = buffer;
_classifier = classifier.GetClassifier(buffer);
_navigator = navigator;
_glyphService = glyphService;
_defaultGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupField, StandardGlyphItem.GlyphItemPublic);
_builtInGlyph = glyphService.GetGlyph(StandardGlyphGroup.GlyphGroupProperty, StandardGlyphItem.TotalGlyphItems);
_imageService = ExtensibilityToolsPackage.GetGlobalService(typeof(SVsImageService)) as IVsImageService2;
}