Java: allow dollar signs in class name when Navigating to Symbol (IDEA-326383)

GitOrigin-RevId: 566a20418c4d15902ba9233fae32f7823ea9d89a
This commit is contained in:
Bas Leijdekkers
2023-08-15 20:50:37 +02:00
committed by intellij-monorepo-bot
parent 4a049023f6
commit a19b0e5b51
2 changed files with 18 additions and 7 deletions

View File

@@ -1,6 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.java.navigation
import com.intellij.codeInsight.JavaProjectCodeInsightSettings
@@ -95,6 +93,20 @@ class Impl extends Intf {
assert impl.findMethodsByName('xxx3', false)[0] in elements
assert !(impl.findMethodsByName('xxx1', false)[0] in elements)
}
void "test goto symbol inner class dollar sign"() {
def method = myFixture.addClass('''
package pkg;
class Cls {
class Inner {
void paint() {}
}
}
''').innerClasses[0].methods
assert gotoSymbol('pkg.Cls.Inner.paint') == [method]
assert gotoSymbol('pkg.Cls$Inner.paint') == [method]
assert gotoSymbol('pkg.Cls$Inner#paint') == [method]
}
void "test goto symbol by Copy Reference result"() {
def methods = myFixture.addClass('''