public class VcsPushDialog extends DialogWrapper implements VcsPushUi, DataProvider
DialogWrapper.CancelAction, DialogWrapper.DialogStyle, DialogWrapper.DialogWrapperAction, DialogWrapper.DialogWrapperExitAction, DialogWrapper.DoNotAskOption, DialogWrapper.IdeModalityType, DialogWrapper.OkAction| Modifier and Type | Field and Description |
|---|---|
protected PushController |
myController |
protected Project |
myProject |
CANCEL_EXIT_CODE, CLOSE_EXIT_CODE, DEFAULT_ACTION, DIALOG_CONTENT_PANEL_PROPERTY, ERROR_FOREGROUND_COLOR, FOCUSED_ACTION, IS_VISUAL_PADDING_COMPENSATED_ON_COMPONENT_LEVEL_KEY, myCancelAction, myCheckBoxDoNotShowDialog, myDisposable, myHelpAction, myOKAction, myPerformAction, myPreferredFocusedComponent, NEXT_USER_EXIT_CODE, OK_EXIT_CODEVCS_PUSH_DIALOG| Constructor and Description |
|---|
VcsPushDialog(Project project,
java.util.Collection<? extends Repository> allRepos,
java.util.List<? extends Repository> selectedRepositories,
Repository currentRepo,
PushSource pushSource) |
VcsPushDialog(Project project,
java.util.List<? extends Repository> selectedRepositories,
Repository currentRepo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPush()
Checks if push is available right now for selected repositories and their targets.
|
protected javax.swing.Action [] |
createActions()
Creates actions for dialog.
|
protected javax.swing.JComponent |
createCenterPanel()
Factory method.
|
protected javax.swing.border.Border |
createContentPaneBorder()
Creates border for dialog's content pane.
|
protected javax.swing.JPanel |
createOptionsPanel() |
protected javax.swing.JPanel |
createSouthAdditionalPanel()
Additional panel in the lower left part of dialog to the left from additional buttons
|
protected javax.swing.JComponent |
createSouthPanel()
Creates panel located at the south of the content pane.
|
protected void |
doOKAction()
This method is invoked by default implementation of "OK" action.
|
protected ValidationInfo |
doValidate()
Validates user input and returns
null if everything is fine
or validation description with component where problem has been found. |
void |
enableOkActions(boolean value) |
void |
executeAfterRunningPrePushHandlers(Task.Backgroundable activity)
Runs
pre-push handlers under a modal progress,
if they succeed, schedules the given background task, and closes the push dialog. |
VcsPushOptionValue |
getAdditionalOptionValue(PushSupport support)
Returns special push options, usually selected by user at the bottom of the push dialog.
|
java.lang.Object |
getData(java.lang.String dataId)
Returns the object corresponding to the specified data identifier.
|
protected java.lang.String |
getDimensionServiceKey()
Returns key for persisting dialog dimensions.
|
protected java.lang.String |
getHelpId()
Returns the help identifier, or
null if no help is available. |
protected javax.swing.Action |
getOKAction() |
javax.swing.JComponent |
getPreferredFocusedComponent() |
java.util.Map<PushSupport<Repository,PushSource,PushTarget>,java.util.Collection<PushInfo>> |
getSelectedPushSpecs()
Returns push specifications (what is being pushed, where from and where to) collected from the push dialog,
grouped per PushSupports, which means in fact per-VCS.
|
protected boolean |
postponeValidation()
Allows to postpone first start of validation
|
void |
push(boolean forcePush)
Runs
pre-push handlers under a modal progress,
and after that starts push in a background task. |
PrePushHandler.Result |
runPrePushHandlersInModalTask() |
void |
updateOkActions() |
addKeyListener, addMouseListener, addMouseListener, canRecordDialogId, centerRelativeToParent, cleanupRootPane, cleanupWindowListeners, clickDefaultButton, close, close, createButtonsPanel, createCancelAction, createContentPane, createDefaultActions, createDefaultBorder, createDoNotAskCheckbox, createHelpButton, createJButtonForAction, createJButtonForAction, createLeftSideActions, createNorthPanel, createPeer, createPeer, createPeer, createPeer, createPeer, createPeer, createRootLayout, createTitlePane, dispose, disposeIfNeeded, doCancelAction, doCancelAction, doHelpAction, doValidateAll, extractMnemonic, findInstance, findInstanceFromFocus, getButton, getCancelAction, getContentPane, getContentPanel, getDimensionKey, getDisposable, getDoNotShowMessage, getErrorTextAlignment, getExitCode, getHelpAction, getHorizontalStretch, getInitialLocation, getLocation, getOwner, getPeer, getPreferredSize, getRootPane, getSize, getStyle, getTitle, getTypeAheadTimeoutMs, getValidationThreadToUse, getVerticalStretch, getWindow, hasErrors, init, initValidation, isAutoAdjustable, isCenterStrictedToPreferredSize, isDisposed, isModal, isModalProgress, isMoveHelpButtonLeft, isNorthStrictedToPreferredSize, isOK, isOKActionEnabled, isProgressDialog, isResizable, isShowing, isSouthStrictedToPreferredSize, isToDispatchTypeAhead, isTypeAheadEnabled, isVisible, layoutButtonsPanel, pack, processDoNotAskOnOk, repaint, setAutoAdjustable, setButtonsAlignment, setButtonsMargin, setCancelButtonIcon, setCancelButtonText, setCrossClosesWindow, setDoNotAskOption, setErrorInfoAll, setErrorText, setErrorText, setHelpTooltip, setHorizontalStretch, setInitialLocationCallback, setLocation, setLocation, setModal, setOKActionEnabled, setOKButtonIcon, setOKButtonMnemonic, setOKButtonText, setOKButtonTooltip, setResizable, setSize, setTitle, setUndecorated, setValidationDelay, setVerticalStretch, shouldAddErrorNearButtons, shouldCloseOnCross, show, showAndGet, showAndGetOk, startTrackingValidation, toBack, toBeShown, toFront, unregisterKeyboardActions, updateErrorInfo, validateprotected final Project myProject
protected final PushController myController
public VcsPushDialog(Project project, java.util.List<? extends Repository> selectedRepositories, Repository currentRepo)
public VcsPushDialog(Project project, java.util.Collection<? extends Repository> allRepos, java.util.List<? extends Repository> selectedRepositories, Repository currentRepo, PushSource pushSource)
protected javax.swing.border.Border createContentPaneBorder()
DialogWrapper(8,12,8,12) insets. Subclasses can
return null for no border.createContentPaneBorder in class DialogWrapperprotected javax.swing.JPanel createSouthAdditionalPanel()
DialogWrappercreateSouthAdditionalPanel in class DialogWrapperprotected javax.swing.JComponent createSouthPanel()
DialogWrappercreateActions()
and createJButtonForAction(Action) methods to construct the panel.createSouthPanel in class DialogWrapperprotected javax.swing.JComponent createCenterPanel()
DialogWrappernull
value. In this case there will be no options panel.createCenterPanel in class DialogWrapperprotected javax.swing.JPanel createOptionsPanel()
protected java.lang.String getDimensionServiceKey()
DialogWrappernull (no persisting).getDimensionServiceKey in class DialogWrapperprotected ValidationInfo doValidate()
DialogWrappernull if everything is fine
or validation description with component where problem has been found.doValidate in class DialogWrappernull if everything is OK or validation descriptorprotected boolean postponeValidation()
DialogWrapperpostponeValidation in class DialogWrapperfalse if start validation in init() methodprotected void doOKAction()
DialogWrapperOK_EXIT_CODE. This is convenient place to override functionality of "OK" action.
Note that the method does nothing if "OK" action isn't enabled.doOKAction in class DialogWrapperprotected javax.swing.Action [] createActions()
DialogWrapperDialogWrapper.getHelpId() returns non-null value.
Each action is represented by JButton created by DialogWrapper.createJButtonForAction(Action).
These buttons are then placed into south panel of dialog.createActions in class DialogWrapperDialogWrapper.createSouthPanel(),
DialogWrapper.createJButtonForAction(javax.swing.Action)public boolean canPush()
VcsPushUipublic java.util.Map<PushSupport<Repository,PushSource,PushTarget>,java.util.Collection<PushInfo>> getSelectedPushSpecs()
VcsPushUigetSelectedPushSpecs in interface VcsPushUipublic javax.swing.JComponent getPreferredFocusedComponent()
getPreferredFocusedComponent in class DialogWrapperprotected javax.swing.Action getOKAction()
getOKAction in class DialogWrapperdoOKAction() method.DialogWrapper.doOKAction()protected java.lang.String getHelpId()
DialogWrappernull if no help is available.getHelpId in class DialogWrapperpublic void push(boolean forcePush)
VcsPushUipre-push handlers under a modal progress,
and after that starts push in a background task.public void executeAfterRunningPrePushHandlers(Task.Backgroundable activity)
VcsPushUipre-push handlers under a modal progress,
if they succeed, schedules the given background task, and closes the push dialog.executeAfterRunningPrePushHandlers in interface VcsPushUipublic PrePushHandler.Result runPrePushHandlersInModalTask()
public void updateOkActions()
public void enableOkActions(boolean value)
public VcsPushOptionValue getAdditionalOptionValue(PushSupport support)
VcsPushUigetAdditionalOptionValue in interface VcsPushUipublic java.lang.Object getData(java.lang.String dataId)
DataProviderPlatformDataKeys class.getData in interface DataProviderdataId - the data identifier for which the value is requested.