/** Completion for classes to be loaded. Before a class is loaded * we make sure its enclosing class (if any) is loaded. */ public void complete(Symbol sym) throws CompletionFailure { if (sym.kind == TYP) { ClassSymbol c = (ClassSymbol)sym; c.members_field = new Scope.ErrorScope(c); // make sure it's always defined boolean suppressFlush = this.suppressFlush; this.suppressFlush = true; try { completeOwners(c.owner); completeEnclosing(c); } finally { this.suppressFlush = suppressFlush; } fillIn(c); } else if (sym.kind == PCK) { PackageSymbol p = (PackageSymbol)sym; try { fillIn(p); } catch (IOException ex) { throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex); } } if (!filling && !suppressFlush) annotate.flush(); // finish attaching annotations }
/** Completion for classes to be loaded. Before a class is loaded * we make sure its enclosing class (if any) is loaded. */ public void complete(Symbol sym) throws CompletionFailure { if (sym.kind == TYP) { ClassSymbol c = (ClassSymbol)sym; c.members_field = new Scope.ErrorScope(c); // make sure it's always defined boolean suppressFlush = this.suppressFlush; this.suppressFlush = true; try { completeOwners(c.owner); completeEnclosing(c); } finally { this.suppressFlush = suppressFlush; } fillIn(c); } else if (sym.kind == PCK) { PackageSymbol p = (PackageSymbol)sym; try { fillIn(p); } catch (IOException ex) { throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex); } } if (!filling && !suppressFlush) annotate.flush(); // finish attaching annotations }
/** Completion for classes to be loaded. Before a class is loaded * we make sure its enclosing class (if any) is loaded. */ private void complete(Symbol sym) throws CompletionFailure { if (sym.kind == TYP) { ClassSymbol c = (ClassSymbol)sym; c.members_field = new Scope.ErrorScope(c); // make sure it's always defined annotate.enterStart(); try { completeOwners(c.owner); completeEnclosing(c); } finally { // The flush needs to happen only after annotations // are filled in. annotate.enterDoneWithoutFlush(); } fillIn(c); } else if (sym.kind == PCK) { PackageSymbol p = (PackageSymbol)sym; try { fillIn(p); } catch (IOException ex) { throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex); } } if (!filling) annotate.flush(); // finish attaching annotations }
/** Completion for classes to be loaded. Before a class is loaded * we make sure its enclosing class (if any) is loaded. */ private void complete(Symbol sym) throws CompletionFailure { if (sym.kind == TYP) { ClassSymbol c = (ClassSymbol)sym; c.members_field = new Scope.ErrorScope(c); // make sure it's always defined annotate.enterStart(); try { completeOwners(c.owner); completeEnclosing(c); } finally { // The flush needs to happen only after annotations // are filled in. annotate.enterDoneWithoutFlush(); } fillIn(c); } else if (sym.kind == PCK) { PackageSymbol p = (PackageSymbol)sym; try { fillIn(p); } catch (IOException ex) { throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex); } } if (!filling) annotate.flush(); // finish attaching annotations }