Search in sources :

Example 6 with RepositoriesView

use of org.eclipse.egit.ui.internal.repository.RepositoriesView in project egit by eclipse.

the class GitRepositoriesViewTestBase method refreshAndWait.

protected void refreshAndWait() throws Exception {
    RepositoriesView view = (RepositoriesView) getOrOpenView().getReference().getPart(true);
    view.refresh();
    try {
        Job.getJobManager().join(JobFamilies.REPO_VIEW_REFRESH, new TimeoutProgressMonitor(60, TimeUnit.SECONDS));
    } catch (OperationCanceledException e) {
        fail("Refresh took longer 60 seconds");
    }
    TestUtil.processUIEvents();
}
Also used : RepositoriesView(org.eclipse.egit.ui.internal.repository.RepositoriesView) OperationCanceledException(org.eclipse.core.runtime.OperationCanceledException)

Example 7 with RepositoriesView

use of org.eclipse.egit.ui.internal.repository.RepositoriesView in project egit by eclipse.

the class DeleteFileCommand method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    Collection<IPath> paths = getSelectedFileAndFolderPaths(event);
    RepositoriesView view = getView(event);
    DeletePathsOperationUI operation = new DeletePathsOperationUI(paths, view.getSite());
    operation.run();
    view.refresh();
    return null;
}
Also used : IPath(org.eclipse.core.runtime.IPath) RepositoriesView(org.eclipse.egit.ui.internal.repository.RepositoriesView) DeletePathsOperationUI(org.eclipse.egit.ui.internal.operations.DeletePathsOperationUI)

Aggregations

RepositoriesView (org.eclipse.egit.ui.internal.repository.RepositoriesView)7 GenericHistoryView (org.eclipse.team.internal.ui.history.GenericHistoryView)2 IHistoryView (org.eclipse.team.ui.history.IHistoryView)2 PartInitException (org.eclipse.ui.PartInitException)2 File (java.io.File)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 IPath (org.eclipse.core.runtime.IPath)1 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)1 RepositoryUtil (org.eclipse.egit.core.RepositoryUtil)1 CloneOperation (org.eclipse.egit.core.op.CloneOperation)1 DeletePathsOperationUI (org.eclipse.egit.ui.internal.operations.DeletePathsOperationUI)1 RepositoryNode (org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)1 ControlContribution (org.eclipse.jface.action.ControlContribution)1 IToolBarManager (org.eclipse.jface.action.IToolBarManager)1 ToolBarManager (org.eclipse.jface.action.ToolBarManager)1 ISelection (org.eclipse.jface.viewers.ISelection)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1 ISelectionProvider (org.eclipse.jface.viewers.ISelectionProvider)1 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 URIish (org.eclipse.jgit.transport.URIish)1