Is it possible to add a custom (potentially private) toolbox repository to the MATLAB Add-On Explorer? Something like this:
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...
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,
My best guess would be to extend the Java class com.mathworks.addons.NavigationData
, then instantiate it, and call matlab.internal.addons.showExplorer(yourNavigationData)
.