1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Make ExternalEditorInput adaptable to ITranslationUnit

This commit is contained in:
Anton Leherbauer 2009-04-15 15:33:03 +00:00
parent 7bf6393aac
commit c3c92bd841

View file

@ -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
*/