Commit cabdd7ed authored by Mathieu's avatar Mathieu
Browse files

[GUI] Implements autocompletion over OpenMOLE keywords

parent ebd9dea0
......@@ -601,7 +601,7 @@ def guiClientDir = guiDir / "client"
lazy val clientGUI = OsgiProject(guiClientDir, "org.openmole.gui.client.core") enablePlugins (ExecNpmPlugin) dependsOn
(sharedGUI, clientToolGUI, market, dataGUI, extClientTool) settings(
libraryDependencies += Libraries.async,
npmDeps in Compile += Dep("ace-builds", "1.2.9", List("mode-scala.js", "theme-github.js"), true),
npmDeps in Compile += Dep("ace-builds", "1.2.9", List("mode-scala.js", "theme-github.js", "ext-language_tools.js"), true),
npmDeps in Compile += Dep("sortablejs", "1.7.0", List("Sortable.min.js")),
npmDeps in Compile += Dep("plotly.js", "1.31.0", List("plotly-basic.min.js"))
) settings (defaultSettings: _*)
......
......@@ -6,8 +6,6 @@ import org.openmole.gui.ext.data._
import org.openmole.gui.ext.data.FileExtension._
import scala.scalajs.js
import scala.scalajs.js.Dynamic.{ literal lit }
import scala.scalajs.js.{ Dynamic Dyn }
import scalatags.JsDom.all._
import scalatags.JsDom.tags
import scala.async.Async.{ async, await }
......@@ -15,7 +13,9 @@ import scaladget.ace._
import scaladget.bootstrapnative.bsn._
import scaladget.tools._
import scala.scalajs.js.JSConverters._
import org.openmole.gui.ext.tool.client._
import js.Dynamic.{ literal lit }
/*
* Copyright (C) 07/04/15 // mathieu.leclaire@openmole.org
......@@ -69,11 +69,16 @@ class EditorPanelUI(initCode: String, fileType: FileExtension, containerModifier
setCode(initCode)
editor.setTheme("ace/theme/github")
ace.require("ace/ext/language_tools")
editor.renderer.setShowGutter(true)
editor.setShowPrintMargin(true)
editor.setAutoScrollEditorIntoView(true)
// editor.getSession().setTabSize(2)
editor.setOptions(js.Dynamic.literal(
"enableBasicAutocompletion" -> true,
"enableSnippets" -> true,
"enableLiveAutocompletion" -> true
))
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment