public static IEnumerable <INavigationToken> GetInstructionsByName(this IInstructionListManager instructionList, AsmType asmType, string instruction) { var instructions = instructionList.GetSelectedSetInstructions(asmType); return(instructions .Where(i => i.Text == instruction) .SelectMany(i => i.Navigations)); }
public SignatureHelpSource(IDocumentAnalysis documentAnalysis, IInstructionListManager instructionListManager, ITextBuffer textBuffer, SignatureConfig signatureConfig) { _documentAnalysis = documentAnalysis; _instructionListManager = instructionListManager; _textBuffer = textBuffer; _signatureConfig = signatureConfig; }
public CodeDocument(ITextDocumentFactoryService textDocumentFactory, IInstructionListManager instructionListManager, ITextDocument textDocument, ILexer lexer, IParser parser, OnDestroyAction onDestroy) : base(textDocumentFactory, textDocument, lexer, parser, onDestroy) { _instructionListManager = instructionListManager; _instructionListManager.InstructionsUpdated += InstructionsUpdated; }
public static void UpdateInstructions(IInstructionListManager sender, AsmType asmType) { const AsmType currentAsmType = AsmType.RadAsm2; if ((asmType & currentAsmType) != currentAsmType) { return; } UpdateInstructions(sender, currentAsmType, ref Instructions, ref OtherInstructions); }
public CompletionSourceProvider(IInstructionListManager instructionListManager, IIntellisenseDescriptionBuilder descriptionBuilder, IDocumentFactory documentFactory, INavigationTokenService navigationTokenService) { _descriptionBuilder = descriptionBuilder; _documentFactory = documentFactory; var optionProvider = GeneralOptionProvider.Instance; _providers = new List <RadCompletionProvider>() { new InstructionCompletionProvider(optionProvider, instructionListManager), new FunctionCompletionProvider(optionProvider, navigationTokenService), new ScopedCompletionProvider(optionProvider, navigationTokenService), }; }
private void InstructionsUpdated(IInstructionListManager sender, AsmType asmType) { if ((asmType & AsmType.RadAsm) != 0) { _asm1InstructionCompletions.Clear(); _asm1InstructionCompletions.AddRange( sender.GetSelectedSetInstructions(AsmType.RadAsm) .GroupBy(i => i.Text) .Select(g => new InstructionCompletionItem(g, g.Key, Icon)) ); } if ((asmType & AsmType.RadAsm2) != 0) { _asm2InstructionCompletions.Clear(); _asm2InstructionCompletions.AddRange( sender.GetSelectedSetInstructions(AsmType.RadAsm2) .GroupBy(i => i.Text) .Select(g => new InstructionCompletionItem(g, g.Key, Icon)) ); } }
public NavigationTokenService(IDocumentFactory documentFactory, IInstructionListManager instructionListManager) { _documentFactory = documentFactory; _instructionListManager = instructionListManager; }
public SignatureHelpSourceProvider(IDocumentFactory documentFactory, IInstructionListManager instructionListManager) { _documentFactory = documentFactory; _instructionListManager = instructionListManager; }
private void InstructionsUpdated(IInstructionListManager sender, Helpers.AsmType asmType) => DocumentAnalysis.Rescan(RescanReason.InstructionsChanged, UpdateCancellation());
public InstructionCompletionProvider(GeneralOptionProvider generalOptionProvider, IInstructionListManager instructionListManager) : base(generalOptionProvider) { _autocomplete = generalOptionProvider.AutocompleteInstructions; _asm1InstructionCompletions = new List <InstructionCompletionItem>(); _asm2InstructionCompletions = new List <InstructionCompletionItem>(); instructionListManager.InstructionsUpdated += InstructionsUpdated; InstructionsUpdated(instructionListManager, AsmType.RadAsmCode); }