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 (-7 / +13 lines)
Lines 60-66 Link Here
60
	/*
60
	/*
61
	 *  @see IncrementalProjectBuilder#build
61
	 *  @see IncrementalProjectBuilder#build
62
	 */
62
	 */
63
	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;
64
64
65
	/**
65
	/**
66
	 * Returns the value of the callOnEmptyDelta builder extension attribute.
66
	 * Returns the value of the callOnEmptyDelta builder extension attribute.
Lines 68-73 Link Here
68
	final boolean callOnEmptyDelta() {
68
	final boolean callOnEmptyDelta() {
69
		return callOnEmptyDelta;
69
		return callOnEmptyDelta;
70
	}
70
	}
71
72
	/*
73
	 * @see IncrementalProjectBuilder
74
	 */
75
	protected abstract void clean(Map<String, String> args, IProgressMonitor monitor) throws CoreException;
76
71
	/*
77
	/*
72
	 * @see IncrementalProjectBuilder
78
	 * @see IncrementalProjectBuilder
73
	 */
79
	 */
Lines 101-109 Link Here
101
	 * @see IncrementalProjectBuilder#getCommand
107
	 * @see IncrementalProjectBuilder#getCommand
102
	 */
108
	 */
103
	protected ICommand getCommand() {
109
	protected ICommand getCommand() {
104
		return (ICommand)((BuildCommand)command).clone();
110
		return (ICommand) ((BuildCommand) command).clone();
105
	}
111
	}
106
	
112
107
	/**
113
	/**
108
	 * @see IncrementalProjectBuilder#forgetLastBuiltState()
114
	 * @see IncrementalProjectBuilder#forgetLastBuiltState()
109
	 * @see IncrementalProjectBuilder#rememberLastBuiltState()
115
	 * @see IncrementalProjectBuilder#rememberLastBuiltState()
Lines 111-120 Link Here
111
	protected IResourceDelta getDelta(IProject aProject) {
117
	protected IResourceDelta getDelta(IProject aProject) {
112
		return buildManager.getDelta(aProject);
118
		return buildManager.getDelta(aProject);
113
	}
119
	}
114
	
120
115
	/**
121
	/**
116
	 * @see IncrementalProjectBuilder#getContext()
122
	 * @see IncrementalProjectBuilder#getContext()
117
	 */ 
123
	 */
118
	protected IBuildContext getContext() {
124
	protected IBuildContext getContext() {
119
		return context;
125
		return context;
120
	}
126
	}
Lines 177-183 Link Here
177
	protected void needRebuild() {
183
	protected void needRebuild() {
178
		buildManager.requestRebuild();
184
		buildManager.requestRebuild();
179
	}
185
	}
180
	
186
181
	final void setCallOnEmptyDelta(boolean value) {
187
	final void setCallOnEmptyDelta(boolean value) {
182
		this.callOnEmptyDelta = value;
188
		this.callOnEmptyDelta = value;
183
	}
189
	}
Lines 185-191 Link Here
185
	final void setCommand(ICommand value) {
191
	final void setCommand(ICommand value) {
186
		this.command = value;
192
		this.command = value;
187
	}
193
	}
188
	
194
189
	final void setInterestingProjects(IProject[] value) {
195
	final void setInterestingProjects(IProject[] value) {
190
		interestingProjects = value;
196
		interestingProjects = value;
191
	}
197
	}
(-)a/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java (-3 / +27 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

Return to bug 408785