Vscode Theia

Posted on  by admin

Is it because the ms-vscode.cpptools extension does not provide grammars? Meaning that if we did not depend on @theia/cpp, we would have had language features (thanks to the vscode extension) but no coloration? The issue is not with a grammar, but with a language itself. None of extensions listed here register a language, so they just don't work. I’m trying to build the vscode built-ins in UBI8-based container. However, doing “yarn” after setting up the vscode submodule reliably fails: 4/4 Building fresh packages -/12 ⠐ waiting 12/12 ⠐ @theia/electron. Could some one kindly explain how to make vsCode extensions work with the theia browser example? That would help me a lot understand and pinpoint what does not work and what to do to improve.

I am building a Vscode/Theia extension, to contribute custom diagram-based editors. Within these editors, I need to provide input controls to end users where they can enter expressions based on our. About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features Press Copyright Contact us Creators.

I know many of you are a big fan of Command Line Interfaces (CLI) (por to DJ Adams 😉) but probably some of us are also used to more intuitive UI interfaces (not saying that CLI is not a nice UI 😊). Many of us have been using the wizards in Web IDE which helps you very well to boost starting your project. This is something many of us want to keep using in the future as well. Therefore, SAP provides similar wizards for the Business Application Studio (BAS).

As you may know, BAS is based on Eclipse Theia which supports VSCode extensions. This means that the extensions that SAP provides as VSCode extensions can also be used in VSCode! Be aware that not everything in BAS is created with VSCode extensions. Luckily SAP used VSCode extensions for the “new” wizards. E.g. SAP uses this for the Fiori elements wizards. You’ve probably seen in many tutorials that the wizards are also available in VSCode as part of the “SAP Fiori tools – Extension Pack”.

Now, many of these things are already out in the SAP Community for a while. Nevertheless, I came across something by accident I did not found online yet or maybe overlooked. I was using the wizard in BAS for creating a freestyle UI5 app and wanted to us this in VSCode. Knowing that this is a VSCode extension, as mentioned earlier, I started looking to get the same wizard in VSCode. Eventually I found a way to do so by following the next steps in VSCode:

  • First install the VSCode extension for SAP Fiori tools
  • Start for the command (ctrl + shift + p ) “Yeoman UI Generators”
    • “Yeoman UI Generators” is a Yeoman generator with a UI on top. This is something that SAP has created on top of Yeoman: https://github.com/SAP/yeoman-ui
    • It comes as part of the “SAP Fiori tools – Extension Pack”
  • The Fiori Elements extension comes with the wizards for Fiori elements. On first sight there is no UI5 Freestyle wizard available. Nevertheless, a UI wizard for freestyle UI5 apps does exists. To be able to use this, you have to install this wizard additionally. This can be done by going to “Explore and Install Generators” from “Yeoman”.
  • Search for “@sap” to have a full overview of all UI wizards provided by SAP. One of them will have the name “@sap/generator-fiori-freestyle”. Click on “install” to start the installation.
  • If error occurs during install run clear npm cache with the following two commands:
    • npm cache clean –force
    • npm cache verify
  • When you go back to the Yeoman UI the Fiori freestyle template is now available

And you are ready!

This UI wizard will have all the same questions and steps as the Yeoman generator I used in this blog post:

The only difference is that I’m now using a UI to answer the questions 😊

  • Provide a Data source
  • Complete the project settings and click on finish

CLI is nice but for UI5 starters a wizard might be useful. Just wanted to share this to make upi aware that this is possible and available to be used outside BAS. In case you like the wizard approach like in Web IDE or in Business Application Studio, this might be you alternative for VSCode.

Kr, Wouter

Index

References

Namespaces

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

References

DefaultWorkspaceServer

Re-exports DefaultWorkspaceServer

DidCreateNewResourceEvent

Re-exports DidCreateNewResourceEvent

EditMenuContribution

Re-exports EditMenuContribution

FileMenuContribution

Re-exports FileMenuContribution

THEIA_EXT

Re-exports THEIA_EXT

VSCODE_EXT

Re-exports VSCODE_EXT

WorkspaceCliContribution

Re-exports WorkspaceCliContribution

WorkspaceCommandContribution

Re-exports WorkspaceCommandContribution

WorkspaceCommands

Re-exports WorkspaceCommands

WorkspaceConfiguration

Re-exports WorkspaceConfiguration

WorkspaceData

Re-exports WorkspaceData

WorkspaceFrontendContribution

Re-exports WorkspaceFrontendContribution

WorkspaceInput

Re-exports WorkspaceInput

WorkspacePreferences

Re-exports WorkspacePreferences

WorkspaceRootUriAwareCommandHandler

Re-exports WorkspaceRootUriAwareCommandHandler

