1 /* 2 * QuartoNewProjectOptions.java 3 * 4 * Copyright (C) 2021 by RStudio, PBC 5 * 6 * Unless you have received this program directly from RStudio pursuant 7 * to the terms of a commercial license agreement with RStudio, then 8 * this program is licensed to you under the terms of version 3 of the 9 * GNU Affero General Public License. This program is distributed WITHOUT 10 * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, 11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the 12 * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details. 13 * 14 */ 15 package org.rstudio.studio.client.quarto.model; 16 17 import com.google.gwt.core.client.JavaScriptObject; 18 19 public class QuartoNewProjectOptions extends JavaScriptObject 20 { QuartoNewProjectOptions()21 protected QuartoNewProjectOptions() 22 { 23 } 24 createDefault()25 public final static QuartoNewProjectOptions createDefault() 26 { 27 return create(QuartoConstants.PROJECT_DEFAULT, QuartoConstants.ENGINE_KNITR, "python3", "", "matplotlib pandas"); 28 } 29 create(String type, String engine, String kernel, String venv, String packages)30 public native final static QuartoNewProjectOptions create(String type, String engine, String kernel, String venv, String packages) 31 /*-{ 32 var options = new Object(); 33 options.type = type; 34 options.engine = engine; 35 options.kernel = kernel; 36 options.venv= venv; 37 options.packages = packages; 38 return options; 39 }-*/; 40 getType()41 public final native String getType() /*-{ return this["type"]; }-*/; getEngine()42 public final native String getEngine() /*-{ return this["engine"]; }-*/; getKernel()43 public final native String getKernel() /*-{ return this["kernel"]; }-*/; getVenv()44 public final native String getVenv() /*-{ return this["venv"]; }-*/; getPackages()45 public final native String getPackages() /*-{ return this["packages"] || ""; }-*/ ; 46 } 47