Search in sources :

Example 26 with RepositoryCommit

use of org.eclipse.egit.ui.internal.commit.RepositoryCommit in project egit by eclipse.

the class MergeResultDialog method createDialogArea.

@Override
public Control createDialogArea(final Composite parent) {
    final Composite composite = (Composite) super.createDialogArea(parent);
    GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 2;
    composite.setLayout(gridLayout);
    // result
    Label resultLabel = new Label(composite, SWT.NONE);
    resultLabel.setText(UIText.MergeResultDialog_result);
    resultLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
    Text resultText = new Text(composite, SWT.READ_ONLY);
    MergeStatus status = mergeResult.getMergeStatus();
    resultText.setText(status.toString());
    resultText.setSelection(resultText.getCaretPosition());
    resultText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    if (status == MergeStatus.FAILED) {
        resultText.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_RED));
        StringBuilder paths = new StringBuilder();
        Label pathsLabel = new Label(composite, SWT.NONE);
        pathsLabel.setText(UIText.MergeResultDialog_failed);
        pathsLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false));
        Text pathsText = new Text(composite, SWT.READ_ONLY);
        pathsText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
        Set<Entry<String, MergeFailureReason>> failedPaths = mergeResult.getFailingPaths().entrySet();
        int n = 0;
        for (Map.Entry<String, MergeFailureReason> e : failedPaths) {
            if (n > 0)
                paths.append(Text.DELIMITER);
            paths.append(e.getValue());
            // $NON-NLS-1$
            paths.append("\t");
            paths.append(e.getKey());
            n++;
            if (n > 10 && failedPaths.size() > 15)
                break;
        }
        if (n < failedPaths.size()) {
            paths.append(Text.DELIMITER);
            paths.append(MessageFormat.format(UIText.MergeResultDialog_nMore, Integer.valueOf(n - failedPaths.size())));
        }
        pathsText.setText(paths.toString());
    }
    if (status == MergeStatus.FAST_FORWARD || status == MergeStatus.FAST_FORWARD_SQUASHED || status == MergeStatus.MERGED) {
        // new head
        Label newHeadLabel = new Label(composite, SWT.NONE);
        newHeadLabel.setText(UIText.MergeResultDialog_newHead);
        newHeadLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
        Text newHeadText = new Text(composite, SWT.READ_ONLY);
        ObjectId newHead = mergeResult.getNewHead();
        if (newHead != null)
            newHeadText.setText(getCommitMessage(newHead) + SPACE + abbreviate(mergeResult.getNewHead(), true));
        newHeadText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
    }
    // Merge Input
    Label mergeInputLabel = new Label(composite, SWT.NONE);
    mergeInputLabel.setText(UIText.MergeResultDialog_mergeInput);
    GridDataFactory.fillDefaults().align(SWT.LEAD, SWT.CENTER).span(2, 1).applyTo(mergeInputLabel);
    TableViewer viewer = new TableViewer(composite);
    viewer.setContentProvider(new IStructuredContentProvider() {

        @Override
        public void dispose() {
        // empty
        }

        @Override
        public void inputChanged(Viewer theViewer, Object oldInput, Object newInput) {
        // empty
        }

        @Override
        public Object[] getElements(Object inputElement) {
            return getCommits(mergeResult.getMergedCommits());
        }
    });
    final IStyledLabelProvider styleProvider = new IStyledLabelProvider() {

        private final WorkbenchLabelProvider wrapped = new WorkbenchLabelProvider();

        @Override
        public void removeListener(ILabelProviderListener listener) {
        // Empty
        }

        @Override
        public boolean isLabelProperty(Object element, String property) {
            return false;
        }

        @Override
        public void dispose() {
            wrapped.dispose();
        }

        @Override
        public void addListener(ILabelProviderListener listener) {
        // Empty
        }

        @Override
        public StyledString getStyledText(Object element) {
            // supported
            if (element instanceof RepositoryCommit)
                return ((RepositoryCommit) element).getStyledText(element);
            return new StyledString(wrapped.getText(element));
        }

        @Override
        public Image getImage(Object element) {
            return wrapped.getImage(element);
        }
    };
    viewer.setLabelProvider(new DelegatingStyledCellLabelProvider(styleProvider));
    applyDialogFont(composite);
    GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).span(2, 1).applyTo(viewer.getControl());
    viewer.setInput(mergeResult);
    new OpenAndLinkWithEditorHelper(viewer) {

        @Override
        protected void linkToEditor(ISelection selection) {
        // Not supported
        }

        @Override
        protected void open(ISelection selection, boolean activate) {
            handleOpen(selection, OpenStrategy.activateOnOpen());
        }

        @Override
        protected void activate(ISelection selection) {
            handleOpen(selection, true);
        }

        private void handleOpen(ISelection selection, boolean activateOnOpen) {
            if (selection instanceof IStructuredSelection)
                for (Object element : ((IStructuredSelection) selection).toArray()) if (element instanceof RepositoryCommit)
                    CommitEditor.openQuiet((RepositoryCommit) element, activateOnOpen);
        }
    };
    return composite;
}
Also used : OpenAndLinkWithEditorHelper(org.eclipse.ui.OpenAndLinkWithEditorHelper) WorkbenchLabelProvider(org.eclipse.ui.model.WorkbenchLabelProvider) Label(org.eclipse.swt.widgets.Label) TableViewer(org.eclipse.jface.viewers.TableViewer) Viewer(org.eclipse.jface.viewers.Viewer) StyledString(org.eclipse.jface.viewers.StyledString) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) GridLayout(org.eclipse.swt.layout.GridLayout) Entry(java.util.Map.Entry) ISelection(org.eclipse.jface.viewers.ISelection) DelegatingStyledCellLabelProvider(org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider) Composite(org.eclipse.swt.widgets.Composite) ObjectId(org.eclipse.jgit.lib.ObjectId) Text(org.eclipse.swt.widgets.Text) UIText(org.eclipse.egit.ui.internal.UIText) StyledString(org.eclipse.jface.viewers.StyledString) MergeFailureReason(org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) ILabelProviderListener(org.eclipse.jface.viewers.ILabelProviderListener) MergeStatus(org.eclipse.jgit.api.MergeResult.MergeStatus) IStyledLabelProvider(org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider) GridData(org.eclipse.swt.layout.GridData) IStructuredContentProvider(org.eclipse.jface.viewers.IStructuredContentProvider) Map(java.util.Map) TableViewer(org.eclipse.jface.viewers.TableViewer)

