mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-15953 make LanguageLevelProjectExtension.{getDefault and setDefault} abstract
to ease migration to the workspace model: it is convenient when the LanguageLevelProjectExtensionImpl state (LanguageLevel + isDefault) is stored in one single place (in contrast to being distributed through the class hierarchy). GitOrigin-RevId: b2ff3c4b0e55b4b9b53a8eb45981507527825c34
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1a7a0eefd9
commit
93d4213af7
+4
-9
@@ -26,22 +26,17 @@ public abstract class LanguageLevelProjectExtension {
|
||||
|
||||
public abstract void setLanguageLevel(@NotNull LanguageLevel languageLevel);
|
||||
|
||||
private Boolean myDefault;
|
||||
|
||||
/**
|
||||
* Auto-detect language level from project JDK maximum possible level.
|
||||
* @return null if the property is not set yet (e.g. after migration).
|
||||
*/
|
||||
public @Nullable Boolean getDefault() {
|
||||
return myDefault;
|
||||
}
|
||||
public abstract @Nullable Boolean getDefault();
|
||||
|
||||
public void setDefault(@Nullable Boolean value) {
|
||||
myDefault = value;
|
||||
}
|
||||
public abstract void setDefault(@Nullable Boolean value);
|
||||
|
||||
public boolean isDefault() {
|
||||
return myDefault != null && myDefault;
|
||||
Boolean currentValue = getDefault();
|
||||
return currentValue != null && currentValue;
|
||||
}
|
||||
|
||||
public void languageLevelsChanged() {
|
||||
|
||||
Reference in New Issue
Block a user