Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2015-09-29 22:44:58 +0000
committerFred Bricon2015-09-29 22:44:58 +0000
commit5a72cf5ad28a29cbdba0d565d35f2039d78acff3 (patch)
tree25fc3edc219ccc77d6402049d5d5945ce2a9837c /org.eclipse.m2e.jdt.ui
parent9049ad806ee574239d9d8b03ab4a9cda32e6ba17 (diff)
downloadm2e-core-5a72cf5ad28a29cbdba0d565d35f2039d78acff3.tar.gz
m2e-core-5a72cf5ad28a29cbdba0d565d35f2039d78acff3.tar.xz
m2e-core-5a72cf5ad28a29cbdba0d565d35f2039d78acff3.zip
478677 : prevent ClassCastException in DownloadSourcesActionDelegate.setActiveEditor
Change-Id: Ieb1830592032a1737c5edbc8fd8d757d067ee1e1 Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.jdt.ui')
-rw-r--r--org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/DownloadSourcesActionDelegate.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/DownloadSourcesActionDelegate.java b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/DownloadSourcesActionDelegate.java
index 3b730356..098611ff 100644
--- a/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/DownloadSourcesActionDelegate.java
+++ b/org.eclipse.m2e.jdt.ui/src/org/eclipse/m2e/jdt/ui/internal/DownloadSourcesActionDelegate.java
@@ -38,10 +38,9 @@ public class DownloadSourcesActionDelegate implements IEditorActionDelegate {
public void setActiveEditor(IAction action, IEditorPart part) {
- if(part != null) {
+ if(part != null && part.getEditorInput() instanceof IClassFileEditorInput) {
try {
IClasspathManager buildpathManager = MavenJdtPlugin.getDefault().getBuildpathManager();
-
IClassFileEditorInput input = (IClassFileEditorInput) part.getEditorInput();
IJavaElement element = input.getClassFile();
while(element.getParent() != null) {

Back to the top