mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git@git.labs.intellij.net:idea/community
This commit is contained in:
@@ -3,6 +3,7 @@ import org.jetbrains.jps.*
|
||||
class LibraryLicense {
|
||||
String name, libraryName, url, version
|
||||
String license, licenseUrl
|
||||
String attachedTo
|
||||
}
|
||||
|
||||
List<LibraryLicense> licensesList = []
|
||||
@@ -72,7 +73,7 @@ binding.setVariable("checkLibLicensesAndGenerateTable", {String filePath ->
|
||||
})
|
||||
|
||||
binding.setVariable("generateLicensesTable", {String filePath ->
|
||||
Set<Module> usedModules = project.modules.values().findAll {it["used"] != null}
|
||||
Set<Module> usedModules = project.modules.values()//.findAll {it["used"] != null}
|
||||
Map<String, String> usedLibraries = [:]
|
||||
usedModules.each {Module module ->
|
||||
module.getClasspath(ClasspathKind.PRODUCTION_RUNTIME).each {item ->
|
||||
@@ -82,11 +83,12 @@ binding.setVariable("generateLicensesTable", {String filePath ->
|
||||
}
|
||||
}
|
||||
|
||||
def licenses = licensesList.findAll {usedLibraries.containsKey(it.libraryName) }
|
||||
def usedModuleNames = usedModules.collect {it.name} as Set
|
||||
def licenses = licensesList.findAll {usedLibraries.containsKey(it.libraryName) || usedModuleNames.contains(it.attachedTo)}
|
||||
project.info("Generating licenses table")
|
||||
project.info("Used libraries:")
|
||||
List<String> lines = []
|
||||
licenses.each { LibraryLicense lib ->
|
||||
licenses.each {LibraryLicense lib ->
|
||||
def name = lib.url != null ? "[$lib.name|$lib.url]" : lib.name
|
||||
def license = lib.licenseUrl != null ? "[$lib.license|$lib.licenseUrl]" : lib.license
|
||||
project.info(" $lib.libraryName (in module ${usedLibraries[lib.libraryName]})")
|
||||
@@ -128,13 +130,14 @@ libraryLicense(name: "Gradle API", libraryName: "gradle-open-api-0.8.jar", versi
|
||||
libraryLicense(name: "Groovy", version: "1.7.3", license: "Apache 2.0", url: "http://groovy.codehaus.org/")
|
||||
libraryLicense(name: "Gson", libraryName: "gson-1.3.jar", license: "Apache 2.0", url: "http://code.google.com/p/google-gson/")
|
||||
libraryLicense(name: "ISO RELAX", libraryName: "isorelax.jar", license: "MIT License", url: "http://sourceforge.net/projects/iso-relax/", licenseUrl: "http://www.opensource.org/licenses/mit-license.html")
|
||||
libraryLicense(name: "JavaCVS", version: "no version number available (with patches by JetBrains)", license: "Sun Public License", url: "http://javacvs.netbeans.org/library/", licenseUrl: "http://www.netbeans.org/about/legal/spl.html")
|
||||
libraryLicense(name: "JavaCVS", attachedTo: "javacvs-src", version: "no version number available (with patches by JetBrains)", license: "Sun Public License", url: "http://javacvs.netbeans.org/library/", licenseUrl: "http://www.netbeans.org/about/legal/spl.html")
|
||||
libraryLicense(name: "JAXB", libraryName: "JAXB", version: "2.1.10", license: "CDDL 1.1 & GPL 2", url: "http://jaxb.java.net/", licenseUrl: "http://glassfish.java.net/public/CDDL+GPL_1_1.html")
|
||||
libraryLicense(name: "Jaxen", version: "", license: "modified Apache", url: "http://www.jaxen.org/", licenseUrl: "http://www.jaxen.org/license.html")
|
||||
libraryLicense(name: "JavaHelp", version: "2.0_02", license: "included as license/javahelp_license.html in IntelliJ IDEA distribution", url: "http://java.sun.com/products/javahelp/")
|
||||
libraryLicense(name: "JCIP Annotations", libraryName: "jcip", license: "Creative Commons Attribution License", url: "http://www.jcip.net", licenseUrl: "http://creativecommons.org/licenses/by/2.5")
|
||||
libraryLicense(name: "JDOM", version: "1.1 (with patches by JetBrains)", license: "modified Apache", url: "http://www.jdom.org/", licenseUrl: "http://www.jdom.org/docs/faq.html#a0030")
|
||||
libraryLicense(name: "JGoodies Forms", libraryName: "jgoodies-forms", version: "CVS snapshot as of 5 May 2006", license: "BSD ", url: "http://www.jgoodies.com/freeware/forms/", licenseUrl: "http://www.jgoodies.com/downloads/libraries.html")
|
||||
libraryLicense(name: "JGoodies Looks", attachedTo: "platform-impl", version: "2.2.2", license: "BSD ", url: "http://www.jgoodies.com/freeware/looks/", licenseUrl: "http://www.jgoodies.com/downloads/libraries.html")
|
||||
libraryLicense(name: "JNA", libraryName: "jna", version: "3.2.4", license: "LGPL 2.1", url: "https://jna.dev.java.net/", licenseUrl: "http://www.opensource.org/licenses/lgpl-2.1.php")
|
||||
libraryLicense(name: "JNA", libraryName: "jna.jar", version: "3.2.7", license: "LGPL 2.1", url: "https://jna.dev.java.net/", licenseUrl: "http://www.opensource.org/licenses/lgpl-2.1.php")
|
||||
libraryLicense(name: "JUnit", libraryName: "JUnit3", version: "3.8.1", license: "CPL 1.0", url: "http://junit.org/")
|
||||
@@ -147,7 +150,9 @@ libraryLicense(name: "Eclipse JDT Core", libraryName: "Eclipse", version: "3.3",
|
||||
libraryLicense(name: "Jakarta ORO", libraryName: "OroMatcher", version: "2.0.8", license: "Apache", url: "http://jakarta.apache.org/oro/", licenseUrl: "http://svn.apache.org/repos/asf/jakarta/oro/trunk/LICENSE")
|
||||
libraryLicense(name: "PicoContainer", libraryName: "picocontainer", version: "1.2", license: "BSD", url: "http://www.picocontainer.org/", licenseUrl: "http://docs.codehaus.org/display/PICO/License")
|
||||
libraryLicense(name: "Plexus Utils", libraryName: "plexus-utils-1.5.5.jar", version: "1.5.5", license: "Apache 2.0", url: "http://plexus.codehaus.org/plexus-utils")
|
||||
libraryLicense(name: "Quaqua L&F", attachedTo: "platform-impl", version: "6.2", license: "BSD", url: "http://www.randelshofer.ch/quaqua/", licenseUrl: "http://www.randelshofer.ch/quaqua/license.html")
|
||||
libraryLicense(name: "Relax NG Object Model", libraryName: "rngom-20051226-patched.jar", license: "MIT", url: "http://java.net/projects/rngom/", licenseUrl: "http://www.opensource.org/licenses/mit-license.php")
|
||||
libraryLicense(name: "Sonatype Nexus: Indexer", libraryName: "nexus-indexer-1.2.3.jar", version: "1.2.3", license: "Eclipse Public License", url: "http://nexus.sonatype.org/", licenseUrl: "http://www.eclipse.org/org/documents/epl-v10.html")
|
||||
libraryLicense(name: "SVNKit", libraryName: "svnkit.jar", version: "SVN version, 1.1 branch as of 1 Oct 2007", license: "link (commercial license)", url: "http://www.svnkit.com/", licenseUrl: "http://svnkit.com/license.html")
|
||||
libraryLicense(name: "TestNG", version: "5.7 snapshot", license: "Apache 2.0", url: "http://testng.org/doc/", licenseUrl: "http://code.google.com/p/testng/")
|
||||
libraryLicense(name: "Trilead SSH", libraryName: "trilead-ssh2", version: "build 213", license: "BSD style (see LICENSE.txt in trilead.jar)", url: "http://www.trilead.com/SSH_Library/")
|
||||
|
||||
@@ -60,6 +60,14 @@ public abstract class RunConfigurationExtension {
|
||||
public abstract void patchConfiguration(RunConfigurationBase runJavaConfiguration);
|
||||
public abstract void checkConfiguration(RunConfigurationBase runJavaConfiguration) throws RuntimeConfigurationException;
|
||||
|
||||
public void cleanUserData(RunConfigurationBase runConfigurationBase) {}
|
||||
|
||||
public static void cleanExtensionsUserData(RunConfigurationBase runConfigurationBase) {
|
||||
for (RunConfigurationExtension extension : Extensions.getExtensions(EP_NAME)) {
|
||||
extension.cleanUserData(runConfigurationBase);
|
||||
}
|
||||
}
|
||||
|
||||
public RefactoringElementListener wrapElementListener(PsiElement element,
|
||||
RunConfigurationBase runJavaConfiguration,
|
||||
RefactoringElementListener listener) {
|
||||
|
||||
+2
-2
@@ -238,9 +238,9 @@ public abstract class BaseLibrariesConfigurable extends BaseStructureConfigurabl
|
||||
}
|
||||
|
||||
if (artifacts.size() > 0) {
|
||||
sb.append(modules.size() > 0 ? " and in " : ".");
|
||||
sb.append(modules.size() > 0 ? " and in " : "");
|
||||
|
||||
if (modules.size() == 1) {
|
||||
if (artifacts.size() == 1) {
|
||||
sb.append("artifact ").append("\"").append(artifacts.get(0)).append("\".");
|
||||
} else {
|
||||
sb.append(artifacts.size()).append(" artifacts.");
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
class A extends A.<ref>Foo, B{
|
||||
}
|
||||
|
||||
interface B{
|
||||
static class Foo{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A extends B.<ref>Foo implements B{
|
||||
}
|
||||
|
||||
interface B{
|
||||
static class Foo{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
public class TTT implements <ref>Bar{
|
||||
static interface Bar{}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class Test{
|
||||
void foo() throws java.io.<ref>IOException{}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
|
||||
public class ImpmortConflict1{
|
||||
public static void main(String[] args){
|
||||
<ref>Date d = new Date();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import java.sql.*;
|
||||
import java.util.Date;
|
||||
|
||||
public class ImportConflict2{
|
||||
public static void main(String[] args){
|
||||
<ref>Date d = new Date();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class C{
|
||||
void foo(){
|
||||
class A{
|
||||
<ref>B b = null;
|
||||
private class B{};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A{
|
||||
{
|
||||
class B{}
|
||||
|
||||
new <ref>B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A{
|
||||
{
|
||||
class B{
|
||||
<ref>B b;
|
||||
}
|
||||
|
||||
new B();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
private static class B{}
|
||||
}
|
||||
|
||||
class C extends A.<ref>B{}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
{
|
||||
Outer outer;
|
||||
outer.new <ref>Inner();
|
||||
}
|
||||
}
|
||||
|
||||
class Outer{
|
||||
class Inner{}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A {
|
||||
{
|
||||
Outer outer;
|
||||
outer.new <ref>Inner(){};
|
||||
}
|
||||
}
|
||||
|
||||
class Outer{
|
||||
class Inner{}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class C<T> {}
|
||||
class CC extends C<<ref>Inner> {
|
||||
static class Inner { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
interface A {
|
||||
class Entry {}
|
||||
}
|
||||
|
||||
class B implements A {
|
||||
private class Entry {}
|
||||
}
|
||||
|
||||
|
||||
class C extends B {
|
||||
static void foo(<ref>Entry e){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import static Outer.Double;
|
||||
|
||||
class Outer {
|
||||
static class Double {
|
||||
}
|
||||
}
|
||||
|
||||
class StaticImportTest {
|
||||
public static void main(String[] args) {
|
||||
<ref>Double d;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class TwoModules {
|
||||
|
||||
<ref>Src src;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class TwoModules2 {
|
||||
|
||||
<ref>Test test;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class s {
|
||||
public static final repeat REPEAT = new <ref>repeat();
|
||||
boolean repeat = false;
|
||||
static class repeat {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class s {
|
||||
public static final repeat REPEAT = new <ref>repeat(){};
|
||||
boolean repeat = false;
|
||||
static class repeat {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
class Src {}
|
||||
@@ -0,0 +1 @@
|
||||
class Test {}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Test {
|
||||
public void foo() {
|
||||
int i = 0;
|
||||
System.out.println(<ref>i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "/x/y/MyClass.java<caret>";
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class C {
|
||||
String s = "x/<caret>MyFile.txt";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
xxxxxxxxxxxxx
|
||||
@@ -0,0 +1 @@
|
||||
//xxxxxxxxx
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
class Test {
|
||||
private static void p( Class<? extends Object> cl )
|
||||
{
|
||||
cl.<ref>getSuperclass();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
<V> V m(V v) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void n () {
|
||||
<ref>m(10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
Seq<String> n = <ref>nil();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
Seq<String> s = <ref>cons("abc", nil());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo (Seq<String> seq) {}
|
||||
|
||||
static void foo() {
|
||||
foo(<ref>nil());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
public class Seq<T> {
|
||||
public Seq() {}
|
||||
|
||||
public Seq(T x, Seq<T> xs) {
|
||||
}
|
||||
|
||||
static <T> Seq<T> nil () {
|
||||
return new Seq<T> ();
|
||||
}
|
||||
|
||||
static <V> Seq<V> cons (V x, Seq<V> xs) {
|
||||
return new Seq<V> (x, xs);
|
||||
}
|
||||
|
||||
static void foo() {
|
||||
(Seq<String>)<ref>nil();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class C {
|
||||
class I {}
|
||||
class A extends I {}
|
||||
class B extends I {}
|
||||
|
||||
<T> T f(T t1, T t2) {return null;}
|
||||
|
||||
void foo () {
|
||||
Object o = <ref>f (new A(), new B ());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class C <T> {
|
||||
<T> T foo () {return null;}
|
||||
|
||||
class Sub {
|
||||
T foo () {
|
||||
return C.this.<ref>foo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A<T> {}
|
||||
class B<T> extends A<T> {}
|
||||
|
||||
class C {
|
||||
<T> B<T> f() {return null;}
|
||||
|
||||
void bar () {
|
||||
A<String> a = <ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import java.util.*;
|
||||
|
||||
|
||||
class SortedList<E extends Comparable> extends ArrayList<E>
|
||||
{
|
||||
public static <T> T binarySearch(List<? extends Comparable<? super T>> list, T key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean add(E e){
|
||||
<ref>binarySearch(this,e); //infer E
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> T extract(List<T> l) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void foo (List<double[]> l) {
|
||||
<ref>extract(l);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class G<T> {}
|
||||
|
||||
public class C {
|
||||
|
||||
<T> T f (G<T> l) { return null;}
|
||||
|
||||
void foo (G l) {
|
||||
String s = <ref>f(l);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class List<T> {}
|
||||
class ArrayList<T> extends List<T> {}
|
||||
class Comparator<T> {}
|
||||
|
||||
public class TokenStreamRewriteEngine {
|
||||
public static <T> T binarySearch(List<? extends T> list, T key, Comparator<? super T> c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void addToSortedRewriteList(String programName, String op, Comparator comparator) {
|
||||
List rewrites = new ArrayList();
|
||||
<ref>binarySearch(rewrites, op, comparator);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class C {
|
||||
class Inner {}
|
||||
<T extends Inner> T f() {return null;}
|
||||
|
||||
void bar () {
|
||||
Object o = <ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test {
|
||||
<T extends String> int getValue() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
void cc() {
|
||||
<ref>getValue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C1 {}
|
||||
class C2 extends C1 {}
|
||||
|
||||
class C {
|
||||
<T> T foo (T... ts) { return null; }
|
||||
|
||||
void bar () {
|
||||
<ref>foo(new C2());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C1 {}
|
||||
class C2 extends C1 {}
|
||||
|
||||
class C {
|
||||
<T> T foo (T... ts) { return null; }
|
||||
|
||||
void bar () {
|
||||
<ref>foo(new C2(), new C1());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new int[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new int[0], new int[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new Integer[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class List<T> {}
|
||||
|
||||
class Test {
|
||||
<T> List<T> asList(T... ts) {
|
||||
return null;
|
||||
}
|
||||
void foo () {
|
||||
<ref>asList(new Integer[0], new Integer[0]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Collection<T> {}
|
||||
class Comparator<T> {}
|
||||
|
||||
public class Collections {
|
||||
public static <T> T min(Collection<? extends T> coll, Comparator<? super T> comp) {
|
||||
if (comp==null)
|
||||
return (T)<ref>min((Collection<SelfComparable>) (Collection) coll);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> coll) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private interface SelfComparable extends Comparable<SelfComparable> {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class C<T> {
|
||||
<T> T foo (C<? extends T> c) {return null;}
|
||||
|
||||
void bar (C<? extends String> c) {
|
||||
<ref>foo(c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
class Collection<T> {}
|
||||
|
||||
interface Bar {}
|
||||
|
||||
class BarImpl implements Bar {}
|
||||
|
||||
interface Foo<E extends Bar> {
|
||||
Collection<E> getElements();
|
||||
}
|
||||
|
||||
class FooImpl implements Foo<BarImpl> {
|
||||
public Collection<BarImpl> getElements() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class Bazz {
|
||||
public static <E extends Bar> Collection<E> getElements(Collection<? extends Foo<E>> foos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void failure(final Collection<FooImpl> foos) {
|
||||
<ref>getElements(foos);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super T> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Long> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super T[]> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Long[]> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class X {
|
||||
static class Y<T> {
|
||||
}
|
||||
|
||||
static <T> Y<T> x(Y<? super Y<T>> y) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Y<Y<Long>> y1 = null;
|
||||
X.<ref>x(y1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class List<T>{
|
||||
T get () {return null;}
|
||||
}
|
||||
|
||||
class CaptureTest <T> {
|
||||
private List<? extends List<T>> listOfSets;
|
||||
|
||||
private void foo() {
|
||||
<ref>doGenericThing(listOfSets.get(0));
|
||||
}
|
||||
|
||||
public <U> List<U> doGenericThing(List<U> set) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 22.01.2003
|
||||
* Time: 11:15:19
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Test1 {
|
||||
public static class A{
|
||||
protected void foo(){}
|
||||
}
|
||||
|
||||
public static void main(String[] args){
|
||||
new A(){
|
||||
protected void foo(){
|
||||
super.<ref>foo();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class Array{
|
||||
void foo(){
|
||||
int[] array;
|
||||
array.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 22.01.2003
|
||||
* Time: 14:46:09
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Bug7968 {
|
||||
public static void foo (String s, String s1, String s2, Object[] oa)
|
||||
{
|
||||
Bar.<ref>bar (s, s1, s2, oa);
|
||||
}
|
||||
class Bar
|
||||
{
|
||||
public static void bar (Object o, String s1, String s2, Object[] ao) {}
|
||||
public static void bar (String s, String s1, String s2, Object o) {}
|
||||
public static void bar (String s, String s1, String s2, Object[] ao) {}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class Z{
|
||||
public interface A { Object clone(); }
|
||||
|
||||
interface B extends A { }
|
||||
|
||||
|
||||
|
||||
|
||||
class C implements B {
|
||||
Object clone() {
|
||||
C c = new C();
|
||||
((A) c).clone();
|
||||
((B) c).<ref>clone();
|
||||
return c.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
public class Cycle1{
|
||||
public interface A{
|
||||
void foo();
|
||||
}
|
||||
|
||||
public interface B{
|
||||
void foo();
|
||||
}
|
||||
|
||||
public static class C
|
||||
implements A{
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
public static class D extends C
|
||||
implements B{
|
||||
void foo(int ggg){}
|
||||
|
||||
void foo1(){
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
A(){
|
||||
<ref>super();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
abstract public class YYY implements I,II{
|
||||
private void f(YYY y) {
|
||||
II i = y.<ref>foo();
|
||||
}
|
||||
}
|
||||
interface I {
|
||||
I foo();
|
||||
}
|
||||
interface II extends I {
|
||||
II foo();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
{
|
||||
"aaa".<ref>indexOf('a');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 23.01.2003
|
||||
* Time: 18:44:34
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Inner1 {
|
||||
private int a(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
private class A extends B{
|
||||
{
|
||||
int j = <ref>a();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
public int a(){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class A{
|
||||
public int askdh(){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A{
|
||||
public void askdh(){
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
class Super1 extends B{
|
||||
{
|
||||
super.<ref>askdh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
public class InnerClass {
|
||||
void foo() {}
|
||||
|
||||
class Inner {
|
||||
void foo(int i) {}
|
||||
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
class A{
|
||||
interface A{}
|
||||
interface B{}
|
||||
|
||||
class C implements A, B{
|
||||
void foo(A a){}
|
||||
void foo(B b){}
|
||||
}
|
||||
{
|
||||
new C().<ref>foo(new C())
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Test{
|
||||
{
|
||||
new Runnable(){
|
||||
{
|
||||
<ref>run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
class A{
|
||||
void foo(Object a, String b){
|
||||
}
|
||||
|
||||
void foo(){
|
||||
<ref>foo("aaa", true);
|
||||
}
|
||||
|
||||
void foo(String a, boolean b){
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
B b1;
|
||||
static B b2;
|
||||
public class Z extends B{
|
||||
public void akshdkjasdh(){}
|
||||
}
|
||||
private class B{
|
||||
public void f() {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class C extends A {
|
||||
{
|
||||
b1.<ref>f();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
interface PublicCloneable {
|
||||
Object clone();
|
||||
}
|
||||
interface Extension extends Serializable, PublicCloneable {}
|
||||
class Test {
|
||||
void foo(Extension bar) {
|
||||
bar.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class A{
|
||||
public abstract class IntegerPredicateBase implements Predicate{
|
||||
public boolean applies(Object obj){
|
||||
return <ref>applies((Integer)obj);
|
||||
}
|
||||
}
|
||||
public interface Predicate{
|
||||
boolean applies(Object obj);
|
||||
boolean applies(Integer myObj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class A{
|
||||
private void foo(String s){}
|
||||
public void foo(Object o){}
|
||||
}
|
||||
|
||||
class B{
|
||||
{
|
||||
new A().<ref>foo("a");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Outer {
|
||||
private void foo() {}
|
||||
|
||||
static class Inner extends Outer {
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Outer {
|
||||
private void foo() {}
|
||||
|
||||
class Inner extends Outer {
|
||||
void bar() {
|
||||
<ref>foo();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
class Xc extends JComponent {
|
||||
JComponent component;
|
||||
|
||||
protected void paintComponent(final Graphics g) {
|
||||
component.<ref>paintComponent(g);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Remove1{
|
||||
void foo(Object o){}
|
||||
void foo(String o){}
|
||||
public static class A extends Remove{
|
||||
void foo(Object o){
|
||||
}
|
||||
void foo(String o){
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(){
|
||||
new A().<ref>foo("aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.util.ArrayList;
|
||||
public class Remove2{
|
||||
private static ArrayList lst = new ArrayList();
|
||||
public static void main(){
|
||||
lst.<ref>remove("aaa");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package psi.resolve.method;
|
||||
|
||||
import com.intellij.util.containers.trove.THashMap;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 17.01.2003
|
||||
* Time: 15:08:26
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Remove3{
|
||||
THashMap map = new THashMap();
|
||||
|
||||
void foo(){
|
||||
map.<ref>size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package ;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 17.01.2003
|
||||
* Time: 19:11:56
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class Remove4 {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
interface I {
|
||||
boolean foo(Object obj);
|
||||
|
||||
boolean foo(Integer myObj);
|
||||
}
|
||||
|
||||
abstract class C implements I {
|
||||
public boolean foo(Object obj) {
|
||||
return <ref>foo((Integer)obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
class Base {
|
||||
}
|
||||
|
||||
class Derived extends Base {
|
||||
}
|
||||
|
||||
class Server {
|
||||
static Base sub(Base p1, Base p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Derived p1, Base p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Base p1, Derived p2) {
|
||||
}
|
||||
|
||||
static Derived sub(Derived p1, Derived p2) {
|
||||
}
|
||||
}
|
||||
|
||||
class Client {
|
||||
{
|
||||
Derived arg = null;
|
||||
Server.<ref>sub(arg, arg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A{
|
||||
String toHex(int i) {}
|
||||
String toHex(short i) {}
|
||||
|
||||
void f(){
|
||||
<ref>toHex('i');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Simple {
|
||||
public void method(String s) {
|
||||
}
|
||||
|
||||
static {
|
||||
Simple a = new Simple();
|
||||
a.<ref>method("blah");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class Sout {
|
||||
static {
|
||||
System.out.<ref>println();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
public void foo() {}
|
||||
|
||||
public static void foo(char c){}
|
||||
}
|
||||
|
||||
class A{
|
||||
{
|
||||
Foo.<ref>foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class A{
|
||||
public void askdh(){
|
||||
}
|
||||
}
|
||||
|
||||
class Super1 extends A{
|
||||
{
|
||||
super.<ref>askdh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
interface I {
|
||||
Object clone();
|
||||
}
|
||||
|
||||
interface J extends I {
|
||||
}
|
||||
|
||||
class CBase implements I {
|
||||
}
|
||||
|
||||
class C extends CBase implements J {
|
||||
{
|
||||
super.<ref>clone();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: ik
|
||||
* Date: 28.05.2003
|
||||
* Time: 16:24:03
|
||||
* To change this template use Options | File Templates.
|
||||
*/
|
||||
public class TestOverloading1 {
|
||||
class A{
|
||||
void foo(){}
|
||||
}
|
||||
class B extends A{
|
||||
void foo(){}
|
||||
}
|
||||
|
||||
{
|
||||
new B().<ref>foo(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo() throws Exception{
|
||||
throw <ref>Exception();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo() throws Exception{
|
||||
throw <ref>Exception();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class A{
|
||||
void foo(){
|
||||
String.<ref>valueOf(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Ambiguous {
|
||||
void f(Object o1, Object o2) {}
|
||||
void f(int o1, int o2) {}
|
||||
|
||||
void g(Integer i)
|
||||
{
|
||||
<ref>f(1, i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
public class Foo {
|
||||
|
||||
public void foo(Comparable c) {
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
<ref>foo(1L);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class Foo {
|
||||
<T> Foo(T t) {
|
||||
|
||||
}
|
||||
|
||||
static {
|
||||
Foo f = <String>new <ref>Foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
interface F {
|
||||
Object o();
|
||||
}
|
||||
interface E extends F {
|
||||
String o();
|
||||
}
|
||||
interface B extends E,F { }
|
||||
|
||||
class User {
|
||||
void x(B a) {
|
||||
String o = a.<ref>o();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class X<T> {
|
||||
class XX extends X<X> {}
|
||||
void <T> f(X<T> x, T t) {
|
||||
f(new XX(), new X());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
interface Runnable{}
|
||||
interface Class<T>{}
|
||||
|
||||
public class Foo implements Runnable{
|
||||
static <T> void foo(Class<T> aClass, T t) { }
|
||||
|
||||
Class<Foo> getC(){ return new Class<Foo>(){};}
|
||||
public void run() {
|
||||
}
|
||||
|
||||
{
|
||||
<ref>foo(new Class<Runnable>(){}, this);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user