mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-02 21:23:37 +02:00
Make ExternalEditorInput adaptable to ITranslationUnit
This commit is contained in:
parent
7bf6393aac
commit
c3c92bd841
1 changed files with 13 additions and 1 deletions
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -106,6 +106,18 @@ public final class ExternalEditorInput extends FileStoreEditorInput implements I
|
||||||
return unit;
|
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
|
* Return the resource where markers for this external editor input are stored
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue