ui5experts / ui5-schemas

:rocket: UI5 Schemas allows you to develop SAPUI5/OpenUI5 XML at a maximum convenience. It downloads, upgrades and sets up SAPUI5/OpenUI5 XML schemas for a better development experience in your favorite IDE (if it is WebStorm ;).
MIT License
49 stars 8 forks source link

support VS code. #13

Open jimiatworking opened 6 years ago

jimiatworking commented 6 years ago

Hi team, do you plan to use it on VS code?

cschuff commented 6 years ago

Duplicate of https://github.com/ui5experts/ui5-schemas/issues/1

BR Chris

cschuff commented 6 years ago

This could actually being solved using this vscode extension: https://marketplace.visualstudio.com/items?itemName=IBM.XMLLanguageSupport#overview

I'll look into supporting this natively. Contributions welcome :) Working example repo would be helpful, too.

BR Chris

cschuff commented 6 years ago

Here is a snippet for a .vscode/settings.json you could use for now:

{
  "xmlLang.javaHome": "C:\\Program Files\\Java\\jdk1.8.0_152",

  "xmlLang.xmlAssociations": [
    {
      "fileNamePattern": "**/*.+(view|fragment).xml",
      "systemId": "C:\\[USER_HOME]\\AppData\\Roaming\\UI5Experts\\ui5-schemas\\sapui5\\[VERSION]\\sap.ui.core.xsd" 
    },
    {
      "fileNamePattern": "**/*.+(view|fragment).xml",
      "systemId": "C:\\[USER_HOME]\\AppData\\Roaming\\UI5Experts\\ui5-schemas\\sapui5\\[VERSION]\\sap.ui.layout.xsd" 
    },
    {
      "fileNamePattern": "**/*.+(view|fragment).xml",
      "systemId": "C:\\[USER_HOME]\\AppData\\Roaming\\UI5Experts\\ui5-schemas\\sapui5\\[VERSION]\\sap.m.xsd" 
    }
  ]
}
kozubikmichal commented 6 years ago

Hi,

Were you able to get this running in VSCode?

Using this configuration I'm getting following error: ct-props-correct.4: Error for type '_ViewType'. Duplicate attribute uses with the same name and target namespace are specified. Name of duplicate attribute use is 'controllerName'.

My configuration:

        "xmlLang.xmlAssociations": [{
        "fileNamePattern": "**/*.+(view|fragment).xml",
        "systemId": "xsd/sap.ui.core.xsd",
    }]
cschuff commented 5 years ago

@kozubikmichal You could get rid of that by omiting the enhancement until #14 is fixed: npx ui5-schemas --no-upgrade

cschuff commented 5 years ago

@kozubikmichal #14 was just fixed with 0.4.2