mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
remove unneccessary imports and format code
This commit is contained in:
parent
efdd319587
commit
2f8833f31d
2 changed files with 98 additions and 112 deletions
|
@ -15,12 +15,9 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.jface.action.Action;
|
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
|
||||||
|
@ -35,7 +32,6 @@ 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.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
|
||||||
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;
|
||||||
import org.eclipse.ui.ISelectionService;
|
import org.eclipse.ui.ISelectionService;
|
||||||
|
@ -45,7 +41,8 @@ import org.eclipse.ui.actions.ActionDelegate;
|
||||||
* @author crecoskie
|
* @author crecoskie
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
|
public class BuildFilesAction extends ActionDelegate implements
|
||||||
|
IWorkbenchWindowActionDelegate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The workbench window; or <code>null</code> if this action has been
|
* The workbench window; or <code>null</code> if this action has been
|
||||||
|
@ -82,7 +79,6 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
|
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
|
||||||
*/
|
*/
|
||||||
|
@ -168,7 +164,9 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
IManagedBuildInfo buildInfo = ManagedBuildManager
|
IManagedBuildInfo buildInfo = ManagedBuildManager
|
||||||
.getBuildInfo(file.getProject());
|
.getBuildInfo(file.getProject());
|
||||||
|
|
||||||
if (buildInfo != null && buildInfo.buildsFileType(file.getFileExtension())) {
|
if ((buildInfo != null)
|
||||||
|
&& buildInfo
|
||||||
|
.buildsFileType(file.getFileExtension())) {
|
||||||
files.add(file);
|
files.add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,13 +180,13 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static final class BuildFilesJob extends Job {
|
private static final class BuildFilesJob extends Job {
|
||||||
private final List files;
|
private final List files;
|
||||||
|
|
||||||
BuildFilesJob(List filesToBuild)
|
BuildFilesJob(List filesToBuild) {
|
||||||
{
|
super(
|
||||||
super(ManagedMakeMessages.getResourceString("BuildFilesAction.buildingSelectedFiles")); //$NON-NLS-1$
|
ManagedMakeMessages
|
||||||
|
.getResourceString("BuildFilesAction.buildingSelectedFiles")); //$NON-NLS-1$
|
||||||
|
|
||||||
files = filesToBuild;
|
files = filesToBuild;
|
||||||
}
|
}
|
||||||
|
@ -202,41 +200,40 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
||||||
|
|
||||||
monitor.beginTask(ManagedMakeMessages.getResourceString("BuildFilesAction.building"), files.size()); //$NON-NLS-1$
|
monitor
|
||||||
|
.beginTask(
|
||||||
|
ManagedMakeMessages
|
||||||
|
.getResourceString("BuildFilesAction.building"), files.size()); //$NON-NLS-1$
|
||||||
|
|
||||||
boolean isFirstFile = true;
|
boolean isFirstFile = true;
|
||||||
|
|
||||||
while(iterator.hasNext())
|
while (iterator.hasNext()) {
|
||||||
{
|
|
||||||
IFile file = (IFile) iterator.next();
|
IFile file = (IFile) iterator.next();
|
||||||
|
|
||||||
IManagedBuildInfo buildInfo = ManagedBuildManager
|
IManagedBuildInfo buildInfo = ManagedBuildManager
|
||||||
.getBuildInfo(file.getProject());
|
.getBuildInfo(file.getProject());
|
||||||
|
|
||||||
IResource[] resources = {file};
|
IResource[] resources = { file };
|
||||||
|
|
||||||
// invoke the internal builder to do the build
|
// invoke the internal builder to do the build
|
||||||
builder.invokeInternalBuilder(resources, buildInfo
|
builder.invokeInternalBuilder(resources, buildInfo
|
||||||
.getDefaultConfiguration(), false, false, isFirstFile,
|
.getDefaultConfiguration(), false, false, isFirstFile,
|
||||||
!iterator.hasNext(), monitor);
|
!iterator.hasNext(), monitor);
|
||||||
|
|
||||||
if(isFirstFile) {
|
if (isFirstFile) {
|
||||||
isFirstFile = false;
|
isFirstFile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(monitor.isCanceled())
|
if (monitor.isCanceled()) {
|
||||||
{
|
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.done();
|
monitor.done();
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
|
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@ -246,7 +243,6 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -270,47 +266,49 @@ 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)
|
if (structuredSelection.size() <= 0) {
|
||||||
return false;
|
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());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
// we only add files that we can actually build
|
// we only add files that we can actually build
|
||||||
if(!ManagedBuildManager.manages(file.getProject()))
|
if (!ManagedBuildManager.manages(file.getProject())) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
IManagedBuildInfo buildInfo = ManagedBuildManager
|
IManagedBuildInfo buildInfo = ManagedBuildManager
|
||||||
.getBuildInfo(file.getProject());
|
.getBuildInfo(file.getProject());
|
||||||
|
|
||||||
if(buildInfo == null)
|
if (buildInfo == null) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
IManagedBuilderMakefileGenerator buildfileGenerator = ManagedBuildManager
|
IManagedBuilderMakefileGenerator buildfileGenerator = ManagedBuildManager
|
||||||
.getBuildfileGenerator(buildInfo
|
.getBuildfileGenerator(buildInfo
|
||||||
.getDefaultConfiguration());
|
.getDefaultConfiguration());
|
||||||
|
|
||||||
if(buildfileGenerator == null)
|
if (buildfileGenerator == null) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure build file generator is initialized
|
// make sure build file generator is initialized
|
||||||
buildfileGenerator.initialize(file.getProject(), buildInfo, new NullProgressMonitor());
|
buildfileGenerator.initialize(file.getProject(), buildInfo,
|
||||||
|
new NullProgressMonitor());
|
||||||
|
|
||||||
// if we have no build info or we can't build the file, then
|
// if we have no build info or we can't build the file, then
|
||||||
// disable the action
|
// disable the action
|
||||||
if (!buildInfo.buildsFileType(file.getFileExtension())
|
if (!buildInfo.buildsFileType(file.getFileExtension())
|
||||||
|| buildfileGenerator.isGeneratedResource(file) ) {
|
|| buildfileGenerator.isGeneratedResource(file)) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,10 +325,10 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
* be enabled.
|
* be enabled.
|
||||||
*/
|
*/
|
||||||
private void update() {
|
private void update() {
|
||||||
if(action != null)
|
if (action != null) {
|
||||||
action.setEnabled(shouldBeEnabled());
|
action.setEnabled(shouldBeEnabled());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
|
@ -343,6 +341,4 @@ public class BuildFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,33 +15,22 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.ICModelMarker;
|
|
||||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
import org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager;
|
|
||||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.GeneratedMakefileBuilder;
|
import org.eclipse.cdt.managedbuilder.internal.core.GeneratedMakefileBuilder;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
|
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IMarker;
|
|
||||||
import org.eclipse.core.resources.IProject;
|
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.IPath;
|
|
||||||
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.OperationCanceledException;
|
import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
import org.eclipse.core.runtime.Path;
|
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.action.Action;
|
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.ui.ISelectionService;
|
import org.eclipse.ui.ISelectionService;
|
||||||
|
@ -54,7 +43,8 @@ import org.eclipse.ui.actions.ActionDelegate;
|
||||||
* @author crecoskie
|
* @author crecoskie
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
|
public class CleanFilesAction extends ActionDelegate implements
|
||||||
|
IWorkbenchWindowActionDelegate {
|
||||||
/**
|
/**
|
||||||
* The workbench window; or <code>null</code> if this action has been
|
* The workbench window; or <code>null</code> if this action has been
|
||||||
* <code>dispose</code>d.
|
* <code>dispose</code>d.
|
||||||
|
@ -90,7 +80,6 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
|
* @see org.eclipse.ui.actions.ActionDelegate#init(org.eclipse.jface.action.IAction)
|
||||||
*/
|
*/
|
||||||
|
@ -123,8 +112,9 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
*/
|
*/
|
||||||
private IFile convertToIFile(Object object) {
|
private IFile convertToIFile(Object object) {
|
||||||
|
|
||||||
if (object instanceof IFile)
|
if (object instanceof IFile) {
|
||||||
return (IFile) object;
|
return (IFile) object;
|
||||||
|
}
|
||||||
|
|
||||||
if (object instanceof IAdaptable) {
|
if (object instanceof IAdaptable) {
|
||||||
IAdaptable adaptable = (IAdaptable) object;
|
IAdaptable adaptable = (IAdaptable) object;
|
||||||
|
@ -199,7 +189,6 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
files = filesToBuild;
|
files = filesToBuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -214,7 +203,7 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
ResourcesPlugin.FAMILY_MANUAL_BUILD);
|
ResourcesPlugin.FAMILY_MANUAL_BUILD);
|
||||||
for (int i = 0; i < buildJobs.length; i++) {
|
for (int i = 0; i < buildJobs.length; i++) {
|
||||||
Job curr = buildJobs[i];
|
Job curr = buildJobs[i];
|
||||||
if (curr != this && curr instanceof CleanFilesJob) {
|
if ((curr != this) && (curr instanceof CleanFilesJob)) {
|
||||||
curr.cancel(); // cancel all other build jobs of our
|
curr.cancel(); // cancel all other build jobs of our
|
||||||
// kind
|
// kind
|
||||||
|
|
||||||
|
@ -223,7 +212,10 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (files != null) {
|
if (files != null) {
|
||||||
monitor.beginTask(ManagedMakeMessages.getResourceString("CleanFilesAction.cleaningFiles"), files.size()); //$NON-NLS-1$
|
monitor
|
||||||
|
.beginTask(
|
||||||
|
ManagedMakeMessages
|
||||||
|
.getResourceString("CleanFilesAction.cleaningFiles"), files.size()); //$NON-NLS-1$
|
||||||
|
|
||||||
Iterator iterator = files.iterator();
|
Iterator iterator = files.iterator();
|
||||||
|
|
||||||
|
@ -234,8 +226,7 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
||||||
builder.cleanFile(file, monitor);
|
builder.cleanFile(file, monitor);
|
||||||
|
|
||||||
if(monitor.isCanceled())
|
if (monitor.isCanceled()) {
|
||||||
{
|
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,12 +256,13 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
List selectedFiles = getSelectedBuildableFiles();
|
List selectedFiles = getSelectedBuildableFiles();
|
||||||
|
|
||||||
CleanFilesJob job = new CleanFilesJob(ManagedMakeMessages.getResourceString("CleanFilesAction.cleaningFiles"), selectedFiles); //$NON-NLS-1$
|
CleanFilesJob job = new CleanFilesJob(
|
||||||
|
ManagedMakeMessages
|
||||||
|
.getResourceString("CleanFilesAction.cleaningFiles"), selectedFiles); //$NON-NLS-1$
|
||||||
|
|
||||||
job.schedule();
|
job.schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean shouldBeEnabled() {
|
private boolean shouldBeEnabled() {
|
||||||
ISelectionService selectionService = workbenchWindow
|
ISelectionService selectionService = workbenchWindow
|
||||||
.getSelectionService();
|
.getSelectionService();
|
||||||
|
@ -279,16 +271,16 @@ 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)
|
if (structuredSelection.size() <= 0) {
|
||||||
return false;
|
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());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
// we only add files that we can actually build
|
// we only add files that we can actually build
|
||||||
if(!ManagedBuildManager.manages(file.getProject()))
|
if (!ManagedBuildManager.manages(file.getProject())) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,14 +289,14 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
|
|
||||||
// if we have no build info or we can't build the file, then
|
// if we have no build info or we can't build the file, then
|
||||||
// disable the action
|
// disable the action
|
||||||
if (buildInfo == null
|
if ((buildInfo == null)
|
||||||
|| !buildInfo.buildsFileType(file.getFileExtension()) ) {
|
|| !buildInfo.buildsFileType(file
|
||||||
|
.getFileExtension())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,18 +308,16 @@ public class CleanFilesAction extends ActionDelegate implements IWorkbenchWindow
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Updates the enablement state for the action based upon the selection. If
|
* Updates the enablement state for the action based upon the selection. If
|
||||||
* the selection corresponds to files buildable by MBS, then the action will
|
* the selection corresponds to files buildable by MBS, then the action will
|
||||||
* be enabled.
|
* be enabled.
|
||||||
*/
|
*/
|
||||||
private void update() {
|
private void update() {
|
||||||
if(action != null)
|
if (action != null) {
|
||||||
action.setEnabled(shouldBeEnabled());
|
action.setEnabled(shouldBeEnabled());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue