mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
+getShadowInstance
This commit is contained in:
@@ -154,6 +154,15 @@ public class UISettings implements PersistentStateComponent<UISettings>, Exporta
|
||||
return ApplicationManager.getApplication().getComponent(UISettings.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method if you are not sure is application initialized or not
|
||||
* @return UISettings instance or default values
|
||||
*/
|
||||
public static UISettings getShadowInstance() {
|
||||
UISettings instance = getInstance();
|
||||
return instance == null ? new UISettings() : instance;
|
||||
}
|
||||
|
||||
public void removeUISettingsListener(UISettingsListener listener){
|
||||
myListenerList.remove(UISettingsListener.class,listener);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user