@Override
 public void doActivate() {
   super.doActivate();
   final Procedure1<Text> _function =
       (Text it) -> {
         String _name = this.getName();
         it.setText(_name);
         TooltipExtensions.setTooltip(it, "Zoom to reveal content");
       };
   ObjectExtensions.<Text>operator_doubleArrow(this.label, _function);
   boolean _equals = Objects.equal(this.innerDiagram, null);
   if (_equals) {
     String _name = this.getName();
     String _plus = ("No inner diagram set on node " + _name);
     String _plus_1 = (_plus + ". LOD behavior deactivated");
     LevelOfDetailDiagramNode.LOG.severe(_plus_1);
   } else {
     XDiagram _diagram = CoreExtensions.getDiagram(this);
     ViewportTransform _viewportTransform = _diagram.getViewportTransform();
     ReadOnlyDoubleProperty _scaleProperty = _viewportTransform.scaleProperty();
     final ChangeListener<Number> _function_1 =
         (ObservableValue<? extends Number> prop, Number oldVal, Number newVal) -> {
           Bounds _boundsInLocal = this.getBoundsInLocal();
           final Bounds bounds = this.localToScene(_boundsInLocal);
           double _width = bounds.getWidth();
           double _height = bounds.getHeight();
           final double area = (_width * _height);
           if ((area <= 100000)) {
             this.label.setVisible(true);
             this.innerDiagramGroup.setVisible(false);
             this.pane.setBackgroundPaint(RectangleBorderPane.DEFAULT_BACKGROUND);
           } else {
             this.label.setVisible(false);
             this.innerDiagramGroup.setVisible(true);
             this.innerDiagram.activate();
             final Procedure1<DiagramScaler> _function_2 =
                 (DiagramScaler it) -> {
                   Bounds _layoutBounds = this.label.getLayoutBounds();
                   double _width_1 = _layoutBounds.getWidth();
                   double _plus_2 = (_width_1 + 40);
                   it.setWidth(_plus_2);
                   Bounds _layoutBounds_1 = this.label.getLayoutBounds();
                   double _height_1 = _layoutBounds_1.getHeight();
                   double _plus_3 = (_height_1 + 20);
                   it.setHeight(_plus_3);
                   it.activate();
                 };
             ObjectExtensions.<DiagramScaler>operator_doubleArrow(this.diagramScaler, _function_2);
             Paint _backgroundPaint = this.innerDiagram.getBackgroundPaint();
             this.pane.setBackgroundPaint(_backgroundPaint);
           }
         };
     _scaleProperty.addListener(_function_1);
   }
 }
 public <T extends Object> XNode createNode(
     final T nodeObject, final NodeMapping<T> nodeMapping, final InterpreterContext context) {
   boolean _isApplicable = nodeMapping.isApplicable(nodeObject);
   if (_isApplicable) {
     final IMappedElementDescriptor<T> descriptor = this.<T>getDescriptor(nodeObject, nodeMapping);
     boolean _equals = Objects.equal(descriptor, null);
     if (_equals) {
       return null;
     }
     boolean _isCreateDuplicateNodes = context.isCreateDuplicateNodes();
     boolean _not = (!_isCreateDuplicateNodes);
     if (_not) {
       final XNode existingNode = context.getNode(descriptor);
       boolean _or = false;
       boolean _notEquals = (!Objects.equal(existingNode, null));
       if (_notEquals) {
         _or = true;
       } else {
         boolean _isCreateNodes = context.isCreateNodes();
         boolean _not_1 = (!_isCreateNodes);
         _or = _not_1;
       }
       if (_or) {
         return existingNode;
       }
     }
     final XNode node = nodeMapping.createNode(descriptor);
     XDiagramConfig _config = nodeMapping.getConfig();
     _config.initialize(node);
     context.addNode(node);
     boolean _isCreateConnections = context.isCreateConnections();
     if (_isCreateConnections) {
       List<AbstractConnectionMappingCall<?, T>> _incoming = nodeMapping.getIncoming();
       final Consumer<AbstractConnectionMappingCall<?, T>> _function =
           (AbstractConnectionMappingCall<?, T> it) -> {
             boolean _isOnDemand = it.isOnDemand();
             boolean _not_2 = (!_isOnDemand);
             if (_not_2) {
               final Procedure1<XConnection> _function_1 =
                   (XConnection it_1) -> {
                     it_1.setTarget(node);
                   };
               this.execute(it, nodeObject, _function_1, context);
             }
           };
       _incoming.forEach(_function);
       List<AbstractConnectionMappingCall<?, T>> _outgoing = nodeMapping.getOutgoing();
       final Consumer<AbstractConnectionMappingCall<?, T>> _function_1 =
           (AbstractConnectionMappingCall<?, T> it) -> {
             boolean _isOnDemand = it.isOnDemand();
             boolean _not_2 = (!_isOnDemand);
             if (_not_2) {
               final Procedure1<XConnection> _function_2 =
                   (XConnection it_1) -> {
                     it_1.setSource(node);
                   };
               this.execute(it, nodeObject, _function_2, context);
             }
           };
       _outgoing.forEach(_function_1);
     }
     List<AbstractLabelMappingCall<?, T>> _labels = nodeMapping.getLabels();
     final Consumer<AbstractLabelMappingCall<?, T>> _function_2 =
         (AbstractLabelMappingCall<?, T> it) -> {
           ObservableList<XLabel> _labels_1 = node.getLabels();
           Iterable<? extends XLabel> _execute = this.execute(it, nodeObject);
           Iterables.<XLabel>addAll(_labels_1, _execute);
         };
     _labels.forEach(_function_2);
     if ((node instanceof XDiagramContainer)) {
       DiagramMappingCall<?, T> _nestedDiagram = nodeMapping.getNestedDiagram();
       XDiagram _execute = null;
       if (_nestedDiagram != null) {
         XDiagram _xDiagram = new XDiagram();
         InterpreterContext _interpreterContext = new InterpreterContext(_xDiagram, context);
         _execute = this.execute(_nestedDiagram, nodeObject, _interpreterContext);
       }
       ((XDiagramContainer) node).setInnerDiagram(_execute);
     }
     return node;
   } else {
     return null;
   }
 }
 public void populate(final ModelElementImpl modelElement) {
   super.populate(modelElement);
 }