sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPreBuilder.java
changeset 15 0367d2db2c06
parent 6 f65f740e69f9
equal deleted inserted replaced
14:bb339882c6e9 15:0367d2db2c06
    27 import com.nokia.s60tools.analyzetool.Activator;
    27 import com.nokia.s60tools.analyzetool.Activator;
    28 import com.nokia.s60tools.analyzetool.global.Constants;
    28 import com.nokia.s60tools.analyzetool.global.Constants;
    29 
    29 
    30 /**
    30 /**
    31  * Class to execute AnalyzeTool custom pre-build actions.
    31  * Class to execute AnalyzeTool custom pre-build actions.
    32  *
    32  * 
    33  * This class holds many static variables because {@link CustomPostBuilder}
    33  * This class holds many static variables because {@link CustomPostBuilder}
    34  * class need to know what variables is used when calling CustomPreBuilder
    34  * class need to know what variables is used when calling CustomPreBuilder
    35  * without creating a new object of this class
    35  * without creating a new object of this class
    36  *
    36  * 
    37  * @author kihe
    37  * @author kihe
    38  *
    38  * 
    39  */
    39  */
    40 public class CustomPreBuilder extends AnalyzeToolBuilder {
    40 public class CustomPreBuilder extends AnalyzeToolBuilder {
    41 
    41 
    42 	/**
    42 	/**
    43 	 * Executes AnalyzeTool post actions when user builds projects.
    43 	 * Executes AnalyzeTool post actions when user builds projects.
    44 	 *
    44 	 * 
    45 	 * @see com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder#build(int,
    45 	 * @see com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder#build(int,
    46 	 *      java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
    46 	 *      java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
    47 	 */
    47 	 */
    48 	@Override
    48 	@Override
    49 	@SuppressWarnings("unchecked")
    49 	@SuppressWarnings("unchecked")
    61 
    61 
    62 		// get project info
    62 		// get project info
    63 		final ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager()
    63 		final ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager()
    64 				.getProjectInfo(project);
    64 				.getProjectInfo(project);
    65 
    65 
    66 		final CarbideCommandLauncher launcher = new CarbideCommandLauncher(project,
    66 		final CarbideCommandLauncher launcher = new CarbideCommandLauncher(
    67 				monitor, Constants.atoolParserIds, cpi.getINFWorkingDirectory());
    67 				project, monitor, Constants.atoolParserIds, cpi
       
    68 						.getINFWorkingDirectory());
    68 		launcher.showCommand(true);
    69 		launcher.showCommand(true);
    69 
    70 
    70 		if (!runPreSteps(launcher, monitor, cpi)) {
    71 		if (!runPreSteps(launcher, monitor, cpi)) {
    71 			return null;
    72 			return null;
    72 		}
    73 		}
    75 
    76 
    76 		return new IProject[0];
    77 		return new IProject[0];
    77 	}
    78 	}
    78 
    79 
    79 	@Override
    80 	@Override
    80 	protected void clean(final IProgressMonitor arg0){
    81 	protected void clean(final IProgressMonitor arg0) {
    81 		// DO nothing by design
    82 		// DO nothing by design
    82 	}
    83 	}
    83 
       
    84 }
    84 }