mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 356275 - Project Explorer: Link with Editor does not work for C/C++ projects
This commit is contained in:
parent
0fd03f628b
commit
e0bca93e1a
1 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
* Copyright (c) 2005, 2011 IBM Corporation 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
|
||||||
|
@ -335,8 +335,11 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
|
||||||
}
|
}
|
||||||
Object parent = null;
|
Object parent = null;
|
||||||
if (element instanceof ICElement) {
|
if (element instanceof ICElement) {
|
||||||
if (element instanceof ICContainer && !CCorePlugin.showSourceRootsAtTopOfProject()) {
|
if (element instanceof ISourceRoot && !CCorePlugin.showSourceRootsAtTopOfProject()) {
|
||||||
parent = ((ICContainer) element).getResource().getParent();
|
parent = ((ICElement) element).getResource().getParent();
|
||||||
|
if (parent instanceof IProject) {
|
||||||
|
return ((ICElement) element).getCProject();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
parent = ((ICElement)element).getParent();
|
parent = ((ICElement)element).getParent();
|
||||||
|
|
Loading…
Add table
Reference in a new issue