Class AbstractRuntimeDebugAwareLaunchDelegate

  • All Implemented Interfaces:
    org.eclipse.debug.core.model.ILaunchConfigurationDelegate, org.eclipse.debug.core.model.ILaunchConfigurationDelegate2

    public abstract class AbstractRuntimeDebugAwareLaunchDelegate
    extends CustomErrorHandlingLaunchDelegate
    Abstract launch delegate that is aware of 1C:Enterprise runtime debug processes.
    • Constructor Detail

      • AbstractRuntimeDebugAwareLaunchDelegate

        public AbstractRuntimeDebugAwareLaunchDelegate()
    • Method Detail

      • getDebugUrl

        protected URL getDebugUrl​(org.eclipse.debug.core.ILaunchConfiguration configuration,
                                  org.eclipse.debug.core.ILaunch launch,
                                  ApplicationPrepareResult applicationPrepareResult)
                           throws org.eclipse.core.runtime.CoreException
        Returns the 1C:Enterprise debug URL to use for this debug launch.
        Parameters:
        configuration - the launch configuration to use, cannot be null
        launch - the launch, cannot be null
        applicationPrepareResult - the application prepare result, cannot be null
        Returns:
        the 1C:Enterprise debug URL to use for this launch, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if launch configuration work failed or if configuraion is invalid
      • getInstallation

        protected Optional<IResolvableRuntimeInstallation> getInstallation​(org.eclipse.debug.core.ILaunchConfiguration configuration)
                                                                    throws org.eclipse.core.runtime.CoreException
        Returns the resolvable 1C:Enterprise runtime installation provided by the launch configuration.
        Parameters:
        configuration - the launch configuration to use, cannot be null
        Returns:
        the resolvable 1C:Enterprise runtime installation provided by the launch configuration
        Throws:
        org.eclipse.core.runtime.CoreException - if launch configuration work failed
      • attachDebugTarget

        protected void attachDebugTarget​(org.eclipse.debug.core.ILaunchConfiguration configuration,
                                         org.eclipse.debug.core.ILaunch launch,
                                         IApplication application,
                                         URL debugServerUrl,
                                         IResolvableRuntimeInstallation installation,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
                                  throws org.eclipse.core.runtime.CoreException
        Attaches an 1C:Enterprise runtime debug target to the provided ILaunch, using the provded launch configuration attributes.
        Parameters:
        configuration - the launch configuration to use, cannot be null
        launch - the launch to attach debug target to, cannot be null
        application - the application to use for launch, cannot be null
        debugServerUrl - the 1C:Enterprise debug server URL, cannot be null
        installation - the 1C:Enterprise runtime installation to use, cannot be null
        monitor - the progress monitor to report progress to (if necessary), cannot be null
        Throws:
        org.eclipse.core.runtime.CoreException - if attaching failed or illegal configuration provided
      • createMatchingRuntimeNotFoundErrorStatus

        protected org.eclipse.core.runtime.IStatus createMatchingRuntimeNotFoundErrorStatus​(int errorCode,
                                                                                            MatchingRuntimeNotFound e)
        Creates an error status with 1C:Enterprise runtime not found exception information.
        Parameters:
        errorCode - the status error code
        e - the matching 1C:Enterprise runtime not found exception, cannot be null
        Returns:
        the created status, never null
      • updateApplication

        protected org.eclipse.core.runtime.IStatus updateApplication​(org.eclipse.core.resources.IProject project,
                                                                     IApplication application,
                                                                     PublishKind publishKind,
                                                                     org.eclipse.core.runtime.IProgressMonitor monitor)
                                                              throws org.eclipse.core.runtime.CoreException
        Updates an application for the provided project. Return status of the publication:
        • OK if an application is succesfully published.
        • CANCEL if publication was cancelled by the user.
        Parameters:
        project - the project to get configuration for, cannot be null
        application - the application to publish, cannot be null
        publishKind - the publish kind, cannot be null
        monitor - the progress monitor to report progress to, cannot be null
        Returns:
        the status of infobase database structure update, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if update failed with some reason
      • getOrPrepareApplication

        protected ApplicationPrepareResult getOrPrepareApplication​(org.eclipse.debug.core.ILaunchConfiguration configuration,
                                                                   org.eclipse.debug.core.ILaunch launch,
                                                                   String mode,
                                                                   org.eclipse.core.resources.IProject project,
                                                                   ApplicationPublicationKind publicationKind,
                                                                   org.eclipse.core.runtime.IProgressMonitor monitor)
                                                            throws org.eclipse.core.runtime.CoreException
        Prepares and returns the application and optional application publication for the provided launch configuration attributes and provided parameters.
        Parameters:
        configuration - the launch configuration to get application, cannot be null
        launch - the launch, cannot be null
        mode - the launch mode, cannot be null
        project - the project to get application for, cannot be null
        publicationKind - the application publication kind, cannot be null
        Returns:
        the application to launch, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if fails or configuration need to be updated
      • getProject

        protected IV8Project getProject​(org.eclipse.debug.core.ILaunchConfiguration configuration)
                                 throws org.eclipse.core.runtime.CoreException
        Returns the V8 project by the provided launch configuration attributes.
        Parameters:
        configuration - the launch configuration to get V8 project, cannot be null
        Returns:
        the project by the provided launch configuration attributes, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if cannot find project by the provided launch configuration attributes
      • getProject

        protected IV8Project getProject​(String projectName)
                                 throws org.eclipse.core.runtime.CoreException
        Returns the V8 project by the provided project name.
        Parameters:
        projectName - the project name to get V8 project with, cannot be null
        Returns:
        the project by the provided project name or null if not found
        Throws:
        org.eclipse.core.runtime.CoreException - if get failed with some reason
      • getRuntimeComponent

        protected <C extends IRuntimeComponent,​E extends IRuntimeComponentExecutorPair<C,​E> getRuntimeComponent​(IResolvableRuntimeInstallation resolvable,
                                                                                                                              String typeId)
                                                                                                                       throws org.eclipse.core.runtime.CoreException
        Returns the 1C:Enterprise runtime installation component and executor by the provided component type id as pair of target component type instance and target component executor.
        Parameters:
        resolvable - the 1C:Enterprise runtime installation, cannot be null
        typeId - the target component type id, cannot be null
        Returns:
        a pair of target component type instance and target component executor, never null
        Throws:
        org.eclipse.core.runtime.CoreException - if component get fails for some reason
        See Also:
        IRuntimeComponentTypes