mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-79812 (Spring config highlights all properies as errors yet Idea can still navigate to the property in the .properties file)
This commit is contained in:
+2
-2
@@ -29,8 +29,8 @@ import org.jetbrains.idea.maven.project.MavenProject;
|
||||
import java.util.List;
|
||||
|
||||
public class MavenFilteredPropertyPsiReference extends MavenPropertyPsiReference {
|
||||
public MavenFilteredPropertyPsiReference(MavenProject mavenProject, PsiElement element, String text, TextRange range, boolean isSoft) {
|
||||
super(mavenProject, element, text, range, isSoft);
|
||||
public MavenFilteredPropertyPsiReference(MavenProject mavenProject, PsiElement element, String text, TextRange range) {
|
||||
super(mavenProject, element, text, range, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-2
@@ -138,8 +138,7 @@ public class MavenFilteredPropertyPsiReferenceProvider extends PsiReferenceProvi
|
||||
|
||||
TextRange range = TextRange.from(from, propertyName.length());
|
||||
|
||||
res.add(
|
||||
new MavenFilteredPropertyPsiReference(mavenProject, element, propertyName, range, MavenPropertyPsiReferenceProvider.SOFT_DEFAULT));
|
||||
res.add(new MavenFilteredPropertyPsiReference(mavenProject, element, propertyName, range));
|
||||
}
|
||||
|
||||
return res == null ? PsiReference.EMPTY_ARRAY : res.toArray(new PsiReference[res.size()]);
|
||||
|
||||
+1
-2
@@ -53,8 +53,7 @@ public class MavenPropertyCompletionContributor extends CompletionContributor {
|
||||
TextRange range = TextRange.create(braceOffset, offset);
|
||||
String prefix = range.substring(text);
|
||||
|
||||
MavenFilteredPropertyPsiReference ref = new MavenFilteredPropertyPsiReference(projectFile, psiFile, prefix, range,
|
||||
MavenPropertyPsiReferenceProvider.SOFT_DEFAULT);
|
||||
MavenFilteredPropertyPsiReference ref = new MavenFilteredPropertyPsiReference(projectFile, psiFile, prefix, range);
|
||||
|
||||
addVariants(Arrays.asList(ref.getVariants()), result.withPrefixMatcher(prefix));
|
||||
}
|
||||
|
||||
+4
-1
@@ -20,6 +20,7 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiManager;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.maven.dom.model.MavenDomProfilesModel;
|
||||
import org.jetbrains.idea.maven.dom.references.MavenPropertyPsiReference;
|
||||
@@ -493,7 +494,9 @@ public class MavenFilteredPropertiesCompletionAndResolutionTest extends MavenDom
|
||||
|
||||
assertNotNull(resolveReference(f, "basedir"));
|
||||
assertNotNull(resolveReference(f, "pom.baseUri"));
|
||||
assertNotNull(getReference(f, "ve|rsion"));
|
||||
PsiReference ref = getReference(f, "ve|rsion");
|
||||
assertNotNull(ref);
|
||||
assertTrue(ref.isSoft());
|
||||
}
|
||||
|
||||
public void testDontUseDefaultDelimiter1() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user