示例#1
0
        private SortedSet <Completion> Label_Completions()
        {
            SortedSet <Completion> completions  = new SortedSet <Completion>(new CompletionComparer());
            ImageSource            imageSource  = this._icons[AsmTokenType.Label];
            AssemblerEnum          usedAssember = AsmDudeToolsStatic.Used_Assembler;

            SortedDictionary <string, string> labels = this._labelGraph.Get_Label_Descriptions;

            foreach (KeyValuePair <string, string> entry in labels)
            {
                //Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO:{0}:AugmentCompletionSession; label={1}; description={2}", this.ToString(), entry.Key, entry.Value));
                string displayText   = entry.Key + " - " + entry.Value;
                string insertionText = AsmDudeToolsStatic.Retrieve_Regular_Label(entry.Key, usedAssember);
                completions.Add(new Completion(displayText, insertionText, null, imageSource, ""));
            }
            return(completions);
        }
示例#2
0
        private IEnumerable <Completion> Label_Completions(bool useCapitals, bool addSpecialKeywords)
        {
            if (addSpecialKeywords)
            {
                yield return(new Completion("SHORT", useCapitals ? "SHORT" : "short", null, this.icons_[AsmTokenType.Misc], string.Empty));

                yield return(new Completion("NEAR", useCapitals ? "NEAR" : "near", null, this.icons_[AsmTokenType.Misc], string.Empty));
            }

            ImageSource   imageSource  = this.icons_[AsmTokenType.Label];
            AssemblerEnum usedAssember = AsmDudeToolsStatic.Used_Assembler;

            SortedDictionary <string, string> labels = this.labelGraph_.Label_Descriptions;

            foreach (KeyValuePair <string, string> entry in labels)
            {
                //Debug.WriteLine(string.Format(CultureInfo.CurrentCulture, "INFO:{0}:AugmentCompletionSession; label={1}; description={2}", this.ToString(), entry.Key, entry.Value));
                string displayTextFull = entry.Key + " - " + entry.Value;
                string displayText     = Truncat(displayTextFull);
                string insertionText   = AsmDudeToolsStatic.Retrieve_Regular_Label(entry.Key, usedAssember);
                yield return(new Completion(displayText, insertionText, displayTextFull, imageSource, string.Empty));
            }
        }