Example 27 with RepositoryCommit

use of org.eclipse.egit.ui.internal.commit.RepositoryCommit in project egit by eclipse.

the class ImportChangedProjectsCommand method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Repository repository = getRepository(event);
    Set<File> changedFiles = new HashSet<>();
    List<RevCommit> commits = getSelectedCommits(event);
    for (RevCommit commit : commits) {
        RepositoryCommit repoCommit = new RepositoryCommit(repository, commit);
        changedFiles.addAll(determineChangedFilesOfCommit(repoCommit));
    }
    Set<File> dotProjectFiles = findDotProjectFiles(changedFiles, repository);
    importProjects(dotProjectFiles);
    return null;
}
Also used : Repository(org.eclipse.jgit.lib.Repository) File(java.io.File) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) HashSet(java.util.HashSet) RevCommit(org.eclipse.jgit.revwalk.RevCommit)

Example 28 with RepositoryCommit

use of org.eclipse.egit.ui.internal.commit.RepositoryCommit in project egit by eclipse.

the class OpenInCommitViewerHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Repository repository = getRepository(event);
    List<RevCommit> commits = getSelectedCommits(event);
    for (RevCommit commit : commits) {
        try {
            CommitEditor.open(new RepositoryCommit(repository, commit));
        } catch (PartInitException e) {
            // $NON-NLS-1$
            Activator.showError("Error opening commit viewer", e);
        }
    }
    return null;
}
Also used : Repository(org.eclipse.jgit.lib.Repository) PartInitException(org.eclipse.ui.PartInitException) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) RevCommit(org.eclipse.jgit.revwalk.RevCommit)

Example 29 with RepositoryCommit

use of org.eclipse.egit.ui.internal.commit.RepositoryCommit in project egit by eclipse.