WorkspaceServer

Re-exports WorkspaceServer

WorkspaceService

Re-exports WorkspaceService

WorkspaceState

Re-exports WorkspaceState

WorkspaceStates

Re-exports WorkspaceStates

bindWorkspacePreferences

Re-exports bindWorkspacePreferences

createWorkspacePreferences

Re-exports createWorkspacePreferences

getTemporaryWorkspaceFileUri

Re-exports getTemporaryWorkspaceFileUri

workspacePath

Re-exports workspacePath

workspacePreferenceSchema

Re-exports workspacePreferenceSchema

Type aliases

WorkspacePreferences

WorkspacePreferences:PreferenceProxy<WorkspaceConfiguration>
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:48

WorkspaceState

  • Defined in packages/workspace/src/browser/workspace-frontend-contribution.ts:52

Variables

Const THEIA_EXT

THEIA_EXT:'theia-workspace' = 'theia-workspace'
  • Defined in packages/workspace/src/common/utils.ts:22

Const VSCODE_EXT

  • Defined in packages/workspace/src/common/utils.ts:23

Const WorkspacePreferences

WorkspacePreferences:unique symbol = Symbol('WorkspacePreferences')
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:47

Const WorkspaceServer

WorkspaceServer:unique symbol = Symbol('WorkspaceServer')
  • Defined in packages/workspace/src/common/workspace-protocol.ts:22

Const validFilename

validFilename:(arg: string) => boolean = require('valid-filename')
  • Defined in packages/workspace/src/browser/workspace-commands.ts:41

Type declaration

    • (arg: string): boolean
    • Parameters

      • arg: string

      Returns boolean

Const workspacePath

workspacePath:'/services/workspace' = '/services/workspace'
  • Defined in packages/workspace/src/common/workspace-protocol.ts:17

This program and the accompanying materials are made available under the terms of the Eclipse Public License v. 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU General Public License, version 2 with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

Const workspaceSchemaId

workspaceSchemaId:'vscode://schemas/workspace' = 'vscode://schemas/workspace'
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:126

Functions

bindWorkspacePreferences

  • bindWorkspacePreferences(bind: interfaces.Bind): void
    • Defined in packages/workspace/src/browser/workspace-preferences.ts:54

    Parameters

    • bind: interfaces.Bind

    Returns void

createWorkspacePreferences

  • createWorkspacePreferences(preferences: PreferenceService): WorkspacePreferences
    • Defined in packages/workspace/src/browser/workspace-preferences.ts:50

    Parameters

    • preferences: PreferenceService

    Returns WorkspacePreferences

getTemporaryWorkspaceFileUri

  • getTemporaryWorkspaceFileUri(envVariableServer: EnvVariablesServer): Promise<URI>
    • Defined in packages/workspace/src/common/utils.ts:28

    Parameters

    • envVariableServer: EnvVariablesServer

    Returns Promise<URI>

Object literals

Const workspacePreferenceSchema

workspacePreferenceSchema:object
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:26

type

  • Defined in packages/workspace/src/browser/workspace-preferences.ts:27

properties

properties:object
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:28

workspace.preserveWindow

  • Defined in packages/workspace/src/browser/workspace-preferences.ts:29

default

default:boolean = false
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:32

description

description:string = 'Enable opening workspaces in current window.'
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:30

type

  • Defined in packages/workspace/src/browser/workspace-preferences.ts:31

workspace.supportMultiRootWorkspace

workspace.supportMultiRootWorkspace:object
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:34

default

  • Defined in packages/workspace/src/browser/workspace-preferences.ts:37

description

description:string = 'Controls whether multi-root workspace support is enabled.'
  • Defined in packages/workspace/src/browser/workspace-preferences.ts:35

type

  • Defined in packages/workspace/src/browser/workspace-preferences.ts:36

Const workspaceSchema

workspaceSchema:object
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:127

$id

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:128

required

required:string[] = ['folders']
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:131

title

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:130
Theia vscode api

type

type:string = 'object'
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:129

default

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:132

folders

folders:{ path: string }[] = [{ path: ' }]
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:132

settings

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:132

Type declaration

properties

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:133

folders

folders:object
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:134

description

description:string = 'Root folders in the workspace'
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:135

type

Theia

Eclipse Theia 1.0

Vscode
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:136

items

Vs Code Eclipse

items:object
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:137

required

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:144

type

Vscode Vs Theia

type:string = 'object'
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:138
Eclipse

properties

Theia Vscode Api

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:139

path

Vscode Theia
path:object
  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:140

Vscode Eclipse Theia

type

Eclipse Theia Install

  • Defined in packages/workspace/src/browser/workspace-schema-updater.ts:141