List of usage examples for org.eclipse.jface.dialogs MessageDialog QUESTION
int QUESTION
To view the source code for org.eclipse.jface.dialogs MessageDialog QUESTION.
Click Source Link
From source file:org.eclipse.team.svn.ui.dialog.DiscardConfirmationDialog.java
License:Open Source License
public DiscardConfirmationDialog(Shell parentShell, boolean oneLocation, int msgSelector) { super(parentShell, SVNUIMessages.getString(/*from ww w.j a v a 2 s . com*/ DiscardConfirmationDialog.MESSAGES[msgSelector][0] + (oneLocation ? "_Single" : "_Multi")), //$NON-NLS-1$ //$NON-NLS-2$ null, SVNUIMessages.getString( DiscardConfirmationDialog.MESSAGES[msgSelector][1] + (oneLocation ? "_Single" : "_Multi")), //$NON-NLS-1$ //$NON-NLS-2$ MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); }
From source file:org.eclipse.team.svn.ui.dialog.DisconnectDialog.java
License:Open Source License
public DisconnectDialog(Shell parentShell, IProject[] projects) { super(parentShell, SVNUIMessages.DisconnectDialog_Title, null, SVNUIMessages.format(SVNUIMessages.DisconnectDialog_Message, new String[] { FileUtility.getNamesListAsString(projects) }), MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); this.dropSVNFolders = false; }
From source file:org.eclipse.team.svn.ui.dialog.NonValidLocationErrorDialog.java
License:Open Source License
public NonValidLocationErrorDialog(Shell parentShell, String message) { super(parentShell, SVNUIMessages.NonValidLocationErrorDialog_Title, null, SVNUIMessages.format(SVNUIMessages.NonValidLocationErrorDialog_Message, new String[] { message == null ? "" : message + "\n\n" }), //$NON-NLS-1$ //$NON-NLS-2$ MessageDialog.QUESTION, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);/* w w w . j av a 2 s . c o m*/ }
From source file:org.eclipse.team.svn.ui.dialog.PromptOptionDialog.java
License:Open Source License
public PromptOptionDialog(Shell parentShell, String title, String message, String toggleMessage, IOptionManager optionManager) {/*from w w w . j ava 2s. c om*/ super(parentShell, title, null, message, MessageDialog.QUESTION, optionManager.getButtons(), 0, toggleMessage, false); this.optionManager = optionManager; this.setPrefStore(SVNTeamUIPlugin.instance().getPreferenceStore()); }
From source file:org.eclipse.team.svn.ui.dialog.ReplaceWarningDialog.java
License:Open Source License
public ReplaceWarningDialog(Shell parentShell) { super(parentShell, SVNUIMessages.ReplaceWarningDialog_Title, null, SVNUIMessages.ReplaceWarningDialog_Message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); }
From source file:org.eclipse.team.svn.ui.dialog.SetPropertyWithOverrideDialog.java
License:Open Source License
public SetPropertyWithOverrideDialog(Shell parentShell, String existingName) { super(parentShell, SVNUIMessages.SetPropertyWithOverrideDialog_Title, null, SVNUIMessages.format(SVNUIMessages.SetPropertyWithOverrideDialog_Message, new String[] { existingName }), MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); }
From source file:org.eclipse.team.svn.ui.dialog.TagModifyWarningDialog.java
License:Open Source License
public TagModifyWarningDialog(Shell parentShell, IProject[] projects) { super(parentShell, SVNUIMessages.TagModifyWarningDialog_Title, null, SVNUIMessages.TagModifyWarningDialog_Message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); this.projects = projects; }
From source file:org.eclipse.team.svn.ui.properties.RemovePropertyDialog.java
License:Open Source License
public RemovePropertyDialog(Shell parentShell, boolean oneProperty, boolean isFile) { super(parentShell, oneProperty ? SVNUIMessages.RemoveProperty_Title_Single : SVNUIMessages.RemoveProperty_Title_Multi, null,/*from ww w . j a va 2s.co m*/ oneProperty ? SVNUIMessages.RemoveProperty_Message_Single : SVNUIMessages.RemoveProperty_Message_Multi, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); this.recursive = false; this.isFile = isFile; }
From source file:org.eclipse.team.svn.ui.synchronize.merge.action.UpdateAction.java
License:Open Source License
protected IActionOperation getOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { IResource[] allResources = this.syncInfoSelector.getSelectedResources(); if (this.advancedMode) { String message;/* w w w. ja v a 2 s . co m*/ if (allResources.length == 1) { message = SVNUIMessages.AcceptAll_Message_Single; } else { message = SVNUIMessages.format(SVNUIMessages.AcceptAll_Message_Multi, new String[] { String.valueOf(allResources.length) }); } MessageDialog dlg = new MessageDialog(configuration.getSite().getShell(), SVNUIMessages.AcceptAll_Title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); if (dlg.open() != 0) { return null; } } AbstractSVNSyncInfo[] infos = this.getSVNSyncInfos(); HashMap<String, String> remote2local = new HashMap<String, String>(); ArrayList<IRepositoryResource> remoteSet = new ArrayList<IRepositoryResource>(); ArrayList<IResource> localSet = new ArrayList<IResource>(); for (int i = 0; i < infos.length; i++) { ILocalResource remote = infos[i].getRemoteChangeResource(); if (remote instanceof IResourceChange && ISyncStateFilter.SF_ONREPOSITORY .acceptRemote(remote.getResource(), remote.getStatus(), remote.getChangeMask())) { IResource resource = infos[i].getLocal(); localSet.add(resource); IRepositoryResource remoteResource = ((IResourceChange) infos[i].getRemoteChangeResource()) .getOriginator(); remoteSet.add(remoteResource); remote2local.put(SVNUtility.encodeURL(remoteResource.getUrl()), FileUtility.getWorkingCopyPath(resource)); } } IResource[] resources = localSet.toArray(new IResource[localSet.size()]); if (resources.length > 0) { boolean ignoreExternals = SVNTeamPreferences.getBehaviourBoolean( SVNTeamUIPlugin.instance().getPreferenceStore(), SVNTeamPreferences.BEHAVIOUR_IGNORE_EXTERNALS_NAME); GetRemoteContentsOperation mainOp = new GetRemoteContentsOperation(resources, remoteSet.toArray(new IRepositoryResource[remoteSet.size()]), remote2local, ignoreExternals); CompositeOperation op = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass()); SaveProjectMetaOperation saveOp = new SaveProjectMetaOperation(resources); op.add(saveOp); op.add(mainOp); op.add(new RestoreProjectMetaOperation(saveOp)); op.add(new RefreshResourcesOperation(resources)); op.add(new ClearMergeStatusesOperation(allResources)); return op; } return new ClearMergeStatusesOperation(allResources); }
From source file:org.eclipse.team.svn.ui.synchronize.update.action.UpdateAction.java
License:Open Source License
protected IActionOperation getOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { // IStateFilter.SF_NONVERSIONED not versioned locally IResource[] resources = UnacceptableOperationNotificator.shrinkResourcesWithNotOnRespositoryParents( configuration.getSite().getShell(), this.syncInfoSelector.getSelectedResources()); if (resources == null || resources.length == 0) { return null; }/*from w w w . j ava2 s .c o m*/ resources = FileUtility.addOperableParents(resources, IStateFilter.SF_UNVERSIONED); final IResource[] missing = FileUtility.getResourcesRecursive(resources, org.eclipse.team.svn.ui.action.local.UpdateAction.SF_MISSING_RESOURCES);//, IResource.DEPTH_ZERO if (missing.length > 0) { if (!org.eclipse.team.svn.ui.action.local.UpdateAction.updateMissing(configuration.getSite().getShell(), missing)) { return null; } } if (this.advancedMode) { String message; if (resources.length == 1) { message = SVNUIMessages.UpdateAll_Message_Single; } else { message = SVNUIMessages.format(SVNUIMessages.UpdateAll_Message_Multi, new String[] { String.valueOf(resources.length) }); } MessageDialog dlg = new MessageDialog(configuration.getSite().getShell(), SVNUIMessages.UpdateAll_Title, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); if (dlg.open() != 0) { return null; } } CompositeOperation op = new CompositeOperation("Operation_Update", SVNMessages.class); //$NON-NLS-1$ SaveProjectMetaOperation saveOp = new SaveProjectMetaOperation(resources); op.add(saveOp); Map<SVNRevision, Set<IResource>> splitted = UpdateAction.splitByPegRevision(this, resources); for (Map.Entry<SVNRevision, Set<IResource>> entry : splitted.entrySet()) { boolean ignoreExternals = SVNTeamPreferences.getBehaviourBoolean( SVNTeamUIPlugin.instance().getPreferenceStore(), SVNTeamPreferences.BEHAVIOUR_IGNORE_EXTERNALS_NAME); UpdateOperation mainOp = new UpdateOperation(entry.getValue().toArray(new IResource[0]), entry.getKey(), ignoreExternals); op.add(mainOp); op.add(new ClearUpdateStatusesOperation(mainOp), new IActionOperation[] { mainOp }); op.add(new NotifyUnresolvedConflictOperation(mainOp)); } op.add(new RestoreProjectMetaOperation(saveOp)); op.add(new RefreshResourcesOperation(resources)); return op; }