mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class X {
|
||||
{
|
||||
int _Web;
|
||||
int web;
|
||||
we<caret>x
|
||||
}
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
class Zoo {
|
||||
void zoo(String fooBar, String __FOO_BAR) {
|
||||
foo<caret>
|
||||
}
|
||||
}
|
||||
-4
@@ -443,10 +443,6 @@ interface TxANotAnno {}
|
||||
checkPreferredItems(0, 'fooBar', '_fooBar', 'FooBar')
|
||||
}
|
||||
|
||||
void testDispreferUnderscoredCaseMismatch() {
|
||||
checkPreferredItems(0, 'fooBar', '__FOO_BAR')
|
||||
}
|
||||
|
||||
void testStatisticsMattersOnNextCompletion() {
|
||||
configureByFile(getTestName(false) + ".java")
|
||||
myFixture.completeBasic()
|
||||
|
||||
+5
@@ -1821,4 +1821,9 @@ class Bar {
|
||||
checkResult()
|
||||
}
|
||||
|
||||
void testLowercaseDoesNotMatchUnderscore() {
|
||||
configure()
|
||||
assert myFixture.lookupElementStrings == ['web']
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
@@ -53,6 +54,7 @@ public class TransactionGuardImpl extends TransactionGuard {
|
||||
|
||||
public TransactionGuardImpl() {
|
||||
myWriteSafeModalities.put(ModalityState.NON_MODAL, true);
|
||||
myWritingAllowed = SwingUtilities.isEventDispatchThread(); // consider app startup a user activity
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -62,6 +62,12 @@ public class CamelHumpMatcher extends PrefixMatcher {
|
||||
|
||||
@Override
|
||||
public boolean prefixMatches(@NotNull final String name) {
|
||||
if (name.startsWith("_") &&
|
||||
myPrefix.length() > 0 && Character.isLetter(myPrefix.charAt(0)) &&
|
||||
CodeInsightSettings.getInstance().COMPLETION_CASE_SENSITIVE == CodeInsightSettings.FIRST_LETTER) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return myMatcher.matches(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ class TransactionTest extends LightPlatformTestCase {
|
||||
|
||||
@Override
|
||||
protected void invokeTestRunnable(@NotNull Runnable runnable) throws Exception {
|
||||
if (app) {
|
||||
guard.assertWriteActionAllowed()
|
||||
}
|
||||
|
||||
SwingUtilities.invokeLater(runnable)
|
||||
UIUtil.dispatchAllInvocationEvents()
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import com.intellij.codeInsight.lookup.Lookup;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInsight.lookup.LookupElementBuilder;
|
||||
import com.intellij.testFramework.PsiTestUtil;
|
||||
import com.jetbrains.python.documentation.PyDocumentationSettings;
|
||||
import com.jetbrains.python.documentation.docstrings.DocStringFormat;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
@@ -1068,7 +1067,7 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
"@six.add_metaclass(M)\n" +
|
||||
"class C(object):\n" +
|
||||
" def foo(self):\n" +
|
||||
" C.ba<caret>()");
|
||||
" C.ba<caret>x()");
|
||||
|
||||
assertNotNull(suggested);
|
||||
assertContainsElements(suggested, "baz");
|
||||
@@ -1082,7 +1081,7 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
"@a_m(M)\n" +
|
||||
"class C(object):\n" +
|
||||
" def foo(self):\n" +
|
||||
" C.ba<caret>()");
|
||||
" C.ba<caret>x()");
|
||||
|
||||
assertNotNull(suggested);
|
||||
assertContainsElements(suggested, "baz");
|
||||
|
||||
Reference in New Issue
Block a user