1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-30 11:43:33 +02:00

[223204] [cleanup] fix broken nls strings in files.ui and others

This commit is contained in:
David McKnight 2008-03-28 15:43:55 +00:00
parent 9296837517
commit e6d64d4104
9 changed files with 30 additions and 24 deletions

View file

@ -131,7 +131,6 @@ public class SystemResources extends NLS
public static String RESID_COLLISION_RENAME_TITLE; public static String RESID_COLLISION_RENAME_TITLE;
public static String RESID_COLLISION_RENAME_VERBIAGE; public static String RESID_COLLISION_RENAME_VERBIAGE;
public static String RESID_COLLISION_RENAME_LABEL; public static String RESID_COLLISION_RENAME_LABEL;
public static String RESID_COLLISION_RENAME_TOOLTIP;
public static String RESID_COLLISION_COPY_VERBIAGE; public static String RESID_COLLISION_COPY_VERBIAGE;
public static String RESID_COLLISION_COPY_COLHDG_OLDNAME; public static String RESID_COLLISION_COPY_COLHDG_OLDNAME;
@ -823,8 +822,6 @@ public class SystemResources extends NLS
public static String ACTION_MOVEDOWN_LABEL; public static String ACTION_MOVEDOWN_LABEL;
public static String ACTION_MOVEDOWN_TOOLTIP; public static String ACTION_MOVEDOWN_TOOLTIP;
public static String ACTION_MOVEUPLEVEL_LABEL; // used but leaving for now since the tooltip is used
public static String ACTION_MOVEUPLEVEL_TOOLTIP; public static String ACTION_MOVEUPLEVEL_TOOLTIP;
public static String ACTION_CONNECT_LABEL; public static String ACTION_CONNECT_LABEL;

View file

