|
Lines 61-67
Link Here
|
| 61 |
* @throws CoreException |
61 |
* @throws CoreException |
| 62 |
*/ |
62 |
*/ |
| 63 |
private static String getTauMakefile(ILaunchConfiguration configuration) throws CoreException { |
63 |
private static String getTauMakefile(ILaunchConfiguration configuration) throws CoreException { |
| 64 |
return configuration.getAttribute(ITAULaunchConfigurationConstants.TAU_MAKEFILE, (String) null); |
64 |
String etfwVersion = configuration.getAttribute(IToolLaunchConfigurationConstants.ETFW_VERSION, |
|
|
65 |
IToolLaunchConfigurationConstants.EMPTY); |
| 66 |
String attributeKey = ITAULaunchConfigurationConstants.TAU_MAKEFILE; |
| 67 |
if (!etfwVersion.equals(IToolLaunchConfigurationConstants.USE_SAX_PARSER)) { |
| 68 |
String controlId = configuration.getAttribute("org.eclipse.ptp.launch.RESOURCE_MANAGER_NAME", //$NON-NLS-1$ |
| 69 |
IToolLaunchConfigurationConstants.EMPTY); |
| 70 |
attributeKey = controlId + IToolLaunchConfigurationConstants.DOT + attributeKey; |
| 71 |
} |
| 72 |
return configuration.getAttribute(attributeKey, (String) null); |
| 65 |
} |
73 |
} |
| 66 |
|
74 |
|
| 67 |
@Override |
75 |
@Override |
|
Lines 185-223
Link Here
|
| 185 |
return IDs; |
193 |
return IDs; |
| 186 |
} |
194 |
} |
| 187 |
|
195 |
|
| 188 |
|
|
|
| 189 |
/** |
196 |
/** |
| 190 |
* Returns true if the directory exists and contains a tau profile or tau xml file. |
197 |
* Returns true if the directory exists and contains a tau profile or tau xml file. |
|
|
198 |
* |
| 191 |
* @param directory |
199 |
* @param directory |
| 192 |
* @param utils |
200 |
* @param utils |
| 193 |
* @return |
201 |
* @return |
| 194 |
*/ |
202 |
*/ |
| 195 |
private boolean checkDirectory(String directory,IBuildLaunchUtils utils){ |
203 |
private boolean checkDirectory(String directory, IBuildLaunchUtils utils) { |
| 196 |
IFileStore d = utils.getFile(directory); |
204 |
IFileStore d = utils.getFile(directory); |
| 197 |
boolean check = d.fetchInfo().exists(); |
205 |
boolean check = d.fetchInfo().exists(); |
| 198 |
if(!check) |
206 |
if (!check) |
| 199 |
return false; |
207 |
return false; |
| 200 |
|
208 |
|
| 201 |
try { |
209 |
try { |
| 202 |
String[] children = d.childNames(EFS.NONE, null); |
210 |
String[] children = d.childNames(EFS.NONE, null); |
| 203 |
for (int i=0;i<children.length;i++) |
211 |
for (int i = 0; i < children.length; i++) |
| 204 |
{ |
212 |
{ |
| 205 |
if(children[i].contains(PROFXML)||children[i].contains("profile.0.0.0")) |
213 |
if (children[i].contains(PROFXML) || children[i].contains("profile.0.0.0")) |
| 206 |
return true; |
214 |
return true; |
| 207 |
} |
215 |
} |
| 208 |
|
216 |
|
| 209 |
} catch (CoreException e) { |
217 |
} catch (CoreException e) { |
| 210 |
|
218 |
|
| 211 |
e.printStackTrace(); |
219 |
e.printStackTrace(); |
| 212 |
return false; |
220 |
return false; |
| 213 |
} |
221 |
} |
| 214 |
|
222 |
|
| 215 |
return false; |
223 |
return false; |
| 216 |
} |
224 |
} |
| 217 |
|
225 |
|
| 218 |
@Override |
226 |
@Override |
| 219 |
public void process(String projname, ILaunchConfiguration configuration, String directory) throws CoreException { |
227 |
public void process(String projname, ILaunchConfiguration configuration, String directory) throws CoreException { |
| 220 |
//String projectDirectory = directory; |
228 |
// String projectDirectory = directory; |
| 221 |
boolean profsummary = configuration.getAttribute(ITAULaunchConfigurationConstants.PROFSUMMARY, false); |
229 |
boolean profsummary = configuration.getAttribute(ITAULaunchConfigurationConstants.PROFSUMMARY, false); |
| 222 |
IBuildLaunchUtils tmpub = new BuildLaunchUtils(); |
230 |
IBuildLaunchUtils tmpub = new BuildLaunchUtils(); |
| 223 |
String pppath = tmpub.checkToolEnvPath("paraprof"); |
231 |
String pppath = tmpub.checkToolEnvPath("paraprof"); |
|
Lines 230-257
Link Here
|
| 230 |
} |
238 |
} |
| 231 |
|
239 |
|
| 232 |
/* |
240 |
/* |
| 233 |
* Determining if the job was local or remote at this point is tricky. It's safest to see if profiles are available locally and if not use the remote location. |
241 |
* Determining if the job was local or remote at this point is tricky. It's safest to see if profiles are available locally |
|
|
242 |
* and if not use the remote location. |
| 234 |
*/ |
243 |
*/ |
| 235 |
boolean dirgood=checkDirectory(directory,tmpub); |
244 |
boolean dirgood = checkDirectory(directory, tmpub); |
| 236 |
|
245 |
|
| 237 |
if (!dirgood&&LaunchUtils.getRemoteServicesId(configuration) != null) { |
246 |
if (!dirgood && LaunchUtils.getRemoteServicesId(configuration) != null) { |
| 238 |
utilBlob = new RemoteBuildLaunchUtils(configuration); |
247 |
utilBlob = new RemoteBuildLaunchUtils(configuration); |
| 239 |
} else { |
248 |
} else { |
| 240 |
utilBlob = tmpub; |
249 |
utilBlob = tmpub; |
| 241 |
} |
250 |
} |
| 242 |
|
251 |
|
| 243 |
String tmpDir=null; |
252 |
String tmpDir = null; |
| 244 |
if(!dirgood){ |
253 |
if (!dirgood) { |
| 245 |
tmpDir = utilBlob.getWorkingDirectory(); |
254 |
tmpDir = utilBlob.getWorkingDirectory(); |
| 246 |
if (tmpDir != null) { |
255 |
if (tmpDir != null) { |
| 247 |
directory = tmpDir; |
256 |
directory = tmpDir; |
| 248 |
}} |
257 |
} |
| 249 |
|
258 |
} |
| 250 |
dirgood=checkDirectory(directory,utilBlob); |
259 |
|
| 251 |
if(!dirgood){ |
260 |
dirgood = checkDirectory(directory, utilBlob); |
| 252 |
tmpDir=configuration.getAttribute(IToolLaunchConfigurationConstants.PROJECT_DIR, ""); |
261 |
if (!dirgood) { |
| 253 |
if(tmpDir!=null) |
262 |
tmpDir = configuration.getAttribute(IToolLaunchConfigurationConstants.PROJECT_DIR, ""); |
| 254 |
directory=tmpDir; |
263 |
if (tmpDir != null) |
|
|
264 |
directory = tmpDir; |
| 255 |
} |
265 |
} |
| 256 |
|
266 |
|
| 257 |
tbpath = utilBlob.getToolPath(Messages.TAUPerformanceDataManager_0); |
267 |
tbpath = utilBlob.getToolPath(Messages.TAUPerformanceDataManager_0); |
|
Lines 517-524
Link Here
|
| 517 |
} |
527 |
} |
| 518 |
|
528 |
|
| 519 |
private static final String PARAPROFCONSOLE = "TAU Profile Output"; |
529 |
private static final String PARAPROFCONSOLE = "TAU Profile Output"; |
| 520 |
|
|
|
| 521 |
|
| 522 |
|
530 |
|
| 523 |
@Override |
531 |
@Override |
| 524 |
public void view() { |
532 |
public void view() { |