예제 #1
0
        public static RunConfigurationEditor CreateEditorForConfiguration(ProjectRunConfiguration config)
        {
            var name = config.GetType().FullName;
            var node = AddinManager.GetExtensionNodes <RunConfigurationEditorExtensionNode> (EditorsExtension).FirstOrDefault(n => n.RunConfigurationType == name);

            if (node != null)
            {
                return((RunConfigurationEditor)node.CreateInstance(typeof(RunConfigurationEditor)));
            }
            else
            {
                return(null);
            }
        }
 protected override ExecutionCommand OnCreateExecutionCommand(ConfigurationSelector configSel, DotNetProjectConfiguration configuration, ProjectRunConfiguration runConfiguration)
 {
     if (IsGodotProject())
     {
         var runConfigurationIndex = runConfigurations.IndexOf(runConfiguration);
         if (runConfigurationIndex == -1)
         {
             LoggingService.LogError($"Unexpected RunConfiguration {runConfiguration.Id} {runConfiguration.GetType().FullName}");
         }
         var executionType = runConfigurations[0] == runConfiguration ? ExecutionType.Launch : ExecutionType.Attach;
         return(new GodotExecutionCommand(
                    GetGodotProjectPath(),
                    executionType,
                    Path.GetDirectoryName(GetGodotProjectPath())));
     }
     return(base.OnCreateExecutionCommand(configSel, configuration, runConfiguration));
 }
        protected override ExecutionCommand OnCreateExecutionCommand(ConfigurationSelector configSel, DotNetProjectConfiguration configuration, ProjectRunConfiguration runConfiguration)
        {
            if (IsGodotProject())
            {
                var runConfigurationIndex = RunConfigurations.IndexOf(runConfiguration);

                if (runConfigurationIndex == -1)
                {
                    LoggingService.LogError($"Unexpected RunConfiguration {runConfiguration.Id} {runConfiguration.GetType().FullName}");
                }

                var executionType = ExecutionTypes[runConfigurationIndex];

                if (executionType == ExecutionType.PlayInEditor && !GodotMessagingClient.IsConnected)
                {
                    LoggingService.LogError($"Cannot launch editor player because the Godot Ide Client is not connected");
                }

                string godotProjectPath = GetGodotProjectPath();

                return(new GodotExecutionCommand(
                           godotProjectPath,
                           executionType,
                           Path.GetDirectoryName(godotProjectPath),
                           GodotMessagingClient
                           ));
            }

            return(base.OnCreateExecutionCommand(configSel, configuration, runConfiguration));
        }