Examples of IErlSource


Examples of org.erlide.engine.new_model.IErlSource

    @Override
    public IStructuredSelection findSelection(final IEditorInput input) {
        if (SystemConfiguration.hasFeatureEnabled(Features.NEW_MODEL)) {
            if (input instanceof IFileEditorInput) {
                final IFile file = ((IFileEditorInput) input).getFile();
                final IErlSource fooFile = ErlModelCore.create(file);
                if (fooFile != null) {
                    final IViewPart navigatorView = PlatformUI.getWorkbench()
                            .getActiveWorkbenchWindow().getActivePage()
                            .findView(ErlangNavigator.ID);
                    if (navigatorView != null) {
                        final IStructuredSelection currentSelection = (IStructuredSelection) navigatorView
                                .getSite().getSelectionProvider().getSelection();
                        if (currentSelection != null && currentSelection.size() == 1) {
                            final Object element = currentSelection.getFirstElement();
                            if (element instanceof org.erlide.engine.new_model.IErlElement) {
                                if (fooFile
                                        .equals(((org.erlide.engine.new_model.IErlElement) element)
                                                .getAncestor(IErlSource.class))) {
                                    return currentSelection;
                                }
                            }
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

  private boolean processAddedFile(final IResourceDelta delta) {
    boolean _xblockexpression = false;
    {
      IResource _resource = delta.getResource();
      final IFile file = ((IFile) _resource);
      final IErlSource erlFile = ErlModelCore.create(file);
      boolean _tripleNotEquals = (erlFile != null);
      if (_tripleNotEquals) {
        ErlDeltaProcessor.addToModel(erlFile);
        this.translateAddedDelta(delta, erlFile);
      } else {
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

  private boolean processRemovedFile(final IResourceDelta delta) {
    boolean _xblockexpression = false;
    {
      IResource _resource = delta.getResource();
      final IFile file = ((IFile) _resource);
      final IErlSource erlFile = ErlModelCore.create(file);
      boolean _tripleNotEquals = (erlFile != null);
      if (_tripleNotEquals) {
        ErlDeltaProcessor.removeFromModel(erlFile);
        this.translateRemovedDelta(delta, erlFile);
      } else {
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

  }
 
  private boolean processChangedFile(final IResourceDelta delta) {
    IResource _resource = delta.getResource();
    final IFile file = ((IFile) _resource);
    final IErlSource erlFile = ErlModelCore.create(file);
    boolean _tripleNotEquals = (erlFile != null);
    if (_tripleNotEquals) {
      int _flags = delta.getFlags();
      int _bitwiseOr = (IResourceDelta.MARKERS | IResourceDelta.SYNC);
      int _bitwiseAnd = (_flags & _bitwiseOr);
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

 
  @Before
  public void setup() throws Exception {
    IProject _setUpProject = this.setUpProject("Test002");
    final IErlProject erlProject = ErlModelCore.create(_setUpProject);
    IErlSource _sourceFile = erlProject.getSourceFile("src/nop.erl");
    this.erlFile = _sourceFile;
  }
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

    }
    return _xifexpression;
  }
 
  public static IErlSource create(final IFile file) {
    IErlSource _xblockexpression = null;
    {
      boolean _tripleEquals = (file == null);
      if (_tripleEquals) {
        return null;
      }
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

      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);
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

    {
      final List<IResource> result = CollectionLiterals.<IResource>newArrayList();
      final IResource[] members = resource.members();
      for (final IResource member : members) {
        if ((member instanceof IFile)) {
          IErlSource _create = ErlModelCore.create(((IFile)member));
          boolean _tripleEquals = (_create == null);
          if (_tripleEquals) {
            result.add(member);
          }
        } else {
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

  public void buildStructure(final Body body, final Map<IHandle, Body> newElements) throws CoreException {
    final IResource[] members = this.workspaceProject.members();
    final List<IErlSource> erlFiles = CollectionLiterals.<IErlSource>newArrayList();
    for (final IResource file : members) {
      if ((file instanceof IFile)) {
        final IErlSource source = this.createSourceFile(((IFile)file));
        boolean _tripleNotEquals = (source != null);
        if (_tripleNotEquals) {
          erlFiles.add(source);
        }
      }
View Full Code Here

Examples of org.erlide.engine.new_model.IErlSource

    }
    body.setChildren(((IHandle[])Conversions.unwrapArray(erlFiles, IHandle.class)));
  }
 
  private IErlSource createSourceFile(final IFile file) {
    IErlSource _switchResult = null;
    String _fileExtension = file.getFileExtension();
    boolean _matched = false;
    if (!_matched) {
      if (Objects.equal(_fileExtension, "erl")) {
        _matched=true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.