diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java index 38d8cea462f..4334566eb8c 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java @@ -28,6 +28,7 @@ * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [222406] Need to be able to override local encoding + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option *******************************************************************************/ package org.eclipse.rse.files.ui.resources; @@ -98,6 +99,7 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.WorkspaceModifyOperation; import org.eclipse.ui.ide.IDE; +import org.eclipse.ui.internal.WorkbenchPage; import org.eclipse.ui.part.FileEditorInput; import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditor; @@ -200,7 +202,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP } } - private String _editorId = null; + private IEditorDescriptor _editorDescriptor = null; private boolean _isRemoteFileMounted = false; private String _actualRemoteHost = null; private String _actualRemotePath = null; @@ -208,7 +210,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP /** * Constructor for SystemEditableRemoteFile */ - public SystemEditableRemoteFile(IWorkbenchPage page, IRemoteFile remoteFile, String editorId) + public SystemEditableRemoteFile(IWorkbenchPage page, IRemoteFile remoteFile, IEditorDescriptor editorDescriptor) { super(); this.page = page; @@ -223,15 +225,15 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP this.root = mgr.getRemoteEditProjectLocation().makeAbsolute().toOSString(); this.localPath = getDownloadPath(); - this._editorId = editorId; + this._editorDescriptor = editorDescriptor; } /** * Constructor for SystemEditableRemoteFile */ - public SystemEditableRemoteFile(IRemoteFile remoteFile, String editorId) + public SystemEditableRemoteFile(IRemoteFile remoteFile, IEditorDescriptor editorDescriptor) { - this(null, remoteFile, editorId); + this(null, remoteFile, editorDescriptor); } /** @@ -256,8 +258,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP { descriptor = getDefaultTextEditor(); } - String id = descriptor.getId(); - this._editorId = id; + this._editorDescriptor = descriptor; } protected IEditorRegistry getEditorRegistry() @@ -1596,7 +1597,12 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP } // set editor as preferred editor for this file - IDE.setDefaultEditor(file, _editorId); + + String editorId = null; + if (_editorDescriptor != null) + _editorDescriptor.getId(); + + IDE.setDefaultEditor(file, editorId); FileEditorInput finput = new FileEditorInput(file); @@ -1605,7 +1611,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP // DKM - when _editorId is not lpex, this causes problem // DY - changed editor from SystemTextEditor to IEditorPart //editor = (SystemTextEditor)activePage.openEditor(file, _editorId); - editor = activePage.openEditor(finput, _editorId); + if (_editorDescriptor != null && _editorDescriptor.isOpenExternal()){ + editor = ((WorkbenchPage)activePage).openEditorFromDescriptor(new FileEditorInput(file), _editorDescriptor, true, null); + } + else { + editor = activePage.openEditor(finput, _editorDescriptor.getId()); + } + SystemIFileProperties properties = new SystemIFileProperties(file); properties.setRemoteFileObject(this); @@ -1624,7 +1636,10 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP IFile file = getLocalResource(); // set editor as preferred editor for this file - IDE.setDefaultEditor(file, _editorId); + String editorId = null; + if (_editorDescriptor != null) + editorId = _editorDescriptor.getId(); + IDE.setDefaultEditor(file, editorId); FileEditorInput fileInput = new FileEditorInput(file); activePage.openEditor(fileInput, IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java index 364cc69a420..f8ab3c0b809 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.java @@ -19,6 +19,7 @@ * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings * David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option *******************************************************************************/ package org.eclipse.rse.internal.files.ui; @@ -403,6 +404,9 @@ public class FileResources extends NLS public static String EditorManager_saveResourcesTitle; + public static String OpenWithMenu_Other; + public static String OpenWithMenu_OtherDialogDescription; + static { // load message values from bundle file diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties index 4e739c756ff..081784b7b90 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/FileResources.properties @@ -19,6 +19,7 @@ # David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared # David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings # David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others +# David McKnight (IBM) - [224377] "open with" menu does not have "other" option ############################################################################### # NLS_MESSAGEFORMAT_VAR @@ -391,4 +392,8 @@ MSG_CREATEFOLDERGENERIC_PROGRESS =Creating folder {0}... MSG_ERROR_FILENAME_INVALID = File type extension must not contain '*' or '.' EditorManager_saveResourcesTitle = Save Resources + +OpenWithMenu_Other=Other... +OpenWithMenu_OtherDialogDescription=Choose the editor for opening {0}: + \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java index 60e554a686e..ce373c293b4 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileAction.java @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -21,6 +22,7 @@ import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorDescriptor; /** @@ -35,17 +37,17 @@ public class SystemBrowseFileAction extends SystemEditFileAction { * @param tooltip * @param image * @param parent - * @param editorId + * @param editorDescriptor */ - public SystemBrowseFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId) { - super(text, tooltip, image, parent, editorId); + public SystemBrowseFileAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor) { + super(text, tooltip, image, parent, editorDescriptor); } /** * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile) */ protected void process(IRemoteFile remoteFile) { - SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId); + SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor); editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java index f09b9434b36..f1072386b1d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemBrowseFileLineAction.java @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -21,6 +22,7 @@ import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorDescriptor; /** * Open a remote file as read-only @@ -36,16 +38,16 @@ public class SystemBrowseFileLineAction extends SystemEditFileLineAction { * @param editorId * @param line */ - public SystemBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, + public SystemBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, int line, int charStart, int charEnd) { - super(text, tooltip, image, parent, editorId, remoteFile, line, charStart, charEnd); + super(text, tooltip, image, parent, editorDescriptor, remoteFile, line, charStart, charEnd); } /** * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile) */ protected void process(IRemoteFile remoteFile) { - SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId); + SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor); editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true); handleGotoLine(); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java index 7266b98460f..5a349fc154f 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java @@ -21,6 +21,8 @@ * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * Rupen Mardirossian (IBM) - [210682] created checkForCollision method that returns a boolean for SystemCopyDialog enhancement + * David McKnight (IBM) - [224313] [api] Create RSE Events for MOVE and COPY holding both source and destination fields + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -50,7 +52,6 @@ import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.ISystemFileConstants; import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.internal.ui.SystemResources; -import org.eclipse.rse.internal.ui.view.SystemView; import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -391,6 +392,18 @@ implements IValidatorRemoteSelection } + /** + * @see SystemBaseCopyAction#getOldAbsoluteNames() + */ + protected String[] getOldAbsoluteNames() + { + IRemoteFile[] files = getSelectedFiles(); + String[] names = new String[files.length]; + for (int idx=0; idx 0) { - copyComplete(); //Need to reflect the views. + copyComplete(ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_MOVE); //Need to reflect the views. } return status; @@ -359,52 +361,23 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction * Called after all the copy/move operations end, be it successfully or not. * Your opportunity to display completion or do post-copy selections/refreshes */ - public void copyComplete() + public void copyComplete(String operation) { // we want to do the super.copyComplete() to refresh the target, but first we must do refresh the // source to reflect the deletion... // refresh all instances of the source parent, and all affected filters... ISubSystem fileSS = targetFolder.getParentRemoteFileSubSystem(); - //RSECorePlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( - // ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, copiedFiles, firstSelectionParent.getAbsolutePath(), fileSS, null, null); - Viewer originatingViewer = getViewer(); - RSECorePlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent( - ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, movedFiles, firstSelectionParent.getAbsolutePath(), fileSS, null, originatingViewer); - - /* old release 1.0 way of doing it... - Viewer v = getViewer(); - if (v instanceof ISystemTree) - { - SystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); - ISystemTree tree = (ISystemTree)v; - Object parent = tree.getSelectedParent(); - if (parent != null) - { - if (parent instanceof IRemoteFile) - { - //System.out.println("Firing REFRESH_REMOTE"); - sr.fireEvent( - new org.eclipse.rse.ui.model.impl.SystemResourceChangeEvent( - parent,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null) ); - } - else - { - //System.out.println("MOVE OPERATION: Firing REFRESH"); - // FIRST REFRESH EXPANDED FILTER - sr.fireEvent( - new org.eclipse.rse.ui.model.impl.SystemResourceChangeEvent( - parent,ISystemResourceChangeEvent.EVENT_REFRESH, null) ); - // NEXT REFRESH ALL OTHER PLACES THAT MIGHT BE SHOWING THE SOURCE FOLDER - sr.fireEvent( - new org.eclipse.rse.ui.model.impl.SystemResourceChangeEvent( - firstSelectionParent,ISystemResourceChangeEvent.EVENT_REFRESH_REMOTE, null) ); - } - } - else - RSEUIPlugin.logWarning("Hmm, selected parent is null on a move operation!"); - }*/ - super.copyComplete(); + if (operation == null){ + operation = ISystemRemoteChangeEvents.SYSTEM_REMOTE_OPERATION_MOVE; + } + + + Viewer originatingViewer = getViewer(); + RSECorePlugin.getTheSystemRegistry().fireRemoteResourceChangeEvent(operation, + ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_DELETED, movedFiles, firstSelectionParent.getAbsolutePath(), fileSS, getOldAbsoluteNames(), originatingViewer); + + super.copyComplete(operation); } } \ No newline at end of file diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java index b5ed02aa348..c848a45e42b 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileLineOpenWithMenu.java @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -137,7 +138,7 @@ public class SystemRemoteFileLineOpenWithMenu extends SystemRemoteFileOpenWithMe protected void openEditor(IRemoteFile file, IEditorDescriptor descriptor) { - SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(file, descriptor.getId()); + SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(file, descriptor); editableFile.open(SystemBasePlugin.getActiveWorkbenchShell()); handleGotoLine(); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java index 273e8811be1..783c1a47285 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemRemoteFileOpenWithMenu.java @@ -15,6 +15,7 @@ * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option *******************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -30,6 +31,8 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.action.ContributionItem; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.window.Window; +import org.eclipse.osgi.util.NLS; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility; import org.eclipse.rse.internal.files.ui.FileResources; @@ -51,6 +54,7 @@ import org.eclipse.ui.IEditorRegistry; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.EditorSelectionDialog; import org.eclipse.ui.ide.IDE; @@ -181,6 +185,40 @@ protected void createMenuItem(Menu menu, final IEditorDescriptor descriptor, fin menuItem.addListener(SWT.Selection, listener); } +/** + * Creates the Other... menu item + * + * @param menu the menu to add the item to + */ +private void createOtherMenuItem(final Menu menu, final IRemoteFile remoteFile) { + + new MenuItem(menu, SWT.SEPARATOR); + final MenuItem menuItem = new MenuItem(menu, SWT.PUSH); + menuItem.setText(FileResources.OpenWithMenu_Other); + Listener listener = new Listener() { + public void handleEvent(Event event) { + switch (event.type) { + case SWT.Selection: + EditorSelectionDialog dialog = new EditorSelectionDialog( + menu.getShell()); + dialog + .setMessage(NLS + .bind( + FileResources.OpenWithMenu_OtherDialogDescription, + remoteFile.getName())); + if (dialog.open() == Window.OK) { + IEditorDescriptor editor = dialog.getSelectedEditor(); + if (editor != null) { + openEditor(remoteFile, editor); + } + } + break; + } + } + }; + menuItem.addListener(SWT.Selection, listener); +} + protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor) { @@ -192,7 +230,7 @@ protected void openEditor(IRemoteFile remoteFile, IEditorDescriptor descriptor) } else { - editable = new SystemEditableRemoteFile(remoteFile, descriptor.getId()); + editable = new SystemEditableRemoteFile(remoteFile, descriptor); } boolean systemEditor = descriptor != null && descriptor.getId().equals(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID); @@ -392,6 +430,10 @@ public void fill(Menu menu, int index) } */ createDefaultMenuItem(menu, _remoteFile); + + // create other menu + createOtherMenuItem(menu, _remoteFile); + } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java index d0579c466b7..b7862043e7d 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchBrowseFileLineAction.java @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -22,6 +23,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult; import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorDescriptor; public class SystemSearchBrowseFileLineAction extends SystemSearchEditFileLineAction { @@ -32,19 +34,19 @@ public class SystemSearchBrowseFileLineAction extends SystemSearchEditFileLineAc * @param tooltip the tooltip for the action. * @param image the image for the action. * @param parent the parent shell. - * @param editorId the editor id. + * @param editorDescriptor the editor id. * @param remoteFile the remote file that is to be opened. * @param searchResult the line number. */ - public SystemSearchBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, IRemoteFile remoteFile, IRemoteSearchResult searchResult) { - super(text, tooltip, image, parent, editorId, remoteFile, searchResult); + public SystemSearchBrowseFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, IRemoteSearchResult searchResult) { + super(text, tooltip, image, parent, editorDescriptor, remoteFile, searchResult); } /** * @see org.eclipse.rse.internal.files.ui.actions.SystemEditFileAction#process(IRemoteFile) */ protected void process(IRemoteFile remoteFile) { - SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorId); + SystemEditableRemoteFile editableFile = new SystemEditableRemoteFile(remoteFile, _editorDescriptor); editableFile.open(SystemBasePlugin.getActiveWorkbenchShell(), true); handleGotoLine(_remoteFile, _searchResult); } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java index c69a5fd9f8d..dcbc9d02852 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemSearchEditFileLineAction.java @@ -13,6 +13,7 @@ * Contributors: * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -26,6 +27,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult; import org.eclipse.rse.ui.SystemBasePlugin; import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorDescriptor; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorReference; @@ -54,8 +56,8 @@ public class SystemSearchEditFileLineAction extends SystemEditFileAction { * @param remoteFile the remote file that is to be opened. * @param searchResult the line number. */ - public SystemSearchEditFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, String editorId, IRemoteFile remoteFile, IRemoteSearchResult searchResult) { - super(text, tooltip, image, parent, editorId); + public SystemSearchEditFileLineAction(String text, String tooltip, ImageDescriptor image, Shell parent, IEditorDescriptor editorDescriptor, IRemoteFile remoteFile, IRemoteSearchResult searchResult) { + super(text, tooltip, image, parent, editorDescriptor); this._remoteFile = remoteFile; this._searchResult = searchResult; } diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java index 5fb107b7eca..9ec7269f9d9 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java @@ -17,6 +17,7 @@ * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option ********************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -533,7 +534,7 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn String id = editor.getEditorSite().getId(); // open editor on new file - SystemEditableRemoteFile edit = new SystemEditableRemoteFile(_saveasFile, id); + SystemEditableRemoteFile edit = new SystemEditableRemoteFile(_saveasFile); try { edit.download(getShell()); diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 497b5d402ac..5d40f36c5db 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -49,6 +49,7 @@ * David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared * Xuan Chen (IBM) - [223126] [api][breaking] Remove API related to User Actions in RSE Core/UI * Rupen Mardirossian (IBM) - [210682] Copy collisions will use SystemCopyDialog now instead of renameDialog when there is a copy collision within the same connection + * David McKnight (IBM) - [224377] "open with" menu does not have "other" option *******************************************************************************/ package org.eclipse.rse.internal.files.ui.view; @@ -395,6 +396,9 @@ public class SystemViewRemoteFileAdapter openWithMenu.updateSelection(selection); submenu.add(openWithMenu); menu.getMenuManager().appendToGroup(ISystemContextMenuConstants.GROUP_OPENWITH, submenu); + + + } }