mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +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
|
||||
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
|
||||
objectClass="org.eclipse.cdt.core.model.ICContainer"
|
||||
adaptable="false"
|
||||
|
@ -331,6 +354,9 @@
|
|||
<objectClass
|
||||
name="org.eclipse.cdt.core.model.ICContainer">
|
||||
</objectClass>
|
||||
<objectClass
|
||||
name="org.eclipse.cdt.core.model.ICProject">
|
||||
</objectClass>
|
||||
</or>
|
||||
</enablement>
|
||||
</action>
|
||||
|
@ -349,6 +375,9 @@
|
|||
<objectClass
|
||||
name="org.eclipse.cdt.core.model.ICContainer">
|
||||
</objectClass>
|
||||
<objectClass
|
||||
name="org.eclipse.cdt.core.model.ICProject">
|
||||
</objectClass>
|
||||
</or>
|
||||
</enablement>
|
||||
</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.ICElement;
|
||||
import org.eclipse.cdt.core.model.ICProject;
|
||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
|
@ -58,8 +59,8 @@ public abstract class AbstractTargetAction
|
|||
IStructuredSelection sel = (IStructuredSelection) selection;
|
||||
Object obj = sel.getFirstElement();
|
||||
if (obj instanceof ICElement) {
|
||||
if ( obj instanceof ICContainer) {
|
||||
fContainer = (IContainer) ((ICContainer) obj).getUnderlyingResource();
|
||||
if ( obj instanceof ICContainer || obj instanceof ICProject) {
|
||||
fContainer = (IContainer) ((ICElement) obj).getUnderlyingResource();
|
||||
} else {
|
||||
obj = ((ICElement)obj).getResource();
|
||||
if ( obj != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue