diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/MoveEditorToOppositeTabGroupAction.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/MoveEditorToOppositeTabGroupAction.java index 44760a3f1f9a..fc4f0495144f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/MoveEditorToOppositeTabGroupAction.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/MoveEditorToOppositeTabGroupAction.java @@ -42,11 +42,15 @@ public class MoveEditorToOppositeTabGroupAction extends AnAction implements Dumb final EditorWithProviderComposite editorComposite = window.getSelectedEditor(); final HistoryEntry entry = editorComposite.currentStateAsHistoryEntry(); ((FileEditorManagerImpl)FileEditorManagerEx.getInstanceEx(project)).openFileImpl3(siblings[0], vFile, true, entry, true); - window.closeFile(vFile); + closeOldFile(vFile, window); } } } + protected void closeOldFile(VirtualFile vFile, EditorWindow window) { + window.closeFile(vFile); + } + @Override public void update(AnActionEvent e) { final Presentation presentation = e.getPresentation(); diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/OpenEditorInOppositeTabGroupAction.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/OpenEditorInOppositeTabGroupAction.java new file mode 100644 index 000000000000..62a66d18d205 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/OpenEditorInOppositeTabGroupAction.java @@ -0,0 +1,27 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.fileEditor.impl; + +import com.intellij.openapi.vfs.VirtualFile; + +/** + * @author yole + */ +public class OpenEditorInOppositeTabGroupAction extends MoveEditorToOppositeTabGroupAction { + @Override + protected void closeOldFile(VirtualFile vFile, EditorWindow window) { + } +} diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index 7d8543af4755..4c4bbe3a4eb0 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -963,7 +963,9 @@ action.ChangeInspectionProfile.description=Change current editor inspection prof action.ChangeCustomizationSchema.text=Switch Customization Scheme action.ChangeCustomizationSchema.description=Change Current Customization Scheme action.MoveEditorToOppositeTabGroup.text=_Move To Opposite Group -action.MoveEditorToOppositeTabGroup.description=Move Editor To Opposite Tab Group +action.MoveEditorToOppositeTabGroup.description=Move editor to opposite tab group +action.OpenEditorInOppositeTabGroup.text=_Open In Opposite Group +action.OpenEditorInOppositeTabGroup.description=Open a copy of this editor in the opposite tab group action.ModuleSettings.text=Module _Settings action.ModuleSettings.description=Open settings dialog for selected module group.MoveModuleToGroup.text=Move Module to Group diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index cc769baac5fc..2549f241beb4 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -472,6 +472,7 @@ +