Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » Fragile compilation for circularly referenced classes
Fragile compilation for circularly referenced classes [message #568900] Mon, 22 February 2010 10:39
Eugene Hutorny is currently offline Eugene Hutorny
Messages: 109
Registered: January 2010
Senior Member
Hi Stephan,

I noticed that the compilation in UI sporadically fails on classes with circular references (please take a look at the example below). The problem is gone when recompiled with Project>Clean....

The example:

public team class A<B b> {
public void run() {
System.out.println("A.run()");
}
public class Q playedBy R<@b> {
void run() <- replace void run();
// 1. originally the compiler forced to declare 'Object run()'
// 2. compile process is fragile with circular references, like in this exercise
callin void run() {
base.run();
System.out.println("Q.run()");
}
}
}

public team class B {
public class R playedBy A {
void run() <- replace void run();
callin void run() {
base.run();
System.out.println("R.run()");
}
}
}

public class TheTest {
final B b = new B();
final A a = new A<@b>();

public void run() {
within(b) {
a.run();
}
}
}


The exception:


eclipse.buildId=I20100129.OT-1.4.0M2
java.version=1.5.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=uk_UA
Command-line arguments: -os win32 -ws win32 -arch x86


Error
Mon Feb 22 12:21:48 EET 2010
Error checking callin/callout binding

Java Model Exception: Core Exception [code 0] Base class for role A.Q not found.
at org.objectteams.otdt.internal.core.RoleType.getBaseClass(Rol eType.java:178)
at org.objectteams.otdt.internal.core.CallinMapping.findBaseMet hods(CallinMapping.java:228)
at org.objectteams.otdt.internal.core.CallinMapping.getBoundBas eMethods(CallinMapping.java:202)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.searchMemberBindings(CallinMarkerCreator2.java:612)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.updateMethodMarkers(CallinMarkerCreator2.java:373)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.updateCallinMarkers(CallinMarkerCreator2.java:297)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.access$1(CallinMarkerCreator2.java:267)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2$3.updateMarkers(CallinMarkerCreator2.java:252)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerJ ob.run(CallinMarkerJob.java:58)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.core.runtime.CoreException: Base class for role A.Q not found.
at org.objectteams.otdt.internal.core.RoleType.getBaseClass(Rol eType.java:178)
at org.objectteams.otdt.internal.core.CallinMapping.findBaseMet hods(CallinMapping.java:228)
at org.objectteams.otdt.internal.core.CallinMapping.getBoundBas eMethods(CallinMapping.java:202)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.searchMemberBindings(CallinMarkerCreator2.java:612)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.updateMethodMarkers(CallinMarkerCreator2.java:373)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.updateCallinMarkers(CallinMarkerCreator2.java:297)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2.access$1(CallinMarkerCreator2.java:267)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerC reator2$3.updateMarkers(CallinMarkerCreator2.java:252)
at org.objectteams.otdt.internal.ui.callinmarkers.CallinMarkerJ ob.run(CallinMarkerJob.java:58)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Previous Topic:An idea on enabling typehole model in OT/J
Next Topic:Fragile compilation for circularly referenced classes
Goto Forum:
  


Current Time: Tue Sep 23 22:25:30 GMT 2014

Powered by FUDForum. Page generated in 0.19345 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software