View | Details | Raw Unified | Return to bug 408785 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java (-1 / +1 lines)
Lines 725-731 Link Here
725
				if (trigger != IncrementalProjectBuilder.CLEAN_BUILD)
725
				if (trigger != IncrementalProjectBuilder.CLEAN_BUILD)
726
					prereqs = currentBuilder.build(trigger, args, monitor);
726
					prereqs = currentBuilder.build(trigger, args, monitor);
727
				else
727
				else
728
					currentBuilder.clean(monitor);
728
					currentBuilder.clean(args, monitor);
729
				if (prereqs == null)
729
				if (prereqs == null)
730
					prereqs = new IProject[0];
730
					prereqs = new IProject[0];
731
				currentBuilder.setInterestingProjects(prereqs.clone());
731
				currentBuilder.setInterestingProjects(prereqs.clone());
(-)a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/events/InternalBuilder.java (-9 / +13 lines)
Lines 11-18 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.core.internal.events;
12
package org.eclipse.core.internal.events;
13
13
14
import org.eclipse.core.resources.IBuildConfiguration;
15
16
import java.util.Map;
14
import java.util.Map;
17
import org.eclipse.core.internal.resources.ICoreConstants;
15
import org.eclipse.core.internal.resources.ICoreConstants;
18
import org.eclipse.core.internal.watson.ElementTree;
16
import org.eclipse.core.internal.watson.ElementTree;
Lines 62-68 Link Here
62
	/*
60
	/*
63
	 *  @see IncrementalProjectBuilder#build
61
	 *  @see IncrementalProjectBuilder#build
64
	 */
62
	 */
65
	protected abstract IProject[] build(int kind, Map<String,String> args, IProgressMonitor monitor) throws CoreException;
63
	protected abstract IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException;
66
64
67
	/**
65
	/**
68
	 * Returns the value of the callOnEmptyDelta builder extension attribute.
66
	 * Returns the value of the callOnEmptyDelta builder extension attribute.
Lines 70-75 Link Here
70
	final boolean callOnEmptyDelta() {
68
	final boolean callOnEmptyDelta() {
71
		return callOnEmptyDelta;
69
		return callOnEmptyDelta;
72
	}
70
	}
71
72
	/*
73
	 * @see IncrementalProjectBuilder
74
	 */
75
	protected abstract void clean(Map<String, String> args, IProgressMonitor monitor) throws CoreException;
76
73
	/*
77
	/*
74
	 * @see IncrementalProjectBuilder
78
	 * @see IncrementalProjectBuilder
75
	 */
79
	 */
Lines 103-111 Link Here
103
	 * @see IncrementalProjectBuilder#getCommand
107
	 * @see IncrementalProjectBuilder#getCommand
104
	 */
108
	 */
105
	protected ICommand getCommand() {
109
	protected ICommand getCommand() {
106
		return (ICommand)((BuildCommand)command).clone();
110
		return (ICommand) ((BuildCommand) command).clone();
107
	}
111
	}
108
	
112
109
	/**
113
	/**
110
	 * @see IncrementalProjectBuilder#forgetLastBuiltState()
114
	 * @see IncrementalProjectBuilder#forgetLastBuiltState()
111
	 * @see IncrementalProjectBuilder#rememberLastBuiltState()
115
	 * @see IncrementalProjectBuilder#rememberLastBuiltState()
Lines 113-122 Link Here
113
	protected IResourceDelta getDelta(IProject aProject) {
117
	protected IResourceDelta getDelta(IProject aProject) {
114
		return buildManager.getDelta(aProject);
118
		return buildManager.getDelta(aProject);
115
	}
119
	}
116
	
120
117
	/**
121
	/**
118
	 * @see IncrementalProjectBuilder#getContext()
122
	 * @see IncrementalProjectBuilder#getContext()
119
	 */ 
123
	 */
120
	protected IBuildContext getContext() {
124
	protected IBuildContext getContext() {
121
		return context;
125
		return context;
122
	}
126
	}
