Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] Trying to understand ETFWBuildTool

Hi,

I’m trying to understand why org.eclipse.ptp.internal.etfw.ETFWBuildTool needs to distinguish between sync and non-sync projects. There are three places in the code where this happens:

1. initMMBuild() at line 283

If the project is not a sync project and the EXTOOL_EXECUTABLE_PATH_TAG attribute is set, then the outputLocation variable is set to a directory at the top level of the project with a name that is the build configuration name combined with a unique suffix.

If either of these is not true (i.e. it is a sync project or the attribute is not set), then the outputLocation variable remains the path to the project location (either remote or local).

Can someone explain why the outputLocation should be different for a sync project?

2. managedMakeBuild() at lines 449 and 484

This method defines two variables: programPath and pathStore. For a non-sync project, the former is an IFile object representing the name of the program that will be built, the latter is an IFileStore object representing the same file. For a sync project, only the pathStore variable is set. The programPath variable is null.

These variables are only used to test if the build has competed by polling programPath.exists() and pathStore.fetchInfo().exists(). If programPath is null (as in the case of a sync project), the method assumes the build never completes.

There are a few things about this I don’t understand:

a) Why distinguish between sync and non-sync projects?
b) Why test both programPath.exists() and pathStore.fetchInfo().exists()? Just checking pathStore.fetchInfo().exists() would work for both the sync and non-sync cases, and wouldn’t require the project to be refreshed in order to detect the build artifact.
c) By assuming the build is never completed when programPath is null, won’t the method never return if it is called for a sync project?

3. standardMakeBuild() at line 580

This method checks for any make targets called “all” and if found, invokes the builder for the target. If no target is found, a CLEAN_BUILD followed by a FULL_BUILD is invoked on the project. However for non-sync projects, a check is first made to see if the full build property is set, and the build only takes place if it is. 

Can someone explain why the full build property is only checked for non-sync projects?

If anyone could help answer these questions, it would be appreciated.

Thanks,
Greg

Back to the top