// Path: src/name/admitriev/jhelper/exceptions/NotificationException.java
// public class NotificationException extends RuntimeException {
// 	private final String title;
// 	private final String content;
// 
// 	public NotificationException(String content) {
// 		this(content, (Throwable) null);
// 	}
// 
// 	public NotificationException(String content, Throwable cause) {
// 		super(content, cause);
// 		title = "";
// 		this.content = content;
// 	}
// 
// 	public NotificationException(String title, String content) {
// 		this(title, content, null);
// 	}
// 
// 	public NotificationException(String title, String content, Throwable cause) {
// 		super(title + ": " + content, cause);
// 		this.title = title;
// 		this.content = content;
// 	}
// 
// 	public String getTitle() {
// 		return title;
// 	}
// 
// 	public String getContent() {
// 		return content;
// 	}
// }


import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import name.admitriev.jhelper.exceptions.NotificationException;
import net.egork.chelper.util.OutputWriter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
							catch (IOException e) {
								throw new NotificationException(
										"Couldn't create directory: " + root.getPath() + '/' + name,
										e
								);
							}
						}
						assert child != null;

						if (index < path.length()) {
							return findOrCreateByRelativePath(child, path.substring(index + 1));
						}
						return child;
					}
				}
		);
	}

	/**
	 * Checks if given file is a C++ file.
	 * In other words checks if code may be generated for that file
	 */
	public static boolean isCppFile(PsiFile file) {
		return file.getName().endsWith(".cpp");
	}

	public static void writeToFile(PsiFile outputFile, String... strings) {
		Project project = outputFile.getProject();
		Document document = PsiDocumentManager.getInstance(project).getDocument(outputFile);
		if (document == null) {
// Path: src/name/admitriev/jhelper/exceptions/NotificationException.java
// public class NotificationException extends RuntimeException {
// 	private final String title;
// 	private final String content;
// 
// 	public NotificationException(String content) {
// 		this(content, (Throwable) null);
// 	}
// 
// 	public NotificationException(String content, Throwable cause) {
// 		super(content, cause);
// 		title = "";
// 		this.content = content;
// 	}
// 
// 	public NotificationException(String title, String content) {
// 		this(title, content, null);
// 	}
// 
// 	public NotificationException(String title, String content, Throwable cause) {
// 		super(title + ": " + content, cause);
// 		this.title = title;
// 		this.content = content;
// 	}
// 
// 	public String getTitle() {
// 		return title;
// 	}
// 
// 	public String getContent() {
// 		return content;
// 	}
// }


// Path: src/name/admitriev/jhelper/generation/FileUtils.java
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import name.admitriev.jhelper.exceptions.NotificationException;
import net.egork.chelper.util.OutputWriter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;

							catch (IOException e) {
								throw new NotificationException(
										"Couldn't create directory: " + root.getPath() + '/' + name,
										e
								);
							}
						}
						assert child != null;

						if (index < path.length()) {
							return findOrCreateByRelativePath(child, path.substring(index + 1));
						}
						return child;
					}
				}
		);
	}

	/**
	 * Checks if given file is a C++ file.
	 * In other words checks if code may be generated for that file
	 */
	public static boolean isCppFile(PsiFile file) {
		return file.getName().endsWith(".cpp");
	}

	public static void writeToFile(PsiFile outputFile, String... strings) {
		Project project = outputFile.getProject();
		Document document = PsiDocumentManager.getInstance(project).getDocument(outputFile);
		if (document == null) {
			throw new NotificationException("Couldn't open output file as document");