File browser for images?
Hi,
I want to allow users to provide custom images in one of my concepts. Currently, I have a string called path and one just has to type the complete path in it, but it would be nice to have a real file browser. I tried https://plugins.jetbrains.com/plugin/7519-org-campagnelab-mps-ui but is does not work for the current Version of MPS. What is the preferred way to implement this? Do I need to write my own SwingComponent?
Cheers,
Julian
Please sign in to leave a comment.
I found SelectImageFileButton, which seems to be the right thing to use:
https://github.com/JetBrains/MPS/blob/master/languages/languageDesign/editor/source_gen/jetbrains/mps/lang/editor/editor/SelectImageFileButton.java
The problem is, I don't know which language to import, so I can use it...
I guess you need to import the containing model, i.e. j.m.lang.editor.editor
Thanks Vaclav, I copy and pasted it and it suggested me which models to import.