LibraryType () { if (!myDetectedTypeComputed) { LibraryTable libraryTable = myLibrary.getTable(); if (libraryTable == null || libraryTable.isEditable()) { final Pair<LibraryType<?>,LibraryProperties<?>> pair = LibraryDetectionManager.getInstance().detectType(Arrays.asList(getFiles(OrderRootType.CLASSES))); if (pair != null) { myDetectedType = pair.getFirst(); myDetectedLibraryProperties = pair.getSecond(); } } myDetectedTypeComputed = true; } return myDetectedType; }