From 58dffc15409a53510a3edb5dfaebac20bc659eae Mon Sep 17 00:00:00 2001 From: David Inglis Date: Mon, 18 Aug 2003 21:10:04 +0000 Subject: [PATCH] update core - refactor cleanup ui - new work on make action contributions and targets --- build/org.eclipse.cdt.make.core/plugin.xml | 10 -- .../eclipse/cdt/make/core/MakeBuilder.java | 33 ++--- .../eclipse/cdt/make/core/MakeCorePlugin.java | 34 +++-- .../cdt/make/core/MakeProjectNature.java | 6 +- .../cdt/make/core/MakeScannerInfo.java | 2 +- .../cdt/make/core/MakeScannerProvider.java | 14 +- .../{ => internal}/core/BuildInfoFactory.java | 43 +++--- .../cdt/make/internal/core/MakeBuilder.java | 58 -------- .../cdt/make/internal/core/MakeProject.java | 12 +- build/org.eclipse.cdt.make.ui/plugin.xml | 14 +- .../ui/actions/MakeBuilderAction.java | 20 +++ .../ui/actions/MakeCreateBuildAction.java | 20 +++ .../ui/properties/MakePropertyPage.java | 4 +- .../internal/ui/wizards/StatusWizardPage.java | 4 +- .../cdt/make/ui/BuildPathInfoBlock.java | 8 +- .../ui/actions/AbstractMakeBuilderAction.java | 46 ++++++ .../make/ui/actions/CreateBuildAction.java | 13 +- .../cdt/make/ui/actions/MakeAction.java | 60 -------- .../cdt/make/ui/actions/MakeBuild.java | 106 ++++++++++++++ .../cdt/make/ui/actions/MakeBuildAction.java | 134 +++++------------- .../ui/actions/UpdateMakeProjectAction.java | 3 +- .../eclipse/cdt/make/ui/views/MakeView.java | 9 +- .../wizards/ConvertToMakeProjectWizard.java | 2 +- .../wizards/MakeProjectWizardOptionPage.java | 2 +- .../make/ui/wizards/NewMakeProjectWizard.java | 2 +- .../ui/wizards/UpdateMakeProjectWizard.java | 2 +- .../wizards/UpdateMakeProjectWizardPage.java | 10 +- 27 files changed, 342 insertions(+), 329 deletions(-) rename build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/{ => internal}/core/BuildInfoFactory.java (82%) delete mode 100644 build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeBuilder.java create mode 100644 build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/MakeBuilderAction.java create mode 100644 build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/MakeCreateBuildAction.java create mode 100644 build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/AbstractMakeBuilderAction.java delete mode 100644 build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeAction.java create mode 100644 build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuild.java diff --git a/build/org.eclipse.cdt.make.core/plugin.xml b/build/org.eclipse.cdt.make.core/plugin.xml index 2520301c754..b68ece0198f 100644 --- a/build/org.eclipse.cdt.make.core/plugin.xml +++ b/build/org.eclipse.cdt.make.core/plugin.xml @@ -61,14 +61,4 @@ class="org.eclipse.cdt.make.internal.core.MakeProject"> - - - - - - diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java index 2eccb8fdb8f..8dfb5b47613 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java @@ -41,9 +41,9 @@ import org.eclipse.core.runtime.SubProgressMonitor; public class MakeBuilder extends ACBuilder { - private static final String BUILD_ERROR = "MakeBuilder.buildError"; + private static final String BUILD_ERROR = "MakeBuilder.buildError"; //$NON-NLS-1$ - public final static String BUILDER_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"; + public final static String BUILDER_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"; //$NON-NLS-1$ public MakeBuilder() { } @@ -68,7 +68,7 @@ public class MakeBuilder extends ACBuilder { */ protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { boolean bPerformBuild = true; - IMakeBuilderInfo info = BuildInfoFactory.create(args, MakeBuilder.BUILDER_ID); + IMakeBuilderInfo info = MakeCorePlugin.create(args, MakeBuilder.BUILDER_ID); if (!shouldBuild(kind, info)) { return new IProject[0]; } @@ -100,7 +100,7 @@ public class MakeBuilder extends ACBuilder { if (monitor == null) { monitor = new NullProgressMonitor(); } - monitor.beginTask("Invoking the C Builder: " + currProject.getName(), IProgressMonitor.UNKNOWN); + monitor.beginTask("Invoking Make Builder: " + currProject.getName(), IProgressMonitor.UNKNOWN); try { IPath buildCommand = info.getBuildCommand(); @@ -115,7 +115,7 @@ public class MakeBuilder extends ACBuilder { IPath workingDirectory = info.getBuildLocation(); String[] targets = getTargets(kind, info); - if (targets.length != 0 && targets[targets.length - 1].equals("clean")) + if (targets.length != 0 && targets[targets.length - 1].equals("clean")) //$NON-NLS-1$ isClean = true; // Before launching give visual cues via the monitor subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN); @@ -128,15 +128,15 @@ public class MakeBuilder extends ACBuilder { // Set the environmennt, some scripts may need the CWD var to be set. Properties props = launcher.getEnvironment(); - props.put("CWD", workingDirectory.toOSString()); - props.put("PWD", workingDirectory.toOSString()); + props.put("CWD", workingDirectory.toOSString()); //$NON-NLS-1$ + props.put("PWD", workingDirectory.toOSString()); //$NON-NLS-1$ String[] env = null; ArrayList envList = new ArrayList(); Enumeration names = props.propertyNames(); if (names != null) { while (names.hasMoreElements()) { String key = (String) names.nextElement(); - envList.add(key + "=" + props.getProperty(key)); + envList.add(key + "=" + props.getProperty(key)); //$NON-NLS-1$ } env = (String[]) envList.toArray(new String[envList.size()]); } @@ -149,12 +149,12 @@ public class MakeBuilder extends ACBuilder { if (info.isDefaultBuildCmd()) { if ( !info.isStopOnError()) { buildArguments = new String[targets.length + 1]; - buildArguments[0] = "-k"; + buildArguments[0] = "-k"; //$NON-NLS-1$ System.arraycopy(targets, 0, buildArguments, 1, targets.length); } } else { String args = info.getBuildArguments(); - if ( args != null && !args.equals("")) { + if ( args != null && !args.equals("")) { //$NON-NLS-1$ String[] newArgs = makeArray(args); buildArguments = new String[targets.length + newArgs.length]; System.arraycopy(newArgs, 0, buildArguments, 0, newArgs.length); @@ -175,21 +175,18 @@ public class MakeBuilder extends ACBuilder { isCanceled = monitor.isCanceled(); monitor.setCanceled(false); subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN); - subMonitor.subTask("Refresh From Local"); + subMonitor.subTask("Updating project..."); try { currProject.refreshLocal(IResource.DEPTH_INFINITE, subMonitor); } catch (CoreException e) { } - - subMonitor = new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN); - subMonitor.subTask("Parsing"); } else { errMsg = launcher.getErrorMessage(); } if (errMsg != null) { - StringBuffer buf = new StringBuffer(buildCommand.toString() + " "); + StringBuffer buf = new StringBuffer(buildCommand.toString() + " "); //$NON-NLS-1$ for (int i = 0; i < buildArguments.length; i++) { buf.append(buildArguments[i]); buf.append(' '); @@ -197,8 +194,8 @@ public class MakeBuilder extends ACBuilder { String errorDesc = MakeCorePlugin.getFormattedString(BUILD_ERROR, buf.toString()); buf = new StringBuffer(errorDesc); - buf.append(System.getProperty("line.separator", "\n")); - buf.append("(").append(errMsg).append(")"); + buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ cos.write(buf.toString().getBytes()); cos.flush(); } @@ -239,7 +236,7 @@ public class MakeBuilder extends ACBuilder { } protected String[] getTargets(int kind, IMakeBuilderInfo info) { - String targets = ""; + String targets = ""; //$NON-NLS-1$ switch (kind) { case IncrementalProjectBuilder.AUTO_BUILD : targets = info.getAutoBuildTarget(); diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java index 76a47282fce..d658e4f22ff 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java @@ -12,20 +12,24 @@ package org.eclipse.cdt.make.core; ***********************************************************************/ import java.text.MessageFormat; +import java.util.Map; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.make.internal.core.BuildInfoFactory; +import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Preferences; /** * The main plugin class to be used in the desktop. */ public class MakeCorePlugin extends Plugin { - public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder"; + public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder"; //$NON-NLS-1$ //The shared instance. private static MakeCorePlugin plugin; //Resource bundle. @@ -38,7 +42,7 @@ public class MakeCorePlugin extends Plugin { super(descriptor); plugin = this; try { - resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.make.core.PluginResources"); + resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.make.core.PluginResources"); //$NON-NLS-1$ } catch (MissingResourceException x) { resourceBundle = null; } @@ -86,20 +90,32 @@ public class MakeCorePlugin extends Plugin { } protected void initializeDefaultPluginPreferences() { - IMakeBuilderInfo info = BuildInfoFactory.create(getPluginPreferences(), MakeBuilder.BUILDER_ID, true); + IMakeBuilderInfo info = create(getPluginPreferences(), MakeBuilder.BUILDER_ID, true); try { - info.setBuildCommand(new Path("make")); - info.setBuildLocation(new Path("")); + info.setBuildCommand(new Path("make")); //$NON-NLS-1$ + info.setBuildLocation(new Path("")); //$NON-NLS-1$ info.setStopOnError(false); info.setUseDefaultBuildCmd(true); info.setAutoBuildEnable(false); - info.setAutoBuildTarget("all"); + info.setAutoBuildTarget("all"); //$NON-NLS-1$ info.setIncrementalBuildEnable(true); - info.setIncrementalBuildTarget("all"); + info.setIncrementalBuildTarget("all"); //$NON-NLS-1$ info.setFullBuildEnable(true); - info.setFullBuildTarget("clean all"); + info.setFullBuildTarget("clean all"); //$NON-NLS-1$ } catch (CoreException e) { } - getPluginPreferences().setDefault(CCorePlugin.PREF_BINARY_PARSER, CCorePlugin.PLUGIN_ID + ".ELF"); + getPluginPreferences().setDefault(CCorePlugin.PREF_BINARY_PARSER, CCorePlugin.PLUGIN_ID + ".ELF"); //$NON-NLS-1$ + } + + public static IMakeBuilderInfo create(Preferences prefs, String builderID, boolean useDefaults) { + return BuildInfoFactory.create(prefs, builderID, useDefaults); + } + + public static IMakeBuilderInfo create(IProject project, String builderID) throws CoreException { + return BuildInfoFactory.create(project, builderID); + } + + public static IMakeBuilderInfo create(Map args, String builderID) { + return BuildInfoFactory.create(args, builderID); } } diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeProjectNature.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeProjectNature.java index 4edf73ca656..a4d38523ede 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeProjectNature.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeProjectNature.java @@ -21,7 +21,7 @@ import org.eclipse.core.runtime.SubProgressMonitor; public class MakeProjectNature implements IProjectNature { - public final static String NATURE_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeNature"; + public final static String NATURE_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeNature"; //$NON-NLS-1$ private IProject fProject; public static void addNature(IProject project, SubProgressMonitor monitor) throws CoreException { @@ -101,8 +101,8 @@ public class MakeProjectNature implements IProjectNature { */ public void configure() throws CoreException { addBuildSpec(); - IMakeBuilderInfo info = BuildInfoFactory.create(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID, false); - IMakeBuilderInfo projectInfo = BuildInfoFactory.create(getProject(), MakeBuilder.BUILDER_ID); + IMakeBuilderInfo info = MakeCorePlugin.create(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID, false); + IMakeBuilderInfo projectInfo = MakeCorePlugin.create(getProject(), MakeBuilder.BUILDER_ID); projectInfo.setBuildLocation(info.getBuildLocation()); diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java index 4c8c4feb457..f6d9ea04d4c 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java @@ -72,7 +72,7 @@ public class MakeScannerInfo implements IScannerInfo { } String key = new String(); String value = new String(); - int index = symbol.indexOf("="); + int index = symbol.indexOf("="); //$NON-NLS-1$ if (index != -1) { key = symbol.substring(0, index).trim(); value = symbol.substring(index + 1).trim(); diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java index fd69715eeaf..f48d0ebb63e 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java @@ -36,16 +36,16 @@ import org.w3c.dom.Node; public class MakeScannerProvider extends AbstractCExtension implements IScannerInfoProvider { // This is the id of the IScannerInfoProvider extension point entry - public static final String INTERFACE_IDENTITY = MakeCorePlugin.getUniqueIdentifier() + ".MakeScannerProvider"; + public static final String INTERFACE_IDENTITY = MakeCorePlugin.getUniqueIdentifier() + ".MakeScannerProvider"; //$NON-NLS-1$ // Name we will use to store build property with the project - private static final QualifiedName scannerInfoProperty = new QualifiedName(MakeCorePlugin.getUniqueIdentifier(), "makeBuildInfo"); - private static final String CDESCRIPTOR_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeScannerInfo"; + private static final QualifiedName scannerInfoProperty = new QualifiedName(MakeCorePlugin.getUniqueIdentifier(), "makeBuildInfo"); //$NON-NLS-1$ + private static final String CDESCRIPTOR_ID = MakeCorePlugin.getUniqueIdentifier() + ".makeScannerInfo"; //$NON-NLS-1$ - public static final String INCLUDE_PATH = "includePath"; - public static final String PATH = "path"; - public static final String DEFINED_SYMBOL = "definedSymbol"; - public static final String SYMBOL = "symbol"; + public static final String INCLUDE_PATH = "includePath"; //$NON-NLS-1$ + public static final String PATH = "path"; //$NON-NLS-1$ + public static final String DEFINED_SYMBOL = "definedSymbol"; //$NON-NLS-1$ + public static final String SYMBOL = "symbol"; //$NON-NLS-1$ // Listeners interested in build model changes private static Map listeners; diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java similarity index 82% rename from build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/BuildInfoFactory.java rename to build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java index a5464d9d432..9a35c9c5cc4 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/BuildInfoFactory.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java @@ -1,4 +1,4 @@ -package org.eclipse.cdt.make.core; +package org.eclipse.cdt.make.internal.core; /********************************************************************** * Copyright (c) 2002,2003 Rational Software Corporation and others. * All rights reserved. This program and the accompanying materials @@ -13,6 +13,9 @@ package org.eclipse.cdt.make.core; import java.util.Map; +import org.eclipse.cdt.make.core.IMakeBuilderInfo; +import org.eclipse.cdt.make.core.MakeCorePlugin; +import org.eclipse.cdt.make.core.MakeProjectNature; import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; @@ -30,17 +33,17 @@ public class BuildInfoFactory { private static final String PREFIX = MakeCorePlugin.getUniqueIdentifier(); - private static final String BUILD_COMMAND = PREFIX + ".buildCommand"; - private static final String BUILD_LOCATION = PREFIX + ".buildLocation"; - private static final String STOP_ON_ERROR = PREFIX + ".stopOnError"; - private static final String USE_DEFAULT_BUILD_CMD = PREFIX + ".useDefaultBuildCmd"; - private static final String BUILD_TARGET_AUTO = PREFIX + ".autoBuildTarget"; - private static final String BUILD_TARGET_INCREMENTAL = PREFIX + ".incrementalBuildTarget"; - private static final String BUILD_TARGET_FULL = PREFIX + ".fullBuildTarget"; - private static final String BUILD_FULL_ENABLED = PREFIX + ".enableFullBuild"; - private static final String BUILD_INCREMENTAL_ENABLED = PREFIX + ".enabledIncrementalBuild"; - private static final String BUILD_AUTO_ENABLED = PREFIX + ".enableAutoBuild"; - private static final String BUILD_ARGUMENTS = PREFIX + ".buildArguments"; + static final String BUILD_COMMAND = PREFIX + ".buildCommand"; //$NON-NLS-1$ + static final String BUILD_LOCATION = PREFIX + ".buildLocation"; //$NON-NLS-1$ + static final String STOP_ON_ERROR = PREFIX + ".stopOnError"; //$NON-NLS-1$ + static final String USE_DEFAULT_BUILD_CMD = PREFIX + ".useDefaultBuildCmd"; //$NON-NLS-1$ + static final String BUILD_TARGET_AUTO = PREFIX + ".autoBuildTarget"; //$NON-NLS-1$ + static final String BUILD_TARGET_INCREMENTAL = PREFIX + ".incrementalBuildTarget"; //$NON-NLS-1$ + static final String BUILD_TARGET_FULL = PREFIX + ".fullBuildTarget"; //$NON-NLS-1$ + static final String BUILD_FULL_ENABLED = PREFIX + ".enableFullBuild"; //$NON-NLS-1$ + static final String BUILD_INCREMENTAL_ENABLED = PREFIX + ".enabledIncrementalBuild"; //$NON-NLS-1$ + static final String BUILD_AUTO_ENABLED = PREFIX + ".enableAutoBuild"; //$NON-NLS-1$ + static final String BUILD_ARGUMENTS = PREFIX + ".buildArguments"; //$NON-NLS-1$ private abstract static class Store implements IMakeBuilderInfo { @@ -61,9 +64,9 @@ public class BuildInfoFactory { public IPath getBuildCommand() { if (isDefaultBuildCmd()) { - String command = getBuildParameter("defaultCommand"); + String command = getBuildParameter("defaultCommand"); //$NON-NLS-1$ if (command == null) { - return new Path("make"); + return new Path("make"); //$NON-NLS-1$ } return new Path(command); } @@ -82,11 +85,11 @@ public class BuildInfoFactory { if (configs.length == 0) return null; //The nature exists, or this builder doesn't specify a nature - IConfigurationElement[] runElement = configs[0].getChildren("run"); - IConfigurationElement[] paramElement = runElement[0].getChildren("parameter"); + IConfigurationElement[] runElement = configs[0].getChildren("run"); //$NON-NLS-1$ + IConfigurationElement[] paramElement = runElement[0].getChildren("parameter"); //$NON-NLS-1$ for (int i = 0; i < paramElement.length; i++) { - if (paramElement[i].getAttribute("name").equals(name)) { - return paramElement[i].getAttribute("value"); + if (paramElement[i].getAttribute("name").equals(name)) { //$NON-NLS-1$ + return paramElement[i].getAttribute("value"); //$NON-NLS-1$ } } return null; @@ -100,7 +103,7 @@ public class BuildInfoFactory { public IPath getBuildLocation() { String location = getString(BUILD_LOCATION); - return new Path(location == null ? "" : location); + return new Path(location == null ? "" : location); //$NON-NLS-1$ } public void setStopOnError(boolean enabled) throws CoreException { @@ -233,7 +236,7 @@ public class BuildInfoFactory { public String getString(String name) { String value = (String)args.get(name); - return value == null ? "" : value; + return value == null ? "" : value; //$NON-NLS-1$ } public String getBuilderID() { diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeBuilder.java deleted file mode 100644 index f54a43b83a3..00000000000 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeBuilder.java +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************** - * Copyright (c) 2002,2003 Rational Software Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * QNX Software Systems - Initial API and implementation -***********************************************************************/ -package org.eclipse.cdt.make.internal.core; - -import org.eclipse.cdt.core.AbstractCExtension; -import org.eclipse.cdt.make.core.MakeCorePlugin; -import org.eclipse.core.runtime.IPath; - -public class MakeBuilder extends AbstractCExtension /*implements ICBuilder */ { - - public IPath[] getIncludePaths() { - return new IPath[0]; - } - - public void setIncludePaths(IPath[] incPaths) { - } - - public IPath[] getLibraryPaths() { - return new IPath[0]; - } - - public void setLibraryPaths(IPath[] libPaths) { - } - - public String[] getLibraries() { - return new String[0]; - } - - public void setLibraries(String[] libs) { - } - -// public IOptimization getOptimization() { -// return null; -// } -// -// public IProject[] build(CIncrementalBuilder cbuilder) { -// ICExtensionReference ref = getExtensionReference(); -// System.out.println("MakeBuilder!!!!\n Command is:" + ref.getExtensionData("command")); -// return null; -// } -// -// public void setOptimization(IOptimization o) { -// } - - public String getID() { - return MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"; - } - - -} diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java index 52e13a0f7bb..7da99037981 100644 --- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java +++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java @@ -12,32 +12,22 @@ package org.eclipse.cdt.make.internal.core; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.ICDescriptor; -import org.eclipse.cdt.core.ICExtensionReference; import org.eclipse.cdt.core.ICOwner; import org.eclipse.cdt.make.core.MakeScannerProvider; -import org.eclipse.cdt.make.core.MakeCorePlugin; import org.eclipse.core.runtime.CoreException; public class MakeProject implements ICOwner { public void configure(ICDescriptor cproject) throws CoreException { - cproject.remove(CCorePlugin.BUILDER_MODEL_ID); - ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"); - ext.setExtensionData("command", "make"); - cproject.remove(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID); cproject.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, MakeScannerProvider.INTERFACE_IDENTITY); } public void update(ICDescriptor cproject, String extensionID) throws CoreException { - if ( extensionID.equals(CCorePlugin.BUILDER_MODEL_ID ) ) { - ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, MakeCorePlugin.getUniqueIdentifier() + ".makeBuilder"); - ext.setExtensionData("command", "make"); - } if ( extensionID.equals(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID)) { cproject.create(CCorePlugin.BUILD_SCANNER_INFO_UNIQ_ID, MakeScannerProvider.INTERFACE_IDENTITY); } if ( extensionID.equals(CCorePlugin.BINARY_PARSER_UNIQ_ID)) { - cproject.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.PLUGIN_ID + ".Elf"); + cproject.create(CCorePlugin.BINARY_PARSER_UNIQ_ID, CCorePlugin.PLUGIN_ID + ".Elf"); //$NON-NLS-1$ } } diff --git a/build/org.eclipse.cdt.make.ui/plugin.xml b/build/org.eclipse.cdt.make.ui/plugin.xml index 5bebd2ea750..ac8f5b25402 100644 --- a/build/org.eclipse.cdt.make.ui/plugin.xml +++ b/build/org.eclipse.cdt.make.ui/plugin.xml @@ -91,7 +91,7 @@ @@ -99,26 +99,26 @@ + id="org.eclipse.cdt.make.ui.makeBuildAction.all"> + id="org.eclipse.cdt.make.ui.makeBuildAction.clean"> + id="org.eclipse.cdt.make.ui.makeBuildAction.clean.all"> 0) { @@ -345,7 +345,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage { } } - private void enableSymbolButtons() { + void enableSymbolButtons() { // Enable the remove button if there is at least 1 item in the list int items = symbolList.getItemCount(); if (items > 0) { @@ -424,7 +424,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage { protected void handleAddPath() { // Popup an entry dialog InputDialog dialog = - new InputDialog(shell, CUIPlugin.getResourceString(PATH_TITLE), CUIPlugin.getResourceString(PATH_LABEL), "", null); + new InputDialog(shell, CUIPlugin.getResourceString(PATH_TITLE), CUIPlugin.getResourceString(PATH_LABEL), "", null); //$NON-NLS-1$ String path = null; if (dialog.open() == InputDialog.OK) { path = dialog.getValue(); @@ -442,7 +442,7 @@ public class BuildPathInfoBlock extends AbstractCOptionPage { protected void handleAddSymbol() { // Popup an entry dialog InputDialog dialog = - new InputDialog(shell, CUIPlugin.getResourceString(SYMBOL_TITLE), CUIPlugin.getResourceString(SYMBOL_LABEL), "", null); + new InputDialog(shell, CUIPlugin.getResourceString(SYMBOL_TITLE), CUIPlugin.getResourceString(SYMBOL_LABEL), "", null); //$NON-NLS-1$ String symbol = null; if (dialog.open() == InputDialog.OK) { symbol = dialog.getValue(); diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/AbstractMakeBuilderAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/AbstractMakeBuilderAction.java new file mode 100644 index 00000000000..a31da3ad587 --- /dev/null +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/AbstractMakeBuilderAction.java @@ -0,0 +1,46 @@ +/* + * Created on 18-Aug-2003 + * + * Copyright (c) 2002,2003 QNX Software Systems Ltd. + * + * Contributors: + * QNX Software Systems - Initial API and implementation +***********************************************************************/ +package org.eclipse.cdt.make.ui.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.actions.ActionDelegate; + +public abstract class AbstractMakeBuilderAction extends ActionDelegate implements IObjectActionDelegate { + IWorkbenchPart part; + ISelection fSelection; + + public AbstractMakeBuilderAction() { + super(); + } + + /** + * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) + */ + public void setActivePart(IAction action, IWorkbenchPart targetPart) { + part = targetPart; + } + + /** + * @see IActionDelegate#selectionChanged(IAction, ISelection) + */ + public void selectionChanged(IAction action, ISelection selection) { + fSelection = selection; + } + + protected Shell getShell() { + return part.getSite().getShell(); + } + + protected abstract String getBuilderID(); + +} diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/CreateBuildAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/CreateBuildAction.java index ee1541bbb63..5c3a70b3669 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/CreateBuildAction.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/CreateBuildAction.java @@ -8,7 +8,16 @@ ***********************************************************************/ package org.eclipse.cdt.make.ui.actions; -public class CreateBuildAction extends MakeAction { +import org.eclipse.jface.action.IAction; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; + +public abstract class CreateBuildAction extends AbstractMakeBuilderAction implements IWorkbenchWindowActionDelegate { + + public void init(IWorkbenchWindow window) { + } + + public void run(IAction action) { + } - } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeAction.java deleted file mode 100644 index f3ec3cb570a..00000000000 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeAction.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.make.ui.actions; - -import org.eclipse.cdt.make.ui.views.MakeTarget; -import org.eclipse.core.resources.IProject; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.actions.ActionDelegate; - -public class MakeAction extends ActionDelegate implements IObjectActionDelegate { - ISelection fSelection; - IWorkbenchPart part; - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - part = targetPart; - } - - /** - * @see IActionDelegate#run(IAction) - */ - public void run(IAction action) { - if (fSelection instanceof IStructuredSelection - && ((IStructuredSelection) fSelection).getFirstElement() instanceof IProject) { - IProject project = (IProject) ((IStructuredSelection) fSelection).getFirstElement(); - MakeBuildAction build = null; - if (action.getId().equals("org.eclipse.cdt.make.ui.makeAction.all")) { - build = new MakeBuildAction(new org.eclipse.cdt.make.ui.views.MakeTarget[] { new MakeTarget(project, "all")}, part.getSite().getShell(), "all"); - } else if (action.getId().equals("org.eclipse.cdt.make.ui.makeAction.clean")) { - build = new MakeBuildAction(new MakeTarget[] { new MakeTarget(project, "all")}, part.getSite().getShell(), "all"); - } else if (action.getId().equals("org.eclipse.cdt.make.ui.makeAction.rebuild")) { - build = new MakeBuildAction(new MakeTarget[] { new MakeTarget(project, "all")}, part.getSite().getShell(), "all"); - } - if ( build != null ) { - build.run(); - } - } - } - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) { - fSelection = selection; - } - -} diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuild.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuild.java new file mode 100644 index 00000000000..62f2e8faeba --- /dev/null +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuild.java @@ -0,0 +1,106 @@ +package org.eclipse.cdt.make.ui.actions; + +/* + * (c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.cdt.make.core.IMakeBuilderInfo; +import org.eclipse.cdt.make.core.MakeBuilder; +import org.eclipse.cdt.make.core.MakeCorePlugin; +import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; +import org.eclipse.cdt.make.ui.views.MakeTarget; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableContext; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.BuildAction; + +public class MakeBuild { + + /** + * Causes all editors to save any modified resources depending on the user's + * preference. + */ + static void saveAllResources(MakeTarget[] targets) { + + if (!BuildAction.isSaveAllSet()) + return; + + List projects = new ArrayList(); + for (int i = 0; i < targets.length; ++i) { + MakeTarget target = targets[i]; + projects.add(target.getResource().getProject()); + } + + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); + for (int i = 0; i < windows.length; i++) { + IWorkbenchPage[] pages = windows[i].getPages(); + for (int j = 0; j < pages.length; j++) { + IWorkbenchPage page = pages[j]; + IEditorReference[] editorReferences = page.getEditorReferences(); + for (int k = 0; k < editorReferences.length; k++) { + IEditorPart editor = editorReferences[k].getEditor(false); + if (editor != null && editor.isDirty()) { + IEditorInput input = editor.getEditorInput(); + if (input instanceof IFileEditorInput) { + IFile inputFile = ((IFileEditorInput) input).getFile(); + if (projects.contains(inputFile.getProject())) { + page.saveEditor(editor, false); + } + } + } + } + } + } + } + + static public void run(boolean fork, IRunnableContext context, final MakeTarget[] targets) { + try { + context.run(fork, true, new IRunnableWithProgress() { + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + try { + IWorkspaceRunnable runnable = new IWorkspaceRunnable() { + public void run(IProgressMonitor monitor) throws CoreException { + saveAllResources(targets); + +// Map infoMap = new HashMap(); +// IMakeBuilderInfo info = MakeCorePlugin.create(infoMap, MakeBuilder.BUILDER_ID); +// project.build(IncrementalProjectBuilder.FULL_BUILD, MakeBuilder.BUILDER_ID, infoMap, monitor); + + } + }; + MakeUIPlugin.getWorkspace().run(runnable, monitor); + } catch (CoreException e) { + throw new InvocationTargetException(e); + } catch (OperationCanceledException e) { + throw new InterruptedException(e.getMessage()); + } + } + }); + } catch (InterruptedException e) { + return; + } catch (InvocationTargetException e) { + MakeUIPlugin.logException(e, "Build Error", "Error Building Projects"); + } + } +} diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuildAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuildAction.java index 3e908dcfe7e..105e8ce2d5d 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuildAction.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/MakeBuildAction.java @@ -1,110 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ package org.eclipse.cdt.make.ui.actions; -/* - * (c) Copyright QNX Software Systems Ltd. 2002. - * All Rights Reserved. - */ - -import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.cdt.internal.ui.CPluginImages; +import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; import org.eclipse.cdt.make.ui.views.MakeTarget; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.action.Action; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.ProgressMonitorDialog; -import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IEditorReference; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.actions.BuildAction; - - -public class MakeBuildAction extends Action { - static final String PREFIX = "BuildAction."; - - MakeTarget[] targets; - Shell shell; - - public MakeBuildAction (MakeTarget[] targets, Shell shell, String s) { - super (s); - this.shell = shell; - this.targets = targets; - - setToolTipText(PREFIX); - setImageDescriptor(CPluginImages.DESC_BUILD_MENU); - } +import org.eclipse.jface.viewers.IStructuredSelection; +public abstract class MakeBuildAction extends AbstractMakeBuilderAction { + protected final String makeActionID = "org.eclipse.cdt.make.ui.makeBuildAction."; //$NON-NLS-1$ /** - * Causes all editors to save any modified resources depending on the user's - * preference. + * @see IActionDelegate#run(IAction) */ - void saveAllResources() { - - if (!BuildAction.isSaveAllSet()) - return; - - List projects = new ArrayList(); - for (int i = 0; i < targets.length; ++i ) { - MakeTarget target = targets[i]; - projects.add(target.getResource().getProject()); - } - - IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); - for (int i = 0; i < windows.length; i++) { - IWorkbenchPage [] pages = windows[i].getPages(); - for (int j = 0; j < pages.length; j++) { - IWorkbenchPage page = pages[j]; - IEditorReference[] editorReferences = page.getEditorReferences(); - for (int k = 0; k < editorReferences.length; k++) { - IEditorPart editor = editorReferences[k].getEditor(false); - if (editor != null && editor.isDirty()) { - IEditorInput input = editor.getEditorInput(); - if (input instanceof IFileEditorInput) { - IFile inputFile = ((IFileEditorInput)input).getFile(); - if (projects.contains(inputFile.getProject())) { - page.saveEditor(editor, false); - } - } - } - } - } - } - } - - public void run() { - try { - saveAllResources(); - IRunnableWithProgress op = new IRunnableWithProgress () { - public void run(IProgressMonitor monitor) - throws InvocationTargetException, InterruptedException { - for (int i = 0; i < targets.length; ++i ) { -// MakeTarget target = targets[i]; -// IResource res = target.getResource(); -// IProject project = res.getProject(); - -// try { -// if (! project.equals(res) || target.isLeaf()) { -// String dir = res.getLocation().toOSString(); -// } -// project.build (IncrementalProjectBuilder.FULL_BUILD, MakeBuilder.BUILDER_ID, monitor); -// } catch (CoreException e) { -// } - } + public void run(IAction action) { + if (fSelection instanceof IStructuredSelection + && ((IStructuredSelection) fSelection).getFirstElement() instanceof IProject) { + IProject project = (IProject) ((IStructuredSelection) fSelection).getFirstElement(); + MakeTarget target = null; + String id = action.getId(); + if ( id.startsWith(makeActionID) ) { + String targets = id.substring(makeActionID.length()); + if ( targets.length() > 0) { + } }; - new ProgressMonitorDialog(shell).run(true, true, op); - } catch (InvocationTargetException e) { - // handle exception - } catch (InterruptedException e) { - // handle cancelation - } + if ( target != null ) { + ProgressMonitorDialog pd = new ProgressMonitorDialog(MakeUIPlugin.getActiveWorkbenchShell()); + MakeBuild.run(true, pd, new MakeTarget[] {target}); + } else { + MakeUIPlugin.errorDialog(getShell(), "Make Build Contribution Error", "build target not defined", (IStatus)null); + } + } } } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java index ab6f6827d94..963bca2e9a7 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java @@ -13,7 +13,6 @@ import java.util.ArrayList; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.model.ICProject; -import org.eclipse.cdt.make.core.BuildInfoFactory; import org.eclipse.cdt.make.core.IMakeBuilderInfo; import org.eclipse.cdt.make.core.MakeBuilder; import org.eclipse.cdt.make.core.MakeCorePlugin; @@ -119,7 +118,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate { MakeProjectNature.addNature(project[i], new SubProgressMonitor(monitor, 1)); QualifiedName qlocation = new QualifiedName(CCorePlugin.PLUGIN_ID, "buildLocation"); String location = project[i].getPersistentProperty(qlocation); - IMakeBuilderInfo newInfo = BuildInfoFactory.create(project[i], MakeBuilder.BUILDER_ID); + IMakeBuilderInfo newInfo = MakeCorePlugin.create(project[i], MakeBuilder.BUILDER_ID); newInfo.setBuildCommand(new Path(location)); //remove old properties diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java index 200325d9687..289322d1927 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java @@ -5,7 +5,6 @@ package org.eclipse.cdt.make.ui.views; * All Rights Reserved. */ -import org.eclipse.cdt.make.ui.actions.MakeBuildAction; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuListener; @@ -49,8 +48,8 @@ public class MakeView extends ViewPart { //System.out.println ("Double click on " + element); if (element instanceof MakeTarget) { MakeTarget ta = (MakeTarget) element; - Action build = new MakeBuildAction(new MakeTarget[] { ta }, getViewSite().getShell(), "Build"); - build.run(); +// Action build = new MakeBuildAction(new MakeTarget[] { ta }, getViewSite().getShell(), "Build"); +// build.run(); } //if (viewer.isExpandable(element)) { // viewer.setExpandedState(element, !viewer.getExpandedState(element)); @@ -112,13 +111,13 @@ public class MakeView extends ViewPart { } }; - Action build = new MakeBuildAction(new MakeTarget[] { ta }, getViewSite().getShell(), "Build"); +// Action build = new MakeBuildAction(new MakeTarget[] { ta }, getViewSite().getShell(), "Build"); menu.add(add); menu.add(edit); menu.add(del); //menu.add (new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); - menu.add(build); +// menu.add(build); if (ta.isLeaf()) { add.setEnabled(false); } else { diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java index b25697c6a26..37a7f49010b 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java @@ -97,7 +97,7 @@ public class ConvertToMakeProjectWizard extends ConversionWizard { } protected void doRun(IProgressMonitor monitor) throws CoreException { - monitor.beginTask("Converting to Make Project", 2); + monitor.beginTask("Converting to Make Project...", 2); super.doRun(new SubProgressMonitor(monitor, 1)); optionsPage.performApply(new SubProgressMonitor(monitor, 1)); } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java index 39e654255bf..c0ccf740ef1 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java @@ -42,7 +42,7 @@ public class MakeProjectWizardOptionPage extends NewCProjectWizardOptionPage { } public MakeProjectWizardOptionPage(String title, String description) { - super("MakeProjectSettingsPage"); + super("MakeProjectSettingsPage"); //$NON-NLS-1$ setTitle(title); setDescription(description); } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java index 2dcbae2143a..f0bb35ddbb0 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java @@ -49,6 +49,6 @@ public abstract class NewMakeProjectWizard extends NewCProjectWizard { } public String getProjectID() { - return MakeCorePlugin.getUniqueIdentifier() + ".make"; + return MakeCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$ } } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizard.java index 03eb7551ea3..e7cbae594f3 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizard.java @@ -14,7 +14,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.Wizard; public class UpdateMakeProjectWizard extends Wizard { - private static final String MAKE_UPDATE_WINDOW_TITLE = "MakeWizardUpdate.window_title"; + private static final String MAKE_UPDATE_WINDOW_TITLE = "MakeWizardUpdate.window_title"; //$NON-NLS-1$ private UpdateMakeProjectWizardPage page1; private IProject[] selected; diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java index 8dedd466742..40ea79e9628 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/UpdateMakeProjectWizardPage.java @@ -32,8 +32,8 @@ import org.eclipse.ui.model.WorkbenchLabelProvider; public class UpdateMakeProjectWizardPage extends StatusWizardPage { - private static final String MAKE_UPDATE_TITLE = "MakeWizardUpdatePage.title"; - private static final String MAKE_UPDATE_DESCRIPTION = "MakeWizardUpdatePage.description"; + private static final String MAKE_UPDATE_TITLE = "MakeWizardUpdatePage.title"; //$NON-NLS-1$ + private static final String MAKE_UPDATE_DESCRIPTION = "MakeWizardUpdatePage.description"; //$NON-NLS-1$ private IProject[] selected; private CheckboxTableViewer makeProjectListViewer; @@ -66,7 +66,7 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage { } public UpdateMakeProjectWizardPage(IProject[] selected) { - super("UpdateMakeProjectWizardPage", true); + super("UpdateMakeProjectWizardPage", true); //$NON-NLS-1$ setTitle(MakeUIPlugin.getResourceString(MAKE_UPDATE_TITLE)); setDescription(MakeUIPlugin.getResourceString(MAKE_UPDATE_DESCRIPTION)); this.selected = selected; @@ -107,7 +107,7 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage { return tablePart.getSelection(); } - private void dialogChanged() { + void dialogChanged() { IStatus genStatus = validatePlugins(); updateStatus(genStatus); } @@ -141,6 +141,6 @@ public class UpdateMakeProjectWizardPage extends StatusWizardPage { if (tablePart.getSelectionCount() == 0) { return createStatus(IStatus.ERROR, "No projects selected"); } - return createStatus(IStatus.OK, ""); + return createStatus(IStatus.OK, ""); //$NON-NLS-1$ } }