Lines 44-49
Link Here
|
44 |
import org.eclipse.jdt.internal.core.JavaElement; |
44 |
import org.eclipse.jdt.internal.core.JavaElement; |
45 |
import org.eclipse.jdt.internal.core.PackageFragment; |
45 |
import org.eclipse.jdt.internal.core.PackageFragment; |
46 |
import org.eclipse.objectteams.otdt.core.compiler.IOTConstants; |
46 |
import org.eclipse.objectteams.otdt.core.compiler.IOTConstants; |
|
|
47 |
import org.eclipse.objectteams.otdt.internal.core.compiler.control.Config; |
47 |
import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies; |
48 |
import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies; |
48 |
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutBinding; |
49 |
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutBinding; |
49 |
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding; |
50 |
import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding; |
Lines 534-540
Link Here
|
534 |
ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; |
535 |
ReferenceBinding referenceBinding = (ReferenceBinding) this.binding; |
535 |
ReferenceBinding[] internalInterfaces = null; |
536 |
ReferenceBinding[] internalInterfaces = null; |
536 |
try { |
537 |
try { |
|
|
538 |
//{ObjectTeams: protect with minimally configured Dependencies: |
539 |
// see Bug 352605 - Eclipse is reporting "Could not retrieve superclass" every few minutes |
540 |
Config cfg = null; |
541 |
if (!Dependencies.isSetup()) |
542 |
cfg = Dependencies.setup(this, null, this.resolver.lookupEnvironment(), false, false, false, false, false, true); |
543 |
try { |
544 |
// orig: |
537 |
internalInterfaces = referenceBinding.superInterfaces(); |
545 |
internalInterfaces = referenceBinding.superInterfaces(); |
|
|
546 |
// :giro |
547 |
} finally { |
548 |
if (cfg != null) |
549 |
Dependencies.release(this); |
550 |
} |
551 |
// SH} |
538 |
} catch (RuntimeException e) { |
552 |
} catch (RuntimeException e) { |
539 |
/* in case a method cannot be resolvable due to missing jars on the classpath |
553 |
/* in case a method cannot be resolvable due to missing jars on the classpath |
540 |
* see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871 |
554 |
* see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871 |
Lines 902-908
Link Here
|
902 |
} |
916 |
} |
903 |
ReferenceBinding superclass = null; |
917 |
ReferenceBinding superclass = null; |
904 |
try { |
918 |
try { |
|
|
919 |
//{ObjectTeams: protect with minimally configured Dependencies: |
920 |
// see Bug 352605 - Eclipse is reporting "Could not retrieve superclass" every few minutes |
921 |
Config cfg = null; |
922 |
if (!Dependencies.isSetup()) |
923 |
cfg = Dependencies.setup(this, null, this.resolver.lookupEnvironment(), false, false, false, false, false, true); |
924 |
try { |
925 |
// orig: |
905 |
superclass = ((ReferenceBinding)this.binding).superclass(); |
926 |
superclass = ((ReferenceBinding)this.binding).superclass(); |
|
|
927 |
// :giro |
928 |
} finally { |
929 |
if (cfg != null) |
930 |
Dependencies.release(this); |
931 |
} |
932 |
// SH} |
906 |
} catch (RuntimeException e) { |
933 |
} catch (RuntimeException e) { |
907 |
/* in case a method cannot be resolvable due to missing jars on the classpath |
934 |
/* in case a method cannot be resolvable due to missing jars on the classpath |
908 |
* see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871 |
935 |
* see https://bugs.eclipse.org/bugs/show_bug.cgi?id=57871 |
Lines 1294-1304
Link Here
|
1294 |
if (! this.binding.isRole()) |
1321 |
if (! this.binding.isRole()) |
1295 |
return null; |
1322 |
return null; |
1296 |
ReferenceBinding roleBinding = (ReferenceBinding) this.binding; |
1323 |
ReferenceBinding roleBinding = (ReferenceBinding) this.binding; |
1297 |
ReferenceBinding baseclass = roleBinding.baseclass(); |
1324 |
Config cfg = null; |
1298 |
if (baseclass == null) { |
1325 |
if (!Dependencies.isSetup()) |
1299 |
return null; |
1326 |
cfg = Dependencies.setup(this, null, this.resolver.lookupEnvironment(), false, false, false, false, false, true); |
1300 |
} |
1327 |
try { |
1301 |
return this.resolver.getTypeBinding(baseclass); |
1328 |
ReferenceBinding baseclass = roleBinding.baseclass(); |
|
|
1329 |
if (baseclass == null) { |
1330 |
return null; |
1331 |
} |
1332 |
return this.resolver.getTypeBinding(baseclass); |
1333 |
} finally { |
1334 |
if (cfg != null) |
1335 |
Dependencies.release(this); |
1336 |
} |
1302 |
} |
1337 |
} |
1303 |
// ira+SH} |
1338 |
// ira+SH} |
1304 |
|
1339 |
|