diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java index 7a2564a4c13..c3bfdd6579c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/ExternalEditorInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2008 QNX Software Systems and others. + * Copyright (c) 2000, 2009 QNX Software Systems 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 @@ -106,6 +106,18 @@ public final class ExternalEditorInput extends FileStoreEditorInput implements I return unit; } + /* + * @see org.eclipse.ui.ide.FileStoreEditorInput#getAdapter(java.lang.Class) + */ + @SuppressWarnings("unchecked") + @Override + public Object getAdapter(Class adapter) { + if (adapter.isAssignableFrom(ITranslationUnit.class) && unit != null) { + return unit; + } + return super.getAdapter(adapter); + } + /** * Return the resource where markers for this external editor input are stored */