Ejemplo n.º 1
0
 public boolean doNeedRebuild(
     final JavaBuilderState it,
     final Procedure1<? super UnconfirmedStructuralChangesDelta> processor) {
   boolean _xblockexpression = false;
   {
     final Iterator<UnconfirmedStructuralChangesDelta> i = this.unconfirmedDeltas.iterator();
     boolean _hasNext = i.hasNext();
     boolean _while = _hasNext;
     while (_while) {
       {
         final UnconfirmedStructuralChangesDelta unconfirmed = i.next();
         boolean _and = false;
         int _buildNumber = unconfirmed.getBuildNumber();
         Integer _buildNumber_1 = it.getBuildNumber();
         boolean _lessThan = (_buildNumber < (_buildNumber_1).intValue());
         if (!_lessThan) {
           _and = false;
         } else {
           IProject _project = unconfirmed.getProject();
           IProject _project_1 = it.getProject();
           boolean _equals = _project.equals(_project_1);
           _and = (_lessThan && _equals);
         }
         if (_and) {
           i.remove();
           boolean _notEquals = (!Objects.equal(processor, null));
           if (_notEquals) {
             processor.apply(unconfirmed);
           }
         }
       }
       boolean _hasNext_1 = i.hasNext();
       _while = _hasNext_1;
     }
     int _size = this.unconfirmedDeltas.size();
     boolean _notEquals = (_size != 0);
     _xblockexpression = (_notEquals);
   }
   return _xblockexpression;
 }
Ejemplo n.º 2
0
 public void doQueueChanges(final Collection<Delta> queuedDeltas) {
   boolean _or = false;
   boolean _equals = Objects.equal(queuedDeltas, null);
   if (_equals) {
     _or = true;
   } else {
     int _size = queuedDeltas.size();
     boolean _equals_1 = (_size == 0);
     _or = (_equals || _equals_1);
   }
   if (_or) {
     return;
   }
   for (final Delta delta : queuedDeltas) {
     boolean _matched = false;
     if (!_matched) {
       if (delta instanceof UnconfirmedStructuralChangesDelta) {
         _matched = true;
         final IProject project = ((UnconfirmedStructuralChangesDelta) delta).getProject();
         JavaBuilderState state = this.javaBuildState.get(project);
         boolean _equals_2 = Objects.equal(state, null);
         if (_equals_2) {
           String _name = project.getName();
           JavaBuilderState _lastBuiltState = JavaBuilderState.getLastBuiltState(project);
           JavaBuilderState _state = state = _lastBuiltState;
           this.javaBuildState.put(_name, _state);
         }
         Integer _buildNumber = state.getBuildNumber();
         ((UnconfirmedStructuralChangesDelta) delta).setBuildNumber((_buildNumber).intValue());
         this.unconfirmedDeltas.add(((UnconfirmedStructuralChangesDelta) delta));
       }
     }
     if (!_matched) {
       Collection<Delta> _deltas = this.getDeltas();
       _deltas.add(delta);
     }
   }
 }