List of usage examples for org.eclipse.jface.dialogs IDialogConstants NO_LABEL
String NO_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants NO_LABEL.
Click Source Link
From source file:org.eclipse.team.svn.revision.graph.preferences.SVNTeamRevisionGraphPage.java
License:Open Source License
protected void removeCaches() { MessageDialog dlg = new MessageDialog(this.getShell(), SVNRevisionGraphMessages.SVNTeamRevisionGraphPage_RemoveConfirm_Title, null, SVNRevisionGraphMessages.SVNTeamRevisionGraphPage_RemoveConfirm_Description, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); if (dlg.open() == 0) { RepositoryCacheInfo[] caches = this.getSelectedCaches(); this.cachesManager.remove(caches); }//from w w w .ja va 2 s .c o m }
From source file:org.eclipse.team.svn.ui.action.local.UpdateAction.java
License:Open Source License
public static boolean updateMissing(Shell shell, IResource[] missing) { ResourceListPanel panel = new ResourceListPanel(missing, SVNUIMessages.UpdateAction_List_Title, SVNUIMessages.UpdateAction_List_Description, SVNUIMessages.UpdateAction_List_Message, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }); panel.setShowLocalNames(true);//from w w w . j a va2 s . c o m return new DefaultDialog(shell, panel).open() == 0; }
From source file:org.eclipse.team.svn.ui.crashrecovery.DiscardedLocationHelper.java
License:Open Source License
public boolean acquireResolution(ErrorDescription description) { if (description.code == ErrorDescription.REPOSITORY_LOCATION_IS_DISCARDED) { Object[] context = (Object[]) description.context; final IRepositoryLocation location = (IRepositoryLocation) context[1]; // check if location is unavailable due to project is checked out with very old plug-in version if (location == null) { return false; }/*from w w w.j a v a 2s. co m*/ // check if already handled for any other project if (SVNRemoteStorage.instance().getRepositoryLocation(location.getId()) != null) { return true; } final IProject project = (IProject) context[0]; final boolean[] solved = new boolean[] { false }; UIMonitorUtility.parallelSyncExec(new Runnable() { public void run() { MessageDialog dlg = new MessageDialog(UIMonitorUtility.getShell(), SVNUIMessages.DiscardedLocationHelper_Dialog_Title, null, SVNUIMessages.format(SVNUIMessages.DiscardedLocationHelper_Dialog_Message, new String[] { project.getName(), location.getLabel() }), MessageDialog.WARNING, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); solved[0] = dlg.open() == 0; } }); if (solved[0]) { AddRepositoryLocationOperation mainOp = new AddRepositoryLocationOperation(location); CompositeOperation op = new CompositeOperation(mainOp.getId(), mainOp.getMessagesClass()); op.add(mainOp); op.add(new SaveRepositoryLocationsOperation()); op.add(new RefreshRepositoryLocationsOperation(new IRepositoryLocation[] { location }, true)); UIMonitorUtility.doTaskBusyDefault(op); } return solved[0]; } return false; }
From source file:org.eclipse.team.svn.ui.crashrecovery.InaccessibleLocationDataHelper.java
License:Open Source License
public boolean acquireResolution(ErrorDescription description) { if (description.code == ErrorDescription.CANNOT_READ_LOCATION_DATA) { final Object[] context = (Object[]) description.context; // resource URL is inaccessible, project should be disconnected if (context[1] == null) { return false; }/*from w w w .j av a 2s. c o m*/ final IProject project = (IProject) context[0]; final boolean[] solved = new boolean[] { false }; final IActionOperation[] op = new IActionOperation[1]; final IRepositoryLocation[] location = new IRepositoryLocation[1]; UIMonitorUtility.parallelSyncExec(new Runnable() { public void run() { MessageDialog dlg = new MessageDialog(UIMonitorUtility.getShell(), SVNUIMessages.InaccessibleLocationDataHelper_Dialog_Title, null, SVNUIMessages.format(SVNUIMessages.InaccessibleLocationDataHelper_Dialog_Message, new String[] { project.getName() }), MessageDialog.WARNING, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); solved[0] = dlg.open() == 0; if (solved[0]) { location[0] = SVNRemoteStorage.instance().newRepositoryLocation(); location[0].setUrl((String) context[1]); NewRepositoryLocationWizard wizard = new NewRepositoryLocationWizard(location[0], false); WizardDialog dialog = new WizardDialog(UIMonitorUtility.getShell(), wizard); solved[0] = dialog.open() == 0; if (solved[0]) { solved[0] = (op[0] = wizard.getOperationToPerform()) != null; } } } }); if (solved[0]) { ProgressMonitorUtility.doTaskExternal(op[0], new NullProgressMonitor()); if (op[0].getExecutionState() == IActionOperation.OK) { IRepositoryContainer container = location[0].asRepositoryContainer((String) context[1], true); if (container == null) { return false; } SVNTeamProvider provider = (SVNTeamProvider) RepositoryProvider.getProvider(project, SVNTeamPlugin.NATURE_ID); try { provider.switchResource(container); } catch (CoreException ex) { // recovery action failed return false; } } else { return false; } } return solved[0]; } return false; }
From source file:org.eclipse.team.svn.ui.crashrecovery.UpgradeWorkingCopyHelper.java
License:Open Source License
public boolean acquireResolution(ErrorDescription description) { if (description.code == ErrorDescription.WORKING_COPY_REQUIRES_UPGRADE) { final IProject project = (IProject) description.context; final boolean[] solved = new boolean[] { false }; UIMonitorUtility.parallelSyncExec(new Runnable() { public void run() { String title = SVNUIMessages.format(SVNUIMessages.UpgradeWorkingCopyDialog_Title, new String[] { project.getName() }); MessageDialog dlg = new MessageDialog(UIMonitorUtility.getShell(), title, null, SVNUIMessages.UpgradeWorkingCopyDialog_Message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0); if (dlg.open() == 0) { UIMonitorUtility.doTaskNowDefault(UIMonitorUtility.getShell(), new UpgradeWorkingCopyOperation(new IResource[] { project }), false); solved[0] = true;// w w w .ja va 2 s. com } } }); return solved[0]; } return false; }
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 . c o m 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.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; }