org.eclipse.cdt.managedbuilder.internal.core
Class TargetPlatform

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.BuildObject
      extended by org.eclipse.cdt.managedbuilder.internal.core.TargetPlatform
All Implemented Interfaces:
IBuildObject, ITargetPlatform

public class TargetPlatform
extends BuildObject
implements ITargetPlatform


Field Summary
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.ITargetPlatform
ARCH_LIST, BINARY_PARSER, OS_LIST, TARGET_PLATFORM_ELEMENT_NAME
 
Fields inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
ID, NAME
 
Constructor Summary
TargetPlatform(IToolChain parent, org.eclipse.cdt.core.settings.model.ICStorageElement element, java.lang.String managedBuildRevision)
          Create a TargetPlatform based on the specification stored in the project file (.cdtbuild).
TargetPlatform(IToolChain parent, IManagedConfigElement element, java.lang.String managedBuildRevision)
          This constructor is called to create a TargetPlatform defined by an extension point in a plugin manifest file, or returned by a dynamic element provider
TargetPlatform(IToolChain parent, java.lang.String Id, java.lang.String name, TargetPlatform targetPlatform)
          Create a TargetPlatform based upon an existing TargetPlatform.
TargetPlatform(ToolChain parent, ITargetPlatform superClass, java.lang.String Id, java.lang.String name, boolean isExtensionElement)
          This constructor is called to create a TargetPlatform whose attributes and children will be added by separate calls.
 
Method Summary
 java.lang.String[] getArchList()
          Returns an array of architectures this target platform represents.
 java.lang.String getBinaryParserId()
          Returns the unique ID of the binary parser associated with the target platform.
 java.lang.String[] getBinaryParserList()
          Returns the unique IDs of the binary parsers associated with the target platform.
 java.lang.String getName()
           
 java.lang.String[] getOSList()
          Returns an array of operating systems this target platform represents.
 IToolChain getParent()
          Returns the tool-chain that is the parent of this target platform.
 ITargetPlatform getSuperClass()
          Returns the ITargetPlatform that is the superclass of this target platform, or null if the attribute was not specified.
 org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData getTargetPlatformData()
           
 java.lang.String getUnusedChildren()
          Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element.
 org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
           
 boolean isAbstract()
          Returns whether this element is abstract.
 boolean isDirty()
          Returns true if this element has changes that need to be saved in the project file, else false.
 boolean isExtensionElement()
          Returns true if this target platform was loaded from a manifest file, and false if it was loaded from a project (.cdtbuild) file.
 void resolveReferences()
           
 void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
          Persist the target platform to the project file.
 void setArchList(java.lang.String[] archs)
          Sets the architecture list.
 void setBinaryParserId(java.lang.String id)
          Sets the string id of the binary parser for this target platform.
 void setBinaryParserList(java.lang.String[] ids)
          Sets the string ids of the binary parsers for this target platform.
 void setDirty(boolean isDirty)
          Sets the element's "dirty" (have I been modified?)
 void setIsAbstract(boolean b)
          Sets the isAbstract attribute of the target paltform.
 void setOSList(java.lang.String[] OSs)
          Sets the OS list.
 void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
           
 
Methods inherited from class org.eclipse.cdt.managedbuilder.internal.core.BuildObject
getBaseId, getId, getManagedBuildRevision, getVersionFromId, setId, setManagedBuildRevision, setName, toString, updateManagedBuildRevision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.cdt.managedbuilder.core.IBuildObject
getBaseId, getId, getManagedBuildRevision
 

Constructor Detail

TargetPlatform

public TargetPlatform(IToolChain parent,
                      IManagedConfigElement element,
                      java.lang.String managedBuildRevision)
This constructor is called to create a TargetPlatform defined by an extension point in a plugin manifest file, or returned by a dynamic element provider

Parameters:
parent - The IToolChain parent of this TargetPlatform, or null if defined at the top level
element - The TargetPlatform definition from the manifest file or a dynamic element provider
managedBuildRevision - the fileVersion of Managed Build System

TargetPlatform

public TargetPlatform(ToolChain parent,
                      ITargetPlatform superClass,
                      java.lang.String Id,
                      java.lang.String name,
                      boolean isExtensionElement)
This constructor is called to create a TargetPlatform whose attributes and children will be added by separate calls.

Parameters:
ToolChain - The parent of the builder, if any
TargetPlatform - The superClass, if any
String - The id for the new tool chain
String - The name for the new tool chain
boolean - Indicates whether this is an extension element or a managed project element

TargetPlatform

public TargetPlatform(IToolChain parent,
                      org.eclipse.cdt.core.settings.model.ICStorageElement element,
                      java.lang.String managedBuildRevision)
Create a TargetPlatform based on the specification stored in the project file (.cdtbuild).

Parameters:
parent - The IToolChain the TargetPlatform will be added to.
element - The XML element that contains the TargetPlatform settings.
managedBuildRevision - the fileVersion of Managed Build System

TargetPlatform

