public class AcceptedLanguageLevelsSettings extends java.lang.Object implements PersistentStateComponent<AcceptedLanguageLevelsSettings>, StartupActivity
StartupActivity.Background, StartupActivity.DumbAware
Modifier and Type | Field and Description |
---|---|
java.util.List<java.lang.String> |
acceptedNames |
BACKGROUND_POST_STARTUP_ACTIVITY, POST_STARTUP_ACTIVITY
Constructor and Description |
---|
AcceptedLanguageLevelsSettings() |
Modifier and Type | Method and Description |
---|---|
static void |
allowLevel(Disposable parentDisposable,
LanguageLevel level) |
static LanguageLevel |
checkAccepted(java.awt.Component parent,
LanguageLevel level)
Shows a legal notice dialog and downgrades to the highest accepted level if the dialog is rejected.
|
static LanguageLevel |
getHighestAcceptedLevel() |
AcceptedLanguageLevelsSettings |
getState() |
static boolean |
isLanguageLevelAccepted(LanguageLevel languageLevel) |
void |
loadState(AcceptedLanguageLevelsSettings state)
This method is called when new component state is loaded.
|
void |
runActivity(Project project) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeComponent, noStateLoaded
public void runActivity(Project project)
runActivity
in interface StartupActivity
public static boolean isLanguageLevelAccepted(LanguageLevel languageLevel)
public static LanguageLevel getHighestAcceptedLevel()
public AcceptedLanguageLevelsSettings getState()
getState
in interface PersistentStateComponent<AcceptedLanguageLevelsSettings>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(AcceptedLanguageLevelsSettings state)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<AcceptedLanguageLevelsSettings>
state
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public static LanguageLevel checkAccepted(java.awt.Component parent, LanguageLevel level)
null
if level was rejectedpublic static void allowLevel(Disposable parentDisposable, LanguageLevel level)