public CurrentColumnAdornment( IWpfTextView view, IClassificationFormatMap formatMap, IClassificationType formatType, IVsfSettings settings) { this.view = view; this.formatMap = formatMap; this.formatType = formatType; this.settings = settings; this.columnRect = new Rectangle(); layer = view.GetAdornmentLayer(Constants.COLUMN_HIGHLIGHT); view.Caret.PositionChanged += OnCaretPositionChanged; view.ViewportWidthChanged += OnViewportChanged; view.ViewportHeightChanged += OnViewportChanged; view.LayoutChanged += OnViewLayoutChanged; view.TextViewModel.EditBuffer.PostChanged += OnBufferPostChanged; view.Closed += OnViewClosed; view.Options.OptionChanged += OnSettingsChanged; this.settings.SettingsChanged += OnSettingsChanged; formatMap.ClassificationFormatMappingChanged += OnClassificationFormatMappingChanged; CreateDrawingObjects(); }
public AutoExpander( IWpfTextView textView, IVsOutliningManager outlining, IVsfSettings settings) { this.settings = settings; this.theView = textView; this.outliningManager = outlining; this.expandMode = settings.AutoExpandRegions; this.theView.Closed += OnViewClosed; this.settings.SettingsChanged += OnSettingsChanged; if ( expandMode == AutoExpandMode.Disable ) { outlining.Enabled = false; } else if ( expandMode == AutoExpandMode.Expand ) { // in most cases, this is enough to // expand all outlining as necessary. // However, it does not appear to work // if the solution is just opened // so take notice of when regions are // collapsed and do it again just in case // Try expanding it when the window gets focus // as a last chance for Visual Basic this.theView.LayoutChanged += OnLayoutChanged; this.outliningManager.RegionsCollapsed += OnRegionsCollapsed; this.theView.GotAggregateFocus += OnGotFocus; } }
public CurrentLineAdornment( IWpfTextView view, IClassificationFormatMap formatMap, IClassificationType formatType, IVsfSettings settings) { this.view = view; this.formatMap = formatMap; this.formatType = formatType; this.settings = settings; this.layer = view.GetAdornmentLayer(Constants.LINE_HIGHLIGHT); this.lineRect = new Rectangle(); this.dispatcher = Dispatcher.CurrentDispatcher; view.Caret.PositionChanged += OnCaretPositionChanged; view.ViewportWidthChanged += OnViewportWidthChanged; view.LayoutChanged += OnLayoutChanged; view.ViewportLeftChanged += OnViewportLeftChanged; view.Closed += OnViewClosed; view.Options.OptionChanged += OnSettingsChanged; this.settings.SettingsChanged += OnSettingsChanged; formatMap.ClassificationFormatMappingChanged += OnClassificationFormatMappingChanged; CreateDrawingObjects(); }
public AutoExpander( IWpfTextView textView, IVsOutliningManager outlining, IVsfSettings settings) { this.settings = settings; this.theView = textView; this.outliningManager = outlining; this.expandMode = settings.AutoExpandRegions; this.theView.Closed += OnViewClosed; this.settings.SettingsChanged += OnSettingsChanged; if (this.expandMode == AutoExpandMode.Disable) { outlining.Enabled = false; } else if (this.expandMode == AutoExpandMode.Expand) { // in most cases, this is enough to // expand all outlining as necessary. // However, it does not appear to work // if the solution is just opened // so take notice of when regions are // collapsed and do it again just in case // Try expanding it when the window gets focus // as a last chance for Visual Basic this.theView.LayoutChanged += OnLayoutChanged; this.outliningManager.RegionsCollapsed += OnRegionsCollapsed; this.theView.GotAggregateFocus += OnGotFocus; } }
public DevMarginVisual(DevMarginViewModel model, IVsfSettings settings) : this() { this.Model = model; this.DataContext = Model; this.settings = settings; }
void OnViewClosed(object sender, EventArgs e) { if (this.settings != null) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if (this.view != null) { this.view.Options.OptionChanged -= OnSettingsChanged; this.view.Caret.PositionChanged -= OnCaretPositionChanged; this.view.ViewportWidthChanged -= OnViewportWidthChanged; this.view.LayoutChanged -= OnLayoutChanged; this.view.ViewportLeftChanged -= OnViewportLeftChanged; this.view.Closed -= OnViewClosed; this.view = null; } if (this.formatMap != null) { this.formatMap.ClassificationFormatMappingChanged -= OnClassificationFormatMappingChanged; this.formatMap = null; } this.layer = null; this.formatType = null; }
public CurrentColumnAdornment( IWpfTextView view, IClassificationFormatMap formatMap, IClassificationType formatType, IVsfSettings settings) { this.view = view; this.formatMap = formatMap; this.formatType = formatType; this.settings = settings; this.dispatcher = Dispatcher.CurrentDispatcher; this.highlight = new Border(); layer = view.GetAdornmentLayer(Constants.COLUMN_HIGHLIGHT); view.Caret.PositionChanged += OnCaretPositionChanged; view.ViewportWidthChanged += OnViewportChanged; view.ViewportHeightChanged += OnViewportChanged; view.LayoutChanged += OnViewLayoutChanged; view.TextViewModel.EditBuffer.PostChanged += OnBufferPostChanged; view.Closed += OnViewClosed; view.Options.OptionChanged += OnSettingsChanged; this.settings.SettingsChanged += OnSettingsChanged; formatMap.ClassificationFormatMappingChanged += OnClassificationFormatMappingChanged; CreateDrawingObjects(); }
private void Cleanup() { if (this.wpfTextViewHost != null) { this.wpfTextViewHost.Closed -= OnTextViewHostClosed; this.wpfTextViewHost = null; } if (this.textView != null) { this.textView.BufferGraph.GraphBuffersChanged -= OnGraphBuffersChanged; this.textView.BufferGraph.GraphBufferContentTypeChanged -= OnGraphBufferContentTypeChanged; this.textView.Caret.PositionChanged -= OnCaretPositionChanged; this.textView.TextViewModel.EditBuffer.PostChanged -= OnBufferPostChanged; this.textView = null; } if (this.visual != null) { this.visual.ViewBuffer -= OnViewBuffer; this.visual = null; } if (this.settings != null) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } this.extensionRegistry = null; }
public PresentationModeFontChanger(IPresentationModeState state) { this.packageState = state; this.enabled = false; this.settings = SettingsContext.GetSettings(); this.categories = GetCategories(); this.fontsAndColors = state.GetService<IVsFontAndColorStorage>(); }
public PresentationModeFontChanger(IPresentationModeState state) { this.packageState = state; this.enabled = false; this.settings = SettingsContext.GetSettings(); this.categories = GetCategories(); this.fontsAndColors = state.GetService <IVsFontAndColorStorage>(); }
public RainbowKeyProcessor(ITextView textView, IVsfSettings settings) { this.theView = textView; this.theView.LostAggregateFocus += OnLostFocus; this.theView.Closed += OnViewClosed; this.settings = settings; pressTime = TimeSpan.FromMilliseconds(settings.RainbowCtrlTimer); }
public BoldAsItalicsFormatter( IWpfTextView textView, IClassificationFormatMap map, IVsfSettings settings) { this.formatMap = map; this.settings = settings; textView.GotAggregateFocus += OnViewFocus; this.formatMap.ClassificationFormatMappingChanged += OnMappingChanged; }
public BoldAsItalicsFormatter( IWpfTextView textView, IClassificationFormatMap map, IVsfSettings settings) { this.formatMap = map; this.settings = settings; textView.GotAggregateFocus += OnViewFocus; this.formatMap.ClassificationFormatMappingChanged += OnMappingChanged; }
public PlainTextCompletionSource( ITextBuffer buffer, ITextStructureNavigator structureNavigator, IVsfSettings settings) { this.theBuffer = buffer; this.navigator = structureNavigator; this.settings = settings; glyphIcon = new BitmapImage(new Uri("pack://application:,,,/Winterdom.Viasfora;component/Resources/PlainTextCompletion.ico")); }
public PlainTextCompletionSource( ITextBuffer buffer, ITextStructureNavigator structureNavigator, IVsfSettings settings) { this.theBuffer = buffer; this.navigator = structureNavigator; this.settings = settings; glyphIcon = new BitmapImage(new Uri("pack://application:,,,/Winterdom.Viasfora;component/Resources/PlainTextCompletion.ico")); }
public PresentationMode(IWpfTextView textView, IVsfSettings settings) { this.theView = textView; this.settings = settings; VsfPackage.PresentationModeChanged += OnPresentationModeChanged; settings.SettingsChanged += OnSettingsChanged; textView.Closed += OnTextViewClosed; textView.ViewportWidthChanged += OnViewportWidthChanged; }
private void OnViewClosed(object sender, EventArgs e) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; this.outliningManager.RegionsCollapsed -= OnRegionsCollapsed; this.theView.LayoutChanged -= OnLayoutChanged; this.theView.GotAggregateFocus -= OnGotFocus; this.theView.Closed -= OnViewClosed; this.theView = null; this.outliningManager = null; }
public PresentationMode(IWpfTextView textView, IPresentationModeState state, IVsfSettings settings) { this.theView = textView; this.settings = settings; this.state = state; state.PresentationModeChanged += OnPresentationModeChanged; settings.SettingsChanged += OnSettingsChanged; textView.Closed += OnTextViewClosed; textView.ViewportWidthChanged += OnViewportWidthChanged; }
void OnTextViewClosed(object sender, EventArgs e) { if ( this.settings != null ) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if ( theView != null ) { VsfPackage.PresentationModeChanged -= OnPresentationModeChanged; theView.Closed -= OnTextViewClosed; theView.ViewportWidthChanged -= OnViewportWidthChanged; theView = null; } }
public PlainTextCompletionSource( ITextBuffer buffer, ITextStructureNavigator structureNavigator, IVsfSettings settings) { this.theBuffer = buffer; this.navigator = structureNavigator; this.settings = settings; String assemblyName = this.GetType().Assembly.GetName().Name; glyphIcon = new BitmapImage(new Uri(String.Format( "pack://application:,,,/{0};component/Resources/PlainTextCompletion.ico", assemblyName))); }
public ItalicsFormatter(ITextView textView, IClassificationFormatMap map, IVsfSettings settings) { this.textView = textView; this.formatMap = map; this.settings = settings; this.working = false; this.classificationTypes = new List <String>(); this.settings.SettingsChanged += OnSettingsChanged; this.formatMap.ClassificationFormatMappingChanged += OnMappingChanged; // Delay activating until after the textView // gets focus. Otherwise, VS may crash/hang this.textView.GotAggregateFocus += OnTextViewFocus; }
public void Dispose() { if (settings != null) { settings.SettingsChanged -= OnSettingsChanged; settings = null; } if (aggregator != null) { aggregator.Dispose(); aggregator = null; } theBuffer = null; }
public void Dispose() { if (this.settings != null) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if (this.aggregator != null) { this.aggregator.Dispose(); this.aggregator = null; } this.theBuffer = null; }
public PlainTextCompletionSource( ITextBuffer buffer, ITextStructureNavigator structureNavigator, IVsfSettings settings) { this.theBuffer = buffer; this.navigator = structureNavigator; this.settings = settings; String assemblyName = this.GetType().Assembly.GetName().Name; glyphIcon = new BitmapImage(new Uri(String.Format( "pack://application:,,,/{0};component/Resources/PlainTextCompletion.ico", assemblyName))); }
void OnTextViewClosed(object sender, EventArgs e) { if (this.settings != null) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if (theView != null) { state.PresentationModeChanged -= OnPresentationModeChanged; theView.Closed -= OnTextViewClosed; theView.ViewportWidthChanged -= OnViewportWidthChanged; theView = null; } }
#pragma warning restore 67 internal KeywordTagger(ITextBuffer buffer, KeywordTaggerProvider provider) { theBuffer = buffer; this.aggregator = provider.Aggregator.CreateTagAggregator <IClassificationTag>(buffer); this.langFactory = provider.LanguageFactory; keywordClassification = provider.GetTag(Constants.KEYWORD_CLASSIF_NAME); linqClassification = provider.GetTag(Constants.LINQ_CLASSIF_NAME); visClassification = provider.GetTag(Constants.VISIBILITY_CLASSIF_NAME); stringEscapeClassification = provider.GetTag(Constants.STRING_ESCAPE_CLASSIF_NAME); formatSpecClassification = provider.GetTag(Constants.FORMAT_SPECIFIER_NAME); this.settings = provider.Settings; this.settings.SettingsChanged += this.OnSettingsChanged; }
private void OnViewClosed(object sender, EventArgs e) { if (this.settings != null) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if (this.theView != null) { this.theView.Closed -= OnViewClosed; TextObfuscationState.EnabledChanged -= OnEnabledChanged; this.theView = null; this.theBuffer = null; this.obfuscationType = null; this.expressionsToSearch = null; } }
public TextObfuscationTagger( ITextView view, ITextBuffer buffer, IClassificationType obfuscationType, IVsfSettings settings) { this.theView = view; this.theBuffer = buffer; this.obfuscationType = obfuscationType; this.enabled = TextObfuscationState.Enabled; this.settings = settings; this.expressionsToSearch = settings.TextObfuscationRegexes.ListFromJson <RegexEntry>(); this.settings.SettingsChanged += OnSettingsChanged; TextObfuscationState.EnabledChanged += OnEnabledChanged; this.theView.Closed += OnViewClosed; }
public DevViewMargin(IWpfTextViewHost wpfTextViewHost, IFileExtensionRegistryService fers, IVsfSettings settings) { this.model = new DevMarginViewModel(); this.wpfTextViewHost = wpfTextViewHost; this.extensionRegistry = fers; this.settings = settings; this.settings.SettingsChanged += OnSettingsChanged; this.wpfTextViewHost.Closed += OnTextViewHostClosed; this.visual = new DevMarginVisual(this.model, settings); this.visual.ViewBuffer += OnViewBuffer; UpdateVisibility(); InitializeTextView(); RefreshBufferGraphList(); this.model.RefreshView(wpfTextViewHost.TextView); }
public DevViewMargin(IWpfTextViewHost wpfTextViewHost, IFileExtensionRegistryService fers, IVsfSettings settings) { model = new DevMarginViewModel(); this.wpfTextViewHost = wpfTextViewHost; this.extensionRegistry = fers; this.settings = settings; this.settings.SettingsChanged += OnSettingsChanged; this.wpfTextViewHost.Closed += OnTextViewHostClosed; this.visual = new DevMarginVisual(model, settings); this.visual.ViewBuffer += OnViewBuffer; UpdateVisibility(); InitializeTextView(); RefreshBufferGraphList(); this.model.RefreshView(wpfTextViewHost.TextView); }
public CurrentLineAdornment( IWpfTextView view, IClassificationFormatMap formatMap, IClassificationType formatType, IVsfSettings settings) { this.view = view; this.formatMap = formatMap; this.formatType = formatType; this.settings = settings; this.layer = view.GetAdornmentLayer(Constants.LINE_HIGHLIGHT); this.lineRect = new Rectangle(); view.Caret.PositionChanged += OnCaretPositionChanged; view.ViewportWidthChanged += OnViewportWidthChanged; view.LayoutChanged += OnLayoutChanged; view.ViewportLeftChanged += OnViewportLeftChanged; view.Closed += OnViewClosed; view.Options.OptionChanged += OnSettingsChanged; this.settings.SettingsChanged += OnSettingsChanged; formatMap.ClassificationFormatMappingChanged += OnClassificationFormatMappingChanged; CreateDrawingObjects(); }
private void Cleanup() { if ( this.wpfTextViewHost != null ) { this.wpfTextViewHost.Closed -= OnTextViewHostClosed; this.wpfTextViewHost = null; } if ( this.textView != null ) { this.textView.BufferGraph.GraphBuffersChanged -= OnGraphBuffersChanged; this.textView.BufferGraph.GraphBufferContentTypeChanged -= OnGraphBufferContentTypeChanged; this.textView.Caret.PositionChanged -= OnCaretPositionChanged; this.textView.TextViewModel.EditBuffer.PostChanged -= OnBufferPostChanged; this.textView = null; } if ( this.visual != null ) { this.visual.ViewBuffer -= OnViewBuffer; this.visual = null; } if ( this.settings != null ) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } this.extensionRegistry = null; }
public XmlSettings(IVsfSettings settings) { this.settings = settings; this.settings.SettingsChanged += OnSettingsChanged; }
public LanguageInfo(IVsfSettings settings) { this.Settings = settings; }
public Sql(IVsfSettings settings) : base(settings) { }
public CSharp(IVsfSettings settings) : base(settings) { }
public TypeScript(IVsfSettings settings) : base(settings) { }
public Cpp(IVsfSettings settings) : base(settings) { }
public RainbowSettings(IVsfSettings settings) { this.settings = settings; this.settings.SettingsChanged += OnSettingsChanged; }
public DefaultLanguage(IVsfSettings settings) : base(settings) { }
public PowerShell(IVsfSettings settings) : base(settings) { }
public LanguageFactory(IVsfSettings settings) { this.defaultLang = new DefaultLanguage(settings); }
public XmlSettings(IVsfSettings settings) { this.settings = settings; this.settings.SettingsChanged += OnSettingsChanged; }
public R(IVsfSettings settings) : base(settings) { }
public LanguageFactory(IVsfSettings settings) { this.defaultLang = new DefaultLanguage(settings); }
public DefaultLanguage(IVsfSettings settings) : base(settings) { }
public Sql(IVsfSettings settings) : base(settings) { }
public JScript(IVsfSettings settings) : base(settings) { }
public JSON(IVsfSettings settings) : base(settings) { }
public Cpp(IVsfSettings settings) : base(settings) { }
public Python(IVsfSettings settings) : base(settings) { }
void OnViewClosed(object sender, EventArgs e) { if ( this.settings != null ) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; } if ( this.view != null ) { view.Options.OptionChanged -= OnSettingsChanged; view.Caret.PositionChanged -= OnCaretPositionChanged; view.ViewportWidthChanged -= OnViewportWidthChanged; view.LayoutChanged -= OnLayoutChanged; view.ViewportLeftChanged -= OnViewportLeftChanged; view.Closed -= OnViewClosed; view = null; } if ( formatMap != null ) { formatMap.ClassificationFormatMappingChanged -= OnClassificationFormatMappingChanged; formatMap = null; } layer = null; formatType = null; }
public FSharp(IVsfSettings settings) : base(settings) { }
public Python(IVsfSettings settings) : base(settings) { }
public VB(IVsfSettings settings) : base(settings) { }
public Css(IVsfSettings settings) : base(settings) { }
private void OnViewClosed(object sender, EventArgs e) { this.settings.SettingsChanged -= OnSettingsChanged; this.settings = null; this.outliningManager.RegionsCollapsed -= OnRegionsCollapsed; this.theView.LayoutChanged -= OnLayoutChanged; this.theView.GotAggregateFocus -= OnGotFocus; this.theView.Closed -= OnViewClosed; this.theView = null; this.outliningManager = null; }