Examples of ITypedElement


Examples of org.eclipse.compare.ITypedElement

        return new DiffNode(actLeft, actRight);
    }
  }

  private DiffNode addDirectoryFiles(ITypedElement elem, int diffType) {
    ITypedElement l = null;
    ITypedElement r = null;
    if (diffType == Differencer.DELETION) {
      r = elem;
    } else {
      l = elem;
    }
View Full Code Here

Examples of org.eclipse.compare.ITypedElement

    private boolean connected = false;

    public InternalResourceSaveableComparison(ICompareInput input,
        CompareEditorInput editorInput) {
      super(input, editorInput, left);
      ITypedElement element = left;
      if (element instanceof LocalResourceTypedElement) {
        lrte = (LocalResourceTypedElement) element;
        if (lrte.isConnected()) {
          registerSaveable(true);
        } else {
View Full Code Here

Examples of org.eclipse.compare.ITypedElement

      }
      return;
    }

    // still happens on initial commits
    final ITypedElement oldSide = createTypedElement(op, oldCommit,
        oldObjectId);
    final ITypedElement newSide = createTypedElement(np, newCommit,
        newObjectId);
    CompareUtils.openInCompare(page, new GitCompareFileRevisionEditorInput(
        newSide, oldSide, null));
  }
View Full Code Here

Examples of org.eclipse.compare.ITypedElement

              commit.getId()), e);
          errorOccurred = true;
        }
        if (rev != null) {
          if (compareMode) {
            ITypedElement right = CompareUtils
                .getFileRevisionTypedElement(commitPath,
                    commit, map.getRepository());
            final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
                SaveableCompareEditorInput
                    .createFileElement(resource), right,
                null);
            try {
              CompareUtils.openInCompare(workBenchPage, in);
            } catch (Exception e) {
              errorOccurred = true;
            }
          } else
            try {
              EgitUiEditorUtils.openEditor(getPart(event)
                  .getSite().getPage(), rev,
                  new NullProgressMonitor());
            } catch (CoreException e) {
              Activator.logError(
                  UIText.GitHistoryPage_openFailed, e);
              errorOccurred = true;
            }
        } else
          ids.add(commit.getId());
      }
    }
    if (input instanceof File) {
      File fileInput = (File) input;
      Repository repo = getRepository(event);
      gitPath = getRepoRelativePath(repo, fileInput);
      Iterator<?> it = selection.iterator();
      while (it.hasNext()) {
        RevCommit commit = (RevCommit) it.next();
        String commitPath = getRenamedPath(gitPath, commit);
        IFileRevision rev = null;
        try {
          rev = CompareUtils.getFileRevision(commitPath, commit,
              repo, null);
        } catch (IOException e) {
          Activator.logError(NLS.bind(
              UIText.GitHistoryPage_errorLookingUpPath,
              commitPath, commit.getId()), e);
          errorOccurred = true;
        }
        if (rev != null) {
          if (compareMode)
            try {
              ITypedElement left = CompareUtils
                  .getFileRevisionTypedElement(gitPath,
                      new RevWalk(repo).parseCommit(repo
                          .resolve(Constants.HEAD)),
                      repo);
              ITypedElement right = CompareUtils
                  .getFileRevisionTypedElement(commitPath,
                      commit, repo);
              final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
                  left, right, null);
              CompareUtils.openInCompare(workBenchPage, in);
View Full Code Here

Examples of org.eclipse.compare.ITypedElement

      IFile file = (IFile) input;
      final RepositoryMapping mapping = RepositoryMapping.getMapping(file
          .getProject());
      final String gitPath = mapping.getRepoRelativePath(file);
      final String commitPath = getRenamedPath(gitPath, commit);
      ITypedElement right = CompareUtils.getFileRevisionTypedElement(
          commitPath, commit, mapping.getRepository());
      final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
          SaveableCompareEditorInput.createFileElement(file), right,
          null);
      CompareUtils.openInCompare(workBenchPage, in);
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.