Exemple #1
0
 protected CharSequence _toHtml(final CodeRef it) {
   CharSequence _xblockexpression = null;
   {
     JvmDeclaredType _element = it.getElement();
     String _identifier = _element.getIdentifier();
     String _operator_plus = StringExtensions.operator_plus("TODO CodeRef to: ", _identifier);
     InputOutput.<String>println(_operator_plus);
     CharSequence _xifexpression = null;
     TextOrMarkup _altText = it.getAltText();
     boolean _operator_notEquals = ObjectExtensions.operator_notEquals(_altText, null);
     if (_operator_notEquals) {
       TextOrMarkup _altText_1 = it.getAltText();
       CharSequence _html = this.toHtml(_altText_1);
       _xifexpression = _html;
     } else {
       JvmDeclaredType _element_1 = it.getElement();
       String _identifier_1 = _element_1.getIdentifier();
       String _operator_plus_1 =
           StringExtensions.operator_plus("<code class=\"prettyprint lang-java\">", _identifier_1);
       String _operator_plus_2 = StringExtensions.operator_plus(_operator_plus_1, "</code>");
       _xifexpression = _operator_plus_2;
     }
     _xblockexpression = (_xifexpression);
   }
   return _xblockexpression;
 }
 protected Object _execute(final HistoryEntry entry) throws ExecutionException {
   Object _xblockexpression = null;
   {
     ExecutionRegion _region = entry.getRegion();
     ExecutionState _historyStateConfiguration =
         this.executionContext.getHistoryStateConfiguration(_region);
     boolean _operator_notEquals =
         ObjectExtensions.operator_notEquals(_historyStateConfiguration, null);
     if (_operator_notEquals) {
       Step _historyStep = entry.getHistoryStep();
       this.execute(_historyStep);
     } else {
       Step _initialStep = entry.getInitialStep();
       boolean _operator_equals = ObjectExtensions.operator_equals(_initialStep, null);
       if (_operator_equals) {
         String _operator_plus =
             StringExtensions.operator_plus("Missing initial transition ", entry);
         InputOutput.<String>println(_operator_plus);
       } else {
         Step _initialStep_1 = entry.getInitialStep();
         this.execute(_initialStep_1);
       }
     }
     _xblockexpression = (null);
   }
   return _xblockexpression;
 }
Exemple #3
0
 protected CharSequence _toHtml(final Todo it) {
   String _xblockexpression = null;
   {
     String _text = it.getText();
     String _operator_plus = StringExtensions.operator_plus("TODO: ", _text);
     InputOutput.<String>println(_operator_plus);
     _xblockexpression = ("");
   }
   return _xblockexpression;
 }
Exemple #4
0
 protected CharSequence _toHtml(final EObject it) {
   String _xblockexpression = null;
   {
     EClass _eClass = it.eClass();
     String _name = _eClass.getName();
     String _operator_plus = StringExtensions.operator_plus("Missing toHtml for ", _name);
     InputOutput.<String>println(_operator_plus);
     _xblockexpression = ("");
   }
   return _xblockexpression;
 }
Exemple #5
0
 protected static void _privk3_saveHistoryState(
     final RegionAspectRegionAspectProperties _self_,
     final Region _self,
     final Hashtable<String, Object> context) {
   InputOutput.<String>println("saving the history state");
   EList<AbstractState> _subvertex = _self.getSubvertex();
   final Function1<AbstractState, Boolean> _function =
       (AbstractState _vertex) -> {
         boolean _and = false;
         if (!(_vertex instanceof Pseudostate)) {
           _and = false;
         } else {
           _and = (_vertex instanceof ShallowHistory);
         }
         return Boolean.valueOf(_and);
       };
   boolean _exists = IterableExtensions.<AbstractState>exists(_subvertex, _function);
   if (_exists) {
     String _name = _self.getName();
     String _plus = ("currentState-" + _name);
     Object _get = context.get(_plus);
     final Function1<AbstractState, Boolean> _function_1 =
         (AbstractState _state) -> {
           boolean _and = false;
           if (!(_state instanceof State)) {
             _and = false;
           } else {
             Region _ownerRegion = ((State) _state).getOwnerRegion();
             boolean _equals = Objects.equal(_ownerRegion, _self);
             _and = _equals;
           }
           return Boolean.valueOf(_and);
         };
     AbstractState _findFirst =
         IterableExtensions.<AbstractState>findFirst(
             ((ArrayList<AbstractState>) _get), _function_1);
     RegionAspect.history(_self, ((State) _findFirst));
   }
 }
 public void testRichStrings() {
   Person _person = new Person("Joe", "Developer");
   StringConcatenation _writeLetterTo = this.writeLetterTo(_person);
   InputOutput.<StringConcatenation>println(_writeLetterTo);
 }
 protected Object _execute(final Step step) {
   String _operator_plus = StringExtensions.operator_plus("Missing dispatch function for ", step);
   String _println = InputOutput.<String>println(_operator_plus);
   return _println;
 }