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();
        }
        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()));
        }
Exemple #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();
        }
 internal static string Usual(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("USUAL");
 internal static string Parameter(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("PARAMETER");
 internal static string Local(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("LOCAL");
 internal static string Global(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("GLOBAL");
 internal static string Define(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("DEFINE");
 internal static string Static(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("STATIC");
Exemple #10
0
 internal static string As(this OptionsPages.IntellisenseOptionsPage page) => page.formatKeyword("AS ");
Exemple #11
0
 internal static string formatKeyword(this OptionsPages.IntellisenseOptionsPage page, string keyword)
 {
     return(page.SyncKeyword(keyword));
 }
Exemple #12
0
 internal static string formatKeyword(this OptionsPages.IntellisenseOptionsPage page, Kind keyword)
 {
     return(page.formatKeyword(keyword.ToString()));
 }