private void ProcessOnIdle() { foreach (var view in TextViews) { JavaEditor javaEditor = null; if (view.Properties.TryGetProperty <JavaEditor>(typeof(JavaEditor), out javaEditor)) { javaEditor.Update(view.TextSnapshot); javaEditor.RunIdleLoop(); } } }
void textView_GotAggregateFocus(object sender, EventArgs e) { var textView = sender as IWpfTextView; JavaEditor javaEditor = null; JavaUnconfiguredEditor javaUnconfiguredEditor = null; if (textView.Properties.TryGetProperty <JavaEditor>(typeof(JavaEditor), out javaEditor)) { // Force an update in case something changed in the configuration since the last time we opened the file in the editor javaEditor.Update(textView.TextSnapshot, true); } else if (textView.Properties.TryGetProperty <JavaUnconfiguredEditor>(typeof(JavaUnconfiguredEditor), out javaUnconfiguredEditor)) { javaUnconfiguredEditor.Update(); } }