mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Update breadcrumbs on actual options changes
This commit is contained in:
@@ -137,10 +137,10 @@ public class BreadcrumbsLoaderComponent extends AbstractProjectComponent {
|
||||
|
||||
private static void removeBreadcrumbs(@NotNull FileEditorManager fileEditorManager, @NotNull VirtualFile file) {
|
||||
final FileEditor[] fileEditors = fileEditorManager.getAllEditors(file);
|
||||
for (final FileEditor fileEditor : fileEditors) {
|
||||
for (FileEditor fileEditor : fileEditors) {
|
||||
if (fileEditor instanceof TextEditor) {
|
||||
Editor editor = ((TextEditor)fileEditor).getEditor();
|
||||
final BreadcrumbsXmlWrapper wrapper = BreadcrumbsXmlWrapper.getBreadcrumbsComponent(editor);
|
||||
BreadcrumbsXmlWrapper wrapper = BreadcrumbsXmlWrapper.getBreadcrumbsComponent(editor);
|
||||
if (wrapper != null) {
|
||||
disposeWrapper(fileEditorManager, fileEditor, wrapper);
|
||||
}
|
||||
|
||||
+8
-2
@@ -60,8 +60,11 @@ public class WebEditorOptions implements PersistentStateComponent<WebEditorOptio
|
||||
}
|
||||
|
||||
public void setBreadcrumbsEnabled(boolean b) {
|
||||
boolean oldValue = myBreadcrumbsEnabled;
|
||||
myBreadcrumbsEnabled = b;
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(WEB_EDITOR_OPTIONS).breadcrumbsOptionsChanged(this);
|
||||
if (oldValue != b) {
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(WEB_EDITOR_OPTIONS).breadcrumbsOptionsChanged(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isBreadcrumbsEnabledInXml() {
|
||||
@@ -69,8 +72,11 @@ public class WebEditorOptions implements PersistentStateComponent<WebEditorOptio
|
||||
}
|
||||
|
||||
public void setBreadcrumbsEnabledInXml(boolean b) {
|
||||
boolean oldValue = myBreadcrumbsEnabledInXml;
|
||||
myBreadcrumbsEnabledInXml = b;
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(WEB_EDITOR_OPTIONS).breadcrumbsOptionsChanged(this);
|
||||
if (oldValue != b) {
|
||||
ApplicationManager.getApplication().getMessageBus().syncPublisher(WEB_EDITOR_OPTIONS).breadcrumbsOptionsChanged(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isShowCssInlineColorPreview() {
|
||||
|
||||
Reference in New Issue
Block a user