File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 31
31
import org .eclipse .ui .IFileEditorInput ;
32
32
import org .eclipse .ui .IWorkbenchPage ;
33
33
import org .eclipse .ui .PlatformUI ;
34
- import org .eclipse .ui .forms . editor . FormEditor ;
34
+ import org .eclipse .ui .part . MultiPageEditorPart ;
35
35
import org .eclipse .ui .texteditor .ITextEditor ;
36
36
37
37
public class ClipboardReplace extends BaseCompareAction {
@@ -43,8 +43,11 @@ protected void run(ISelection selection) {
43
43
try {
44
44
IWorkbenchPage page = PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage ();
45
45
IEditorPart editor = page .getActiveEditor ();
46
- if (editor instanceof FormEditor fromEditor ) {
47
- editor = fromEditor .getActiveEditor ();
46
+ if (editor instanceof MultiPageEditorPart mpe ) {
47
+ Object page2 = mpe .getSelectedPage ();
48
+ if (page2 instanceof IEditorPart e ) {
49
+ editor = e ;
50
+ }
48
51
}
49
52
IEditorInput input = editor .getEditorInput ();
50
53
if (input instanceof IFileEditorInput ed ) {
You can’t perform that action at this time.
0 commit comments