Skip to content

Add convenience method to retrieve ScriptInfo/ModuleInfo from script #389

Description

@imagejan

As suggested by @ctrueden on gitter, we should add a convenience method to ScriptService that returns a ScriptInfo or ModuleInfo for a given script.

Something like getScriptInfo(String filename, String script) ?

Activity

  1. imagejan commented on Jun 18, 2020

    @imagejan
    MemberAuthor

    As we have:

    /**
    * Gets the cached {@link ScriptInfo} metadata for the script at the given
    * file, creating it if it does not already exist.
    */
    ScriptInfo getScript(File scriptFile);

    already, we might want to keep it consistent and overload the getScript method like this:

    /**
     * Creates the {@link ScriptInfo} metadata for the provided script.
     */
    ScriptInfo getScript(String languageExtension, String script);

    Would you be fine with that, @ctrueden? I can submit a PR updating ScriptService and DefaultScriptService then.

  2. ctrueden commented on Jun 18, 2020

    @ctrueden
    Member

    Sounds good, @imagejan! 👍

  3. self-assigned this
    on Jun 19, 2020
  4. added a commit that references this issue on Jun 19, 2020
    0b2e588
  5. added a commit that references this issue on Sep 3, 2020
    ab9dad2
  6. added a commit that references this issue on Dec 18, 2020
    fc00c05
  7. added a commit that references this issue on Jan 19, 2021
    0fc27eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions