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
associate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, boolean isSynchronized)
Associates the provided project with the provided infobase, if not associated yet.protected String
attachDebugTarget(org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.debug.core.ILaunch launch, IResolvableRuntimeInstallation installation, org.eclipse.core.runtime.IProgressMonitor monitor)
Attach an 1C:Enterprise runtime debug target to the providedILaunch
, using the provded launch configuration attributes.protected org.eclipse.core.runtime.IStatus
checkInfobaseExistence(InfobaseReference infobase, org.eclipse.core.runtime.IProgressMonitor monitor)
Checks the infobase existence and returns a status of infobase existence check:OK
if infobase exists or was created during check.protected org.eclipse.core.runtime.IStatus
createMatchingRuntimeNotFoundErrorStatus(int errorCode, MatchingRuntimeNotFound e)
Creates an error status with 1C:Enterprise runtime not found exception information.protected InfobaseReference
getInfobase(org.eclipse.debug.core.ILaunchConfiguration configuration)
Returns the infobase from the given launch configuration attributes.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 PublicationResult
publishInfobase(InfobaseReference infobase, IResolvableRuntimeInstallation resolvable, org.eclipse.core.runtime.IProgressMonitor monitor)
Publishes the provided infobase.protected org.eclipse.core.runtime.IStatus
updateInfobaseDatabase(org.eclipse.core.resources.IProject project, InfobaseReference infobase, boolean deployFull, boolean associateAfterDeploy, org.eclipse.core.runtime.IProgressMonitor monitor)
Updaptes infobase database structure 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
-
attachDebugTarget
protected String attachDebugTarget(org.eclipse.debug.core.ILaunchConfiguration configuration, org.eclipse.debug.core.ILaunch launch, IResolvableRuntimeInstallation installation, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Attach 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
installation
- the 1C:Enterprise runtime installation to use, cannot benull
monitor
- the progress monitor to report progress to (if necessary), cannot benull
- Returns:
- debug client connection URL (debug server or remote HTTP server URL), never
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 codee
- the matching 1C:Enterprise runtime not found exception, cannot benull
- Returns:
- the created status, never
null
-
checkInfobaseExistence
protected org.eclipse.core.runtime.IStatus checkInfobaseExistence(InfobaseReference infobase, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Checks the infobase existence and returns a status of infobase existence check:OK
if infobase exists or was created during check.CANCEL
if infobase does not exists and user cancel infobase creation.
- Parameters:
infobase
- the infobase to check, cannot benull
monitor
- the progress monitor to use, cannot benull
- Returns:
- the status of infobase existence check, never
null
- Throws:
org.eclipse.core.runtime.CoreException
- if check failed with some reason
-
updateInfobaseDatabase
protected org.eclipse.core.runtime.IStatus updateInfobaseDatabase(org.eclipse.core.resources.IProject project, InfobaseReference infobase, boolean deployFull, boolean associateAfterDeploy, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Updaptes infobase database structure for the provided project. Return status of infobase database update:OK
if infobase is succesfully updated.CANCEL
if update was cancelled by the user.
- Parameters:
project
- the project to get configuration for, cannot benull
infobase
- the infobase to update database, cannot benull
deployFull
- whether need to deploy full project configurationassociateAfterDeploy
- whether project will be associated with infobase after project deploymonitor
- 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
-
publishInfobase
protected PublicationResult publishInfobase(InfobaseReference infobase, IResolvableRuntimeInstallation resolvable, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Publishes the provided infobase. Method will return publication result: status of execution and instance of publication, if it was successful.- Parameters:
infobase
- the infoase to publih, cannot benull
resolvable
- the resolvabe 1C:Enterprise runtime installation to use, cannot benull
monitor
- the progress monitor, cannot benull
- Returns:
- a status of execution and instance of publication, if it was successful, never
null
- Throws:
org.eclipse.core.runtime.CoreException
- if request failed
-
getInfobase
protected InfobaseReference getInfobase(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
Returns the infobase from the given launch configuration attributes. Can returnnull
.- Parameters:
configuration
- the launch configuration to get infobase from, cannot benull
- Returns:
- the infobase or
null
if not present - 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
-
associate
protected void associate(org.eclipse.core.resources.IProject project, InfobaseReference infobase, boolean isSynchronized)
Associates the provided project with the provided infobase, if not associated yet.- Parameters:
project
- the project to associate, cannot benull
infobase
- the infobase to associate, cannot benull
isSynchronized
- whether the infobase is synchronized with the provided project (configurations are equals)
-
-