lemminx icon indicating copy to clipboard operation
lemminx copied to clipboard

Rename XSD/DTD generation code actions

Open xorye opened this issue 5 years ago • 5 comments

@fbricon 's idea:

For these code actions:

image

Rename each of them to match this format:

Bind to the generated XSD 'test.xsd' with xsi:noschemaLocation to Generate 'test.xsd' and bind with xsi:noschemaLocation.

After, we could add another code action if test.xsd exists: Bind to 'test.xsd' with xsi:noschemaLocation.

xorye avatar Jun 24 '20 19:06 xorye

+1

@xorye is there any chance that you work on this issue?

angelozerr avatar Jun 24 '20 19:06 angelozerr

@angelozerr yes, I can look into this

xorye avatar Jun 24 '20 19:06 xorye

For this issue:

  • [x] Rename code actions
  • [ ] Add new code action for when the schema file already exists

xorye avatar Jun 25 '20 15:06 xorye

@angelozerr do you think the second portion of this issue is worth pursuing? I know we were thinking of implementing a command that will bind to a schema that is passed by the client. (ie. the client provides a wizard to select the schema file, then calls a LemMinX command to bind the document to the schema). However, using a CodeAction in this scenario means nothing needs to be implemented on the client side.

datho7561 avatar May 25 '21 14:05 datho7561

However, using a CodeAction in this scenario means nothing needs to be implemented on the client side.

The idea with CodeAction is to generate a CodeAction with a command id (only when client has the proper capability). This command id will used on client side to open a XSD files (This part could be managed by https://github.com/redhat-developer/vscode-xml/issues/395 which will work with CodeLens).

In short I think we could split this issue in 2 isssues like explained https://github.com/eclipse/lemminx/issues/807#issuecomment-649640549

angelozerr avatar May 25 '21 16:05 angelozerr