diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/DefaultInsertHandler.java b/java/java-impl/src/com/intellij/codeInsight/completion/DefaultInsertHandler.java index f36da9923d22..743f0b1482cc 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/DefaultInsertHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/DefaultInsertHandler.java @@ -107,14 +107,6 @@ public class DefaultInsertHandler extends TemplateInsertHandler implements Clone AutoPopupController.getInstance(project).autoPopupMemberLookup(editor, null); } - if (completionChar == '#') { - context.setLaterRunnable(new Runnable() { - public void run() { - new CodeCompletionHandlerBase(CompletionType.BASIC).invoke(project, editor, file); - } - }); - } - if (annotation) { // Check if someone inserts annotation class that require @ PsiElement elementAt = file.findElementAt(context.getStartOffset()); @@ -324,7 +316,6 @@ public class DefaultInsertHandler extends TemplateInsertHandler implements Clone case ':': return TailType.CASE_COLON; //? case '<': case '>': - case '#': case '\"': case '[': return TailType.createSimpleTailType(completionChar); } diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/FocusInJavadoc.java b/java/java-impl/src/com/intellij/codeInsight/completion/FocusInJavadoc.java new file mode 100644 index 000000000000..95a99a37d912 --- /dev/null +++ b/java/java-impl/src/com/intellij/codeInsight/completion/FocusInJavadoc.java @@ -0,0 +1,35 @@ +/* + * Copyright 2000-2010 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight.completion; + +import com.intellij.psi.javadoc.PsiDocTag; +import com.intellij.psi.util.PsiTreeUtil; +import com.intellij.util.ThreeState; +import org.jetbrains.annotations.NotNull; + +/** + * @author peter + */ +public class FocusInJavadoc extends CompletionConfidence { + @NotNull + @Override + public ThreeState shouldFocusLookup(@NotNull CompletionParameters parameters) { + if (PsiTreeUtil.getParentOfType(parameters.getPosition(), PsiDocTag.class) != null) { + return ThreeState.YES; + } + return ThreeState.UNSURE; + } +} diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameCompletionContributor.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameCompletionContributor.java index 2a487a5ae069..0e2cd86abad8 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameCompletionContributor.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameCompletionContributor.java @@ -17,6 +17,7 @@ package com.intellij.codeInsight.completion; import com.intellij.codeInsight.ExpectedTypeInfo; import com.intellij.codeInsight.ExpectedTypesProvider; +import com.intellij.codeInsight.TailType; import com.intellij.lang.LangBundle; import com.intellij.lang.StdLanguages; import com.intellij.openapi.actionSystem.IdeActions; @@ -32,6 +33,7 @@ import com.intellij.psi.filters.TrueFilter; import com.intellij.psi.filters.classes.ThisOrAnyInnerFilter; import com.intellij.psi.filters.element.ExcludeDeclaredFilter; import com.intellij.psi.filters.types.AssignableFromFilter; +import com.intellij.psi.javadoc.PsiDocTag; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiUtil; import com.intellij.util.Consumer; @@ -66,8 +68,29 @@ public class JavaClassNameCompletionContributor extends CompletionContributor { return; } - if (completingRawConstructor(context, item) && !JavaCompletionUtil.hasAccessibleInnerClass(item.getObject(), file)) { - ConstructorInsertHandler.insertParentheses(context, item, item.getObject()); + PsiElement position = file.findElementAt(offset); + PsiClass psiClass = item.getObject(); + + if (context.getCompletionChar() == '#') { + context.setLaterRunnable(new Runnable() { + public void run() { + new CodeCompletionHandlerBase(CompletionType.BASIC).invoke(context.getProject(), context.getEditor(), file); + } + }); + TailType.insertChar(context.getEditor(), context.getTailOffset(), '#'); + } + + if (position != null) { + PsiElement parent = position.getParent(); + if (parent instanceof PsiJavaCodeReferenceElement && PsiTreeUtil.getParentOfType(position, PsiDocTag.class) != null) { + if (((PsiJavaCodeReferenceElement)parent).isReferenceTo(psiClass)) { + return; + } + } + } + + if (completingRawConstructor(context, item) && !JavaCompletionUtil.hasAccessibleInnerClass(psiClass, file)) { + ConstructorInsertHandler.insertParentheses(context, item, psiClass); DefaultInsertHandler.addImportForItem(context.getFile(), context.getStartOffset(), item); } else { new DefaultInsertHandler().handleInsert(context, item); diff --git a/java/java-tests/testData/codeInsight/completion/style/after15.java b/java/java-tests/testData/codeInsight/completion/style/after15.java index 681bed8c16b8..1ba026a30775 100644 --- a/java/java-tests/testData/codeInsight/completion/style/after15.java +++ b/java/java-tests/testData/codeInsight/completion/style/after15.java @@ -1,6 +1,6 @@ class A{ { String str; - str.toCharArray(); + str.toString(); } } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/completion/style/after17.java b/java/java-tests/testData/codeInsight/completion/style/after17.java index 3017047611de..6b9c70503bbc 100644 --- a/java/java-tests/testData/codeInsight/completion/style/after17.java +++ b/java/java-tests/testData/codeInsight/completion/style/after17.java @@ -1,7 +1,7 @@ class A{ { final String path = BASE_PATH; - path.toCharArray(); + path.toString(); sdkfjsdkhjfh(); } } \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy index d00fcbdc4c4a..34ad3cf9d0ad 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/JavaAutoPopupTest.groovy @@ -217,4 +217,28 @@ class JavaAutoPopupTest extends CompletionAutoPopupTestCase { assert lookup } + public void testFocusInJavadoc() { + myFixture.configureByText("a.java", """ + /** + * {@link ArrLi} + */ + class Foo {} + """) + type 's' + assert lookup.focused + + } + + public void testPrefixLengthDependentSorting() { + myFixture.addClass("package foo; public class PsiJavaCodeReferenceElement {}") + myFixture.configureByText("a.java", """ + class PsiJavaCodeReferenceElementImpl { + { } + } + """) + type 'PJCR' + assertOrderedEquals myFixture.lookupElementStrings, 'PsiJavaCodeReferenceElement', 'PsiJavaCodeReferenceElementImpl' + + } + } diff --git a/java/testFramework/src/com/intellij/testFramework/fixtures/impl/JavaCodeInsightTestFixtureImpl.java b/java/testFramework/src/com/intellij/testFramework/fixtures/impl/JavaCodeInsightTestFixtureImpl.java index 03ac938431a5..363caf601ddf 100644 --- a/java/testFramework/src/com/intellij/testFramework/fixtures/impl/JavaCodeInsightTestFixtureImpl.java +++ b/java/testFramework/src/com/intellij/testFramework/fixtures/impl/JavaCodeInsightTestFixtureImpl.java @@ -15,6 +15,8 @@ */ package com.intellij.testFramework.fixtures.impl; +import com.intellij.openapi.application.Result; +import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; import com.intellij.psi.search.ProjectScope; @@ -49,12 +51,17 @@ public class JavaCodeInsightTestFixtureImpl extends CodeInsightTestFixtureImpl i return psiClass; } - private PsiClass addClass(@NonNls String rootPath, @NotNull @NonNls final String classText) throws IOException { + private PsiClass addClass(@NonNls final String rootPath, @NotNull @NonNls final String classText) throws IOException { final PsiClass aClass = ((PsiJavaFile)PsiFileFactory.getInstance(getProject()).createFileFromText("a.java", classText)).getClasses()[0]; final String qName = aClass.getQualifiedName(); assert qName != null; - final PsiFile psiFile = addFileToProject(rootPath, qName.replace('.', '/') + ".java", classText); + final PsiFile psiFile = new WriteCommandAction(getProject()) { + @Override + protected void run(Result result) throws Throwable { + result.setResult(addFileToProject(rootPath, qName.replace('.', '/') + ".java", classText)); + } + }.execute().getResultObject(); return ((PsiJavaFile)psiFile).getClasses()[0]; } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/PrefixMatchingWeigher.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/PrefixMatchingWeigher.java index c106d8c771a6..1d2b74f65354 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/PrefixMatchingWeigher.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/PrefixMatchingWeigher.java @@ -35,8 +35,7 @@ public class PrefixMatchingWeigher extends CompletionWeigher { final String prefixHumps = StringUtil.capitalsOnly(prefix); final String itemHumps = StringUtil.capitalsOnly(lookupString); - if (itemHumps.equals(prefixHumps)) return 20; - if (itemHumps.startsWith(prefixHumps)) return 10; + if (itemHumps.startsWith(prefixHumps)) return 100 - itemHumps.length(); if (lookupString.startsWith(prefix)) return 5; if (StringUtil.startsWithIgnoreCase(lookupString, prefix)) return 1; diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java index 9f729a8d4b8f..83491d3a0715 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java @@ -452,7 +452,7 @@ public class CodeStyleManagerImpl extends CodeStyleManager { @Nullable private static TextRange insertNewLineIndentMarker(@NotNull Document document, final int offset) { CharSequence text = document.getCharsSequence(); - if (!isWhiteSpaceSymbol(text.charAt(offset))) { + if (offset < 0 || offset >= text.length() || !isWhiteSpaceSymbol(text.charAt(offset))) { return null; } diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 531dce74dd47..2d5b574b611d 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -356,8 +356,9 @@ public class FileBasedIndex implements ApplicationComponent { } myIndexIdToVersionMap.put(name, version); final File versionFile = IndexInfrastructure.getVersionFile(name); + final boolean versionFileExisted = versionFile.exists(); if (isCurrentVersionCorrupted || IndexInfrastructure.versionDiffers(versionFile, version)) { - if (!isCurrentVersionCorrupted) { + if (!isCurrentVersionCorrupted && versionFileExisted) { versionChanged = true; LOG.info("Version has changed for index " + extension.getName() + ". The index will be rebuilt."); } diff --git a/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/HistoryDialog.java b/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/HistoryDialog.java index 59030d9c0f71..3fbf95bf8a47 100644 --- a/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/HistoryDialog.java +++ b/platform/lvcs-impl/src/com/intellij/history/integration/ui/views/HistoryDialog.java @@ -264,11 +264,11 @@ public abstract class HistoryDialog extends FrameW } public void run() { - if (myProject.isDisposed()) return; + if (isDisposed() || myProject.isDisposed()) return; invokeAndWait(new Runnable() { public void run() { - if (myProject.isDisposed()) return; + if (isDisposed() || myProject.isDisposed()) return; isUpdating = true; updateActions(); @@ -287,7 +287,7 @@ public abstract class HistoryDialog extends FrameW final Runnable finalApply = apply; invokeAndWait(new Runnable() { public void run() { - if (myProject.isDisposed()) return; + if (isDisposed() || myProject.isDisposed()) return; isUpdating = false; if (finalApply != null) { diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java b/platform/platform-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java index 520e2b9c8da1..9e37fb62028a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/ex/util/SegmentArray.java @@ -238,14 +238,14 @@ public class SegmentArray { public int getSegmentStart(int index) { if (index < 0 || index >= mySegmentCount) { - throw new IndexOutOfBoundsException("Wrong line: " + index); + throw new IndexOutOfBoundsException("Wrong line: " + index + ". Available lines count: " + mySegmentCount); } return myStarts[index]; } public int getSegmentEnd(int index) { if (index < 0 || index >= mySegmentCount) { - throw new IndexOutOfBoundsException("Wrong line: " + index); + throw new IndexOutOfBoundsException("Wrong line: " + index + ". Available lines count: " + mySegmentCount); } return myEnds[index]; } diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index b2db014039fe..3aa700fda5d4 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -1603,6 +1603,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi if (!getFoldingModel().isOffsetCollapsed(startOffset)) { if (visibleStartLine >= startLineNumber && visibleStartLine <= endLineNumber) { int logStartLine = offsetToLogicalPosition(startOffset).line; + if (logStartLine >= myDocument.getLineCount()) { + return; + } LogicalPosition logPosition = offsetToLogicalPosition(myDocument.getLineEndOffset(logStartLine)); Point end = logicalPositionToXY(logPosition); int charWidth = EditorUtil.getSpaceWidth(Font.PLAIN, this); diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java index 312ba258a2f9..45f859f031c5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java @@ -247,7 +247,15 @@ public class FSRecords implements Forceable { private static void invalidateIndex() { LOG.info("Marking VFS as corrupted"); - FileUtil.createIfDoesntExist(new File(PathManager.getIndexRoot(), "corruption.marker")); + final File indexRoot = PathManager.getIndexRoot(); + if (indexRoot.exists()) { + final String[] children = indexRoot.list(); + if (children != null && children.length > 0) { + // create index corruption marker only if index directory exists and is non-empty + // It is incorrect to consider non-existing indices "corrupted" + FileUtil.createIfDoesntExist(new File(PathManager.getIndexRoot(), "corruption.marker")); + } + } } private static File basePath() { diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/compiler/MavenResourceCompiler.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/compiler/MavenResourceCompiler.java index 6448129cfbad..8eaa2ccd3478 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/compiler/MavenResourceCompiler.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/compiler/MavenResourceCompiler.java @@ -391,7 +391,7 @@ public class MavenResourceCompiler implements ClassPostProcessingCompiler { outputFile.getParentFile().mkdirs(); boolean shouldFilter = eachItem.isFiltered(); - if (sourceFile.length() > 10 * 1024 * 1024) { + if (shouldFilter && sourceFile.length() > 10 * 1024 * 1024) { context.addMessage(CompilerMessageCategory.WARNING, "Maven: File is too big to be filtered. Most likely it is a binary file and should be excluded from filtering.", sourceVirtualFile.getUrl(), -1, -1); diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenArtifactCoordinatesVersionConverter.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenArtifactCoordinatesVersionConverter.java index 22194e67adeb..b7afdd34061a 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenArtifactCoordinatesVersionConverter.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenArtifactCoordinatesVersionConverter.java @@ -31,13 +31,13 @@ public class MavenArtifactCoordinatesVersionConverter extends MavenArtifactCoord || StringUtil.isEmpty(id.getVersion())) { return false; } - if (isVersionRange(id)) return true; // todo handle ranges more sensibly + if (isMagicVersion(id)) return true; // todo handle ranges more sensibly return manager.hasVersion(id.getGroupId(), id.getArtifactId(), id.getVersion()); } - private boolean isVersionRange(MavenId id) { + private boolean isMagicVersion(MavenId id) { String version = id.getVersion().trim(); - return version.startsWith("(") || version.startsWith("["); + return version.equals("LATEST") || version.equals("RELEASE") || version.startsWith("(") || version.startsWith("["); } @Override diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoFileContributor.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoFileContributor.java new file mode 100644 index 000000000000..5fb43df0b448 --- /dev/null +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoFileContributor.java @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2010 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jetbrains.idea.maven.utils; + +import com.intellij.navigation.ChooseByNameContributor; +import com.intellij.navigation.NavigationItem; +import com.intellij.openapi.project.Project; +import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiManager; +import org.jetbrains.idea.maven.project.MavenProject; +import org.jetbrains.idea.maven.project.MavenProjectsManager; + +import java.util.ArrayList; +import java.util.List; + +public class MavenGotoFileContributor implements ChooseByNameContributor { + public String[] getNames(Project project, boolean includeNonProjectItems) { + List result = new ArrayList(); + + for (MavenProject each : MavenProjectsManager.getInstance(project).getProjects()) { + result.add(each.getMavenId().getArtifactId()); + } + + return result.toArray(new String[result.size()]); + } + + public NavigationItem[] getItemsByName(String name, String pattern, Project project, boolean includeNonProjectItems) { + List result = new ArrayList(); + + for (final MavenProject each : MavenProjectsManager.getInstance(project).getProjects()) { + if (name.equals(each.getMavenId().getArtifactId())) { + PsiFile psiFile = PsiManager.getInstance(project).findFile(each.getFile()); + if (psiFile != null) result.add(psiFile); + } + } + + return result.toArray(new NavigationItem[result.size()]); + } +} diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContibutor.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContributor.java similarity index 95% rename from plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContibutor.java rename to plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContributor.java index 6ae9412af293..c37e5eeb86d7 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContibutor.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenGotoSettingsFileContributor.java @@ -30,7 +30,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; -public class MavenGotoSettingsFileContibutor implements ChooseByNameContributor, DumbAware { +public class MavenGotoSettingsFileContributor implements ChooseByNameContributor, DumbAware { public String[] getNames(Project project, boolean includeNonProjectItems) { if (!includeNonProjectItems) return ArrayUtil.EMPTY_STRING_ARRAY; diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContibutor.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContributor.java similarity index 95% rename from plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContibutor.java rename to plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContributor.java index 051736b17c78..300149c8d9cf 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContibutor.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenGotoPropertyFileContributor.java @@ -23,7 +23,7 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; import com.intellij.util.ArrayUtil; -public class MavenGotoPropertyFileContibutor implements ChooseByNameContributor { +public class MavenGotoPropertyFileContributor implements ChooseByNameContributor { public String[] getNames(Project project, boolean includeNonProjectItems) { if (!includeNonProjectItems) return ArrayUtil.EMPTY_STRING_ARRAY; return MavenPropertiesVirtualFileSystem.PROPERTIES_FILES; diff --git a/plugins/maven/src/main/resources/META-INF/plugin.xml b/plugins/maven/src/main/resources/META-INF/plugin.xml index d41f41b66e4c..efa1d0cf0c68 100644 --- a/plugins/maven/src/main/resources/META-INF/plugin.xml +++ b/plugins/maven/src/main/resources/META-INF/plugin.xml @@ -95,8 +95,9 @@ - - + + + diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java index 1326d42bc202..688be099a964 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/dom/MavenDependencySpecialVersionsCompletionAndResolutionTest.java @@ -57,4 +57,25 @@ public class MavenDependencySpecialVersionsCompletionAndResolutionTest extends M checkHighlighting(); } + + public void testDoNotHighlightLatestAndReleaseDependencies() throws Throwable { + createProjectPom("test" + + "project" + + "1" + + + "" + + " " + + " jmock" + + " jmock" + + " LATEST" + + " " + + " " + + " jmock" + + " jmock" + + " RELEASE" + + " " + + ""); + + checkHighlighting(); + } } diff --git a/resources/src/META-INF/IdeaPlugin.xml b/resources/src/META-INF/IdeaPlugin.xml index a0117012fb44..a11a1480624e 100644 --- a/resources/src/META-INF/IdeaPlugin.xml +++ b/resources/src/META-INF/IdeaPlugin.xml @@ -231,6 +231,7 @@ id="excludeFromCompletion" order="last"/> +