Accessing file in deployed plugin

We are trying to get access to a file that is either located under an MPS module during development or packed in an MPS plugin. We tried:

1. read action {
  RelativePathHelper relativePathHelper = Context.defaultContext().getRelativePathHelper(SModelRepository.getInstance().getModelDescriptor(model/;
  additionalLibPath = relativePathHelper.getBasePath();

2. additionalLibPath = PluginPathManager.getPluginHomePath("NextflowWorkbench")

1. only works for development, but cannot find the module path in a packaged and installed plugin.
2. fails because it assumes the plugin is shipped with MPS, when it is instead installed by the end-user using Preferences.
We get the path /Applications/MPS when should be getting  ~/Library/Application\ Support/MPS32/NextflowWorkbench/

Could you suggest a method/API that would work in both cases?
1 comment
Comment actions Permalink
Hi Fabien,

I´m not sure if I understood completly your problem, but here goes my 2 cents:

What if you just add your file in java source paths in your module configuration and then just try to get it using the own module classLoader?

Well, this is just a guess but maybe it could work for your case.

Best regards,

Please sign in to leave a comment.