Knowcode-AI / android-xml-editor

Apache License 2.0
14 stars 4 forks source link

Addressing issue #6, making assets location user-configurable via a n… #7

Open Nos78 opened 1 year ago

Nos78 commented 1 year ago

Added new configuration setting, xmlEditor.resourcesPath, which is accessible via the File->Settings menu within VSCode, under the extensions tab, with the title "Android XML Editor".

package.json: Add new configuration properties for xmlEditor.resourcesPath, as a string with a default value to match the existing hard-coded location (modified to reflect the standard location of /res/ rather than /resources/).

Added a markdownDescription for this setting, which explains the default value and that this path is relative to the workspace root.

Note that when you add settings (or remove them) into an extension package.json, you need to reboot vscode to re-build the settings menu, then reboot vscode a second time to actually see it.

src/extension.ts:

This commit addresses issue #6 , change 1. This pull request also factors in the change/pull request submitted by EduApps-CDG that addressed issue #4

Nos78 commented 1 year ago

Seems that any commit I do to my fork automatically contributes to this same pull request... I wanted to do separate pull requests so that these fixes where kept separate. Hey ho, neither change is major so hopefully this won't be a problem.

With the second commit, I've fixed issue #5 and so the extension will now work properly without crashing after an initial install.

I won't bother making the /media/drawable cache location user-configurable - it'll probably complicate the issue for users who already have a problem after install. The project location, on the other hand, looks so much better as a user-configurable setting. This way you're not precluding users who have workspaces open from folders other than /app/...