示例#1
0
        public XSharpQuickInfoSource(XSharpQuickInfoSourceProvider provider, ITextBuffer subjectBuffer, IClassificationFormatMapService formatMap, IClassificationTypeRegistryService registry)
        {
            _provider      = provider;
            _subjectBuffer = subjectBuffer;
            _file          = _subjectBuffer.GetFile();
            _formatMap     = formatMap;
            _registry      = registry;
            var package = XSharpProjectPackage.Instance;

            _optionsPage = package.GetIntellisenseOptionsPage();
        }
示例#2
0
        internal static string formatKeyword(this OptionsPages.IntellisenseOptionsPage page, Kind keyword)
        {
            switch (keyword)
            {
            case Kind.VODefine:
                return(page.formatKeyword("define"));

            case Kind.VOGlobal:
                return(page.formatKeyword("global"));

            case Kind.VODLL:
                return(page.formatKeyword("_dll function"));
            }
            return(page.formatKeyword(keyword.ToString()));
        }
示例#3
0
        public XSharpSmartIndent(ITextView view, IBufferTagAggregatorFactoryService aggregator)
        {
            _textView        = view;
            _aggregator      = aggregator;
            _lastIndentValue = 0;
            _options         = _textView.Options;
            // this does not fire when Smartindent option is changed
            _options.OptionChanged += Options_OptionChanged;
            _options.GlobalOptions.OptionChanged += Options_OptionChanged;
            var package = XSharp.Project.XSharpProjectPackage.Instance;

            _textManager = package.GetTextManager();
            _optionsPage = package.GetIntellisenseOptionsPage();
            getOptions();
            getKeywords();
        }
示例#4
0
 internal static string Usual(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("USUAL");
示例#5
0
 internal static string Parameter(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("PARAMETER");
示例#6
0
 internal static string Local(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("LOCAL");
示例#7
0
 internal static string Global(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("GLOBAL");
示例#8
0
 internal static string Define(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("DEFINE");
示例#9
0
 internal static string Static(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("STATIC");
示例#10
0
 internal static string As(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("AS ");
示例#11
0
 internal static string formatKeyword(this OptionsPages.IntellisenseOptionsPage page, string keyword)
 {
     return(page.SyncKeyword(keyword));
 }
示例#12
0
 internal static string formatKeyword(this OptionsPages.IntellisenseOptionsPage page, Kind keyword)
 {
     return(page.formatKeyword(keyword.ToString()));
 }