mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 12:25:35 +02:00
fix for 139663
This commit is contained in:
parent
3582f6f800
commit
c8e51d5da3
2 changed files with 27 additions and 0 deletions
|
@ -31,6 +31,7 @@ import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
@ -259,6 +260,18 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldBeEnabled() {
|
private boolean shouldBeEnabled() {
|
||||||
|
|
||||||
|
// fix for Bugzilla 139663
|
||||||
|
// if build automatically is turned on, then this menu should be turned off as
|
||||||
|
// it will trigger the auto build
|
||||||
|
Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
|
||||||
|
|
||||||
|
if(preferences.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING))
|
||||||
|
{
|
||||||
|
// auto building is on... do not enable the menu
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ISelectionService selectionService = workbenchWindow
|
ISelectionService selectionService = workbenchWindow
|
||||||
.getSelectionService();
|
.getSelectionService();
|
||||||
ISelection selection = selectionService.getSelection();
|
ISelection selection = selectionService.getSelection();
|
||||||
|
|
|
@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.OperationCanceledException;
|
import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
|
@ -264,6 +265,19 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldBeEnabled() {
|
private boolean shouldBeEnabled() {
|
||||||
|
|
||||||
|
|
||||||
|
// fix for Bugzilla 139663
|
||||||
|
// if build automatically is turned on, then this menu should be turned off as
|
||||||
|
// it will trigger the auto build
|
||||||
|
Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
|
||||||
|
|
||||||
|
if(preferences.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING))
|
||||||
|
{
|
||||||
|
// auto building is on... do not enable the menu
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ISelectionService selectionService = workbenchWindow
|
ISelectionService selectionService = workbenchWindow
|
||||||
.getSelectionService();
|
.getSelectionService();
|
||||||
ISelection selection = selectionService.getSelection();
|
ISelection selection = selectionService.getSelection();
|
||||||
|
|
Loading…
Add table
Reference in a new issue