Copy impages in /class_gen directory after compilation Follow
Hi,
is there an easy way to copy some images into the /class_gen directory after generation & compilation. This would be very convenient.
I have to specify images relative to class path in java. So when executing inside MPS, the root of my solution is the /class_gen directory - but it get s clean up every time .. (althought - the image directory is not deleted, only it s contents)
Should i write a post-proc-script?
Dan
is there an easy way to copy some images into the /class_gen directory after generation & compilation. This would be very convenient.
I have to specify images relative to class path in java. So when executing inside MPS, the root of my solution is the /class_gen directory - but it get s clean up every time .. (althought - the image directory is not deleted, only it s contents)
Should i write a post-proc-script?
Dan
Please sign in to leave a comment.
Sure you can do this. Please see our implementation of the same idea in plugin language, concept IconResource. We had exactly the same task, and implemented it using our "facets". The thing is, you can write your custom code and integrate it into the make-process. "Facet" (created in plugin aspect, see our example in plugin aspect of the plugin language called Binaries) is now a container for such a custom code.
In our case, what we do is selecting all the Resource concepts from the input model, getting paths from them and copying corresponding icons into classes_gen.
Please feel free to ask if there's some not-very-clear places in this code.
Regards,
Mihail
Here we report that we've created ome files, which is very important for make as the not-reported files are considered as a trash from the previous generation and are removed.
The code in the header of this facet is also for this purpose:
You'll be able to implement your own as soon as we have advanced facets (like in Idea). For now, implementing a lot of "useful" features is not our focus, because we'll need to rewrite them in the nearest future (in this case, when facets functionality will be extended). As far as we don't have too many developers, we can focus either on small features or on developing the core functionality. As now you _can_ do what you want we'd better focus on what you can't - developing the core functionality to give you a way to use more features and use them simplier in future.
Nevertheless, if some minor feature is often requested by our users, we try to implement it ASAP. So you can ask us or file an issue and vote for it.
...or something ;)
Mihail