@Override
  public void clear(SNode node, EditorComponent editorComponent) {
    if (editorComponent.getNodeForTypechecking() == null) return;

    TypeContextManager.getInstance()
        .acquireTypecheckingContext(editorComponent.getNodeForTypechecking(), editorComponent);
    TypeContextManager.getInstance().releaseTypecheckingContext(editorComponent);
  }
Esempio n. 2
0
 @Override
 public Set<EditorMessage> createMessages(
     final SNode node,
     final List<SModelEvent> list,
     final boolean wasCheckedOnce,
     final EditorContext editorContext) {
   return TypeContextManager.getInstance()
       .runTypeCheckingComputation(
           ((EditorComponent) editorContext.getEditorComponent()).getTypecheckingContextOwner(),
           node,
           new ITypechecking.Computation<Set<EditorMessage>>() {
             @Override
             public Set<EditorMessage> compute(TypeCheckingContext p0) {
               return doCreateMessages(node, list, wasCheckedOnce, editorContext);
             }
           });
 }
 @Override
 public Set<EditorMessage> createMessages(
     final SNode rootNode,
     List<SModelEvent> events,
     final boolean wasCheckedOnce,
     final EditorContext editorContext,
     final Cancellable cancellable) {
   myMessagesChanged = false;
   return TypeContextManager.getInstance()
       .runTypeCheckingComputation(
           ((EditorComponent) editorContext.getEditorComponent()).getTypecheckingContextOwner(),
           rootNode,
           new Computation<Set<EditorMessage>>() {
             @Override
             public Set<EditorMessage> compute(final TypeCheckingContext context) {
               final Set<EditorMessage> messages = new LinkedHashSet<EditorMessage>();
               doCreateMessages(
                   context, wasCheckedOnce, editorContext, rootNode, messages, cancellable);
               return messages;
             }
           });
 }
Esempio n. 4
0
 public static void checkNodeWithTypeCheckingAction(
     final SNode node, ITypechecking.Action checkingAction) {
   ITypeContextOwner owner = new DefaultTypecheckingContextOwner();
   SNode containingRoot = node.getContainingRoot();
   TypeContextManager.getInstance().runTypeCheckingAction(owner, containingRoot, checkingAction);
 }
 @Override
 public TypeCheckingContext createTypecheckingContext(
     SNode sNode, TypeContextManager typeContextManager) {
   return typeContextManager.createTypeCheckingContextForResolve(sNode);
 }