Class AbstractExportProjectProvider

    • Field Detail

      • NPM

        public static final org.eclipse.core.runtime.IProgressMonitor NPM
    • Constructor Detail

      • AbstractExportProjectProvider

        public AbstractExportProjectProvider()
    • Method Detail

      • getApplicationArguments

        protected String[] getApplicationArguments()
        Returns:
        the application arguments
      • setApplicationArguments

        public void setApplicationArguments​(String[] arguments)
        Description copied from interface: IExportProjectProvider
        This method will be called by the export framework before any other method in this class. It passes the application argument received by the export application
        Specified by:
        setApplicationArguments in interface IExportProjectProvider
        Parameters:
        arguments - the application arguments
        See Also:
        Platform.getApplicationArgs()
      • getParsedArgs

        protected Map<String,​List<String>> getParsedArgs()
        Returns a mapping from string option to parameter string list
        For example, if -option p1 p2 p3 appears on the command line, then the mapping option=>[p1,p2,p3] will be present in the map
        Returns:
        a mapping from string option to parameter string list
      • getSingleString

        public String getSingleString​(String option)
                               throws org.eclipse.core.runtime.CoreException
        Gets an option's single parameter, or throws a CoreException should the option not be present, or if it does not have exactly one parameter
        Parameters:
        option -
        Returns:
        an option's single parameter
        Throws:
        org.eclipse.core.runtime.CoreException - should the specified option not be present, or if it does not have exactly one parameter
      • getParameters

        public List<String> getParameters​(String option)
        Parameters:
        option -
        Returns:
        the list of parameters given with this option
      • isPresent

        public boolean isPresent​(String option)
        Returns whether the specified option appears in the application arguments
        Parameters:
        option - the option to check for
        Returns:
        whether the specified option appears in the application arguments
      • getParameters

        public List<String> getParameters​(String option,
                                          int expected)
                                   throws org.eclipse.core.runtime.CoreException
        Returns a list of strings representing the parameters to the specified option. If the number of parameters does not match the expected number, an command-line error message is shown to the user.
        Parameters:
        option -
        expected - the number of parameters expected
        Throws:
        org.eclipse.core.runtime.CoreException
      • fail

        public org.eclipse.core.runtime.IStatus fail​(String message)
                                              throws org.eclipse.core.runtime.CoreException
        Produces an error in the application
        Parameters:
        message - an error message suitable for the user
        Returns:
        does not return
        Throws:
        org.eclipse.core.runtime.CoreException - Throws a CoreException with an ERROR status