@ -184,7 +184,6 @@ RESID_MOVE_TARGET_FILTERPOOL_PROMPT=Select the filter pool to move into
RESID_COLLISION_RENAME_TITLE=Duplicate Name Collision RESID_COLLISION_RENAME_TITLE=Duplicate Name Collision
RESID_COLLISION_RENAME_VERBIAGE=A resource named "&1" already exists. RESID_COLLISION_RENAME_VERBIAGE=A resource named "&1" already exists.
RESID_COLLISION_RENAME_LABEL=Rename to RESID_COLLISION_RENAME_LABEL=Rename to
RESID_COLLISION_RENAME_TOOLTIP=Enter unique new resource name
RESID_COLLISION_COPY_VERBIAGE=The following resources already exist. Would you like to overwrite all of the existing resources or cancel the operation? RESID_COLLISION_COPY_VERBIAGE=The following resources already exist. Would you like to overwrite all of the existing resources or cancel the operation?
RESID_COLLISION_COPY_COLHDG_OLDNAME=Resource RESID_COLLISION_COPY_COLHDG_OLDNAME=Resource
@ -742,8 +741,6 @@ ACTION_MOVEUP_TOOLTIP=Move selected resources up by one
ACTION_MOVEDOWN_LABEL=Move Down ACTION_MOVEDOWN_LABEL=Move Down
ACTION_MOVEDOWN_TOOLTIP=Move selected resources down by one ACTION_MOVEDOWN_TOOLTIP=Move selected resources down by one
# leave moveuplevel for now even though used since the tooltip is used
ACTION_MOVEUPLEVEL_LABEL=Move up one level
ACTION_MOVEUPLEVEL_TOOLTIP=Move selected resources up one level ACTION_MOVEUPLEVEL_TOOLTIP=Move selected resources up one level
ACTION_CONNECT_LABEL=Connect... ACTION_CONNECT_LABEL=Connect...

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [200682] Fix drag&drop for elements just adaptable to IResource, like CDT elements * Martin Oberhuber (Wind River) - [200682] Fix drag&drop for elements just adaptable to IResource, like CDT elements
* David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect() * David McKnight (IBM) - [186363] get rid of obsolete calls to SubSystem.connect()
* Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when cancelling copy * Xuan Chen (IBM) - [191370] [dstore] Supertransfer zip not deleted when cancelling copy
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -54,6 +55,7 @@ import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.internal.model.SystemScratchpad; import org.eclipse.rse.ui.internal.model.SystemScratchpad;
import org.eclipse.rse.ui.messages.SystemMessageDialog; import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.progress.UIJob; import org.eclipse.ui.progress.UIJob;
@ -640,6 +642,7 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
public IStatus runInUIThread(IProgressMonitor monitor) public IStatus runInUIThread(IProgressMonitor monitor)
{ {
String[] oldNames = new String[_resultSrcObjects.size()];
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
if (_resultTgtObjects.size() > 0) if (_resultTgtObjects.size() > 0)
{ {
@ -657,6 +660,8 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
{ {
doRefresh = true; doRefresh = true;
} }
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)src).getAdapter(ISystemViewElementAdapter.class);
oldNames[t] = adapter.getAbsoluteName(src);
} }
if (_originatingViewer instanceof TreeViewer) if (_originatingViewer instanceof TreeViewer)
@ -674,7 +679,8 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
if (doRefresh) if (doRefresh)
{ {
registry.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, _resultTgtObjects, _target, _targetSubSystem, null, _originatingViewer); String operation = ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_COPY;
registry.fireRemoteResourceChangeEvent(operation, ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_CREATED, _resultTgtObjects, _target, _targetSubSystem, oldNames, _originatingViewer);
} }
else if (_target instanceof SystemScratchpad) else if (_target instanceof SystemScratchpad)
{ {

View file

@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste with Search view open * Kevin Doyle (IBM) - [196582] ClassCastException when doing copy/paste with Search view open
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -1007,7 +1008,7 @@ public class SystemTableTreeView
// -------------------------- // --------------------------
case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED : case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
{ {
String oldName = event.getOldName(); String oldName = event.getOldNames()[0]; // right now we're assuming that a rename event is for a single resource
Object child = event.getResource(); Object child = event.getResource();
if (provider != null) if (provider != null)
@ -1402,7 +1403,7 @@ public class SystemTableTreeView
if (ok) if (ok)
{ {
if (remoteAdapter != null) { if (remoteAdapter != null) {
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this); sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), new String[]{oldFullName}, this);
} }
else { else {
sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement)); sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));

View file

@ -27,6 +27,7 @@
* David McKnight (IBM) - [210229] table refresh needs unique table-specific tooltip-text * David McKnight (IBM) - [210229] table refresh needs unique table-specific tooltip-text
* Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core * Martin Oberhuber (Wind River) - [215820] Move SystemRegistry implementation to Core
* David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -1669,7 +1670,7 @@ public class SystemTableViewPart extends ViewPart
boolean referToSameObject = false; boolean referToSameObject = false;
if (registry instanceof SystemRegistry) if (registry instanceof SystemRegistry)
{ {
referToSameObject = ((SystemRegistry)registry).isSameObjectByAbsoluteName(input, null, child, event.getOldName()); referToSameObject = ((SystemRegistry)registry).isSameObjectByAbsoluteName(input, null, child, event.getOldNames()[0]); // right now assuming only one resource
} }
if (input == child || child instanceof java.util.List || referToSameObject) if (input == child || child instanceof java.util.List || referToSameObject)

View file

@ -50,6 +50,7 @@
* Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell() * Martin Oberhuber (Wind River) - [218524][api] Remove deprecated ISystemViewInputProvider#getShell()
* David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile * David Dykstal (IBM) - [222376] NPE if starting on a workspace with an old mark and a renamed default profile
* David McKnight (IBM) - [224380] system view should only fire property sheet update event when in focus * David McKnight (IBM) - [224380] system view should only fire property sheet update event when in focus
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -2533,7 +2534,7 @@ public class SystemView extends SafeTreeViewer
} }
// rename all existing references to the remote object... // rename all existing references to the remote object...
renameRemoteObject(remoteResource, event.getOldName(), ss); renameRemoteObject(remoteResource, event.getOldNames()[0], ss); // assuming only one resource renamed
// refresh remoteResource if it's a directory // refresh remoteResource if it's a directory
ISystemViewElementAdapter adapter = getViewAdapter(remoteResource); ISystemViewElementAdapter adapter = getViewAdapter(remoteResource);
@ -2542,7 +2543,7 @@ public class SystemView extends SafeTreeViewer
} }
// now, find all filters that list the contents of the OLD name container. // now, find all filters that list the contents of the OLD name container.
filterMatches = findAllRemoteItemFilterReferences(event.getOldName(), ss, null); filterMatches = findAllRemoteItemFilterReferences(event.getOldNames()[0], ss, null); // assuming only one resource renamed
if (filterMatches != null) { if (filterMatches != null) {
for (int idx = 0; idx < filterMatches.size(); idx++) { for (int idx = 0; idx < filterMatches.size(); idx++) {
FilterMatch match = (FilterMatch) filterMatches.get(idx); FilterMatch match = (FilterMatch) filterMatches.get(idx);
@ -5063,7 +5064,7 @@ public class SystemView extends SafeTreeViewer
if (remoteAdapter != null) if (remoteAdapter != null)
{ {
ISubSystem ss = adapter.getSubSystem(element); ISubSystem ss = adapter.getSubSystem(element);
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, oldFullName, this); sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, ss, new String[] {oldFullName}, this);
} }
else else

View file

@ -22,6 +22,7 @@
* David McKnight (IBM) - [197860] drag and drop consistency - no text transfer * David McKnight (IBM) - [197860] drag and drop consistency - no text transfer
* Kevin Doyle (IBM) - [197841] "Terminate and Remove" should remove the shell from Scratchpad * Kevin Doyle (IBM) - [197841] "Terminate and Remove" should remove the shell from Scratchpad
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view.scratchpad; package org.eclipse.rse.internal.ui.view.scratchpad;
@ -557,7 +558,7 @@ public class SystemScratchpadView
// -------------------------- // --------------------------
case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED : case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
{ {
renameRemoteObject(remoteResource, event.getOldName()); renameRemoteObject(remoteResource, event.getOldNames()[0]);
} }
break; break;
@ -975,7 +976,7 @@ public class SystemScratchpadView
if (ok) if (ok)
{ {
if (remoteAdapter != null) { if (remoteAdapter != null) {
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), oldFullName, this); sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, remoteAdapter.getSubSystem(element), new String[]{oldFullName}, this);
} }
else { else {
sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement)); sr.fireEvent(new org.eclipse.rse.core.events.SystemResourceChangeEvent(element, ISystemResourceChangeEvents.EVENT_RENAME, parentElement));

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.ui.actions; package org.eclipse.rse.ui.actions;
@ -277,7 +278,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction
* Called after all the copy/move operations end, be it successfully or not. * Called after all the copy/move operations end, be it successfully or not.
* Your opportunity to display completion or do post-copy selections/refreshes * Your opportunity to display completion or do post-copy selections/refreshes
*/ */
public void copyComplete() {} public void copyComplete(String operation) {}
// ---------------------------------- // ----------------------------------
// INTERNAL METHODS... // INTERNAL METHODS...
@ -333,7 +334,7 @@ public abstract class SystemBaseCopyAction extends SystemBaseDialogAction
throw (java.lang.reflect.InvocationTargetException)runException; throw (java.lang.reflect.InvocationTargetException)runException;
} }
if (copiedOk) if (copiedOk)
copyComplete(); copyComplete(null);
} }
protected abstract String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName); protected abstract String checkForCollision(Shell shell, IProgressMonitor monitor, Object targetContainer, Object oldObject, String oldName);

View file

@ -17,6 +17,7 @@
* Xuan Chen (IBM) - [187016] [menus] Remote Systems Details View should have Refresh on context menu * Xuan Chen (IBM) - [187016] [menus] Remote Systems Details View should have Refresh on context menu
* David McKnight (IBM) - [193329] using "Resource" instead of "Name" in the label column * David McKnight (IBM) - [193329] using "Resource" instead of "Name" in the label column
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.ui.view; package org.eclipse.rse.ui.view;
@ -1146,7 +1147,7 @@ public class SystemTableView
// -------------------------- // --------------------------
case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED : case ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED :
{ {
String oldName = event.getOldName(); String oldName = event.getOldNames()[0]; // assuming only one resource
Object child = event.getResource(); Object child = event.getResource();
if (provider != null) if (provider != null)
@ -1583,7 +1584,7 @@ public class SystemTableView
if (remoteAdapter != null) if (remoteAdapter != null)
{ {
// Don't think we need to do findItem and updateItem here. // Don't think we need to do findItem and updateItem here.
sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, adapter.getSubSystem(element), oldFullName, this); sr.fireRemoteResourceChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_RENAMED, element, parentElement, adapter.getSubSystem(element), new String[]{oldFullName}, this);
} }