Code Monkey home page Code Monkey logo

openui5vscodetypescripttools's Introduction

ui5ts Extension

This extension aims to improve the experience using UI5 with typescript.

This extension is not officially supported by SAP or the openUi5 team. It is currently in an alpha phase. Please report issues.

Features

  • Code snippets for generating views and controllers in typescript
  • Generator for getting up-to-date typescript declarations for UI5 (customizable)
  • Navigation between views and controllers
  • Schemas for manifest.json

Requirements

none

Extension Settings

none

Usage

This section will help getting you started.

Code snippets

All snippets start with ui5ts:.

Document outlines

To create a new xml view or controller just create your file at the desired position and type ui5ts.doc: to get the suggestions.

Known Issues

  • Navigation between controller and view may not work, if controller is used in multiple views.
  • Problems getting the right controllers in large projects (multiple manifests)

Release Notes

0.1.0 - alpha: First Release


Working with Markdown

Note: You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on OSX or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+CMD+V on OSX or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux) or Cmd+Space (OSX) to see a list of Markdown snippets

For more information

Enjoy!

openui5vscodetypescripttools's People

Contributors

apazureck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openui5vscodetypescripttools's Issues

Open GoTo Controller/View in same tab

When having multiple columns in the vscode editor, open the goto view / goto controller window in the same column as the currently opened view/controller.

Code completion on sap Typescript classes

As there is only use of ambient namespace possible, tools like tshero do not get the import. It has to be done by hand.

There should be a way to import for example the class JSONModel by typing its name and getting a suggestion to import. The import should be added below the namespace:

import JSONModel = sap.ui.model.json.JSONModel;

should be created when typing

JSONModel as type

Possible cases:
new JSONModel
...(model: JSONModel)

Command to generate sap.ui.define imports

Create a command to automatically add imports like:

import JSONModel = sap.ui.model.json.JSONModel;

to the sap.ui.define

Command can be called via autocomplete, too.

Is it possible to use that plugin without typescript

I know the advantages of typescript but we use javascript as prepared script language. So with the "@types/openui5": "^1.40.2", we can work with intellisense this is great but it works not with the new sap controller structure from sap. Do you see a chance to extend your plugin also using javascript. The XML-Server shows missing links to the controller, because i mean it search the controller in the ts file.

Autocompletion for IDs

Autocomplete getId() using the information on the view

Use sap.ui.core.ID type to determine where to provide autocomplete

Support i18n Code completion

Autocompletion for the i18n entries stored in the i18n.properties file. This should be available in xml and json views

  • Can get model via manifest.json
  • Entries are Key-Value-Pairs

Make models renameable

When a model is renamed it should be renamed in all view bindings and controllers who use this model (if possible).

Add a command to convert dots to slashes

To convert the namespaces in define to the namespaces for extend.

Example:

sap.ui.define([
'sap/ui/core/mvc/Controller'

should be convertable to
sap.ui.core.mvc.Controller

this should be put in the copy-paste feature so it can be pasted at the desired place.

navigation from and to views

f12 navigates to the underlying file
controllerName
viewName
fragmentName

f7 switches between controller and view
handling when controller is used by multiple views

IntelliSense not working for UI5

Hi apazureck,
First thanks for the great UI5 TS extension.

After install this extension, intelliSense still not work, example below: no intelliSense is showed for oModel, could you share any clue on this?

sap.ui.define([
    "sap/ui/model/json/JSONModel"
], function( JSONModel ) {
    return Controller.extend("Demo.controller.App", {
    	Init : function(){
            var oModel = new JSONModel();
            oModel. **_(no intellisense)_**
    	}
    });
});

Importing new custom XSD files for XML intelliscense and guidance

Hi,

I have recently started looking at your vscode extension as I am really impressed with the XML Support it provides. The main features I am looking at is verifying the XML syntax is correct, but also to provide intelliscense and guidance using annotations/tool tips while the author is creating the xml.

I have a basic strict XML file that we often use, I have created an XSD for the XML and successfully imported it into the schemastorage. However I can't seem to get this to work in my XML files, are you able to give any input in this area, on where I may have gone wrong?

Thanks,

Chris

I18n label check does not work

I have configured my project with correct i18n settings descriped by you. But in the XML-View i get messages like: Label ... does not exists.

Fix missing targets

In Manifest.json the target views are always displayed as errors (not found).

provide the relative path from the manifest.json for the views

Code completion on navTo Method

Provide code completion on

sap.ui.core.UIComponent.getRouterFor(this).navTo("");

or just .navTo("")

  • Go To source can get you to the manifest.json
  • Find all References in manifest.json will list the loc where the .navTo() was used

invalid "Double attribute" xml error

If I have two different elements on the same line, with the same attribute, the xml parser is identifying an error: "[xmllint] Double attribute 'text'"

Example:
<Label text="{i18n>someLabel}" /><Text text="{model>someField}" />

If I put a line break between the two elements, the is no error:

<Label text="{i18n>someLabel}" />
<Text text="{model>someField}" />

Could not find corresponding controller

My project contains '.' in the namespace. Eg, MY.PRJ.USER.MAIL
The view "Detail.view.xml" is located in /webapp/view
The Controller "Detail.controller.js" is included in /webapp/controller
The first line in the xml file is <mvc:View controllerName="MY.PRJ.USER.MAIL.controller.Detail" ....>

However, the extension gives an error "Could not find corresponding controller".

How to resolve this issue.

Rename callbacks in referenced views and fragments

When renaming a callback on a controller class the reference in the view is not changed.

When renaming a method pressing f2, the corresponding usage in the xml or json view should be adjusted accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.