コード例 #1
0
 public LibraryDescriptor findLibraryDescriptorFor(LibraryId id) {
   DefaultComboBoxModel model = (DefaultComboBoxModel) myCompilerLibrary.getModel();
   for (int i = 0; i < model.getSize(); i++) {
     LibraryDescriptor entry = (LibraryDescriptor) model.getElementAt(i);
     if (entry != null && entry.id().equals(id)) {
       return entry;
     }
   }
   return null;
 }
コード例 #2
0
 private LibraryId getCompilerLibraryId() {
   LibraryDescriptor descriptor = (LibraryDescriptor) myCompilerLibrary.getSelectedItem();
   return descriptor == null ? LibraryId.empty() : descriptor.id();
 }