Пример #1
0
 public boolean doNeedRebuild(final IProject it) {
   boolean _xblockexpression = false;
   {
     String _name = it.getName();
     final JavaBuilderState oldState = this.javaBuildState.get(_name);
     final JavaBuilderState newState = JavaBuilderState.getLastBuiltState(it);
     Procedure1<Delta> _xifexpression = null;
     boolean _or = false;
     boolean _equals = Objects.equal(oldState, null);
     if (_equals) {
       _or = true;
     } else {
       Long _lastStructuralBuildTime = oldState.getLastStructuralBuildTime();
       Long _lastStructuralBuildTime_1 = newState.getLastStructuralBuildTime();
       boolean _notEquals = (!Objects.equal(_lastStructuralBuildTime, _lastStructuralBuildTime_1));
       _or = (_equals || _notEquals);
     }
     if (_or) {
       final Procedure1<Delta> _function =
           new Procedure1<Delta>() {
             public void apply(final Delta it) {
               final Set<QualifiedName> structurallyChangedTypes =
                   newState.getStructurallyChangedTypes();
               boolean _or = false;
               IResourceDescription _new = it.getNew();
               boolean _namesIntersect =
                   JdtQueuedBuildData.this.namesIntersect(_new, structurallyChangedTypes);
               if (_namesIntersect) {
                 _or = true;
               } else {
                 IResourceDescription _old = it.getOld();
                 boolean _namesIntersect_1 =
                     JdtQueuedBuildData.this.namesIntersect(_old, structurallyChangedTypes);
                 _or = (_namesIntersect || _namesIntersect_1);
               }
               if (_or) {
                 Collection<Delta> _deltas = JdtQueuedBuildData.this.getDeltas();
                 _deltas.add(it);
               }
             }
           };
       _xifexpression = _function;
     } else {
       _xifexpression = null;
     }
     boolean _doNeedRebuild = this.doNeedRebuild(newState, _xifexpression);
     _xblockexpression = (_doNeedRebuild);
   }
   return _xblockexpression;
 }
Пример #2
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;
 }
Пример #3
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);
     }
   }
 }