File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal Expand file tree Collapse file tree 1 file changed +4
-0
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
35
import org .eclipse .ui .texteditor .ITextEditor ;
35
36
36
37
public class ClipboardReplace extends BaseCompareAction {
@@ -42,6 +43,9 @@ protected void run(ISelection selection) {
42
43
try {
43
44
IWorkbenchPage page = PlatformUI .getWorkbench ().getActiveWorkbenchWindow ().getActivePage ();
44
45
IEditorPart editor = page .getActiveEditor ();
46
+ if (editor instanceof FormEditor fromEditor ) {
47
+ editor = fromEditor .getActiveEditor ();
48
+ }
45
49
IEditorInput input = editor .getEditorInput ();
46
50
if (input instanceof IFileEditorInput ed ) {
47
51
IFile file2 = ed .getFile ();
You can’t perform that action at this time.
0 commit comments