Class LaunchTargetWorkingCopy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAttribute​(java.lang.String key, java.lang.String defValue)
      Return a string attribute of this target
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Returns a read-only map of the attributes.
      java.lang.String getId()
      The id for the target.
      ILaunchTarget getOriginal()
      Get the original launch target.
      java.lang.String getTypeId()
      The type of the target.
      ILaunchTargetWorkingCopy getWorkingCopy()
      Create a working copy of this launch target to allow setting of attributes.
      ILaunchTarget save()
      Save the changes to the original working copy.
      void setAttribute​(java.lang.String key, java.lang.String value)
      Set an attribute.
      void setId​(java.lang.String id)
      Gives the target a new ID.
      • Methods inherited from class org.eclipse.core.runtime.PlatformObject

        getAdapter
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.core.runtime.IAdaptable

        getAdapter
    • Field Detail

      • changes

        private final java.util.Map<java.lang.String,​java.lang.String> changes
      • newId

        private java.lang.String newId
    • Constructor Detail

      • LaunchTargetWorkingCopy

        public LaunchTargetWorkingCopy​(LaunchTarget original)
    • Method Detail

      • getTypeId

        public java.lang.String getTypeId()
        Description copied from interface: ILaunchTarget
        The type of the target.
        Specified by:
        getTypeId in interface ILaunchTarget
        Returns:
        type of the target
      • getId

        public java.lang.String getId()
        Description copied from interface: ILaunchTarget
        The id for the target. It is unique for each type.
        Specified by:
        getId in interface ILaunchTarget
        Returns:
        id for the target.
      • setId

        public void setId​(java.lang.String id)
        Description copied from interface: ILaunchTargetWorkingCopy
        Gives the target a new ID. The save method will return a new target with the given name.e
        Specified by:
        setId in interface ILaunchTargetWorkingCopy
        Parameters:
        id - new target ID
      • getWorkingCopy

        public ILaunchTargetWorkingCopy getWorkingCopy()
        Description copied from interface: ILaunchTarget
        Create a working copy of this launch target to allow setting of attributes. It also allows changing the id, which results in a new launch target when saved.
        Specified by:
        getWorkingCopy in interface ILaunchTarget
        Returns:
        launch target working copy
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String key,
                                             java.lang.String defValue)
        Description copied from interface: ILaunchTarget
        Return a string attribute of this target
        Specified by:
        getAttribute in interface ILaunchTarget
        Parameters:
        key - key
        defValue - default value
        Returns:
        value of attribute
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Description copied from interface: ILaunchTarget
        Returns a read-only map of the attributes.
        Specified by:
        getAttributes in interface ILaunchTarget
        Returns:
        the attributes for this target