mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
[242389] [usability] RSE Save Conflict dialog should indicate which file is in conflict
This commit is contained in:
parent
525bc15720
commit
18cf60e65c
2 changed files with 10 additions and 5 deletions
|
@ -23,6 +23,7 @@
|
||||||
# Martin Oberhuber (Wind River) - [226784] [nls] Standardize on Cancelled in PII
|
# Martin Oberhuber (Wind River) - [226784] [nls] Standardize on Cancelled in PII
|
||||||
# Rupen Mardirossian (IBM) - [227213] Added RESID_CONFLICT_COPY_PATTERN to be used for copying resources to parent folder.
|
# Rupen Mardirossian (IBM) - [227213] Added RESID_CONFLICT_COPY_PATTERN to be used for copying resources to parent folder.
|
||||||
# David Dykstal (IBM) [231841] Correcting messages for folder creation
|
# David Dykstal (IBM) [231841] Correcting messages for folder creation
|
||||||
|
# Kevin Doyle (IBM) - [242389] [usability] RSE Save Conflict dialog should indicate which file is in conflict
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# NLS_MESSAGEFORMAT_VAR
|
# NLS_MESSAGEFORMAT_VAR
|
||||||
|
@ -144,7 +145,7 @@ RESID_SEARCH_MESSAGE_SEARCHING= Searching...
|
||||||
############################Resource Conflict Dlgs #########################
|
############################Resource Conflict Dlgs #########################
|
||||||
##################################################################################
|
##################################################################################
|
||||||
RESID_CONFLICT_SAVE_TITLE= Save Conflict
|
RESID_CONFLICT_SAVE_TITLE= Save Conflict
|
||||||
RESID_CONFLICT_SAVE_MESSAGE= This file has changed on the remote system since it was opened.
|
RESID_CONFLICT_SAVE_MESSAGE= The file "{0}" has changed on the remote system since it was opened.
|
||||||
RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
|
RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
|
||||||
RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file. Pending changes will be lost.
|
RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file. Pending changes will be lost.
|
||||||
RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
|
RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
* Xuan Chen (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
* Xuan Chen (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||||
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
* David McKnight (IBM) - [235221] Files truncated on exit of Eclipse
|
||||||
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
||||||
|
* Kevin Doyle (IBM) - [242389] [usability] RSE Save Conflict dialog should indicate which file is in conflict
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
package org.eclipse.rse.internal.files.ui.actions;
|
||||||
|
@ -34,6 +35,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
|
import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.rse.core.RSECorePlugin;
|
import org.eclipse.rse.core.RSECorePlugin;
|
||||||
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
|
||||||
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
|
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
|
||||||
|
@ -244,14 +246,16 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
private SystemMessage _errorMessage;
|
private SystemMessage _errorMessage;
|
||||||
|
|
||||||
private IRemoteFile _saveasLocation;
|
private IRemoteFile _saveasLocation;
|
||||||
|
private String _uploadFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* @param shell the parent shell of the dialog
|
* @param shell the parent shell of the dialog
|
||||||
*/
|
*/
|
||||||
public UploadConflictDialog(Shell shell)
|
public UploadConflictDialog(Shell shell, String file)
|
||||||
{
|
{
|
||||||
super(shell, FileResources.RESID_CONFLICT_SAVE_TITLE);
|
super(shell, FileResources.RESID_CONFLICT_SAVE_TITLE);
|
||||||
|
_uploadFile = file;
|
||||||
//pack();
|
//pack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +335,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
|
|
||||||
Text text = new Text(m, SWT.WRAP | SWT.MULTI);
|
Text text = new Text(m, SWT.WRAP | SWT.MULTI);
|
||||||
text.setEditable(false);
|
text.setEditable(false);
|
||||||
text.setText(FileResources.RESID_CONFLICT_SAVE_MESSAGE);
|
text.setText(NLS.bind(FileResources.RESID_CONFLICT_SAVE_MESSAGE, _uploadFile));
|
||||||
GridData textData = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
GridData textData = new GridData(SWT.FILL, SWT.CENTER, true, false);
|
||||||
text.setLayoutData(textData);
|
text.setLayoutData(textData);
|
||||||
|
|
||||||
|
@ -594,7 +598,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
|
||||||
{
|
{
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
|
SystemIFileProperties properties = new SystemIFileProperties(_tempFile);
|
||||||
|
|
||||||
UploadConflictDialog cnfDialog = new UploadConflictDialog(SystemBasePlugin.getActiveWorkbenchShell());
|
UploadConflictDialog cnfDialog = new UploadConflictDialog(SystemBasePlugin.getActiveWorkbenchShell(), _remoteFile.getName());
|
||||||
if (cnfDialog.open() == Window.OK)
|
if (cnfDialog.open() == Window.OK)
|
||||||
{
|
{
|
||||||
// does user want to open local or replace local with remote?
|
// does user want to open local or replace local with remote?
|
||||||
|
|
Loading…
Add table
Reference in a new issue