File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
io.sloeber.core/src/io/sloeber/arduinoFramework/api Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,30 @@ public static IArduinoLibraryVersion getLibraryVersionFromLocation(IFolder libFo
475475 return getLibrariesPrivate ().get (libFolder .getName ());
476476 }
477477
478+ public static IArduinoLibraryVersion getLibraryVersionFromFQN (String FQNLibName , BoardDescription boardDescriptor ) {
479+ String [] fqnParts = FQNLibName .split (SLACH );
480+ if (fqnParts .length < 3 ) {
481+ return null ;
482+ }
483+ if (!SLOEBER_LIBRARY_FQN .equals (fqnParts [0 ])) {
484+ // this is not a library
485+ return null ;
486+ }
487+ if (MANAGED .equals (fqnParts [1 ])) {
488+ if (BOARD .equals (fqnParts [2 ])) {
489+ if (boardDescriptor == null ) {
490+ return null ;
491+ }
492+ return getLibrariesHarware (boardDescriptor ).get (FQNLibName );
493+ }
494+ return getLibrariesdManaged ().get (FQNLibName );
495+ }
496+ if (PRIVATE .equals (fqnParts [1 ])) {
497+ return getLibrariesPrivate ().get (FQNLibName );
498+ }
499+ return null ;
500+ }
501+
478502 /**
479503 * Remove a lib based on the name of the lib
480504 *
You can’t perform that action at this time.
0 commit comments