mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
IDEA-59783 Properties files: code completion list does not open after dot character
This commit is contained in:
@@ -1159,6 +1159,10 @@ class Foo {{
|
||||
assert myFixture.lookupElementStrings.size() >= 2
|
||||
type '.'
|
||||
assert lookup
|
||||
edt { myFixture.editor.caretModel.moveToOffset(myFixture.editor.document.text.indexOf('lang')) }
|
||||
assert !lookup
|
||||
type 'i'
|
||||
assert 'io' in myFixture.lookupElementStrings
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.lang.properties;
|
||||
|
||||
import com.intellij.codeInsight.completion.CompletionContributor;
|
||||
import com.intellij.codeInsight.completion.CompletionInitializationContext;
|
||||
import com.intellij.codeInsight.completion.CompletionUtil;
|
||||
import com.intellij.lang.properties.psi.PropertiesFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class PropertiesCompletionContributor extends CompletionContributor {
|
||||
@Override
|
||||
public void beforeCompletion(@NotNull CompletionInitializationContext context) {
|
||||
if (context.getFile() instanceof PropertiesFile) {
|
||||
context.setDummyIdentifier(CompletionUtil.DUMMY_IDENTIFIER_TRIMMED);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
<applicationService serviceInterface="com.intellij.lang.properties.LastSelectedPropertiesFileStore"
|
||||
serviceImplementation="com.intellij.lang.properties.LastSelectedPropertiesFileStore"/>
|
||||
<annotator language="Properties" implementationClass="com.intellij.lang.properties.PropertiesAnnotator"/>
|
||||
<completion.contributor language="Properties" implementationClass="com.intellij.lang.properties.PropertiesCompletionContributor"/>
|
||||
<lang.refactoringSupport language="Properties" implementationClass="com.intellij.lang.properties.refactoring.PropertiesRefactoringSupportProvider"/>
|
||||
<lang.documentationProvider language="Properties" implementationClass="com.intellij.lang.properties.PropertiesDocumentationProvider"/>
|
||||
<lang.findUsagesProvider language="Properties"
|
||||
|
||||
Reference in New Issue
Block a user