Getting com.intellij.openapi.externalSystem.model.project.ProjectCoordinate from a library.

Answered

Hello,

I would like to get the `com.intellij.openapi.externalSystem.model.project.ProjectCoordinate` from `com.intellij.openapi.roots.libraries.Library`. When i call `Library::getName` i actually get something like `Maven: group:artifact:version`. I could strip the Maven part but i would rather have a structured way of doing this without knowing the prefixes.

Best regards.

0
1 comment

Hi Finn,

Library and ProjectCoordinate are unrelated and there is no API that would provide what you need.

Stripping the library type prefix is the common approach.

0

Please sign in to leave a comment.