IDEA Plugin Dev - Library

Card Puncher Data Processing

IDEA Plugin Dev - Library

About

IDEA - Library in the context of Plugin Dev

Management

How do I get the library content?

The Library class provides the getUrls method you can use to get a list of source roots and classes the library includes.

// In this sample code, lib is of the Library type.
StringBuilder roots = new StringBuilder("The " + lib.getName() + " library includes:\n");
roots.append("Sources:\n");
for (String each : lib.getUrls(OrderRootType.SOURCES)) {
  roots.append(each).append("\n");
}
roots.append"Classes:\n");
for (String each : lib.getUrls(OrderRootType.CLASSES)) {
  strRoots.append(each).append("\n");
}
Messages.showInfoMessage(roots.toString(), "Library Info");







Share this page:
Follow us:
Task Runner