Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 352131 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java (-2 / +14 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 45-50 Link Here
45
	 * @since 3.7
45
	 * @since 3.7
46
	 */
46
	 */
47
	public static final String INC_CLEAN = "incclean"; //$NON-NLS-1$
47
	public static final String INC_CLEAN = "incclean"; //$NON-NLS-1$
48
	public static final String NOT_REAL_AUTO  = "notrealauto";//$NON-NLS-1$
48
49
49
	/**
50
	/**
50
	 * Constant used to find a builder using the 3.0-interim format
51
	 * Constant used to find a builder using the 3.0-interim format
Lines 126-132 Link Here
126
		newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
127
		newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
127
		String buildKinds = config.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null);
128
		String buildKinds = config.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null);
128
		int[] triggers = buildTypesToArray(buildKinds);
129
		int[] triggers = buildTypesToArray(buildKinds);
129
		boolean isfull = false, isinc = false;
130
		boolean isfull = false, isinc = false, isauto = false;
130
		for (int i = 0; i < triggers.length; i++) {
131
		for (int i = 0; i < triggers.length; i++) {
131
			switch (triggers[i]) {
132
			switch (triggers[i]) {
132
				case IncrementalProjectBuilder.FULL_BUILD:
133
				case IncrementalProjectBuilder.FULL_BUILD:
Lines 139-150 Link Here
139
					break;
140
					break;
140
				case IncrementalProjectBuilder.AUTO_BUILD:
141
				case IncrementalProjectBuilder.AUTO_BUILD:
141
					newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true);
142
					newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true);
143
					isauto = true;
142
					break;
144
					break;
143
				case IncrementalProjectBuilder.CLEAN_BUILD:
145
				case IncrementalProjectBuilder.CLEAN_BUILD:
144
					newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true);
146
					newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true);
145
					break;
147
					break;
146
			}
148
			}
147
		}
149
		}
150
		if ((isfull || isinc) && !isauto) {
151
			// target should execute after clean
152
			Map args = newCommand.getArguments();
153
			if(args == null) {
154
				args = new HashMap();
155
			}
156
			newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true);
157
			args.put(NOT_REAL_AUTO, Boolean.TRUE.toString());
158
			newCommand.setArguments(args);
159
		}
148
		if(!isfull && isinc) {
160
		if(!isfull && isinc) {
149
			Map args = newCommand.getArguments();
161
			Map args = newCommand.getArguments();
150
			if(args == null) {
162
			if(args == null) {
(-)a/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java (-2 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 70-76 Link Here
70
		if (ExternalToolsCore.getDefault().getBundle().getState() != Bundle.ACTIVE) {
70
		if (ExternalToolsCore.getDefault().getBundle().getState() != Bundle.ACTIVE) {
71
			return null;
71
			return null;
72
		}
72
		}
73
		
73
	    if (kind == IncrementalProjectBuilder.AUTO_BUILD && args.get(BuilderCoreUtils.NOT_REAL_AUTO) != null) {
74
	    		return null;
75
	    }
74
		ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), args, new String[1]);
76
		ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), args, new String[1]);
75
        if (config == null) {
77
        if (config == null) {
76
            throw ExternalToolsCore.newError(ExternalToolsModelMessages.ExternalToolBuilder_0, null);
78
            throw ExternalToolsCore.newError(ExternalToolsModelMessages.ExternalToolBuilder_0, null);

Return to bug 352131