public TargetPlatform(IToolChain parent,
                      java.lang.String Id,
                      java.lang.String name,
                      TargetPlatform targetPlatform)
Create a TargetPlatform based upon an existing TargetPlatform.

Parameters:
parent - The IToolChain the TargetPlatform will be added to.
builder - The existing TargetPlatform to clone.
Method Detail

serialize

public void serialize(org.eclipse.cdt.core.settings.model.ICStorageElement element)
Persist the target platform to the project file.

Parameters:
doc -
element -

getParent

public IToolChain getParent()
Description copied from interface: ITargetPlatform
Returns the tool-chain that is the parent of this target platform.

Specified by:
getParent in interface ITargetPlatform
Returns:
IToolChain

getSuperClass

public ITargetPlatform getSuperClass()
Description copied from interface: ITargetPlatform
Returns the ITargetPlatform that is the superclass of this target platform, or null if the attribute was not specified.

Specified by:
getSuperClass in interface ITargetPlatform
Returns:
ITargetPlatform

getName

public java.lang.String getName()
Specified by:
getName in interface IBuildObject
Overrides:
getName in class BuildObject

isAbstract

public boolean isAbstract()
Description copied from interface: ITargetPlatform
Returns whether this element is abstract. Returns false if the attribute was not specified.

Specified by:
isAbstract in interface ITargetPlatform
Returns:
boolean

getUnusedChildren

public java.lang.String getUnusedChildren()
Description copied from interface: ITargetPlatform
Returns a semi-colon delimited list of child Ids of the superclass' children that should not be automatically inherited by this element. Returns an empty string if the attribute was not specified.

Specified by:
getUnusedChildren in interface ITargetPlatform
Returns:
String

getBinaryParserId

public java.lang.String getBinaryParserId()
Description copied from interface: ITargetPlatform
Returns the unique ID of the binary parser associated with the target platform.

Specified by:
getBinaryParserId in interface ITargetPlatform
Returns:
String

getBinaryParserList

public java.lang.String[] getBinaryParserList()
Description copied from interface: ITargetPlatform
Returns the unique IDs of the binary parsers associated with the target platform.

Specified by:
getBinaryParserList in interface ITargetPlatform
Returns:
String[]

getArchList

public java.lang.String[] getArchList()
Description copied from interface: ITargetPlatform
Returns an array of architectures this target platform represents.

Specified by:
getArchList in interface ITargetPlatform
Returns:
String[]

getOSList

public java.lang.String[] getOSList()
Description copied from interface: ITargetPlatform
Returns an array of operating systems this target platform represents.

Specified by:
getOSList in interface ITargetPlatform
Returns:
String[]

setBinaryParserId

public void setBinaryParserId(java.lang.String id)
Description copied from interface: ITargetPlatform
Sets the string id of the binary parser for this target platform.

Specified by:
setBinaryParserId in interface ITargetPlatform

setBinaryParserList

public void setBinaryParserList(java.lang.String[] ids)
Description copied from interface: ITargetPlatform
Sets the string ids of the binary parsers for this target platform.

Specified by:
setBinaryParserList in interface ITargetPlatform

setIsAbstract

public void setIsAbstract(boolean b)
Description copied from interface: ITargetPlatform
Sets the isAbstract attribute of the target paltform.

Specified by:
setIsAbstract in interface ITargetPlatform

setOSList

public void setOSList(java.lang.String[] OSs)
Description copied from interface: ITargetPlatform
Sets the OS list.

Specified by:
setOSList in interface ITargetPlatform

setArchList

public void setArchList(java.lang.String[] archs)
Description copied from interface: ITargetPlatform
Sets the architecture list.

Specified by:
setArchList in interface ITargetPlatform

isExtensionElement

public boolean isExtensionElement()
Description copied from interface: ITargetPlatform
Returns true if this target platform was loaded from a manifest file, and false if it was loaded from a project (.cdtbuild) file.

Specified by:
isExtensionElement in interface ITargetPlatform
Returns:
boolean

isDirty

public boolean isDirty()
Description copied from interface: ITargetPlatform
Returns true if this element has changes that need to be saved in the project file, else false.

Specified by:
isDirty in interface ITargetPlatform
Returns:
boolean

setDirty

public void setDirty(boolean isDirty)
Description copied from interface: ITargetPlatform
Sets the element's "dirty" (have I been modified?) flag.

Specified by:
setDirty in interface ITargetPlatform

resolveReferences

public void resolveReferences()

getVersion

public org.eclipse.core.runtime.PluginVersionIdentifier getVersion()
Specified by:
getVersion in interface IBuildObject
Overrides:
getVersion in class BuildObject
Returns:
Returns the version.

setVersion

public void setVersion(org.eclipse.core.runtime.PluginVersionIdentifier version)
Specified by:
setVersion in interface IBuildObject
Overrides:
setVersion in class BuildObject
Parameters:
version - The version to set.

getTargetPlatformData

public org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData getTargetPlatformData()
Specified by:
getTargetPlatformData in interface ITargetPlatform