public AttributeScopeTagger(ITextBuffer buffer, SQLanguageService service, IClassificationTypeRegistryService typeService, IClassifierAggregatorService classifierAggregator) { _classifierAggregator = classifierAggregator; var classificationType = typeService.GetClassificationType(SQAtrributeFormat); _attribtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.Comment); _commenttag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.String); _stringtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("class name"); _classtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("enum name"); _enumtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.SymbolReference); _subnametag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("number"); _numberictag = new ClassificationTag(classificationType); _languangeService = service; _buffer = buffer; //this.snapshot = buffer.CurrentSnapshot; filepath = SQLanguageService.GetFileName(buffer); }
public AttributeScopeTagger(ITextSearchService textSearchService, ITextStructureNavigatorSelectorService textStructureNavigatorSelector, ITextBuffer buffer, SQLanguageService service, IClassificationTypeRegistryService typeService, IClassifierAggregatorService classifierAggregator) { if (_attribtag == null) { _classifierAggregator = classifierAggregator; var classificationType = typeService.GetClassificationType(SQAtrributeFormat); _attribtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.Comment); _commenttag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.String); _stringtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("class name"); _classtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("enum name"); _enumtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.SymbolReference); _subnametag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("number"); _numberictag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("keyword"); _keywordtag = new ClassificationTag(classificationType); } _languangeService = service; _textStructureNavigatorSelector = textStructureNavigatorSelector; _buffer = buffer; _textSearchService = textSearchService; filepath = SQLanguageService.GetFileName(buffer); _buffer.Changed -= _buffer_Changed; _buffer.Changed += _buffer_Changed; }
public AttributeScopeTagger(ITextSearchService textSearchService, ITextStructureNavigatorSelectorService textStructureNavigatorSelector, ITextBuffer buffer, SQLanguageService service, IClassificationTypeRegistryService typeService, IClassifierAggregatorService classifierAggregator) { _classifierAggregator = classifierAggregator; var classificationType = typeService.GetClassificationType(SQAtrributeFormat); _attribtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.Comment); _commenttag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.String); _stringtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("class name"); _classtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("enum name"); _enumtag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType(PredefinedClassificationTypeNames.SymbolReference); _subnametag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("number"); _numberictag = new ClassificationTag(classificationType); classificationType = typeService.GetClassificationType("keyword"); _keywordtag = new ClassificationTag(classificationType); _sqTypes = new Dictionary <string, SQTokenTypes>(); _sqTypes["function"] = SQTokenTypes.ReservedWords; _sqTypes["return"] = SQTokenTypes.ReservedWords; _sqTypes["extends"] = SQTokenTypes.ReservedWords; _sqTypes["require"] = SQTokenTypes.ReservedWords; _sqTypes["constructor"] = SQTokenTypes.ReservedWords; _sqTypes["local"] = SQTokenTypes.ReservedWords; _sqTypes["base"] = SQTokenTypes.ReservedWords; _sqTypes["bindenv"] = SQTokenTypes.ReservedWords; _sqTypes["weakref"] = SQTokenTypes.ReservedWords; _sqTypes["null"] = SQTokenTypes.ReservedWords; _sqTypes["class"] = SQTokenTypes.ReservedWords; _sqTypes["if"] = SQTokenTypes.ReservedWords; _sqTypes["else"] = SQTokenTypes.ReservedWords; _sqTypes["while"] = SQTokenTypes.ReservedWords; _sqTypes["do"] = SQTokenTypes.ReservedWords; _sqTypes["switch"] = SQTokenTypes.ReservedWords; _sqTypes["case"] = SQTokenTypes.ReservedWords; _sqTypes["default"] = SQTokenTypes.ReservedWords; _sqTypes["delete"] = SQTokenTypes.ReservedWords; _sqTypes["break;"] = SQTokenTypes.ReservedWords; _sqTypes["assert"] = SQTokenTypes.ReservedWords; _sqTypes["for"] = SQTokenTypes.ReservedWords; _sqTypes["this"] = SQTokenTypes.ReservedWords; _sqTypes["in"] = SQTokenTypes.ReservedWords; _sqTypes["foreach"] = SQTokenTypes.ReservedWords; _sqTypes["clone"] = SQTokenTypes.ReservedWords; _sqTypes["true"] = SQTokenTypes.ReservedWords; _sqTypes["false"] = SQTokenTypes.ReservedWords; _sqTypes["try"] = SQTokenTypes.ReservedWords; _sqTypes["catch"] = SQTokenTypes.ReservedWords; _sqTypes["enum"] = SQTokenTypes.ReservedWords; _sqTypes["const"] = SQTokenTypes.ReservedWords; _sqTypes["print"] = SQTokenTypes.ReservedWords; _sqTypes["yield"] = SQTokenTypes.ReservedWords; _sqTypes["continue"] = SQTokenTypes.ReservedWords; _sqTypes["resume"] = SQTokenTypes.ReservedWords; _sqTypes["throw"] = SQTokenTypes.ReservedWords; _sqTypes["static"] = SQTokenTypes.ReservedWords; _sqTypes["instanceof"] = SQTokenTypes.ReservedWords; _sqTypes["typeof"] = SQTokenTypes.ReservedWords; _sqTypes["@"] = SQTokenTypes.ReservedWords; _languangeService = service; _textStructureNavigatorSelector = textStructureNavigatorSelector; _buffer = buffer; _textSearchService = textSearchService; //this.snapshot = buffer.CurrentSnapshot; filepath = SQLanguageService.GetFileName(buffer); }