Search in sources :

Example 1 with ProcessStepsRebaseCommand

use of org.eclipse.egit.ui.internal.commands.shared.ProcessStepsRebaseCommand in project egit by eclipse.

the class RebaseInteractiveView method createCommandToolBar.

private void createCommandToolBar(Form theForm, FormToolkit toolkit) {
    headComposite = new Composite(theForm.getHead(), SWT.NONE);
    theForm.setHeadClient(headComposite);
    GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false).margins(0, 0).applyTo(headComposite);
    ToolBar toolBar = new ToolBar(headComposite, SWT.FLAT);
    GridDataFactory.fillDefaults().grab(false, false).applyTo(toolBar);
    toolkit.adapt(toolBar);
    toolkit.paintBordersFor(toolBar);
    toolBar.setBackground(null);
    startItem = new ToolItem(toolBar, SWT.NONE);
    startItem.setImage(UIIcons.getImage(resources, UIIcons.REBASE_PROCESS_STEPS));
    startItem.addSelectionListener(new RebaseCommandItemSelectionListener(new ProcessStepsRebaseCommand()));
    startItem.setEnabled(false);
    startItem.setText(UIText.InteractiveRebaseView_startItem_text);
    continueItem = new ToolItem(toolBar, SWT.NONE);
    continueItem.setImage(UIIcons.getImage(resources, UIIcons.REBASE_CONTINUE));
    continueItem.addSelectionListener(new RebaseCommandItemSelectionListener(new ContinueRebaseCommand()));
    continueItem.setEnabled(false);
    continueItem.setText(UIText.InteractiveRebaseView_continueItem_text);
    skipItem = new ToolItem(toolBar, SWT.NONE);
    skipItem.setImage(UIIcons.getImage(resources, UIIcons.REBASE_SKIP));
    skipItem.addSelectionListener(new RebaseCommandItemSelectionListener(new SkipRebaseCommand()));
    skipItem.setText(UIText.InteractiveRebaseView_skipItem_text);
    skipItem.setEnabled(false);
    abortItem = new ToolItem(toolBar, SWT.NONE);
    abortItem.setImage(UIIcons.getImage(resources, UIIcons.REBASE_ABORT));
    abortItem.addSelectionListener(new RebaseCommandItemSelectionListener(new AbortRebaseCommand()));
    abortItem.setText(UIText.InteractiveRebaseView_abortItem_text);
    abortItem.setEnabled(false);
    createSeparator(toolBar);
    refreshItem = new ToolItem(toolBar, SWT.NONE);
    refreshItem.setImage(UIIcons.getImage(resources, UIIcons.ELCL16_REFRESH));
    refreshItem.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            refresh();
        }
    });
    refreshItem.setText(UIText.InteractiveRebaseView_refreshItem_text);
    toolBar.pack();
}
Also used : AbortRebaseCommand(org.eclipse.egit.ui.internal.commands.shared.AbortRebaseCommand) Composite(org.eclipse.swt.widgets.Composite) ProcessStepsRebaseCommand(org.eclipse.egit.ui.internal.commands.shared.ProcessStepsRebaseCommand) ContinueRebaseCommand(org.eclipse.egit.ui.internal.commands.shared.ContinueRebaseCommand) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) ToolBar(org.eclipse.swt.widgets.ToolBar) SelectionEvent(org.eclipse.swt.events.SelectionEvent) SkipRebaseCommand(org.eclipse.egit.ui.internal.commands.shared.SkipRebaseCommand) ToolItem(org.eclipse.swt.widgets.ToolItem)

Aggregations

AbortRebaseCommand (org.eclipse.egit.ui.internal.commands.shared.AbortRebaseCommand)1 ContinueRebaseCommand (org.eclipse.egit.ui.internal.commands.shared.ContinueRebaseCommand)1 ProcessStepsRebaseCommand (org.eclipse.egit.ui.internal.commands.shared.ProcessStepsRebaseCommand)1 SkipRebaseCommand (org.eclipse.egit.ui.internal.commands.shared.SkipRebaseCommand)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 Composite (org.eclipse.swt.widgets.Composite)1 ToolBar (org.eclipse.swt.widgets.ToolBar)1 ToolItem (org.eclipse.swt.widgets.ToolItem)1