ui5-schemas icon indicating copy to clipboard operation
ui5-schemas copied to clipboard

support VS code.

Open jimiatworking opened this issue 7 years ago • 6 comments

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

jimiatworking avatar Feb 26 '18 07:02 jimiatworking

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

BR Chris

cschuff avatar Feb 26 '18 08:02 cschuff

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 avatar Feb 26 '18 08:02 cschuff

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" 
    }
  ]
}

cschuff avatar Feb 28 '18 10:02 cschuff

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",
	}]

kozubikmichal avatar Jul 20 '18 15:07 kozubikmichal

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

cschuff avatar Jun 08 '19 20:06 cschuff

@kozubikmichal #14 was just fixed with 0.4.2

cschuff avatar Jun 09 '19 19:06 cschuff