Class AbstractRuntimeDebugAwareLaunchDelegate
- java.lang.Object
-
- org.eclipse.debug.core.model.LaunchConfigurationDelegate
-
- com._1c.g5.v8.dt.debug.core.launchconfigurations.CustomErrorHandlingLaunchDelegate
-
- com._1c.g5.v8.dt.launching.core.launchconfigurations.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 Summary
Constructors Constructor Description AbstractRuntimeDebugAwareLaunchDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
Attaches an 1C:Enterprise runtime debug target to the providedILaunch
, using the provded launch configuration attributes.protected org.eclipse.core.runtime.IStatus
createMatchingRuntimeNotFoundErrorStatus(int errorCode, MatchingRuntimeNotFound e)
Creates an error status with 1C:Enterprise runtime not found exception information.protected URL
getDebugUrl(org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.debug.core.ILaunch launch, ApplicationPrepareResult applicationPrepareResult)
Returns the 1C:Enterprise debug URL to use for this debug launch.protected Optional<IResolvableRuntimeInstallation>
getInstallation(org.eclipse.debug.core.ILaunchConfiguration configuration)
Returns the resolvable 1C:Enterprise runtime installation provided by the launch configuration.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)
Prepares and returns the application and optional application publication for the provided launch configuration attributes and provided parameters.protected IV8Project
getProject(String projectName)
Returns the V8 project by the provided project name.protected IV8Project
getProject(org.eclipse.debug.core.ILaunchConfiguration configuration)
Returns the V8 project by the provided launch configuration attributes.protected <C extends IRuntimeComponent,E extends IRuntimeComponentExecutor>
Pair<C,E>getRuntimeComponent(IResolvableRuntimeInstallation resolvable, String typeId)
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.protected org.eclipse.core.runtime.IStatus
updateApplication(org.eclipse.core.resources.IProject project, IApplication application, PublishKind publishKind, org.eclipse.core.runtime.IProgressMonitor monitor)
Updates an application for the provided project.-
Methods inherited from class com._1c.g5.v8.dt.debug.core.launchconfigurations.CustomErrorHandlingLaunchDelegate
doLaunch, errorCode, errorMessage, handleError, handleErrorStatus, handleStatus, isValid, launch, needHandling, preLaunchCheck, removeLaunch
-
Methods inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate
addReferencedProjects, buildForLaunch, buildProjects, computeBuildOrder, computeReferencedBuildOrder, existsProblems, finalLaunchCheck, getBreakpoints, getBuildOrder, getLaunch, getProjectsForProblemSearch, isLaunchProblem, saveBeforeLaunch
-
-
-
-
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 benull
launch
- the launch, cannot benull
applicationPrepareResult
- the application prepare result, cannot benull
- 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 benull
- 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 providedILaunch
, using the provded launch configuration attributes.- Parameters:
configuration
- the launch configuration to use, cannot benull
launch
- the launch to attach debug target to, cannot benull
application
- the application to use for launch, cannot benull
debugServerUrl
- the 1C:Enterprise debug server URL, cannot benull
installation
- the 1C:Enterprise runtime installation to use, cannot benull
monitor
- the progress monitor to report progress to (if necessary), cannot benull
- 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 codee
- the matching 1C:Enterprise runtime not found exception, cannot benull
- 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 benull
application
- the application to publish, cannot benull
publishKind
- the publish kind, cannot benull
monitor
- the progress monitor to report progress to, cannot benull
- 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 benull
launch
- the launch, cannot benull
mode
- the launch mode, cannot benull
project
- the project to get application for, cannot benull
publicationKind
- the application publication kind, cannot benull
- 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 benull
- 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 benull
- 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 IRuntimeComponentExecutor> Pair<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 benull
typeId
- the target component type id, cannot benull
- 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
-
-