mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
Revert "IJ-CR-134196 [java-highlighting] IDEA-352727 Incomplete model with lombok"
This reverts commit 1c5fc12a0f4dd70c8899a807dc03925680c68ab9. GitOrigin-RevId: dd3bcd03cf5dd5d1b3ef8958805579283cbcca37
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7e047434f3
commit
41c184cc13
@@ -287,7 +287,7 @@ public final class HighlightControlFlowUtil {
|
|||||||
if (isFieldInitializedAfterObjectConstruction(field)) return null;
|
if (isFieldInitializedAfterObjectConstruction(field)) return null;
|
||||||
if (PsiUtilCore.hasErrorElementChild(field)) return null;
|
if (PsiUtilCore.hasErrorElementChild(field)) return null;
|
||||||
if (IncompleteModelUtil.isIncompleteModel(field) && IncompleteModelUtil.canBeAugmented(field.getContainingClass())) {
|
if (IncompleteModelUtil.isIncompleteModel(field) && IncompleteModelUtil.canBeAugmented(field.getContainingClass())) {
|
||||||
return IncompleteModelUtil.getPendingInitizializingHighlightInfo(field);
|
return IncompleteModelUtil.getPendingReferenceHighlightInfo(field);
|
||||||
}
|
}
|
||||||
String description = JavaErrorBundle.message("variable.not.initialized", field.getName());
|
String description = JavaErrorBundle.message("variable.not.initialized", field.getName());
|
||||||
TextRange range = HighlightNamesUtil.getFieldDeclarationTextRange(field);
|
TextRange range = HighlightNamesUtil.getFieldDeclarationTextRange(field);
|
||||||
|
|||||||
@@ -280,22 +280,13 @@ final class IncompleteModelUtil {
|
|||||||
.descriptionAndTooltip(JavaErrorBundle.message("incomplete.project.state.pending.reference"));
|
.descriptionAndTooltip(JavaErrorBundle.message("incomplete.project.state.pending.reference"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param elementToHighlight element to attach the highlighting
|
|
||||||
* @return HighlightInfo builder that adds a pending initizializing highlight
|
|
||||||
*/
|
|
||||||
static HighlightInfo.@NotNull Builder getPendingInitizializingHighlightInfo(@NotNull PsiElement elementToHighlight) {
|
|
||||||
return HighlightInfo.newHighlightInfo(HighlightInfoType.PENDING_REFERENCE).range(elementToHighlight)
|
|
||||||
.descriptionAndTooltip(JavaErrorBundle.message("incomplete.project.state.pending.initalizing"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static boolean canBeAugmented(@Nullable PsiClass targetClass) {
|
static boolean canBeAugmented(@Nullable PsiClass targetClass) {
|
||||||
if (targetClass == null) return false;
|
if (targetClass == null) return false;
|
||||||
return CachedValuesManager.getProjectPsiDependentCache(targetClass,
|
return CachedValuesManager.getProjectPsiDependentCache(targetClass,
|
||||||
psiClass -> PsiAugmentProvider.canBeAugmentedForIncompleteMode(psiClass));
|
psiClass -> PsiAugmentProvider.canBeAugmentedForIncompleteMode(psiClass));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean canBeUsedImportImplicitly(@Nullable PsiImportStatementBase importStatementBase) {
|
static boolean canBeUsedImportImplicitly(@Nullable PsiImportStatementBase importStatementBase) {
|
||||||
if (importStatementBase == null) return false;
|
if (importStatementBase == null) return false;
|
||||||
return PsiAugmentProvider.canBeUsedImportForIncompleteMode(importStatementBase);
|
return PsiAugmentProvider.canBeUsedImportForIncompleteMode(importStatementBase);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -597,5 +597,4 @@ error.implicit.class.has.invalid.file.name=Implicitly declared class's file name
|
|||||||
error.package.statement.not.allowed.for.implicit.class=Package statement is not allowed for implicitly declared class
|
error.package.statement.not.allowed.for.implicit.class=Package statement is not allowed for implicitly declared class
|
||||||
error.initializers.are.not.allowed.in.implicit.classes=Initializers are not allowed in implicitly declared classes
|
error.initializers.are.not.allowed.in.implicit.classes=Initializers are not allowed in implicitly declared classes
|
||||||
remove.unused.imports.quickfix.text=Remove unused imports
|
remove.unused.imports.quickfix.text=Remove unused imports
|
||||||
incomplete.project.state.pending.reference=Not resolved until the project is fully loaded
|
incomplete.project.state.pending.reference=Not resolved until the project is fully loaded
|
||||||
incomplete.project.state.pending.initalizing=Not initialized until the project is fully loaded
|
|
||||||
@@ -14,15 +14,15 @@ public final class LombokBasics {
|
|||||||
@<info descr="Not resolved until the project is fully loaded">Getter</info>
|
@<info descr="Not resolved until the project is fully loaded">Getter</info>
|
||||||
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
||||||
class UserDao extends UserId {
|
class UserDao extends UserId {
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String name;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String name;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String surname;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String surname;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String email;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String email;</info>
|
||||||
}
|
}
|
||||||
|
|
||||||
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
||||||
abstract class UserId {
|
abstract class UserId {
|
||||||
<info descr="Not initialized until the project is fully loaded">private final long id;</info>
|
<info descr="Not resolved until the project is fully loaded">private final long id;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String info;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String info;</info>
|
||||||
}
|
}
|
||||||
|
|
||||||
class UserChain {
|
class UserChain {
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ public final class LombokBasicsWithExplicitImport {
|
|||||||
@<info descr="Not resolved until the project is fully loaded">Getter</info>
|
@<info descr="Not resolved until the project is fully loaded">Getter</info>
|
||||||
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
||||||
class UserDao extends UserId {
|
class UserDao extends UserId {
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String name;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String name;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String surname;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String surname;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String email;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String email;</info>
|
||||||
}
|
}
|
||||||
|
|
||||||
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
@<info descr="Not resolved until the project is fully loaded">SuperBuilder</info>
|
||||||
abstract class UserId {
|
abstract class UserId {
|
||||||
<info descr="Not initialized until the project is fully loaded">private final long id;</info>
|
<info descr="Not resolved until the project is fully loaded">private final long id;</info>
|
||||||
<info descr="Not initialized until the project is fully loaded">private final String info;</info>
|
<info descr="Not resolved until the project is fully loaded">private final String info;</info>
|
||||||
}
|
}
|
||||||
|
|
||||||
class UserChain {
|
class UserChain {
|
||||||
|
|||||||
Reference in New Issue
Block a user