Class Contributions


  • public abstract class Contributions
    extends java.lang.Object
    For contributions to the EASY core. (preliminary, to be aligned with self-bootstrapping capabilities in future) Please do not change the name or the location of this class as it is populated via OSGI-DS.
    Author:
    Holger Eichelberger
    • Field Detail

      • REGISTERED

        private static final java.util.List<Contributions> REGISTERED
        Stores the registered UI contributions.
    • Constructor Detail

      • Contributions

        public Contributions()
    • Method Detail

      • register

        public static void register​(Contributions contribution)
        Registers a particular contribution.
        Parameters:
        contribution - the new contribution
      • unregister

        public static void unregister​(Contributions contribution)
        Unregisters a particular contribution.
        Parameters:
        contribution - the contribution to be unregisted
      • isEnabled

        public static final boolean isEnabled​(Contributions.CoreFunction element)
        Returns whether the specified UI element is enabled (at least one contribution must request this).
        Parameters:
        element - the UI element
        Returns:
        true if it shall be enabled, false else
      • isEnabledImpl

        protected abstract boolean isEnabledImpl​(Contributions.CoreFunction coreFunction)
        Returns whether this contribution requires that the given core function shall be enabled.
        Parameters:
        coreFunction - the core function descriptor
        Returns:
        true if it shall be enabled, false else
      • determineConfigurationPaths

        public static boolean determineConfigurationPaths​(org.eclipse.core.resources.IProject project,
                                                          Configuration config)
        Determines the most appropriate configuration paths.
        Parameters:
        project - the project to determine the configuration path for
        config - the configuration to be modified as a side effect
        Returns:
        true if the configuration was changed, false else
      • determineConfigurationPathsImpl

        protected abstract boolean determineConfigurationPathsImpl​(org.eclipse.core.resources.IProject project,
                                                                   Configuration config)
        Determines the configuration paths for the given project.
        Parameters:
        project - the project to consider
        config - the configuration to be modified as a side effect
        Returns:
        true if the configuration was changed, false else
      • initializePLP

        public static void initializePLP​(org.eclipse.core.resources.IProject project,
                                         PLPInfo plp,
                                         java.util.List<PLPInfo> plps)
                                  throws java.io.IOException
        Initializes a recently created PLP.
        Parameters:
        project - the physical project the PLP is located in
        plp - the PLP to be initialized
        plps - information about predecessor PLPs (to be modified as a side effect)
        Throws:
        java.io.IOException - in case of any IO related problems
      • initializePLPImpl

        protected abstract void initializePLPImpl​(org.eclipse.core.resources.IProject project,
                                                  PLPInfo plp,
                                                  java.util.List<PLPInfo> plps)
                                           throws java.io.IOException
        Initializes a recently created PLP.
        Parameters:
        project - the physical project the PLP is located in
        plp - the PLP to be initialized
        plps - information about predecessor PLPs (to be modified as a side effect)
        Throws:
        java.io.IOException - in case of any IO related problems
      • getDefaultCopyMechanismIDImpl

        protected abstract java.lang.String getDefaultCopyMechanismIDImpl()
        Returns the default copy mechanism ID.
        Returns:
        the default copy mechanism ID, use EASy default if null
      • getDefaultCopyMechanismID

        public static final java.lang.String getDefaultCopyMechanismID()
        Returns the default copy mechanism ID.
        Returns:
        the default copy mechanism ID, use EASy default if null