Java源码示例:com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditor

示例1
@Override
public JComponent createOptionsPanel() {
  myLibraryEditorComponent = new LibraryRootsComponent(myProject, new Computable<LibraryEditor>() {
    @Override
    public LibraryEditor compute() {
      return getLibraryEditor();
    }
  });
  myLibraryEditorComponent.addListener(new Runnable() {
    @Override
    public void run() {
      myContext.getDaemonAnalyzer().queueUpdate(myProjectStructureElement);
      updateName();
    }
  });
  return myLibraryEditorComponent.getComponent();
}
 
示例2
@Override
public void addRoots(@NotNull LibraryEditor editor)
{
    final List<File> libs = muleSdk.getLibraryEntries();
    for (File file : libs)
    {
        editor.addRoot(VfsUtil.getUrlForLibraryRoot(file), OrderRootType.CLASSES);
    }
}
 
示例3
@Override
public VirtualFile[] selectFiles(@NotNull JComponent parent,
                                 @Nullable VirtualFile initialSelection,
                                 @Nullable Module contextModule,
                                 @NotNull LibraryEditor libraryEditor) {
  final VirtualFile vFile = Util.showSpecifyJavadocUrlDialog(parent);
  if (vFile != null) {
    return new VirtualFile[]{vFile};
  }
  return VirtualFile.EMPTY_ARRAY;
}
 
示例4
@Override
public VirtualFile[] selectFiles(final @Nonnull JComponent parent, @Nullable VirtualFile initialSelection,
                                 final @Nullable Module contextModule, @Nonnull LibraryEditor libraryEditor) {
  final FileChooserDescriptor chooserDescriptor = createChooserDescriptor();
  chooserDescriptor.setTitle(getChooserTitle(libraryEditor.getName()));
  chooserDescriptor.setDescription(getChooserDescription());
  if (contextModule != null) {
    chooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, contextModule);
  }
  return FileChooser.chooseFiles(chooserDescriptor, parent, contextModule != null ? contextModule.getProject() : null, initialSelection);
}
 
示例5
@Override
public boolean isChanged() {
  for (LibraryEditor libraryEditor : myLibrary2EditorMap.values()) {
    if (libraryEditor.hasChanges()) return true;
  }
  return getLibrariesModifiableModel().isChanged();
}
 
示例6
private static <P extends LibraryProperties<?>> NewLibraryConfiguration doCreate(final LibraryType<P> type, final String name, final List<OrderRoot> roots) {
  return new NewLibraryConfiguration(name, type, type != null ? type.getKind().createDefaultProperties() : null) {
    @Override
    public void addRoots(@Nonnull LibraryEditor editor) {
      editor.addRoots(roots);
    }
  };
}
 
示例7
public abstract VirtualFile[] selectFiles(@Nonnull JComponent parent, @Nullable VirtualFile initialSelection,
@Nullable Module contextModule, @Nonnull LibraryEditor libraryEditor);
 
示例8
protected LibraryEditor getLibraryEditor() {
  return myModel.getModifiableModel().getLibraryEditor(myLibrary);
}
 
示例9
public abstract void addRoots(@Nonnull LibraryEditor editor); 
示例10
LibraryEditor getLibraryEditor();