This repository was archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
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
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)
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 ✅)
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 ✅)
shared value a = 1;
Available fix:
- declare explicit type Integer (IJ ❌ / EC ❌)
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 ✅)
abstract class A() {}
class AA() => A();
Available fixes:
- make AA abstract (IJ ✅ / EC ✅)
abstract class A() {
void a() {}
}
class AA() extends A() {
super.a();
}
Available fixes:
- make a shared in A (IJ ✅ / EC ✅)
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";
}
abstract class A() {
shared formal String a;
}
class AA() extends A() {
shared String a;
}
abstract class A() {
shared formal String a;
}
class AA() extends A() {
actual String a;
}
abstract class A() {
formal String a;
}
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;
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;
}
}
class A() of B<A> {
}
class B<C>() extends A() {}
class A() {
shared formal void a() {}
}
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() {
}
}
abstract class A() {
shared formal alias AA => String;
}
abstract class A() {
shared default alias AA => String;
}
final class A() {
shared default void a();
}
interface A {
void a();
}
class A() {
shared void b() {}
shared String a;
}
class A {
shared abstract new a() {}
}
class A() {
variable void a() {}
}
abstract interface A {}
final interface A {}
sealed class A {
shared new() {}
}
class A() {
late String a = "";
}
annotation object a {}
TODO (we have a skeleton in SpecifyTypeQuickFix