|
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 |
|
| 49 |
/** |
| 50 |
* Constant added to the build command to determine if the trigger for auto build is really requested |
| 51 |
* |
| 52 |
* @since 3.8 |
| 53 |
*/ |
| 54 |
public static final String NOT_REAL_AUTO = "notrealauto";//$NON-NLS-1$ |
| 48 |
|
55 |
|
| 49 |
/** |
56 |
/** |
| 50 |
* Constant used to find a builder using the 3.0-interim format |
57 |
* Constant used to find a builder using the 3.0-interim format |
|
Lines 116-121
Link Here
|
| 116 |
} |
123 |
} |
| 117 |
} |
124 |
} |
| 118 |
} |
125 |
} |
|
|
126 |
if (configuration != null) { |
| 127 |
configuration = ExternalToolMigration.migrateIfRequired(configuration); |
| 128 |
} |
| 119 |
return configuration; |
129 |
return configuration; |
| 120 |
} |
130 |
} |
| 121 |
|
131 |
|
|
Lines 126-132
Link Here
|
| 126 |
newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false); |
136 |
newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false); |
| 127 |
String buildKinds = config.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null); |
137 |
String buildKinds = config.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null); |
| 128 |
int[] triggers = buildTypesToArray(buildKinds); |
138 |
int[] triggers = buildTypesToArray(buildKinds); |
| 129 |
boolean isfull = false, isinc = false; |
139 |
boolean isfull = false, isinc = false, isauto = false; |
| 130 |
for (int i = 0; i < triggers.length; i++) { |
140 |
for (int i = 0; i < triggers.length; i++) { |
| 131 |
switch (triggers[i]) { |
141 |
switch (triggers[i]) { |
| 132 |
case IncrementalProjectBuilder.FULL_BUILD: |
142 |
case IncrementalProjectBuilder.FULL_BUILD: |
|
Lines 139-149
Link Here
|
| 139 |
break; |
149 |
break; |
| 140 |
case IncrementalProjectBuilder.AUTO_BUILD: |
150 |
case IncrementalProjectBuilder.AUTO_BUILD: |
| 141 |
newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true); |
151 |
newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true); |
|
|
152 |
isauto = true; |
| 142 |
break; |
153 |
break; |
| 143 |
case IncrementalProjectBuilder.CLEAN_BUILD: |
154 |
case IncrementalProjectBuilder.CLEAN_BUILD: |
| 144 |
newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true); |
155 |
newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true); |
| 145 |
break; |
156 |
break; |
| 146 |
} |
157 |
} |
|
|
158 |
} |
| 159 |
if ((isfull || isinc) && !isauto) { |
| 160 |
// if build automatically is turned on, AUTO_BUILD targets will be triggered |
| 161 |
// for normal builds too. Hence, get a trigger for AUTO_BUILD too. |
| 162 |
Map args = newCommand.getArguments(); |
| 163 |
if(args == null) { |
| 164 |
args = new HashMap(); |
| 165 |
} |
| 166 |
newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true); |
| 167 |
args.put(NOT_REAL_AUTO, Boolean.TRUE.toString()); |
| 168 |
newCommand.setArguments(args); |
| 147 |
} |
169 |
} |
| 148 |
if(!isfull && isinc) { |
170 |
if(!isfull && isinc) { |
| 149 |
Map args = newCommand.getArguments(); |
171 |
Map args = newCommand.getArguments(); |
|
Lines 157-162
Link Here
|
| 157 |
if (!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false)) { |
179 |
if (!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false)) { |
| 158 |
ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy(); |
180 |
ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy(); |
| 159 |
copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true); |
181 |
copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true); |
|
|
182 |
copy.setAttribute(IExternalToolConstants.ATTR_VERSION, IExternalToolConstants.VERSION); |
| 160 |
copy.doSave(); |
183 |
copy.doSave(); |
| 161 |
} |
184 |
} |
| 162 |
} |
185 |
} |