diff options
| author | Lars Vogel | 2014-11-17 19:27:35 +0000 |
|---|---|---|
| committer | Lars Vogel | 2014-11-17 19:28:14 +0000 |
| commit | fd17b44d1f8d4758ffefc98a15b9a7a14bed3f8f (patch) | |
| tree | aff849df6c9abbcf0afea003ab20fcc1f45c4a9c | |
| parent | e5244a95291e1ad47dead3dcc01df33027c6c085 (diff) | |
| download | eclipse.platform.ui-fd17b44d1f8d4758ffefc98a15b9a7a14bed3f8f.tar.gz eclipse.platform.ui-fd17b44d1f8d4758ffefc98a15b9a7a14bed3f8f.tar.xz eclipse.platform.ui-fd17b44d1f8d4758ffefc98a15b9a7a14bed3f8f.zip | |
[Bug 446965] EditorInputPropertyTester called for IEditorPart with
IEditorInput set
Change-Id: Ic0c0e6a7104ecb2d153575f250b994b858d3bbaf
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
| -rw-r--r-- | bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/EditorInputPropertyTester.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/EditorInputPropertyTester.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/EditorInputPropertyTester.java index e0c9b7dc622..7f04fc9375c 100644 --- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/EditorInputPropertyTester.java +++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/EditorInputPropertyTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013 IBM Corporation and others. + * Copyright (c) 2013, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -16,6 +16,7 @@ import org.eclipse.core.resources.IResource; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; /** * Test the active part to see if: @@ -41,6 +42,13 @@ public class EditorInputPropertyTester extends PropertyTester { if (input instanceof IFileEditorInput) { return true; } + + if (input == null) { + IDEWorkbenchPlugin + .log("IEditorPart (" + editor.getClass() + ") passed in without IEditorInput set.", new NullPointerException()); //$NON-NLS-1$ //$NON-NLS-2$ + return false; + } + Object obj = input.getAdapter(IResource.class); return obj!=null; } |