the class RewordHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Repository repository = getRepository(event);
    RevCommit commit = getSelectedCommit(event);
    try {
        if (!CommitUtil.isCommitInCurrentBranch(commit, repository)) {
            MessageDialog.openError(HandlerUtil.getActiveShellChecked(event), UIText.RewordHandler_Error_Title, UIText.RewordHandler_CommitNotOnCurrentBranch);
            return null;
        }
    } catch (IOException e) {
        throw new ExecutionException(UIText.RewordHandler_ErrorCheckingIfCommitIsOnCurrentBranch, e);
    }
    final IStructuredSelection selected = new StructuredSelection(new RepositoryCommit(repository, commit));
    CommonUtils.runCommand(org.eclipse.egit.ui.internal.commit.command.RewordHandler.ID, selected);
    return null;
}
Also used : Repository(org.eclipse.jgit.lib.Repository) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IOException(java.io.IOException) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ExecutionException(org.eclipse.core.commands.ExecutionException) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) RevCommit(org.eclipse.jgit.revwalk.RevCommit)

Example 30 with RepositoryCommit

use of org.eclipse.egit.ui.internal.commit.RepositoryCommit in project egit by eclipse.

the class ReflogView method createPartControl.

@Override
public void createPartControl(Composite parent) {
    dateFormatter = PreferenceBasedDateFormatter.create();
    GridLayoutFactory.fillDefaults().applyTo(parent);
    toolkit = new FormToolkit(parent.getDisplay());
    parent.addDisposeListener(new DisposeListener() {

        @Override
        public void widgetDisposed(DisposeEvent e) {
            toolkit.dispose();
        }
    });
    form = toolkit.createForm(parent);
    Image repoImage = UIIcons.REPOSITORY.createImage();
    UIUtils.hookDisposal(form, repoImage);
    Image commitImage = UIIcons.CHANGESET.createImage();
    UIUtils.hookDisposal(form, commitImage);
    form.setImage(repoImage);
    form.setText(UIText.StagingView_NoSelectionTitle);
    GridDataFactory.fillDefaults().grab(true, true).applyTo(form);
    toolkit.decorateFormHeading(form);
    GridLayoutFactory.fillDefaults().applyTo(form.getBody());
    Composite tableComposite = toolkit.createComposite(form.getBody());
    tableComposite.setLayout(new GridLayout());
    GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite);
    final TreeColumnLayout layout = new TreeColumnLayout();
    FilteredTree filteredTree = new FilteredTree(tableComposite, SWT.NONE | SWT.BORDER | SWT.FULL_SELECTION, new PatternFilter(), true) {

        @Override
        protected void createControl(Composite composite, int treeStyle) {
            super.createControl(composite, treeStyle);
            treeComposite.setLayout(layout);
        }
    };
    toolkit.adapt(filteredTree);
    refLogTableTreeViewer = filteredTree.getViewer();
    refLogTableTreeViewer.getTree().setLinesVisible(true);
    refLogTableTreeViewer.getTree().setHeaderVisible(true);
    refLogTableTreeViewer.setContentProvider(new ReflogViewContentProvider());
    ColumnViewerToolTipSupport.enableFor(refLogTableTreeViewer);
    TreeViewerColumn toColumn = createColumn(layout, UIText.ReflogView_CommitColumnHeader, 10, SWT.LEFT);
    toColumn.setLabelProvider(new ColumnLabelProvider() {

        @Override
        public String getText(Object element) {
            if (element instanceof ReflogEntry) {
                final ReflogEntry entry = (ReflogEntry) element;
                return entry.getNewId().abbreviate(7).name();
            }
            return null;
        }

        @Override
        public String getToolTipText(Object element) {
            if (element instanceof ReflogEntry) {
                final ReflogEntry entry = (ReflogEntry) element;
                return entry.getNewId().name();
            }
            return null;
        }

        @Override
        public Image getImage(Object element) {
            if (element instanceof ReflogEntry) {
                return commitImage;
            }
            return null;
        }
    });
    TreeViewerColumn commitMessageColumn = createColumn(layout, UIText.ReflogView_CommitMessageColumnHeader, 40, SWT.LEFT);
    commitMessageColumn.setLabelProvider(new ColumnLabelProvider() {

        @Override
        public String getText(Object element) {
            if (element instanceof ReflogEntry) {
                final ReflogEntry entry = (ReflogEntry) element;
                RevCommit c = getCommit(entry);
                // $NON-NLS-1$
                return c == null ? "" : c.getShortMessage();
            } else if (element instanceof IWorkbenchAdapter) {
                return ((IWorkbenchAdapter) element).getLabel(element);
            }
            return null;
        }

        private RevCommit getCommit(final ReflogEntry entry) {
            try (RevWalk walk = new RevWalk(getRepository())) {
                walk.setRetainBody(true);
                return walk.parseCommit(entry.getNewId());
            } catch (IOException ignored) {
                // ignore
                return null;
            }
        }
    });
    TreeViewerColumn dateColumn = createColumn(layout, UIText.ReflogView_DateColumnHeader, 15, SWT.LEFT);
    dateColumn.setLabelProvider(new ColumnLabelProvider() {

        @Override
        public String getText(Object element) {
            if (element instanceof ReflogEntry) {
                final ReflogEntry entry = (ReflogEntry) element;
                final PersonIdent who = entry.getWho();
                return dateFormatter.formatDate(who);
            }
            return null;
        }

        @Override
        public Image getImage(Object element) {
            return null;
        }
    });
    TreeViewerColumn messageColumn = createColumn(layout, UIText.ReflogView_MessageColumnHeader, 40, SWT.LEFT);
    messageColumn.setLabelProvider(new ColumnLabelProvider() {

        private ResourceManager resourceManager = new LocalResourceManager(JFaceResources.getResources());

        @Override
        public String getText(Object element) {
            if (element instanceof ReflogEntry) {
                final ReflogEntry entry = (ReflogEntry) element;
                return entry.getComment();
            }
            return null;
        }

        @Override
        public Image getImage(Object element) {
            if (!(element instanceof ReflogEntry)) {
                return null;
            }
            String comment = ((ReflogEntry) element).getComment();
            if (// $NON-NLS-1$ //$NON-NLS-2$
            comment.startsWith("commit:") || comment.startsWith("commit (initial):"))
                return (Image) resourceManager.get(UIIcons.COMMIT);
            if (// $NON-NLS-1$
            comment.startsWith("commit (amend):"))
                return (Image) resourceManager.get(UIIcons.AMEND_COMMIT);
            if (// $NON-NLS-1$
            comment.startsWith("pull"))
                return (Image) resourceManager.get(UIIcons.PULL);
            if (// $NON-NLS-1$
            comment.startsWith("clone"))
                return (Image) resourceManager.get(UIIcons.CLONEGIT);
            if (// $NON-NLS-1$
            comment.startsWith("rebase"))
                return (Image) resourceManager.get(UIIcons.REBASE);
            if (// $NON-NLS-1$
            comment.startsWith("merge"))
                return (Image) resourceManager.get(UIIcons.MERGE);
            if (// $NON-NLS-1$
            comment.startsWith("fetch"))
                return (Image) resourceManager.get(UIIcons.FETCH);
            if (// $NON-NLS-1$
            comment.startsWith("branch"))
                return (Image) resourceManager.get(UIIcons.CREATE_BRANCH);
            if (// $NON-NLS-1$
            comment.startsWith("checkout"))
                return (Image) resourceManager.get(UIIcons.CHECKOUT);
            return null;
        }

        @Override
        public void dispose() {
            resourceManager.dispose();
            super.dispose();
        }
    });
    new OpenAndLinkWithEditorHelper(refLogTableTreeViewer) {

        @Override
        protected void linkToEditor(ISelection selection) {
        // Not supported
        }

        @Override
        protected void open(ISelection sel, boolean activate) {
            handleOpen(sel, OpenStrategy.activateOnOpen());
        }

        @Override
        protected void activate(ISelection selection) {
            handleOpen(selection, true);
        }

        private void handleOpen(ISelection selection, boolean activateOnOpen) {
            if (selection instanceof IStructuredSelection)
                if (selection.isEmpty())
                    return;
            Repository repo = getRepository();
            if (repo == null)
                return;
            try (RevWalk walk = new RevWalk(repo)) {
                for (Object element : ((IStructuredSelection) selection).toArray()) {
                    ReflogEntry entry = (ReflogEntry) element;
                    ObjectId id = entry.getNewId();
                    if (id == null || id.equals(ObjectId.zeroId()))
                        id = entry.getOldId();
                    if (id != null && !id.equals(ObjectId.zeroId()))
                        CommitEditor.openQuiet(new RepositoryCommit(repo, walk.parseCommit(id)), activateOnOpen);
                }
            } catch (IOException e) {
                Activator.logError(UIText.ReflogView_ErrorOnOpenCommit, e);
            }
        }
    };
    uiPrefsListener = new IPropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent event) {
            String property = event.getProperty();
            if (UIPreferences.DATE_FORMAT.equals(property) || UIPreferences.DATE_FORMAT_CHOICE.equals(property)) {
                dateFormatter = PreferenceBasedDateFormatter.create();
                refLogTableTreeViewer.refresh();
            }
        }
    };
    Activator.getDefault().getPreferenceStore().addPropertyChangeListener(uiPrefsListener);
    selectionChangedListener = new ISelectionListener() {

        @Override
        public void selectionChanged(IWorkbenchPart part, ISelection selection) {
            if (part instanceof IEditorPart) {
                IEditorInput input = ((IEditorPart) part).getEditorInput();
                if (input instanceof IFileEditorInput)
                    reactOnSelection(new StructuredSelection(((IFileEditorInput) input).getFile()));
            } else
                reactOnSelection(selection);
        }
    };
    IWorkbenchPartSite site = getSite();
    ISelectionService service = CommonUtils.getService(site, ISelectionService.class);
    service.addPostSelectionListener(selectionChangedListener);
    // Use current selection to populate reflog view
    UIUtils.notifySelectionChangedWithCurrentSelection(selectionChangedListener, site);
    site.setSelectionProvider(new RepositorySelectionProvider(refLogTableTreeViewer, () -> getRepository()));
    addRefsChangedListener = Repository.getGlobalListenerList().addRefsChangedListener(this);
    // Toolbar
    IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
    switchRepositoriesAction = new RepositoryToolbarAction(false, () -> getRepository(), repo -> reactOnSelection(new StructuredSelection(repo)));
    toolbar.add(switchRepositoriesAction);
    getViewSite().getActionBars().updateActionBars();
    // register context menu
    MenuManager menuManager = new MenuManager();
    menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
    Tree tree = refLogTableTreeViewer.getTree();
    tree.setMenu(menuManager.createContextMenu(tree));
    MenuManager resetManager = ResetMenu.createMenu(getSite());
    menuManager.add(resetManager);
    getSite().registerContextMenu(POPUP_MENU_ID, menuManager, refLogTableTreeViewer);
}
Also used : OpenAndLinkWithEditorHelper(org.eclipse.ui.OpenAndLinkWithEditorHelper) AdapterUtils(org.eclipse.egit.core.AdapterUtils) DisposeEvent(org.eclipse.swt.events.DisposeEvent) UIPreferences(org.eclipse.egit.ui.UIPreferences) IWorkbenchPartSite(org.eclipse.ui.IWorkbenchPartSite) ResourceManager(org.eclipse.jface.resource.ResourceManager) DisposeListener(org.eclipse.swt.events.DisposeListener) IToolBarManager(org.eclipse.jface.action.IToolBarManager) HyperlinkEvent(org.eclipse.ui.forms.events.HyperlinkEvent) CommitEditor(org.eclipse.egit.ui.internal.commit.CommitEditor) RepositoryState(org.eclipse.jgit.lib.RepositoryState) OpenAndLinkWithEditorHelper(org.eclipse.ui.OpenAndLinkWithEditorHelper) RevWalk(org.eclipse.jgit.revwalk.RevWalk) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) ISelectionListener(org.eclipse.ui.ISelectionListener) Composite(org.eclipse.swt.widgets.Composite) PreferenceBasedDateFormatter(org.eclipse.egit.ui.internal.PreferenceBasedDateFormatter) ColumnViewerToolTipSupport(org.eclipse.jface.viewers.ColumnViewerToolTipSupport) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) IEditorPart(org.eclipse.ui.IEditorPart) IWorkbenchAction(org.eclipse.ui.actions.ActionFactory.IWorkbenchAction) IWorkbenchAdapter(org.eclipse.ui.model.IWorkbenchAdapter) TreeViewerColumn(org.eclipse.jface.viewers.TreeViewerColumn) TreeColumn(org.eclipse.swt.widgets.TreeColumn) RefsChangedListener(org.eclipse.jgit.events.RefsChangedListener) Separator(org.eclipse.jface.action.Separator) IEditorInput(org.eclipse.ui.IEditorInput) PlatformUI(org.eclipse.ui.PlatformUI) MenuManager(org.eclipse.jface.action.MenuManager) Constants(org.eclipse.jgit.lib.Constants) ColumnLabelProvider(org.eclipse.jface.viewers.ColumnLabelProvider) ResetMenu(org.eclipse.egit.ui.internal.actions.ResetMenu) GridLayoutFactory(org.eclipse.jface.layout.GridLayoutFactory) ListenerHandle(org.eclipse.jgit.events.ListenerHandle) OpenStrategy(org.eclipse.jface.util.OpenStrategy) PersonIdent(org.eclipse.jgit.lib.PersonIdent) Window(org.eclipse.jface.window.Window) UIText(org.eclipse.egit.ui.internal.UIText) ReflogInput(org.eclipse.egit.ui.internal.reflog.ReflogViewContentProvider.ReflogInput) Tree(org.eclipse.swt.widgets.Tree) IFormColors(org.eclipse.ui.forms.IFormColors) SWT(org.eclipse.swt.SWT) ISelection(org.eclipse.jface.viewers.ISelection) TreeViewer(org.eclipse.jface.viewers.TreeViewer) IShowInTarget(org.eclipse.ui.part.IShowInTarget) UIIcons(org.eclipse.egit.ui.internal.UIIcons) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ISelectionService(org.eclipse.ui.ISelectionService) RepositoryMapping(org.eclipse.egit.core.project.RepositoryMapping) RepositoryTreeNode(org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode) RepositorySelectionProvider(org.eclipse.egit.ui.internal.selection.RepositorySelectionProvider) ViewPart(org.eclipse.ui.part.ViewPart) RevCommit(org.eclipse.jgit.revwalk.RevCommit) Activator(org.eclipse.egit.ui.Activator) Image(org.eclipse.swt.graphics.Image) JFaceResources(org.eclipse.jface.resource.JFaceResources) ImageHyperlink(org.eclipse.ui.forms.widgets.ImageHyperlink) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IFileEditorInput(org.eclipse.ui.IFileEditorInput) FilteredTree(org.eclipse.ui.dialogs.FilteredTree) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) ShowInContext(org.eclipse.ui.part.ShowInContext) ReflogEntry(org.eclipse.jgit.lib.ReflogEntry) ColumnWeightData(org.eclipse.jface.viewers.ColumnWeightData) IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) IWorkbenchActionConstants(org.eclipse.ui.IWorkbenchActionConstants) ControlContribution(org.eclipse.jface.action.ControlContribution) GridDataFactory(org.eclipse.jface.layout.GridDataFactory) RefsChangedEvent(org.eclipse.jgit.events.RefsChangedEvent) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) IOException(java.io.IOException) CommonUtils(org.eclipse.egit.ui.internal.CommonUtils) ObjectId(org.eclipse.jgit.lib.ObjectId) Form(org.eclipse.ui.forms.widgets.Form) RowLayout(org.eclipse.swt.layout.RowLayout) PatternFilter(org.eclipse.ui.dialogs.PatternFilter) IContextService(org.eclipse.ui.contexts.IContextService) IResource(org.eclipse.core.resources.IResource) UIUtils(org.eclipse.egit.ui.UIUtils) TreeColumnLayout(org.eclipse.jface.layout.TreeColumnLayout) RepositoryToolbarAction(org.eclipse.egit.ui.internal.components.RepositoryMenuUtil.RepositoryToolbarAction) LocalResourceManager(org.eclipse.jface.resource.LocalResourceManager) HyperlinkAdapter(org.eclipse.ui.forms.events.HyperlinkAdapter) Repository(org.eclipse.jgit.lib.Repository) Control(org.eclipse.swt.widgets.Control) GridLayout(org.eclipse.swt.layout.GridLayout) DisposeListener(org.eclipse.swt.events.DisposeListener) PatternFilter(org.eclipse.ui.dialogs.PatternFilter) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) TreeColumnLayout(org.eclipse.jface.layout.TreeColumnLayout) LocalResourceManager(org.eclipse.jface.resource.LocalResourceManager) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) RepositorySelectionProvider(org.eclipse.egit.ui.internal.selection.RepositorySelectionProvider) FilteredTree(org.eclipse.ui.dialogs.FilteredTree) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) DisposeEvent(org.eclipse.swt.events.DisposeEvent) Image(org.eclipse.swt.graphics.Image) ISelectionListener(org.eclipse.ui.ISelectionListener) IWorkbenchPartSite(org.eclipse.ui.IWorkbenchPartSite) ColumnLabelProvider(org.eclipse.jface.viewers.ColumnLabelProvider) GridLayout(org.eclipse.swt.layout.GridLayout) ReflogEntry(org.eclipse.jgit.lib.ReflogEntry) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) IFileEditorInput(org.eclipse.ui.IFileEditorInput) ISelection(org.eclipse.jface.viewers.ISelection) ISelectionService(org.eclipse.ui.ISelectionService) Tree(org.eclipse.swt.widgets.Tree) FilteredTree(org.eclipse.ui.dialogs.FilteredTree) RevCommit(org.eclipse.jgit.revwalk.RevCommit) IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) RepositoryToolbarAction(org.eclipse.egit.ui.internal.components.RepositoryMenuUtil.RepositoryToolbarAction) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) Composite(org.eclipse.swt.widgets.Composite) ObjectId(org.eclipse.jgit.lib.ObjectId) IOException(java.io.IOException) ResourceManager(org.eclipse.jface.resource.ResourceManager) LocalResourceManager(org.eclipse.jface.resource.LocalResourceManager) IEditorPart(org.eclipse.ui.IEditorPart) RevWalk(org.eclipse.jgit.revwalk.RevWalk) RepositoryCommit(org.eclipse.egit.ui.internal.commit.RepositoryCommit) TreeViewerColumn(org.eclipse.jface.viewers.TreeViewerColumn) Repository(org.eclipse.jgit.lib.Repository) PersonIdent(org.eclipse.jgit.lib.PersonIdent) IToolBarManager(org.eclipse.jface.action.IToolBarManager) IWorkbenchAdapter(org.eclipse.ui.model.IWorkbenchAdapter) MenuManager(org.eclipse.jface.action.MenuManager) IEditorInput(org.eclipse.ui.IEditorInput) Separator(org.eclipse.jface.action.Separator)

Aggregations

RepositoryCommit (org.eclipse.egit.ui.internal.commit.RepositoryCommit)34 RevCommit (org.eclipse.jgit.revwalk.RevCommit)15 Repository (org.eclipse.jgit.lib.Repository)13 Test (org.junit.Test)10 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)7 IOException (java.io.IOException)6 ExecutionException (org.eclipse.core.commands.ExecutionException)6 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)6 ArrayList (java.util.ArrayList)5 ObjectId (org.eclipse.jgit.lib.ObjectId)5 UIText (org.eclipse.egit.ui.internal.UIText)4 RevWalk (org.eclipse.jgit.revwalk.RevWalk)4 IEditorPart (org.eclipse.ui.IEditorPart)4 CommitEditorInput (org.eclipse.egit.ui.internal.commit.CommitEditorInput)3 PartInitException (org.eclipse.ui.PartInitException)3 Map (java.util.Map)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 IResource (org.eclipse.core.resources.IResource)2 CoreException (org.eclipse.core.runtime.CoreException)2 IAdaptable (org.eclipse.core.runtime.IAdaptable)2