Package org.eclipse.handly.model.impl

Examples of org.eclipse.handly.model.impl.HandleDelta


        ErlLogger.error(e);
      } else {
        throw Exceptions.sneakyThrow(_t);
      }
    }
    HandleDelta _delta_1 = deltaProcessor.getDelta();
    boolean _isEmpty = _delta_1.isEmpty();
    boolean _not = (!_isEmpty);
    if (_not) {
      HandleDelta _delta_2 = deltaProcessor.getDelta();
      ElementChangeEvent _elementChangeEvent = new ElementChangeEvent(ElementChangeEvent.POST_CHANGE, _delta_2);
      this.fireElementChangeEvent(_elementChangeEvent);
    }
  }
View Full Code Here


    return this.oldErlProjectNames.contains(_name);
  }
 
  private void addResourceDelta(final IResourceDelta delta) {
    try {
      HandleDelta handleDelta = null;
      IResource _resource = delta.getResource();
      final IResource parent = _resource.getParent();
      if ((parent instanceof IWorkspaceRoot)) {
        handleDelta = this.currentDelta;
      } else {
        if ((parent instanceof IProject)) {
          final IErlProject erlProject = ErlModelCore.create(((IProject)parent));
          HandleDelta _deltaFor = this.currentDelta.getDeltaFor(erlProject);
          handleDelta = _deltaFor;
          boolean _tripleEquals = (handleDelta == null);
          if (_tripleEquals) {
            HandleDelta _handleDelta = new HandleDelta(erlProject);
            handleDelta = _handleDelta;
            this.currentDelta.insert(handleDelta);
          }
          int _kind = delta.getKind();
          int _bitwiseOr = (IResourceDelta.ADDED | IResourceDelta.REMOVED);
View Full Code Here

      throw Exceptions.sneakyThrow(_e);
    }
  }
 
  private void markersChanged(final IErlElement erlElement, final IMarkerDelta[] markerDeltas) {
    HandleDelta delta = this.currentDelta.getDeltaFor(erlElement);
    boolean _tripleEquals = (delta == null);
    if (_tripleEquals) {
      HandleDelta _handleDelta = new HandleDelta(erlElement);
      delta = _handleDelta;
      this.currentDelta.insert(delta);
    }
    delta.setMarkerDeltas(markerDeltas);
  }
View Full Code Here

    @Override
    public void workingCopyModeChanged() {
        super.workingCopyModeChanged();
        final IHandle _root = this.getRoot();
        final HandleDelta delta = new HandleDelta(_root);
        final boolean _exists = this.file.exists();
        if (_exists) {
            delta.insertChanged(this, IHandleDelta.F_WORKING_COPY);
        } else {
            delta.insertAdded(this, IHandleDelta.F_WORKING_COPY);
        }
        final ElementChangeEvent _elementChangeEvent = new ElementChangeEvent(
                IElementChangeEvent.POST_CHANGE, delta);
        ErlModelManager.INSTANCE.fireElementChangeEvent(_elementChangeEvent);
    }
View Full Code Here

    try {
      final IErlModel erlModel = ErlModelCore.getErlModel();
      final IErlProject erlProject1 = erlModel.getProject("Test001");
      final IErlProject erlProject2 = erlModel.getProject("Test002");
      this.setUpProject("Test002");
      HandleDelta _newDelta = this.newDelta();
      HandleDelta _insertAdded = _newDelta.insertAdded(erlProject2);
      ErlNotificationTest.assertEquality(_insertAdded, this.listener.delta);
      final IErlSource erlFile1 = erlProject1.getSourceFile("src/nop.erl");
      IFile _file = erlFile1.getFile();
      _file.touch(null);
      HandleDelta _newDelta_1 = this.newDelta();
      HandleDelta _insertChanged = _newDelta_1.insertChanged(erlFile1, HandleDelta.F_CONTENT);
      ErlNotificationTest.assertEquality(_insertChanged, this.listener.delta);
      IFile _file_1 = erlFile1.getFile();
      Path _path = new Path("/Test002/test1.erl");
      _file_1.copy(_path, true, null);
      HandleDelta _newDelta_2 = this.newDelta();
      IErlSource _sourceFile = erlProject2.getSourceFile("test1.erl");
      HandleDelta _insertAdded_1 = _newDelta_2.insertAdded(_sourceFile);
      ErlNotificationTest.assertEquality(_insertAdded_1, this.listener.delta);
      IFile _file_2 = erlFile1.getFile();
      _file_2.delete(true, null);
      HandleDelta _newDelta_3 = this.newDelta();
      HandleDelta _insertRemoved = _newDelta_3.insertRemoved(erlFile1);
      ErlNotificationTest.assertEquality(_insertRemoved, this.listener.delta);
      final IErlSource erlFile2 = erlProject2.getSourceFile("nop.erl");
      final IErlSource movedErlFile2 = erlProject1.getSourceFile("test1.erl");
      IFile _file_3 = erlFile2.getFile();
      Path _path_1 = new Path("/Test001/test1.erl");
      _file_3.move(_path_1, true, null);
      HandleDelta _newDelta_4 = this.newDelta();
      HandleDelta _insertMovedTo = _newDelta_4.insertMovedTo(movedErlFile2, erlFile2);
      HandleDelta _insertMovedFrom = _insertMovedTo.insertMovedFrom(erlFile2, movedErlFile2);
      ErlNotificationTest.assertEquality(_insertMovedFrom,
        this.listener.delta);
      IProject _workspaceProject = erlProject2.getWorkspaceProject();
      _workspaceProject.close(null);
      HandleDelta _newDelta_5 = this.newDelta();
      HandleDelta _insertRemoved_1 = _newDelta_5.insertRemoved(erlProject2, HandleDelta.F_OPEN);
      ErlNotificationTest.assertEquality(_insertRemoved_1, this.listener.delta);
      IProject _workspaceProject_1 = erlProject2.getWorkspaceProject();
      _workspaceProject_1.open(null);
      HandleDelta _newDelta_6 = this.newDelta();
      HandleDelta _insertAdded_2 = _newDelta_6.insertAdded(erlProject2, HandleDelta.F_OPEN);
      ErlNotificationTest.assertEquality(_insertAdded_2, this.listener.delta);
      IProject _workspaceProject_2 = erlProject2.getWorkspaceProject();
      _workspaceProject_2.delete(true, null);
      HandleDelta _newDelta_7 = this.newDelta();
      HandleDelta _insertRemoved_2 = _newDelta_7.insertRemoved(erlProject2);
      ErlNotificationTest.assertEquality(_insertRemoved_2, this.listener.delta);
      IProject _workspaceProject_3 = erlProject1.getWorkspaceProject();
      final IProjectDescription description = _workspaceProject_3.getDescription();
      final String[] oldNatures = description.getNatureIds();
      description.setNatureIds(new String[] {});
      IProject _workspaceProject_4 = erlProject1.getWorkspaceProject();
      _workspaceProject_4.setDescription(description, null);
      HandleDelta _newDelta_8 = this.newDelta();
      HandleDelta _insertRemoved_3 = _newDelta_8.insertRemoved(erlProject1, HandleDelta.F_DESCRIPTION);
      ErlNotificationTest.assertEquality(_insertRemoved_3, this.listener.delta);
      description.setNatureIds(oldNatures);
      IProject _workspaceProject_5 = erlProject1.getWorkspaceProject();
      _workspaceProject_5.setDescription(description, null);
      HandleDelta _newDelta_9 = this.newDelta();
      int _bitwiseOr = (HandleDelta.F_DESCRIPTION | HandleDelta.F_CONTENT);
      HandleDelta _insertChanged_1 = _newDelta_9.insertChanged(erlProject1, _bitwiseOr);
      ErlNotificationTest.assertEquality(_insertChanged_1,
        this.listener.delta);
      final IErlProject movedErlProject1 = erlModel.getProject("Test");
      IProject _workspaceProject_6 = erlProject1.getWorkspaceProject();
      Path _path_2 = new Path("Test");
      _workspaceProject_6.move(_path_2, true, null);
      HandleDelta _newDelta_10 = this.newDelta();
      HandleDelta _insertMovedTo_1 = _newDelta_10.insertMovedTo(movedErlProject1, erlProject1);
      HandleDelta _insertMovedFrom_1 = _insertMovedTo_1.insertMovedFrom(erlProject1, movedErlProject1);
      ErlNotificationTest.assertEquality(_insertMovedFrom_1,
        this.listener.delta);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

    }
  }
 
  private HandleDelta newDelta() {
    final IErlModel erlModel = ErlModelCore.getErlModel();
    return new HandleDelta(erlModel);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.handly.model.impl.HandleDelta

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.