1

Is it possible to add a custom (potentially private) toolbox repository to the MATLAB Add-On Explorer? Something like this:

add-on explorer

In other words: is it possible to integrate a custom binary repository manager with MATLAB? Has anyone explored this possibility?

By default, MATLAB only searches the File Exchange or installed products from The MathWorks, but I'd like to add my own Toolbox repositor(y)(ies). I'm not finding anything related to this in any of the usual channels...

Rody Oldenhuis
  • 37,726
  • 7
  • 50
  • 96
  • 1
    This is probably a broader question than you realise. The short answer, I think, is "no". The broad answer requires a recommendation to use the [Minimart](https://uk.mathworks.com/matlabcentral/fileexchange/59769-matlab-minimart) from the File Exchange, and to take a look at the JLR implementation of a MATLAB "store" as shown in [this blog](https://uk.mathworks.com/company/user_stories/jaguar-land-rover-standardizes-on-matlab-for-developing-packaging-and-sharing-engineering-tools.html). – Wolfie Jul 01 '19 at 13:00
  • @Wolfie Thanks, I suspected as much. (1) why not post this as an answer; it's likely the best possible one anyway (2) "broader than I realise": please enlighten me? – Rody Oldenhuis Jul 01 '19 at 20:44
  • I know you didn't *ask* for an off-site recommendation, but that's what I've given, hence I gave it as a comment not an answer. "Hacking" the add on explorer with a custom configuration sounds like a pretty time consuming (and so broad) task, unless it's something documented which you probably would have already found, that's why I said it was broad. I'm not saying the question isn't *interesting*, but as currently posed I think it's broad and likely to garner only off-site recommendations, hence my initial comment. – Wolfie Jul 02 '19 at 07:41

1 Answers1

2

This post is not a complete solution, but it addresses your questions, and points toward a possible solution path.


  • Q: Is it possible to invoke the add-on explorer programmatically?
    A: Yes, it can be invoked using the Java API. There are several functions for invoking it:

    com.mathworks.addons.AddonsLauncher.showExplorer("some_string");
    com.mathworks.addons.AddonsLauncher.showExplorerViewForHardwareSupportPackages("some_string");
    com.mathworks.addons.AddonsLauncher.showExplorerViewForApps("some_string");
    % etc.
    
    % See also: 
    %  1) "\MATLAB\R20###\java\jar\addons.jar"
    %  2) methods(com.mathworks.addons.AddonsLauncher.class)
    
  • Q: Is it possible to invoke the add-on explorer programmatically? Does that function take arguments?
    A: See previous bullet. It does, but the argument doesn't do anything noticeable.

  • Q: Does it read configuration files?
    A: It's hard to say without in-depth exploration of the .jar and the .m files that invoke it.

  • Q: Are there any insights or plans at The MathWorks to implement this in the near future?
    A: N\A.

  • Q: Are there hints of that {plans to implement this} appearing in the MATLAB codebase?
    A: Yes, the class matlab.addons.repositories.FileExchangeRepository appears to an implementation of such a repository connector (see also the matlab.addons.repositories.SearchableAddonsRepository superclass).

And finally,

  • Q: Is it possible to integrate a custom binary repository manager with MATLAB?
    A: Based on the above, I would say yes.

My best guess would be to extend the Java class com.mathworks.addons.NavigationData, then instantiate it, and call matlab.internal.addons.showExplorer(yourNavigationData).

Dev-iL
  • 23,742
  • 7
  • 57
  • 99