Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storing Libraries in subfolders #1986

Commits on Oct 30, 2014

  1. Add Library.isProperLibrary() to check for non-legacy libraries

    This shouldn't change any behaviour, just restructures the code to
    prepare for upcoming changes.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    d12a407 View commit details
    Browse the repository at this point in the history
  2. Add Library.isLibrary() method

    This allows checking a folder on disk to see if it looks like a library.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    454db63 View commit details
    Browse the repository at this point in the history
  3. Move the library name check into Library.create

    This prepares for a next change by making it easier to call
    Library.create from multiple places without having to copy the name
    check to every invocation.
    
    The name check is still performed in the same code paths. However,
    previously it would display a warning dialog, now it just prints a
    warning message in the text area (just like with other library loading
    failures).
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    8ea0cae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eeb7dfa View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0cc95ce View commit details
    Browse the repository at this point in the history
  6. Add TargetPlatform.getName()

    This simplifies some other code.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    3f29d0c View commit details
    Browse the repository at this point in the history
  7. Make Sketch.importedLibraries an ArrayList

    Previously, it was a LibraryList, but since it was only iterated, there
    is no real need.
    
    This should not change any behaviour, but prepares for an upcoming
    change.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    cfb8156 View commit details
    Browse the repository at this point in the history
  8. Remove separation between IDE and user libraries

    In a subsequent commit, we'll reintroduce this distinction in a more
    flexible way, but for now just treat all libraries equal in the import
    and examples menus.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    0a1266d View commit details
    Browse the repository at this point in the history
  9. Allow libraries to live in subdirectories

    Before, libraries could only be stored directly under
    e.g. Sketchbook/libraries. When a lot of libraries were present, this
    could lead to an unwieldy list in the import menu and a mess on disk.
    
    This commit changes the library scanning code to recursively scan the
    contents of the various libraries directories. Each directory is scanned
    for signs of a library (library.properties file, utility folder, any .h
    files). If the directory doesn't look like a library, any subdirectories
    are recursively scanned.
    
    This commit updates the scanning code and the modifies the LibraryList
    class so it can store a tree of libraries instead of just a flat list.
    
    In the GUI all libraries are still shown in a flat list.
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    0e2d2ed View commit details
    Browse the repository at this point in the history
  10. Make the library (examples) menu nested

    Previously, the library scanning code started supported subfolders
    inside the libraries folders. Now, the import library and library
    examples menus also reflect this nested structure.
    
    In addition to the on-disk nesting, this also shows a top-level
    structure (which was already added by the scanning code), dividing the
    libraries into "Libraries for all boards", "Libraries for Arduino AVR
    Boards" (or whatever core is being used) and "Libraries from your
    sketchbook".
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    e7f6fba View commit details
    Browse the repository at this point in the history
  11. Don't show the top-level library categories as submenus

    In the previous commit, the import library and example menus were made
    recursive. The top level submenus here were the different kinds of
    library (hardware-independent libraries, hardware-specific libraries and
    sketchbook libraries). With this commit, these different kinds of
    libraries are all put together at the top level, with (unselectable)
    headers in between (like the boards menu, which already head these
    headers for the different platforms).
    matthijskooijman committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    1abd31a View commit details
    Browse the repository at this point in the history