mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 13:55:39 +02:00
update due to Core Model changes
This commit is contained in:
parent
3b191e5ddc
commit
717a507bae
2 changed files with 32 additions and 2 deletions
|
@ -84,6 +84,29 @@
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.popupMenus">
|
point="org.eclipse.ui.popupMenus">
|
||||||
|
<objectContribution
|
||||||
|
objectClass="org.eclipse.cdt.core.model.ICProject"
|
||||||
|
adaptable="false"
|
||||||
|
id="org.eclipse.cdt.make.ui.popupMenu.CViewContribution">
|
||||||
|
<action
|
||||||
|
label="%ActionMakeCreateTarget.label"
|
||||||
|
class="org.eclipse.cdt.make.ui.actions.CreateTargetAction"
|
||||||
|
menubarPath="buildGroup"
|
||||||
|
enablesFor="1"
|
||||||
|
id="org.eclipse.cdt.make.ui.CViewCreateTargetAction">
|
||||||
|
</action>
|
||||||
|
<action
|
||||||
|
label="%ActionMakeBuildTarget.label"
|
||||||
|
class="org.eclipse.cdt.make.ui.actions.BuildTargetAction"
|
||||||
|
menubarPath="buildGroup"
|
||||||
|
enablesFor="1"
|
||||||
|
id="org.eclipse.cdt.make.ui.CViewBuildTargetAction">
|
||||||
|
</action>
|
||||||
|
<filter
|
||||||
|
name="projectNature"
|
||||||
|
value="org.eclipse.cdt.make.core.makeNature">
|
||||||
|
</filter>
|
||||||
|
</objectContribution>
|
||||||
<objectContribution
|
<objectContribution
|
||||||
objectClass="org.eclipse.cdt.core.model.ICContainer"
|
objectClass="org.eclipse.cdt.core.model.ICContainer"
|
||||||
adaptable="false"
|
adaptable="false"
|
||||||
|
@ -331,6 +354,9 @@
|
||||||
<objectClass
|
<objectClass
|
||||||
name="org.eclipse.cdt.core.model.ICContainer">
|
name="org.eclipse.cdt.core.model.ICContainer">
|
||||||
</objectClass>
|
</objectClass>
|
||||||
|
<objectClass
|
||||||
|
name="org.eclipse.cdt.core.model.ICProject">
|
||||||
|
</objectClass>
|
||||||
</or>
|
</or>
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
|
@ -349,6 +375,9 @@
|
||||||
<objectClass
|
<objectClass
|
||||||
name="org.eclipse.cdt.core.model.ICContainer">
|
name="org.eclipse.cdt.core.model.ICContainer">
|
||||||
</objectClass>
|
</objectClass>
|
||||||
|
<objectClass
|
||||||
|
name="org.eclipse.cdt.core.model.ICProject">
|
||||||
|
</objectClass>
|
||||||
</or>
|
</or>
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -10,6 +10,7 @@ package org.eclipse.cdt.make.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICContainer;
|
import org.eclipse.cdt.core.model.ICContainer;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
|
@ -58,8 +59,8 @@ public abstract class AbstractTargetAction
|
||||||
IStructuredSelection sel = (IStructuredSelection) selection;
|
IStructuredSelection sel = (IStructuredSelection) selection;
|
||||||
Object obj = sel.getFirstElement();
|
Object obj = sel.getFirstElement();
|
||||||
if (obj instanceof ICElement) {
|
if (obj instanceof ICElement) {
|
||||||
if ( obj instanceof ICContainer) {
|
if ( obj instanceof ICContainer || obj instanceof ICProject) {
|
||||||
fContainer = (IContainer) ((ICContainer) obj).getUnderlyingResource();
|
fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
|
||||||
} else {
|
} else {
|
||||||
obj = ((ICElement)obj).getResource();
|
obj = ((ICElement)obj).getResource();
|
||||||
if ( obj != null) {
|
if ( obj != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue