Skip to content

Main Features

Rocco Palermiti edited this page Aug 3, 2020 · 3 revisions

Description of main features

Open project or multiple text files

In the right section, you can drag and drop the file to open, or you can manually select it by the button choose file.

It's possible to open multiple files, but you can open one configuration file (.json) at a time. If you open a second configuration file, all the previous configurations will be deleted and set with the new one. When you open multiple files in LoIDE it opens each file in different tabs with its content. It accepts any type of file format, in particular, if the file is .json it will set the configuration, otherwise, it will show on the text editor. At the end of the completed upload, the section will be closed automatically.

Save project

The user can download a configuration file .json and inside we find, by default in JSON format, the solver options, programs and output. Example:

{
  "language": "asp",
  "engine": "dlv",
  "option": [
    {
      "name": "filter",
      "value": [
        "text"
      ]
    }
  ],
  "runAuto": "on",
  "tab": [
    "editor1"
  ],
  "program": "text(1). text(2). test(5)",
  "output": "{text(1), text(2)}"
}

Share project

It’s possible to share the project via URL from share popover clinking on the Share button. LoIDE will generate an URL that will contain all the programs of each tab with its names, the language and the solver used. The link can be copied simply by clicking the copy button on the right. Once the user opens the link, it will open the LoIDE web page with the project loaded on. To avoid having a long URL to be shared we used the is.gd URL shortening service.

Run Options Panel

Run options of LoIDE can be customized, along with the behavior of the underlying systems of use. The options that the user can interact are:

  • language: possibility to change the language (now support only ASP language);

  • solver: possibility to change the solver for the executions of logic programs;

  • executor: possibility to change the executor witch contains the solvers;

  • solver options: Possibility to add one or more options solver contemporary for the executions of logic programs. Specific options can be selected for each solver, with predefined typical settings available for the most common.

  • run automatically: Possibility to automatically run programs at the end of each statement, so that the output dynamically changes as the user is crafting the program; this increases the interaction with the system.

  • choose tab to execute: Possibility to select multiple tabs to run together as if they were a single program. If none is selected, it will execute the program in the open tab. The tabs reference will be automatically added or deleted whenever the user adds or deletes a tab in the main panel.

  • reset options: Reset the options to the default values, deleting all the solver options if they have been added.

Multiple Tab editor support

LoIDE supports multiple files management: you can have more editors at the same time thanks to the tabs feature; you can add or delete them, but if you want to delete one of them, you have to confirm it (to avoid mistakes).

For each tab, you can do some actions listed in a dropdown displayed when clicked the actions button near the tab name or simply doing a right-click on the tab name:

  • Run: run the tab.
  • Rename Tab: it changes the name of the tab.
  • Duplicate: it creates another tab with the same content.
  • Save content: It creates a .txt file with the tab's content and it will have the name "LogicProgram_ NameTab" where NameTab is the name of the current tab opened
  • Delete: it deletes the tab.

Autocomplete and Snippets

LoIDE offers autocomplete and snippets for supported languages. That is useful to write logic programs faster and more accurately. See the page of supported languages for further details.

Syntax highlighting

LoIDE offers basic support for syntax highlighting for supported languages programs. See the page of supported languages for further details.

Keyboard shortcuts

There are a lot of shortcuts provided by Ace and also we add specific shortcuts to Save and Open files and to Run the logic programs. For further information see this page.

Toolbar

LoIDE has a toolbar in the main panel that has many buttons with useful functionalities to the opened tab:

  • Download content: It creates a .txt file with the tab's content and it will have the name "LogicProgram_ NameTab" where NameTab is the name of the current tab opened
  • Copy: copy the selected content or if you didn't select anything it copies all the current row
  • Cut: cut the selected content or if you didn't select anything it copies all the current row
  • Paste: it pastes text from the clipboard. Note: it uses the Clipboard API and not all the browser supports it
  • Search/replace: it opens the ace editor search/replace box.
  • Undo: undo changes that have been made to the editor
  • Redo: restores the changes that were made to the editor

Editor layout and appearance

The user can customize the layout and appearance of the editor and the output panel of the IDE clicking the Appearance button on the navbar. The user can change the theme and fonts sizes of the editor and the font size of the Output panel. The user can also activate and disable the dark mode.

It’s worth noticing that all the options are automatically saved in the Web Storage, in order to make the persistent also across different the current browser user sessions.

Output highlighting

When the user selects an element of the output (for instance, a predicate name), all the elements with the same “name” will be automatically highlighted. The user can dynamically play with such highlighting and, as a consequence, the analysis of the results might be dramatically simplified.

Download output content

Clicking the download button LoIDE creates a .txt file with the output. The file name will be "LoIDE_output".