Пример #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()));
 }