Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-user] Getting path to the profile dir

Greetings,

In an ETFw definition xml file the string 
%%REPLACE_WITH_BUILD_DIR%%
should be replaced with the directory containing the executable file for the project being run in any command arguments you define.  However I think I need to do some testing and maintenance on this feature.

Getting that information programatically could be a little tricky.  If you only have access to the project name and the ILaunchConfiguration you could try something like this:

IProject thisProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projname);
thisCProject = CCorePlugin.getDefault().getCoreModel().create(thisProject);
IManagedBuildInfo buildInfo=ManagedBuildManager.getBuildInfo(thisCProject.getResource());
IConfiguration[] confs = managedBuildProj.getConfigurations();

The problem is that only gets you a list of configurations available for the project, the system doesn't know which of those will actually be used for the run.  However you are provided that information if you hook into the ETFw itself (for example, if you define your own post-processing step as a plugin, as with the TAU ETFw plugin).  Could you give me a little more information on what you're trying to do and where in the build/run/analyze order you're trying to do it?

Regards,
Wyatt

On Tue, Feb 9, 2010 at 8:05 AM, Xavier Pegenaute <xavier.pegenaute@xxxxxx> wrote:
Hi,

could be possible to know the path to the directory where the profile binary is
generated? I am using this method in Java:
process(String projname, ILaunchConfiguration conf ...)

And I would like to get "../projectXX/Debug_PerformanceAnalysis_CEPBATools".

Thanks & Regards.
Xavi.
_______________________________________________
ptp-user mailing list
ptp-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-user



Back to the top