Пример #1
0
 /**
  * Filters Spoofax editor-service declarations.
  *
  * @param term a SugarJ extension declaration.
  */
 public static IStrategoTerm extractEditor(IStrategoTerm term) throws IOException {
   IStrategoTerm result = null;
   Context extractionContext = SugarJContexts.extractionContext();
   try {
     result = extract_editor_0_0.instance.invoke(extractionContext, term);
   } catch (StrategoExit e) {
     if (e.getValue() != 0 || result == null)
       throw new RuntimeException("Editor service extraction failed", e);
   } finally {
     SugarJContexts.releaseContext(extractionContext);
   }
   return result;
 }