|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.compile.SystemCompileProfile
A SystemCompileProfile has a one-to-one correspondence with a SystemProfile. There is one for each profile, for each subsystem factory that supports compiles.
The compile profile manages all aspects of the compile framework for this subsystem factory, for this system profile. Underneath, this basically means managing the xml file where the compile information is stored.
At a high level, a SystemCompileProfile manages a list of SystemCompileType
objects,
of which there is one per compilable source type. Given a raw source type like ".cpp" there
is a method getCompileType(String)
to return the SystemCompileType object for it.
From that, one can get a list of compile commands registered for that type, and the
last-used compile command for that type.
Field Summary | |
---|---|
static String |
Copyright
|
Fields inherited from interface com.ibm.etools.systems.core.ui.compile.ISystemCompileXMLConstants |
---|
COMPILECOMMAND_ELEMENT, COPYRIGHT_ELEMENT, COPYRIGHT_TEXT, CURRENT_ATTRIBUTE, DEFAULT_ATTRIBUTE, FILE_NAME, ID_ATTRIBUTE, JOBENV_ATTRIBUTE, LABEL_ATTRIBUTE, LABEL_EDITABLE_ATTRIBUTE, LASTUSED_ATTRIBUTE, MENU_ATTRIBUTE, MENU_BOTH_VALUE, MENU_NON_PROMPTABLE_VALUE, MENU_NONE_VALUE, MENU_PROMPTABLE_VALUE, NATURE_ATTRIBUTE, NATURE_IBM_VALUE, NATURE_ISV_VALUE, NATURE_USER_VALUE, ORDER_ATTRIBUTE, ROOT_ELEMENT, STRING_EDITABLE_ATTRIBUTE, TYPE_ATTRIBUTE, TYPE_ELEMENT, VERSION_ATTRIBUTE, VERSION_VALUE |
Constructor Summary | |
---|---|
SystemCompileProfile(SystemCompileManager manager,
String profileName)
Constructor for SystemCompileProfile Will automatically read from disk. |
Method Summary | |
---|---|
void |
addCompileType(SystemCompileType type)
Add a compile type |
void |
addContributions(Object element)
Add compile contributions made through extension points for the given resource, and save them to disk. |
protected void |
doPreRead()
This method is called by the constructor, prior to reading the xml contents from disk. |
Object |
getAssociatedData()
Get the associated data set via setAssociatedData |
abstract SystemCompilableSource |
getCompilableSourceObject(Shell shell,
Object selectedObject,
SystemCompileCommand compileCmd,
boolean isPrompt,
Viewer viewer)
When the time comes to actually run a compile command against a selected source object, this method is called to return the instance of SystemCompilableSource to do that. |
IFolder |
getCompileFolder()
Should you require access to the IFolder containing the persisted xml file, call this method. |
IFile |
getCompileProfileFile()
Should you require access to the IFile handle to the persisted xml file, call this method. |
File |
getCompileProfileJavaFile()
Should you require access to the java.io.File handle to the persisted xml file, call this method. |
SystemCompileType |
getCompileType(String typeString)
Get the compile type, given a type |
Vector |
getCompileTypes()
Get compile types. |
String[] |
getCompileTypesArray()
Get compile types as an array of strings. |
SystemCompileManager |
getParentManager()
Return the SystemCompileManager responsible for this profile |
SystemProfile |
getProfile()
Return the system profile this is associated with |
String |
getProfileName()
Return the name of this profile as given in the constructor |
protected String |
getSaveFileName()
Return the name of the xml file we will persist this profile's compile command information to. |
protected SystemCompileCommand |
migrateCompileCommand(SystemCompileCommand oldCmd,
String oldVrm)
Opportunity for subclasses to do migration of compile commands read from disk, from a document that has an older vrm than the current vrm. |
void |
printCommandsByType(Vector compileTypes)
Print the commands to standard out, sorted by source type, for debugging purposes |
void |
removeCompileType(SystemCompileType type)
Remote a compile type. |
void |
setAssociatedData(Object data)
Set any data you want associated with this profile, while it is in memory |
void |
setProfileName(String name)
Reset the profile name, on a profile rename operation, say. |
protected String |
sub(String string,
String subOld,
String subNew)
Do substring substitution. |
void |
writeToDisk()
Save this profile to disk. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String Copyright
Constructor Detail |
public SystemCompileProfile(SystemCompileManager manager, String profileName)
manager
- - the SystemCompileManager which instantiated thisprofileName
- - the name for this profile.Method Detail |
public void setProfileName(String name)
public void setAssociatedData(Object data)
public Object getAssociatedData()
public String getProfileName()
public SystemProfile getProfile()
public SystemCompileManager getParentManager()
public void addCompileType(SystemCompileType type)
public void removeCompileType(SystemCompileType type)
public Vector getCompileTypes()
public String[] getCompileTypesArray()
public SystemCompileType getCompileType(String typeString)
public void writeToDisk()
public IFolder getCompileFolder()
This defers back to the owning SystemCompileManager.
public IFile getCompileProfileFile()
public File getCompileProfileJavaFile()
public abstract SystemCompilableSource getCompilableSourceObject(Shell shell, Object selectedObject, SystemCompileCommand compileCmd, boolean isPrompt, Viewer viewer)
This method must be implemented to return an instance of your subclass of SystemCompilableSource.
protected String getSaveFileName()
protected void doPreRead()
public void addContributions(Object element)
protected SystemCompileCommand migrateCompileCommand(SystemCompileCommand oldCmd, String oldVrm)
protected String sub(String string, String subOld, String subNew)
string
- - string containing substring to be substituted.subOld
- - substitution variable. Eg "%1"subNew
- - substitution data. Eg "001"
public void printCommandsByType(Vector compileTypes)
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |