Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Inglis2003-09-24 10:20:21 -0400
committerDavid Inglis2003-09-24 10:20:21 -0400
commitec1f9424bbce5154839a5df7900cadf5bbc2942e (patch)
treebac04403e4db37090022abad1ab685dbf4b450ce
parent366e74c5bcff5f4614b3a8be5a5c573673d6d452 (diff)
downloadorg.eclipse.cdt-ec1f9424bbce5154839a5df7900cadf5bbc2942e.tar.gz
org.eclipse.cdt-ec1f9424bbce5154839a5df7900cadf5bbc2942e.tar.xz
org.eclipse.cdt-ec1f9424bbce5154839a5df7900cadf5bbc2942e.zip
added support for temporary targets
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/IMakeTarget.java13
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeProjectNature.java3
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/PluginResources.properties1
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java3
5 files changed, 19 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/IMakeTarget.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/IMakeTarget.java
index 46655d01551..e94f6f711c0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/IMakeTarget.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/IMakeTarget.java
@@ -33,7 +33,20 @@ public interface IMakeTarget {
String getBuildArguments();
void setBuildArguments(String arguments);
+
+ /**
+ * Get the target build container.
+ *
+ * @return IContainer of where target build will be invoked.
+ */
IContainer getContainer();
+ /**
+ * Make this target temporary on the container, this target will not be persisted,
+ * and may not be added to the IMakeTargetManager.
+ * @param container
+ */
+ void setContainer(IContainer container);
+
void build(IProgressMonitor monitor) throws CoreException;
}
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 81a92867aff..07d31716504 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
@@ -16,14 +16,13 @@ import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
public class MakeProjectNature implements IProjectNature {
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 {
+ public static void addNature(IProject project, IProgressMonitor monitor) throws CoreException {
IProjectDescription description = project.getDescription();
String[] prevNatures= description.getNatureIds();
for (int i= 0; i < prevNatures.length; i++) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/PluginResources.properties b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/PluginResources.properties
index 6c204e2ff15..6cbf15ca9af 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/PluginResources.properties
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/PluginResources.properties
@@ -8,5 +8,6 @@ MakeBuidler.Creating_Markers=Generating markers...
BuildInfoFactory.Missing_Builder=Missing Builder:
MakeTargetProvider.add_to_workspace_root=Cannot add build targets to workspace root
+MakeTargetProvider.add_temporary_target=Cannot add temporart Target to manager.
MakeTargetProvider.target_exists=Target exists
MakeTargetProvider.failed_initializing_targets=Failed initializing build targets
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
index ec5339a5061..6957dceab9a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTarget.java
@@ -44,7 +44,7 @@ public class MakeTarget implements IMakeTarget {
isStopOnError = info.isStopOnError();
}
- void setContainer(IContainer container) {
+ public void setContainer(IContainer container) {
this.container = container;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
index 04f405724ba..da1581295f7 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
@@ -66,6 +66,9 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
if (container instanceof IWorkspaceRoot) {
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.add_to_workspace_root"), null)); //$NON-NLS-1$
}
+ if ( target.getContainer() != null) {
+ throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1, MakeCorePlugin.getResourceString("MakeTargetManager.add_temporary_target"), null)); //$NON-NLS-1$
+ }
IProject project = container.getProject();
ProjectTargets projectTargets = (ProjectTargets) projectMap.get(project);
if (projectTargets == null) {

Back to the top