mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
further fixes for 139797
This commit is contained in:
parent
6d991143ef
commit
efdd319587
3 changed files with 21 additions and 5 deletions
|
@ -150,7 +150,7 @@
|
||||||
<actionSet
|
<actionSet
|
||||||
id="org.eclipse.cdt.managedbuilder.ui.buildSelectedFilesActionSet"
|
id="org.eclipse.cdt.managedbuilder.ui.buildSelectedFilesActionSet"
|
||||||
label="%BuildSelectedFilesActionSet.label"
|
label="%BuildSelectedFilesActionSet.label"
|
||||||
visible="true">
|
visible="false">
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.cdt.managedbuilder.ui.actions.BuildFilesAction"
|
class="org.eclipse.cdt.managedbuilder.ui.actions.BuildFilesAction"
|
||||||
enablesFor="+"
|
enablesFor="+"
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
</objectContribution>
|
</objectContribution>
|
||||||
<objectContribution
|
<objectContribution
|
||||||
adaptable="true"
|
adaptable="true"
|
||||||
id="org.eclipse.cdt.managedbuilder.ui.objectContribution1"
|
id="org.eclipse.cdt.managedbuilder.ui.BuildSelectedFilesContribution"
|
||||||
objectClass="org.eclipse.core.resources.IResource">
|
objectClass="org.eclipse.core.resources.IResource">
|
||||||
<action
|
<action
|
||||||
class="org.eclipse.cdt.managedbuilder.ui.actions.BuildFilesAction"
|
class="org.eclipse.cdt.managedbuilder.ui.actions.BuildFilesAction"
|
||||||
|
@ -205,12 +205,16 @@
|
||||||
id="org.eclipse.cdt.managedbuilder.ui.popups.cleanFilesAction"
|
id="org.eclipse.cdt.managedbuilder.ui.popups.cleanFilesAction"
|
||||||
label="%CleanSelectedFiles.label"
|
label="%CleanSelectedFiles.label"
|
||||||
menubarPath="additions"/>
|
menubarPath="additions"/>
|
||||||
|
<filter
|
||||||
|
name="projectNature"
|
||||||
|
value="org.eclipse.cdt.managedbuilder.core.managedBuildNature"/>
|
||||||
</objectContribution>
|
</objectContribution>
|
||||||
</extension>
|
</extension>
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.ui.perspectiveExtensions">
|
point="org.eclipse.ui.perspectiveExtensions">
|
||||||
<perspectiveExtension targetID="org.eclipse.cdt.ui.CPerspective">
|
<perspectiveExtension targetID="org.eclipse.cdt.ui.CPerspective">
|
||||||
<actionSet id="org.eclipse.cdt.managedbuilder.ui.buildConfigActionSet"/>
|
<actionSet id="org.eclipse.cdt.managedbuilder.ui.buildConfigActionSet"/>
|
||||||
|
<actionSet id="org.eclipse.cdt.managedbuilder.ui.buildSelectedFilesActionSet"/>
|
||||||
</perspectiveExtension>
|
</perspectiveExtension>
|
||||||
</extension>
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -269,6 +269,10 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
||||||
|
|
||||||
|
if(structuredSelection.size() <= 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
|
@ -310,9 +314,11 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -278,6 +278,10 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
||||||
|
|
||||||
|
if(structuredSelection.size() <= 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
|
@ -305,9 +309,11 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue