Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Quick fixes migration

Bastien Jansen edited this page Nov 6, 2015 · 11 revisions

This lists the quick fixes migrated from Eclipse to ceylon-ide-common, with a snippet that will trigger the corresponding errors.

Note on how to read those cryptic emojis:

  • (IJ ❌ linked mode / EC ❌) means the IntelliJ version was started but lacks linked mode, and the Eclipse version isn't started
  • (IJ ❌ / EC ❌) means the quick fix hasn't been ported yet
  • (IJ ✅) means the quick fix has been ported with no regression

100: Function or value does not exist

void a() {
    print(hello);
}

Available fixes:

  • create local value 'hello' (IJ ❌ linked mode / EC ✅)
  • create toplevel value 'hello' (IJ ❌ linked mode / EC ✅)
  • create toplevel value 'hello' in a new source file (IJ ❌ / EC ❌)
  • create local object 'hello' (IJ ✅ / EC ✅)
  • create toplevel object 'hello' (IJ ✅ / EC ✅)
  • create toplevel object 'hello' in a new source file (IJ ❌ / EC ❌)
void a() {
    hello = "world";
}

Available fixes:

  • declare local value 'hello' (IJ ✅ / EC ✅)
  • create local value 'hello' (see above)
  • create toplevel value 'hello' (see above)
  • create toplevel value 'hello' in a new source file (see above)

101: no matching parameter for named argument foo declared by bar

void aa(Integer b) {
}

void run() {
    aa { a = 2; };
}

Available fixes:

  • add parameter 'a' to 'aa' (IJ ❌ linked mode / EC ✅)
  • change reference to 'b' (IJ ✅ / EC ✅)

102: Type declaration does not exist

SerializationContext foo;

Available fixes:

  • Add import of class ... in package ... (IJ ✅ / EC ✅)
  • Change reference to Deserialization in package ... (IJ ✅ / EC ✅)
class A() of B | c { }
interface D of E | f { }

Available fixes on B:

  • Create enumerated class B (IJ ✅ / EC ✅)
  • Change reference to A/D not presente in IJ ?!

Available fixes on c:

  • Create enumerated object c (IJ ✅ / EC ✅)
  • Add parameter c to A (IJ ❌ linked mode / EC ✅)
  • Create local/toplevel value/object c / in a new source file (IJ ❌ / EC ❌)

Available fixes on E:

  • Create enumerated interface c (IJ ✅ / EC ✅)
  • Change reference to A/D

Available fixes on f:

  • Create enumerated object f (IJ ✅ / EC ✅)
  • Create local/toplevel value/object f / in a new source file
Abc("");

Available fixes:

  • Create local class 'Abc' (IJ ✅ / EC ✅)
  • Create toplevel class 'Abc' / in a new source file (IJ ✅ / EC ✅) / (IJ ❌ / EC ❌)
  • Change reference to ... (IJ ✅ / EC ✅)

200: toplevel/shared value must explicitly specify a type

shared value a = 1;

Available fix:

  • declare explicit type Integer (IJ ❌ / EC ❌)

300: Formal member a of A not implemented in class hierarchy

interface A {
    shared formal void a();
}
class AA() satisfies A {}    

Available fixes:

  • refine inherited formal members of AA (IJ ✅ / EC ✅)
  • make AA abstract (IJ ✅ / EC ✅)

350: TODO (ambiguous names)

310: alias of abstract class must be annotated abstract

abstract class A() {}
class AA() => A(); 

Available fixes:

  • make AA abstract (IJ ✅ / EC ✅)

400/402: imported xyz is not shared / xyz is not visible

abstract class A() {
    void a() {}
}

class AA() extends A() {
    super.a();
}

Available fixes:

  • make a shared in A (IJ ✅ / EC ✅)

705: default constructor must be annotated shared

class A {
    new() {}
}

Available fixes:

  • make default constructor shared in A (IJ ✅ / EC ✅)

500/510: member refines a non-default, non-formal member / inherited attribute may not be assigned in initializer and is neither formal nor default so may not be refined

abstract class A() {
    shared String a = "";
}

class AA() extends A() {
    a = "4";
}

600: non-actual member refines an inherited member

abstract class A() {
    shared formal String a;
}

class AA() extends A() {
    shared String a;
}

701: actual declaration must be shared

abstract class A() {
    shared formal String a;
}

class AA() extends A() {
    actual String a;
}

702: formal declaration must be shared

abstract class A() {
    formal String a;
}

703: default declaration must be shared

abstract class A() {
    default String a = "2";
}

710/711: type of parameter xyz is not visible everywhere declaration is visible: foo involves an unshared type declaration

interface A {}
shared class AA(A b) {}

713: aliased type is not visible everywhere type alias xyz is visible: foo involves an unshared type declaration

interface A {}
shared alias AA => A;

800/804: value is not a variable / non-variable attribute refines a variable attribute

void a() {
    Integer b = 0;
    b++;
}

803: value is not a variable and may not be assigned here / cannot specify value declared in outer scope / ...

class A() {
    Integer a;

    void foo() {
        a = 3;
    }
}

801: ??

802: ??

905: non-abstract class parameterized by self type

class A() of B<A> {
}
class B<C>() extends A() {}

1100: formal member belongs to non-abstract, non-formal class

class A() {
    shared formal void a() {}
}

1101: formal member may not have a body

abstract class A() {
    shared formal void a() {}
}

1200/1201: shared declaration is not a member of a class, interface, or package / setter may not be annotated shared

void a() {
    shared void b() {
    }
}

1300/1301: actual member does not refine any inherited member / actual declaration is not a member of a class or interface

class A() {
    shared actual void a() {
    }
}

1302/1312/1307: formal declaration is not a method, getter, reference attribute, or class / ...

abstract class A() {
    shared formal alias AA => String;
}

1303/1313/1320: default declaration is not a method, getter, reference attribute, or class

abstract class A() {
    shared default alias AA => String;
}

1350: member of final class may not be annotated default

final class A() {
    shared default void a();
}

1400/1401: interface attribute must be annotated formal

interface A {
    void a();
}

1450: forward declaration may not occur in declaration section

class A() {
    shared void b() {}
    shared String a;
}

1610: abstract constructor may not be annotated shared

class A {
    shared abstract new a() {}
}

1500/1501: declaration is not a value, and may not be annotated variable

class A() {
    variable void a() {}
}

1600/1601: declaration is not a class, and may not be annotated abstract

abstract interface A {}

1700: declaration is not a class, and may not be annotated final

final interface A {}

1800/1801: class without parameter list may not be annotated sealed

sealed class A {
    shared new() {}
}

1900: value is not an uninitialized reference, and may not be annotated late

class A() {
    late String a = "";
}

1950/1951: declaration is not a function or class, and may not be annotated annotation

annotation object a {}

specify type

TODO (we have a skeleton in SpecifyTypeQuickFix

Clone this wiki locally