// Path: dotTrace-common/src/main/java/jetbrains/buildServer/dotTrace/Constants.java
// public class Constants {
//     public static final String USE_VAR = "dot_trace";
//     public static final String PATH_VAR = "dot_trace_path";
//     public static final String THRESHOLDS_VAR = "dot_trace_thresholds";
//     public static final String MEASURE_TYPE_VAR = "dot_trace_measure_type";
//     public static final String PROFILE_CHILD_PROCESSES_VAR = "dot_trace_profile_child_processes";
//     public static final String PROCESS_FILTERS_VAR = "dot_trace_process_filters";
//     public static final String SNAPSHOTS_PATH_VAR = "dot_trace_snapshots_path";
// }
// 
// Path: dotTrace-common/src/main/java/jetbrains/buildServer/dotTrace/MeasureType.java
// public enum MeasureType {
//   SAMPLING("sampling", "Sampling", "Sampling"),
//   TRACING("tracing", "Tracing", ""),
//   LINE_BY_LINE("line-by-line", "Line-by-line", "TracingInject");
// 
//   private final String myValue;
//   private final String myDescription;
//   private final String myId;
// 
//   MeasureType(@NotNull final String value, @NotNull final String description, @NotNull final String id) {
//     myValue = value;
//     myDescription = description;
//     myId = id;
//   }
// 
//   @NotNull
//   public String getValue() {
//     return myValue;
//   }
// 
//   @NotNull
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   @NotNull
//   @Override
//   public String toString() {
//     return myDescription;
//   }
// 
//   @NotNull
//   public String getId() {
//     return myId;
//   }
// }


import com.intellij.openapi.util.text.StringUtil;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jetbrains.buildServer.dotNet.buildRunner.agent.*;
import jetbrains.buildServer.dotTrace.Constants;
import jetbrains.buildServer.dotTrace.MeasureType;
import org.jetbrains.annotations.NotNull;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/*
 * Copyright 2000-2021 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package jetbrains.buildServer.dotTrace.agent;


public class ProjectGenerator implements ResourceGenerator<Context> {
  private static final Map<String, String> outDocumentProperties = new HashMap<String, String>();
  private static final String ROOT_ELEMENT = "root";
  private static final String TYPE_ATTR = "type";
  private static final String TYPE_ELEMENT = "Type";
  private static final String HOST_PARAMETERS_ELEMENT = "HostParameters";
  private static final String TYPE_LOCAL_HOST_PARAMETERS = "LocalHostParameters";
  private static final String ARGUMENT_ELEMENT = "Argument";
  private static final String ARGUMENTS_ELEMENT = "Arguments";
  private static final String FILE_NAME_ELEMENT = "FileName";
  private static final String PROFILE_CHILD_PROCESSES_ELEMENT = "ProfileChildProcesses";
  private static final String WORKING_DIRECTORY_ELEMENT = "WorkingDirectory";
  private static final String INFO_ELEMENT = "Info";
// Path: dotTrace-common/src/main/java/jetbrains/buildServer/dotTrace/Constants.java
// public class Constants {
//     public static final String USE_VAR = "dot_trace";
//     public static final String PATH_VAR = "dot_trace_path";
//     public static final String THRESHOLDS_VAR = "dot_trace_thresholds";
//     public static final String MEASURE_TYPE_VAR = "dot_trace_measure_type";
//     public static final String PROFILE_CHILD_PROCESSES_VAR = "dot_trace_profile_child_processes";
//     public static final String PROCESS_FILTERS_VAR = "dot_trace_process_filters";
//     public static final String SNAPSHOTS_PATH_VAR = "dot_trace_snapshots_path";
// }
// 
// Path: dotTrace-common/src/main/java/jetbrains/buildServer/dotTrace/MeasureType.java
// public enum MeasureType {
//   SAMPLING("sampling", "Sampling", "Sampling"),
//   TRACING("tracing", "Tracing", ""),
//   LINE_BY_LINE("line-by-line", "Line-by-line", "TracingInject");
// 
//   private final String myValue;
//   private final String myDescription;
//   private final String myId;
// 
//   MeasureType(@NotNull final String value, @NotNull final String description, @NotNull final String id) {
//     myValue = value;
//     myDescription = description;
//     myId = id;
//   }
// 
//   @NotNull
//   public String getValue() {
//     return myValue;
//   }
// 
//   @NotNull
//   public String getDescription() {
//     return myDescription;
//   }
// 
//   @NotNull
//   @Override
//   public String toString() {
//     return myDescription;
//   }
// 
//   @NotNull
//   public String getId() {
//     return myId;
//   }
// }


// Path: dotTrace-agent/src/main/java/jetbrains/buildServer/dotTrace/agent/ProjectGenerator.java
import com.intellij.openapi.util.text.StringUtil;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jetbrains.buildServer.dotNet.buildRunner.agent.*;
import jetbrains.buildServer.dotTrace.Constants;
import jetbrains.buildServer.dotTrace.MeasureType;
import org.jetbrains.annotations.NotNull;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

/*
 * Copyright 2000-2021 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package jetbrains.buildServer.dotTrace.agent;


public class ProjectGenerator implements ResourceGenerator<Context> {
  private static final Map<String, String> outDocumentProperties = new HashMap<String, String>();
  private static final String ROOT_ELEMENT = "root";
  private static final String TYPE_ATTR = "type";
  private static final String TYPE_ELEMENT = "Type";
  private static final String HOST_PARAMETERS_ELEMENT = "HostParameters";
  private static final String TYPE_LOCAL_HOST_PARAMETERS = "LocalHostParameters";
  private static final String ARGUMENT_ELEMENT = "Argument";
  private static final String ARGUMENTS_ELEMENT = "Arguments";
  private static final String FILE_NAME_ELEMENT = "FileName";
  private static final String PROFILE_CHILD_PROCESSES_ELEMENT = "ProfileChildProcesses";
  private static final String WORKING_DIRECTORY_ELEMENT = "WorkingDirectory";
  private static final String INFO_ELEMENT = "Info";
  private static final String MEASURE_TYPE_ELEMENT = "MeasureType";