コード例 #1
0
 public void setCompilerLibraryById(LibraryId id) {
   if (id.isEmpty()) {
     //      myCompilerLibrary.addItem(null);
     myCompilerLibrary.setSelectedItem(null);
   } else {
     LibraryDescriptor descriptor = findLibraryDescriptorFor(id);
     if (descriptor == null) {
       LibraryDescriptor newId = LibraryDescriptor.createFor(id);
       myCompilerLibrary.addItem(newId);
       myCompilerLibrary.setSelectedItem(newId);
     } else {
       myCompilerLibrary.setSelectedItem(descriptor);
     }
   }
 }
コード例 #2
0
 private LibraryLevel getCompilerLibraryLevel() {
   LibraryId id = getCompilerLibraryId();
   return id == null ? null : id.level();
 }
コード例 #3
0
 private LibraryId getCompilerLibraryId() {
   LibraryDescriptor descriptor = (LibraryDescriptor) myCompilerLibrary.getSelectedItem();
   return descriptor == null ? LibraryId.empty() : descriptor.id();
 }
コード例 #4
0
 private String getCompilerLibraryName() {
   LibraryId id = getCompilerLibraryId();
   return id == null ? "" : id.name();
 }