Search in sources :

Example 1 with HistoryDialog

use of org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog in project subclipse by subclipse.

the class SvnWizardCompareMultipleResourcesWithBranchTagPage method showLog.

protected void showLog() {
    ISVNRemoteResource remoteResource = null;
    try {
        remoteResource = SVNWorkspaceRoot.getSVNResourceFor(resources[0]).getRepository().getRemoteFile(new SVNUrl(urlCombo.getText()));
    } catch (Exception e) {
        MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), // $NON-NLS-1$
        e.toString());
        return;
    }
    if (remoteResource == null) {
        MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), Policy.bind("MergeDialog.urlError") + " " + // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        urlCombo.getText());
        return;
    }
    HistoryDialog dialog = new HistoryDialog(getShell(), remoteResource);
    if (dialog.open() == HistoryDialog.CANCEL)
        return;
    ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
    if (selectedEntries.length == 0)
        return;
    revisionText.setText(Long.toString(selectedEntries[selectedEntries.length - 1].getRevision().getNumber()));
    setPageComplete(canFinish());
}
Also used : HistoryDialog(org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog) ILogEntry(org.tigris.subversion.subclipse.core.history.ILogEntry) SVNUrl(org.tigris.subversion.svnclientadapter.SVNUrl) ISVNRemoteResource(org.tigris.subversion.subclipse.core.ISVNRemoteResource) SVNException(org.tigris.subversion.subclipse.core.SVNException) ParseException(java.text.ParseException) MalformedURLException(java.net.MalformedURLException)

Example 2 with HistoryDialog

use of org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog in project subclipse by subclipse.

the class CheckoutWizardCheckoutAsMultiplePage method showLog.

private void showLog() {
    HistoryDialog dialog = new HistoryDialog(getShell(), getCommonParent());
    if (dialog.open() == HistoryDialog.CANCEL)
        return;
    ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
    if (selectedEntries.length == 0)
        return;
    revisionText.setText(Long.toString(selectedEntries[0].getRevision().getNumber()));
    revisionText.setEnabled(true);
    headButton.setSelection(false);
}
Also used : HistoryDialog(org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog) ILogEntry(org.tigris.subversion.subclipse.core.history.ILogEntry)

Example 3 with HistoryDialog

use of org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog in project subclipse by subclipse.

the class CheckoutWizardCheckoutAsWithProjectFilePage method showLog.

private void showLog() {
    HistoryDialog dialog = new HistoryDialog(getShell(), getCommonParent());
    if (dialog.open() == HistoryDialog.CANCEL)
        return;
    ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
    if (selectedEntries.length == 0)
        return;
    revisionText.setText(Long.toString(selectedEntries[0].getRevision().getNumber()));
    revisionText.setEnabled(true);
    headButton.setSelection(false);
}
Also used : HistoryDialog(org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog) ILogEntry(org.tigris.subversion.subclipse.core.history.ILogEntry)

Example 4 with HistoryDialog

use of org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog in project subclipse by subclipse.

the class SvnWizardUpdatePage method showLog.

protected void showLog() {
    ISVNRemoteResource remoteResource = null;
    try {
        remoteResource = SVNWorkspaceRoot.getSVNResourceFor(resources[0]).getRepository().getRemoteFile(new SVNUrl(commonRoot));
    } catch (Exception e) {
        MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), // $NON-NLS-1$
        e.toString());
        return;
    }
    if (remoteResource == null) {
        MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), Policy.bind("MergeDialog.urlError") + " " + // $NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        commonRoot);
        return;
    }
    HistoryDialog dialog = new HistoryDialog(getShell(), remoteResource);
    if (dialog.open() == HistoryDialog.CANCEL)
        return;
    ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
    if (selectedEntries.length == 0)
        return;
    revisionText.setText(Long.toString(selectedEntries[selectedEntries.length - 1].getRevision().getNumber()));
    setPageComplete(canFinish());
}
Also used : HistoryDialog(org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog) ILogEntry(org.tigris.subversion.subclipse.core.history.ILogEntry) SVNUrl(org.tigris.subversion.svnclientadapter.SVNUrl) ISVNRemoteResource(org.tigris.subversion.subclipse.core.ISVNRemoteResource) SVNException(org.tigris.subversion.subclipse.core.SVNException) ParseException(java.text.ParseException)

Example 5 with HistoryDialog

use of org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog in project subclipse by subclipse.

the class FilterRevisionsDialog method showLog.

private void showLog(Text revisionText) {
    HistoryDialog dialog = new HistoryDialog(getShell(), remoteResource);
    if (dialog.open() == HistoryDialog.CANCEL)
        return;
    ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
    if (selectedEntries.length == 0)
        return;
    revisionText.setText(Long.toString(selectedEntries[selectedEntries.length - 1].getRevision().getNumber()));
}
Also used : HistoryDialog(org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog) ILogEntry(org.tigris.subversion.subclipse.core.history.ILogEntry)

Aggregations

ILogEntry (org.tigris.subversion.subclipse.core.history.ILogEntry)13 HistoryDialog (org.tigris.subversion.subclipse.ui.dialogs.HistoryDialog)13 ISVNRemoteResource (org.tigris.subversion.subclipse.core.ISVNRemoteResource)8 SVNException (org.tigris.subversion.subclipse.core.SVNException)6 SVNUrl (org.tigris.subversion.svnclientadapter.SVNUrl)6 ParseException (java.text.ParseException)5 MalformedURLException (java.net.MalformedURLException)4 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 IFile (org.eclipse.core.resources.IFile)1 IResource (org.eclipse.core.resources.IResource)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)1 TeamException (org.eclipse.team.core.TeamException)1 SaveablePartDialog (org.eclipse.team.ui.SaveablePartDialog)1 ISVNLocalResource (org.tigris.subversion.subclipse.core.ISVNLocalResource)1 ISVNRemoteFolder (org.tigris.subversion.subclipse.core.ISVNRemoteFolder)1 ISVNRepositoryLocation (org.tigris.subversion.subclipse.core.ISVNRepositoryLocation)1 GetLogsCommand (org.tigris.subversion.subclipse.core.commands.GetLogsCommand)1 AliasManager (org.tigris.subversion.subclipse.core.history.AliasManager)1