method chains completion

This commit is contained in:
Dmitry Batkovich
2013-07-12 12:48:39 +04:00
parent 147513c0e5
commit 56f3a39c69
120 changed files with 7207 additions and 3 deletions
@@ -0,0 +1,31 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiElement {
PsiFile getContainingFile() {
return null;
}
}
class PsiFile {
VirtualFile getVirtualFile() {
return null;
}
}
class VirtualFile {}
public class TestCompletion {
PsiElement e;
public void method() {
VirtualFile vf = <caret>
}
}
@@ -0,0 +1,30 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElement e) {
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
e.getContainingFile().getVirtualFile();
}
}
class PsiElement {
PsiFile getContainingFile() {
return null;
}
}
class PsiFile {
VirtualFile getVirtualFile() {
return null;
}
}
class VirtualFile {}
@@ -0,0 +1,36 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
interface PsiFile extends PsiElement {
}
interface PsiElement {
PsiElement findElementAt(int position);
}
class PsiManager {
static PsiManager getInstance(Project p) {
return null;
}
PsiFile findFile(VirtualFile vf) {
return null;
}
}
interface VirtualFile {}
interface Project {}
public class TestCompletion {
public void method() {
PsiElement e = <caret>
}
}
@@ -0,0 +1,38 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
PsiElement e;
public void statMethod() {
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
e = PsiManager.getInstance(null).findFile(null).findElementAt(0);
}
}
interface PsiFile extends PsiElement {
}
interface PsiElement {
PsiElement findElementAt(int position);
}
class PsiManager {
static PsiManager getInstance(Project p) {
return null;
}
PsiFile findFile(VirtualFile vf) {
return null;
}
}
interface VirtualFile {}
interface Project {}
@@ -0,0 +1,43 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class Project {
Object o;
void setObject(Object o) {
this.o = o;
}
<T> Object getObject(Class<T> tClass) {
return o;
}
}
class Manager {
Project p1;
Manager(Project p1) {
this.p1 = p1;
}
static Manager getManager(Project project) {
return (Manager) project.getObject(Manager.class);
}
Project getProject() {
return p1;
}
}
public class TestCompletion {
public void method() {
Manager m = <caret>;
Project p = m.getProject();
}
}
@@ -0,0 +1,61 @@
public class TestIndex {
Manager manager = new Manager(new Project());
public void statMethod() {
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
}
}
class TestIndex2 {
Project p2 = new Project();
public void statMethod() {
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
}
}
class Project {
Object o;
void setObject(Object o) {
this.o = o;
}
<T> Object getObject(Class<T> tClass) {
return o;
}
}
class Manager {
Project p1;
Manager(Project p1) {
this.p1 = p1;
}
static Manager getManager(Project project) {
return (Manager) project.getObject(Manager.class);
}
Project getProject() {
return p1;
}
}
@@ -0,0 +1,42 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class Project {
Object o;
void setObject(Object o) {
this.o = o;
}
<T> Object getObject(Class<T> tClass) {
return o;
}
}
class Manager {
Project p1;
Manager(Project p1) {
this.p1 = p1;
}
static Manager getManager(Project project) {
return (Manager) project.getObject(Manager.class);
}
Project getProject() {
return p1;
}
}
public class TestCompletion {
public void method() {
Manager m = <caret>;
}
}
@@ -0,0 +1,61 @@
public class TestIndex {
Manager manager = new Manager(new Project());
public void statMethod() {
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
manager.getProject();
}
}
class TestIndex2 {
Project p2 = new Project();
public void statMethod() {
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
Manager.getManager(p2);
}
}
class Project {
Object o;
void setObject(Object o) {
this.o = o;
}
<T> Object getObject(Class<T> tClass) {
return o;
}
}
class Manager {
Project p1;
Manager(Project p1) {
this.p1 = p1;
}
static Manager getManager(Project project) {
return (Manager) project.getObject(Manager.class);
}
Project getProject() {
return p1;
}
}
@@ -0,0 +1,18 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiElement {
public PsiElement getPrevSibling() {
return null;
}
public PsiElement getParent() {
return null;
}
}
public class TestCompletion {
public void method(PsiElement e) {
PsiElement anotherElement = <caret>
}
}
@@ -0,0 +1,25 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElement e) {
e.getParent();
e.getParent();
e.getParent();
e.getParent();
e.getPrevSibling();
e.getPrevSibling();
e.getPrevSibling();
e.getPrevSibling();
}
}
class PsiElement {
public PsiElement getPrevSibling() {
return null;
}
public PsiElement getParent() {
return null;
}
}
@@ -0,0 +1,22 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
interface Project {}
interface PsiElement {
Project getProject();
}
public class TestCompletion {
private PsiElement getMyElement() {
return null;
}
public void method() {
Project p = <caret>
}
}
@@ -0,0 +1,22 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElement e) {
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
}
}
interface Project {}
interface PsiElement {
Project getProject();
}
@@ -0,0 +1,23 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class JarFile {
class JarEntry {
}
JarEntry getEntry() {
return null;
}
}
public class TestCompletion {
public void method(JarFile j) {
JarFile.JarEntry e = <caret>
}
}
@@ -0,0 +1,26 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(JarFile f) {
f.getEntry();
f.getEntry();
f.getEntry();
f.getEntry();
f.getEntry();
f.getEntry();
f.getEntry();
f.getEntry();
}
}
class JarFile {
class JarEntry {
}
JarEntry getEntry() {
return null;
}
}
@@ -0,0 +1,19 @@
import java.jang.String;
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {}
public class TestCompletion {
public void method(PsiElement e) {
int j = 1 + method123(<caret>);
}
public int method123(PsiClass c) {
return 0;
}
}
@@ -0,0 +1,22 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElement e) {
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {}
@@ -0,0 +1,25 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiMethod implements PsiElement {
}
interface PsiElement {
}
class PsiClass {
public PsiMethod findMethodByName(String methodName) {
return null;
}
}
public class TestCompletion {
PsiClass c;
public void method() {
PsiElement element = <caret>
}
}
@@ -0,0 +1,24 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiClass c) {
c.findMethodByName("asd");
c.findMethodByName("asd");
c.findMethodByName("asd");
c.findMethodByName("asd");
}
}
class PsiMethod implements PsiElement {
}
interface PsiElement {
}
class PsiClass {
public PsiMethod findMethodByName(String methodName) {
return null;
}
}
@@ -0,0 +1,27 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class ElementFactory {
PsiClassType createType(PsiClass c, Object obj) {
return null;
}
PsiClassType createType(PsiClass c) {
return null;
}
}
class PsiClassType {}
class PsiClass {}
public class TestCompletion {
public void method(ElementFactory f) {
PsiClassType t = <caret>
}
}
@@ -0,0 +1,32 @@
import java.lang.Object;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(ElementFactory ef) {
ef.createType(null);
ef.createType(null);
ef.createType(null);
ef.createType(null);
ef.createType(null, null);
ef.createType(null, null);
ef.createType(null, null);
ef.createType(null, null);
}
}
class ElementFactory {
PsiClassType createType(PsiClass c, Object obj) {
return null;
}
PsiClassType createType(PsiClass c) {
return null;
}
}
class PsiClassType {}
class PsiClass {}
@@ -0,0 +1,19 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiManager {
Project getProject() {
return null;
}
}
class Project {}
public class TestCompletion {
public void method() {
Project p = <caret>
}
}
@@ -0,0 +1,51 @@
//
// if component obtained in implicit way
//
public class TestIndex {
//
// simple test for spring like configuration
//
private PsiManager a;
public void setA(PsiManager a) {
this.a = a;
}
void m() {
a.getProject();
a.getProject();
}
void b() {
a.getProject();
}
void c() {
a.getProject();
}
void c22() {
a.getProject();
}
void c11() {
a.getProject();
}
void c1() {
a.getProject();
}
}
class PsiManager {
Project getProject() {
return null;
}
}
class Project {}
@@ -0,0 +1,24 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiManager {
Project getProject() {
return null;
}
}
interface Project {
VirtualFile getBaseDir();
}
class VirtualFile {
}
public class TestCompletion {
PsiManager m;
public void method(Project p) {
VirtualFile projectBaseDir = <caret>
}
}
@@ -0,0 +1,29 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiManager m) {
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
m.getProject().getBaseDir();
}
}
class PsiManager {
Project getProject() {
return null;
}
}
interface Project {
VirtualFile getBaseDir();
}
class VirtualFile {
}
@@ -0,0 +1,18 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class Element {
public Project getProject() {
return null;
}
}
class Project {
}
public class TestCompletion {
public void method(Element e) {
Project project = <caret>
}
}
@@ -0,0 +1,25 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(Element e) {
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
e.getProject();
}
}
class Element {
public Project getProject() {
return null;
}
}
class Project {
}
@@ -0,0 +1,53 @@
import java.jang.String;
class B {
C getC() {
return null;
}
static B b = new B();
static B getB1() {
return b;
}
static B getB2() {
return b;
}
static B getB3() {
return b;
}
static B getB4() {
return b;
}
static B getB5() {
return b;
}
static B getB6() {
return b;
}
static B getB7() {
return b;
}
static B getB8() {
return b;
}
static B getB9() {
return b;
}
static B getB10() {
return b;
}
static B getB11() {
return b;
}
}
class C {}
public class TestCompletion {
public void method() {
C c = <caret>
}
}
@@ -0,0 +1,104 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod1() {
B.getB1().getC();
B.getB1().getC();
B.getB1().getC();
}
public void statMethod2() {
B.getB2().getC();
B.getB2().getC();
B.getB2().getC();
}
public void statMethod3() {
B.getB3().getC();
B.getB3().getC();
B.getB3().getC();
}
public void statMethod4() {
B.getB4().getC();
B.getB4().getC();
B.getB4().getC();
}
public void statMethod5() {
B.getB5().getC();
B.getB5().getC();
B.getB5().getC();
}
public void statMethod6() {
B.getB6().getC();
B.getB6().getC();
B.getB6().getC();
}
public void statMethod7() {
B.getB7().getC();
B.getB7().getC();
B.getB7().getC();
}
public void statMethod8() {
B.getB8().getC();
B.getB8().getC();
B.getB8().getC();
}
public void statMethod9() {
B.getB9().getC();
B.getB9().getC();
B.getB9().getC();
}
public void statMethod10() {
B.getB10().getC();
B.getB10().getC();
B.getB10().getC();
}
public void statMethod11() {
B.getB11().getC();
B.getB11().getC();
B.getB11().getC();
}
}
class B {
C getC() {
return null;
}
static B b = new B();
static B getB1() {
return b;
}
static B getB2() {
return b;
}
static B getB3() {
return b;
}
static B getB4() {
return b;
}
static B getB5() {
return b;
}
static B getB6() {
return b;
}
static B getB7() {
return b;
}
static B getB8() {
return b;
}
static B getB9() {
return b;
}
static B getB10() {
return b;
}
static B getB11() {
return b;
}
}
class C {}
@@ -0,0 +1,14 @@
import java.jang.String;
interface PsiManager {
Project getProject();
}
interface Project {}
public class TestCompletion {
void m() {
PsiManager psiManager = null;
Project p = psiManager.getProject()
}
}
@@ -0,0 +1,13 @@
import java.jang.String;
interface PsiManager {
Project getProject();
}
interface Project {}
public class TestCompletion {
void m() {
Project p = <caret>
}
}
@@ -0,0 +1,41 @@
/*
* Copyright 2000-2013 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.
*/
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
import java.lang.String;
public class TestIndex {
PsiManager m;
void m() {
m.getProject();
m.getProject();
m.getProject();
m.getProject();
m.getProject();
m.getProject();
}
}
interface PsiManager {
Project getProject();
}
interface Project {}
@@ -0,0 +1,26 @@
import java.jang.String;
class JavaPsiFacade {
static JavaPsiFacade getInstance() {
return null;
}
PsiClass findClass() {
return null;
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {
}
public class TestCompletion {
public void method(PsiElement e) {
PsiClass c = JavaPsiFacade.getInstance().findClass()
}
}
@@ -0,0 +1,26 @@
import java.jang.String;
class JavaPsiFacade {
static JavaPsiFacade getInstance() {
return null;
}
PsiClass findClass() {
return null;
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {
}
public class TestCompletion {
public void method(PsiElement e) {
PsiClass c = <caret>
}
}
@@ -0,0 +1,47 @@
/*
* Copyright 2000-2013 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.
*/
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
void m() {
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
}
}
class JavaPsiFacade {
static JavaPsiFacade getInstance() {
return null;
}
PsiClass findClass() {
return null;
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {
}
@@ -0,0 +1,16 @@
import java.jang.String;
import java.lang.String;
interface PsiManager {
Project getProject(String asd, String zxc);
}
interface Project {}
public class TestCompletion {
void m() {
String asd = "123";
PsiManager psiManager = null;
Project p = psiManager.getProject(asd, zxc)
}
}
@@ -0,0 +1,15 @@
import java.jang.String;
import java.lang.String;
interface PsiManager {
Project getProject(String asd, String zxc);
}
interface Project {}
public class TestCompletion {
void m() {
String asd = "123";
Project p = <caret>
}
}
@@ -0,0 +1,22 @@
import java.lang.String;
public class TestIndex {
PsiManager m;
void m() {
m.getProject(null, null);
m.getProject(null, null);
m.getProject(null, null);
m.getProject(null, null);
m.getProject(null, null);
m.getProject(null, null);
}
}
interface PsiManager {
Project getProject(String asd, String zxc);
}
interface Project {}
@@ -0,0 +1,26 @@
import java.jang.String;
class JavaPsiFacade {
static JavaPsiFacade getInstance() {
return null;
}
PsiClass findClass() {
return null;
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {
}
public class TestCompletion {
public void method(PsiElement e) {
PsiClass c = <caret>
}
}
@@ -0,0 +1,37 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
PsiElement e;
void m() {
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
e.getContainingClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
JavaPsiFacade.getInstance().findClass();
}
}
class JavaPsiFacade {
static JavaPsiFacade getInstance() {
return null;
}
PsiClass findClass() {
return null;
}
}
interface PsiElement {
PsiClass getContainingClass();
}
interface PsiClass extends PsiElement {
}
@@ -0,0 +1,20 @@
import java.jang.String;
class TestCompletuin{
}
interface PsiManager {
Project getProject();
}
interface PsiElement {
Project getProject1();
}
interface Project {}
public class TestCompletion {
void m(PsiElement e) {
Project p = <caret>
}
}
@@ -0,0 +1,35 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
import java.lang.String;
public class TestIndex {
PsiElement e;
PsiManager m;
void m() {
m.getProject();
m.getProject();
m.getProject();
m.getProject();
m.getProject();
m.getProject();
e.getProject1();
e.getProject1();
e.getProject1();
e.getProject1();
}
}
interface PsiManager {
Project getProject();
}
interface PsiElement {
Project getProject1();
}
interface Project {}
@@ -0,0 +1,24 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class PsiElement {
}
class PsiClass extends PsiElement {
}
class PsiElementFactory {
public PsiClass createClass() {
return null;
}
}
public class TestCompletion {
public void method(PsiElementFactory f) {
PsiElement e = <caret>
}
}
@@ -0,0 +1,26 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElementFactory f) {
f.createClass();
f.createClass();
f.createClass();
f.createClass();
f.createClass();
f.createClass();
}
}
class PsiElement {
}
class PsiClass extends PsiElement {
}
class PsiElementFactory {
public PsiClass createClass() {
return null;
}
}
@@ -0,0 +1,24 @@
import java.jang.String;
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class FileIndex {
}
class ProjectFileIndex extends FileIndex {
public static ProjectFileIndex getInstance(Project p) {
return null;
}
}
interface Project {}
public class TestCompletion {
public void method() {
FileIndex fi = <caret>
}
}
@@ -0,0 +1,28 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod() {
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
ProjectFileIndex.getInstance(null);
}
}
class FileIndex {
}
class ProjectFileIndex extends FileIndex {
public static ProjectFileIndex getInstance(Project p) {
return null;
}
}
interface Project {}
@@ -0,0 +1,19 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class LocalFileSystem {
public LocalFileSystem returnSelf() {
return this;
}
public static LocalFileSystem getInstance() {
return null;
}
}
public class TestCompletion {
public void method(LocalFileSystem lfs) {
LocalFileSystem anotherLfs = <caret>
}
}
@@ -0,0 +1,26 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(LocalFileSystemAware lfsa) {
lfsa.returnLFS();
lfsa.returnLFS();
lfsa.returnLFS();
lfsa.returnLFS();
LocalFileSystem.getInstance();
LocalFileSystem.getInstance();
}
}
class LocalFileSystem {
public static LocalFileSystem getInstance() {
return null;
}
}
class LocalFileSystemAware {
public LocalFileSystem returnLFS() {
return null;
}
}
@@ -0,0 +1,25 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class JavaPsiFacade {
public static PsiClass findClass(String qName) {
return null;
}
}
class PsiClass {
}
class PsiMethod {
public PsiClass getContainingClass() {
return null;
}
}
public class TestCompletion {
public void method(PsiMethod m) {
PsiClass someClass = <caret>
}
}
@@ -0,0 +1,35 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod() {
JavaPsiFacade.findClass("asd");
JavaPsiFacade.findClass("asd");
JavaPsiFacade.findClass("asd");
}
public void statMethod(PsiMethod m) {
m.getContainingClass();
m.getContainingClass();
m.getContainingClass();
m.getContainingClass();
m.getContainingClass();
}
}
class JavaPsiFacade {
public static PsiClass findClass(String qName) {
return null;
}
}
class PsiClass {
}
class PsiMethod {
public PsiClass getContainingClass() {
return null;
}
}
@@ -0,0 +1,23 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class Project {
}
interface PsiElement {
Project getProject();
}
class PsiMethod implements PsiElement {
public Project getProject() {
return null;
}
}
public class TestCompletion {
public void method(PsiMethod m) {
Project project = <caret>
}
}
@@ -0,0 +1,30 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiElement a, PsiElement b) {
a.getProject();
a.getProject();
a.getProject();
a.getProject();
b.getProject();
b.getProject();
b.getProject();
b.getProject();
}
}
class Project {
}
interface PsiElement {
Project getProject();
}
class PsiMethod implements PsiElement {
public Project getProject() {
return null;
}
}
@@ -0,0 +1,31 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
class Project {
}
interface PsiElement {
Project getProject();
}
class PsiClass implements PsiElement {
public Project getProject() {
return null;
}
}
class PsiMethod implements PsiElement {
public Project getProject() {
return null;
}
}
public class TestCompletion {
PsiClass c = new PsiClass();
public void method(PsiMethod m) {
Project p = <caret>
}
}
@@ -0,0 +1,36 @@
/**
* @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com>
*/
public class TestIndex {
public void statMethod(PsiClass c, PsiMethod m) {
c.getProject();
c.getProject();
c.getProject();
c.getProject();
m.getProject();
m.getProject();
m.getProject();
m.getProject();
}
}
class Project {
}
interface PsiElement {
Project getProject();
}
class PsiClass implements PsiElement {
public Project getProject() {
return null;
}
}
class PsiMethod implements PsiElement {
public Project getProject() {
return null;
}
}