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

0
3 comments
Avatar
Permanently deleted user

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...

0

I guess you need to import the containing model, i.e. j.m.lang.editor.editor

0
Avatar
Permanently deleted user

Thanks Vaclav, I copy and pasted it and it suggested me which models to import.

0

Please sign in to leave a comment.