Search in sources :

Example 1 with HgMqUnAppliedPatchesPanel

use of org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel in project intellij-community by JetBrains.

the class HgActionFromMqPatches method actionPerformed.

@Override
public void actionPerformed(AnActionEvent e) {
    final HgMqUnAppliedPatchesPanel patchInfo = e.getRequiredData(HgMqUnAppliedPatchesPanel.MQ_PATCHES);
    final List<String> names = patchInfo.getSelectedPatchNames();
    final HgRepository repository = patchInfo.getRepository();
    Runnable task = new Runnable() {

        @Override
        public void run() {
            ProgressManager.getInstance().getProgressIndicator().setText(getTitle());
            executeInCurrentThread(repository, names);
        }
    };
    patchInfo.updatePatchSeriesInBackground(task);
}
Also used : HgMqUnAppliedPatchesPanel(org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel) HgRepository(org.zmlx.hg4idea.repo.HgRepository)

Example 2 with HgMqUnAppliedPatchesPanel

use of org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel in project intellij-community by JetBrains.

the class HgActionFromMqPatches method update.

@Override
public void update(AnActionEvent e) {
    HgMqUnAppliedPatchesPanel patchInfo = e.getData(HgMqUnAppliedPatchesPanel.MQ_PATCHES);
    e.getPresentation().setEnabled(patchInfo != null && patchInfo.getSelectedRowsCount() != 0 && isEnabled(patchInfo.getRepository()));
}
Also used : HgMqUnAppliedPatchesPanel(org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel)

Example 3 with HgMqUnAppliedPatchesPanel

use of org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel in project intellij-community by JetBrains.

the class HgSingleActionFomMqPatches method update.

@Override
public void update(AnActionEvent e) {
    HgMqUnAppliedPatchesPanel patchInfo = e.getData(HgMqUnAppliedPatchesPanel.MQ_PATCHES);
    e.getPresentation().setEnabled(patchInfo != null && patchInfo.getSelectedRowsCount() == 1);
}
Also used : HgMqUnAppliedPatchesPanel(org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel)

Example 4 with HgMqUnAppliedPatchesPanel

use of org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel in project intellij-community by JetBrains.

the class HgShowUnAppliedPatchesAction method showUnAppliedPatches.

public static void showUnAppliedPatches(@NotNull Project project, @NotNull HgRepository selectedRepo) {
    ToolWindow toolWindow = ObjectUtils.assertNotNull(ToolWindowManager.getInstance(project).getToolWindow(ToolWindowId.VCS));
    ContentUtilEx.addTabbedContent(toolWindow.getContentManager(), new HgMqUnAppliedPatchesPanel(selectedRepo), "MQ", selectedRepo.getRoot().getName(), true);
    toolWindow.activate(null);
}
Also used : ToolWindow(com.intellij.openapi.wm.ToolWindow) HgMqUnAppliedPatchesPanel(org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel)

Aggregations

HgMqUnAppliedPatchesPanel (org.zmlx.hg4idea.ui.HgMqUnAppliedPatchesPanel)4 ToolWindow (com.intellij.openapi.wm.ToolWindow)1 HgRepository (org.zmlx.hg4idea.repo.HgRepository)1