1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

Put some framework in place for the coming Builder.

This commit is contained in:
Alain Magloire 2002-08-26 20:01:45 +00:00
parent 3d96f03185
commit c80351772d
5 changed files with 178 additions and 93 deletions

View file

@ -26,14 +26,14 @@ public class BuilderModel {
public static String getBuilderId () {
return BUILDER_ID;
}
/*
public IBuildPath getBuildPath(IProject project) {
return null;
}
public void setBuildPath(IProject project, IBuildPath bp) {
}
*/
public void addBuildListener () {
}

View file

@ -0,0 +1,76 @@
package org.eclipse.cdt.core.builder;
import java.util.Map;
import org.eclipse.cdt.core.resources.IConsole;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*/
/**
*
* Note: This class/interface is part of an interim API that is still under development and
* expected to change significantly before reaching stability. It is being made available at
* this early stage to solicit feedback from pioneering adopters on the understanding that any
* code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
*/
public class CIncrementalBuilder extends IncrementalProjectBuilder {
int kind;
Map args;
IProgressMonitor monitor;
public int getkind() {
return kind;
}
public Map getMap() {
return args;
}
public IProgressMonitor monitor() {
return monitor;
}
//FIXME: Not implemented
public IConsole getConsole() {
ICBuilder builder = getCBuilder();
String id = builder.getID();
return null;
}
//FIXME: Not implemented
public IPath getBuildDirectory() {
return getProject().getLocation();
}
//FIXME: Not implemented
public String[] getBuildParameters() {
return new String[0];
}
protected IProject[] build(int kind, Map args, IProgressMonitor monitor)
throws CoreException {
this.kind = kind;
this.args = args;
this.monitor = monitor;
// Get the ICBuilder
ICBuilder cbuilder = getCBuilder();
// FIXME: Check preference for non-modal builds
return cbuilder.build(this);
}
//FIXME: Not implemented
private ICBuilder getCBuilder () {
return null;
}
}

View file

@ -1,91 +0,0 @@
package org.eclipse.cdt.core.builder;
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*/
import org.eclipse.core.runtime.IPath;
/**
* A BuildPath can contain the following:<ul>
* <li> EXTRA_INCVPATH: a list of path to look for include files
* <li> EXTRA_LIBVPATH: a list of path to search for libraries
* <li> EXTRA_SRCVPATH: a list of path to search for files
* <li> LIBS: a list of libraries to link
* <li> CPPFLAGS: C Preprocessor options
* <li> CPP: C Preprocessor cmd
* <li> CFLAGS: C options
* <li> CC: C cmd
* <li> CXXFLAGS: C++ Preprocessor options
* <li> CXX: C++ cmd
* <li> ARFLAGS: archive options
* <li> AR: archiver cmd
* <li> LDFLAGS: linker options
* <li> LD: linker cmd
* <li> ASFLAGS: assembly options
* <li> AS: assembly cmd
* </ul>
*/
public interface IBuildPath {
public String[] getCPPOpts();
public String[] getCPPFlags();
public void setCPP(IPath p);
public void setCPPOpts(String[] s);
public void setCPPFlags(String[] s);
public IPath getCXX();
public String[] getCXXOPT();
public String[] getCXXFlags();
public void setCXX(IPath p);
public void setCXXOpts(String[] s);
public void setCXXFlags(String[] s);
public IPath getCC();
public String[] getCFLAGS();
public String[] getCOpts();
public void setCFLAGS(String[] s);
public void setCOpts(String[] s);
public void setCC(IPath p);
public IPath getAS();
public String[] getASFlags();
public String[] getASOpts();
public void getAS(IPath p);
public void getASOpts(String[] s);
public void getASFlags(String[] s);
public IPath getLD();
public String[] getLDOpts();
public String[] getLDFlags();
public void setLD(IPath p);
public void setLDOpts(String[] s);
public void setLDFlags(String[] s);
public IPath getAR();
public String[] getARFlags();
public String[] getAROpts();
public void setAR(IPath p);
public void setAROpts(String[] s);
public void setARFlags(String[] s);
public IPath[] getIncVPath();
public void setIncVPath(IPath[] p);
public IPath[] getLibs();
public void setLibs(IPath[] p);
public IPath[] getLibVPath();
public void setLibVPath(IPath[] p);
public IPath[] getSRCVPath();
public void setSRCVPath(IPath[] p);
}

View file

@ -0,0 +1,80 @@
package org.eclipse.cdt.core.builder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*/
/**
*
* This class provides the infrastructure for defining a builder and fulfills the contract
* specified by the org.eclipse.cdt.core.cbuilder standard extension point.
* Note: This class/interface is part of an interim API that is still under development and
* expected to change significantly before reaching stability. It is being made available at
* this early stage to solicit feedback from pioneering adopters on the understanding that any
* code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
*/
public interface ICBuilder {
/**
* return the search include path list.
* @return IPath[]
*/
IPath[] getIncludePaths();
/**
* Change the search include path lists.
* @params IPath[]
*/
void setIncludePaths(IPath[] incPaths);
/**
* return the search library path list.
* @return IPath[]
*/
IPath[] getLibraryPaths();
/**
* Change the search library path lists.
* @params IPath[]
*/
void setLibraryPaths(IPath[] libPaths);
/**
* return the list of libraries use.
* @return String[]
*/
String[] getLibraries();
/**
* Change the libraries.
* @params String[]
*/
void setLibraries(String[] libs);
/**
* Get the Optimization level.
* @params String[]
*/
IOptimization getOptimization();
/**
* Change the Optimization level.
* @params String[]
*/
void setOptimization();
/**
* Build the project.
*/
IProject[] build(CIncrementalBuilder cbuilder);
/**
* Method getID.
* @return String
*/
String getID();
}

View file

@ -0,0 +1,20 @@
package org.eclipse.cdt.core.builder;
/*
* (c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*/
/**
*
* Note: This class/interface is part of an interim API that is still under development and
* expected to change significantly before reaching stability. It is being made available at
* this early stage to solicit feedback from pioneering adopters on the understanding that any
* code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
*/
public interface IOptimization {
String getDescription(int level);
int getCurrentLevel();
void setCurrentLevel(int level);
int[] getLevels();
}