Lines 179-185 Link Here
179
	protected void needRebuild() {
183
	protected void needRebuild() {
180
		buildManager.requestRebuild();
184
		buildManager.requestRebuild();
181
	}
185
	}
182
	
186
183
	final void setCallOnEmptyDelta(boolean value) {
187
	final void setCallOnEmptyDelta(boolean value) {
184
		this.callOnEmptyDelta = value;
188
		this.callOnEmptyDelta = value;
185
	}
189
	}
Lines 187-193 Link Here
187
	final void setCommand(ICommand value) {
191
	final void setCommand(ICommand value) {
188
		this.command = value;
192
		this.command = value;
189
	}
193
	}
190
	
194
191
	final void setInterestingProjects(IProject[] value) {
195
	final void setInterestingProjects(IProject[] value) {
192
		interestingProjects = value;
196
		interestingProjects = value;
193
	}
197
	}
(-)a/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java (-4 / +28 lines)
Lines 141-147 Link Here
141
	 * @exception CoreException if this build fails.
141
	 * @exception CoreException if this build fails.
142
	 * @see IProject#build(int, String, Map, IProgressMonitor)
142
	 * @see IProject#build(int, String, Map, IProgressMonitor)
143
	 */
143
	 */
144
	protected abstract IProject[] build(int kind, Map<String,String> args, IProgressMonitor monitor) throws CoreException;
144
	protected abstract IProject[] build(int kind, Map<String, String> args, IProgressMonitor monitor) throws CoreException;
145
146
	/**
147
	 * This method is equivalent to {@link IncrementalProjectBuilder#clean(IProgressMonitor)}, with
148
	 * the additional possibility to pass builder specific arguments to the clean step.
149
	 * <p>
150
	 * This method is called as a result of invocations of
151
	 * <code>IProject.build</code> where the build kind is {@link #CLEAN_BUILD}.
152
	 * <p>
153
	 * This default implementation does nothing. Subclasses may override. 
154
	 * <p>
155
	 * 
156
	 * @param args a table of builder-specific arguments keyed by argument name
157
	 * (key type: <code>String</code>, value type: <code>String</code>);
158
	 * <code>null</code> is equivalent to an empty map
159
	 * @param monitor a progress monitor, or <code>null</code> if progress
160
	 * reporting and cancellation are not desired
161
	 * @exception CoreException if this build fails.
162
	 * @see IncrementalProjectBuilder#clean(IProgressMonitor)
163
	 * @since 3.8
164
	 */
165
	protected void clean(Map<String, String> args, IProgressMonitor monitor) throws CoreException {
166
		//default implementation forwards to old interface without argument map
167
		clean(monitor);
168
	}
145
169
146
	/**
170
	/**
147
	 * Clean is an opportunity for a builder to discard any additional state that has 
171
	 * Clean is an opportunity for a builder to discard any additional state that has 
Lines 419-426 Link Here
419
	 * <li>
443
	 * <li>
420
	 * The rule returned here may have no effect if the build is invoked within the 
444
	 * The rule returned here may have no effect if the build is invoked within the 
421
	 * scope of another operation that locks the entire workspace.
445
	 * scope of another operation that locks the entire workspace.
422
     * </li>
446
	 * </li>
423
     * <li>
447
	 * <li>
424
	 * If this method returns any rule other than the workspace root,
448
	 * If this method returns any rule other than the workspace root,
425
	 * resources outside of the rule scope can be modified concurrently with the build. 
449
	 * resources outside of the rule scope can be modified concurrently with the build. 
426
	 * The delta returned by {@link #getDelta(IProject)} for any project
450
	 * The delta returned by {@link #getDelta(IProject)} for any project
Lines 450-456 Link Here
450
	 * 
474
	 * 
451
	 * @since 3.6
475
	 * @since 3.6
452
	 */
476
	 */
453
	public ISchedulingRule getRule(int kind, Map<String,String> args) {
477
	public ISchedulingRule getRule(int kind, Map<String, String> args) {
454
		return getRule();
478
		return getRule();
455
	}
479
	}
456
480

Return to bug 408785