Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalyan Prasad Tatavarthi2019-01-17 08:20:45 +0000
committerKalyan Prasad Tatavarthi2019-01-17 08:20:45 +0000
commit8a8c720dcba307ee279cf0fc812054239fbe85e8 (patch)
treeca7a110135e494404c38ea2a6c1e1182fa1435f4
parent2d9e70c20b9a8400a565934e74de9406497d4f8a (diff)
downloadeclipse.platform.team-8a8c720dcba307ee279cf0fc812054239fbe85e8.tar.gz
eclipse.platform.team-8a8c720dcba307ee279cf0fc812054239fbe85e8.tar.xz
eclipse.platform.team-8a8c720dcba307ee279cf0fc812054239fbe85e8.zip
work correctly anymore (regression) Change-Id: I18734d3d32c8e2b45f483419a84e097d5ddb88cb Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
index 5a98388a0..386ad1507 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -198,7 +198,11 @@ public class CompareEditor extends EditorPart
}
if (key == IEditorInput.class) {
- return (T) Adapters.adapt(getEditorInput(), IEditorInput.class);
+ // return (T) Adapters.adapt(getEditorInput(), IEditorInput.class);
+ // The above call cannot be used because the return type of getEditorInput()
+ // call is IEditorInput and this itself will be returned by the above function.
+ // What we want is to call getAdapter call on this IEditorInput object.
+ return (T) getEditorInput().getAdapter(IEditorInput.class);
}
if (key == ITextEditorExtension3.class) {

Back to the top