本文整理汇总了Java中com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor类的典型用法代码示例。如果您正苦于以下问题:Java LibraryRootsComponentDescriptor类的具体用法?Java LibraryRootsComponentDescriptor怎么用?Java LibraryRootsComponentDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LibraryRootsComponentDescriptor类属于com.intellij.openapi.roots.libraries.ui包,在下文中一共展示了LibraryRootsComponentDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: CreateModuleLibraryChooser
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
public CreateModuleLibraryChooser(List<? extends LibraryType> libraryTypes, JComponent parentComponent,
Module module,
final LibraryTable.ModifiableModel moduleLibrariesModel,
@Nullable final Function<LibraryType, LibraryProperties> defaultPropertiesFactory) {
myParentComponent = parentComponent;
myModule = module;
myModuleLibrariesModel = moduleLibrariesModel;
myDefaultPropertiesFactory = defaultPropertiesFactory;
myLibraryTypes = new HashMap<LibraryRootsComponentDescriptor, LibraryType>();
myDefaultDescriptor = new DefaultLibraryRootsComponentDescriptor();
for (LibraryType<?> libraryType : libraryTypes) {
LibraryRootsComponentDescriptor descriptor = null;
if (libraryType != null) {
descriptor = libraryType.createLibraryRootsComponentDescriptor();
}
if (descriptor == null) {
descriptor = myDefaultDescriptor;
}
if (!myLibraryTypes.containsKey(descriptor)) {
myLibraryTypes.put(descriptor, libraryType);
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:CreateModuleLibraryChooser.java
示例2: createLibraryFromFiles
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@Override
public NewLibraryConfiguration createLibraryFromFiles(@NotNull LibraryRootsComponentDescriptor descriptor,
@NotNull JComponent parentComponent,
@Nullable VirtualFile contextDirectory,
LibraryType<?> type,
final Project project) {
final FileChooserDescriptor chooserDescriptor = descriptor.createAttachFilesChooserDescriptor(null);
chooserDescriptor.setTitle("Select Library Files");
final VirtualFile[] rootCandidates = FileChooser.chooseFiles(chooserDescriptor, parentComponent, project, contextDirectory);
if (rootCandidates.length == 0) {
return null;
}
final List<OrderRoot> roots = RootDetectionUtil.detectRoots(Arrays.asList(rootCandidates), parentComponent, project, descriptor);
if (roots.isEmpty()) return null;
String name = suggestLibraryName(roots);
return doCreate(type, name, roots);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:LibraryTypeServiceImpl.java
示例3: LibraryTreeStructure
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
public LibraryTreeStructure(LibraryRootsComponent parentElement, LibraryRootsComponentDescriptor componentDescriptor) {
myParentEditor = parentElement;
myComponentDescriptor = componentDescriptor;
myRootElement = new Object();
myRootElementDescriptor = new NodeDescriptor(null, null) {
@Override
public boolean update() {
myName = ProjectBundle.message("library.root.node");
return false;
}
@Override
public Object getElement() {
return myRootElement;
}
};
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:LibraryTreeStructure.java
示例4: LibraryTreeStructure
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
public LibraryTreeStructure(LibraryRootsComponent parentElement, LibraryRootsComponentDescriptor componentDescriptor) {
myParentEditor = parentElement;
myComponentDescriptor = componentDescriptor;
myRootElementDescriptor = new NodeDescriptor(null, null) {
@RequiredDispatchThread
@Override
public boolean update() {
myName = ProjectBundle.message("library.root.node");
return false;
}
@Override
public Object getElement() {
return this;
}
};
}
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:LibraryTreeStructure.java
示例5: createLibraryFromFiles
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@Override
public NewLibraryConfiguration createLibraryFromFiles(@Nonnull LibraryRootsComponentDescriptor descriptor,
@Nonnull JComponent parentComponent,
@Nullable VirtualFile contextDirectory,
LibraryType<?> type,
final Project project) {
final FileChooserDescriptor chooserDescriptor = descriptor.createAttachFilesChooserDescriptor(null);
chooserDescriptor.setTitle("Select Library Files");
final VirtualFile[] rootCandidates = FileChooser.chooseFiles(chooserDescriptor, parentComponent, project, contextDirectory);
if (rootCandidates.length == 0) {
return null;
}
final List<OrderRoot> roots = RootDetectionUtil.detectRoots(Arrays.asList(rootCandidates), parentComponent, project, descriptor);
if (roots.isEmpty()) return null;
String name = suggestLibraryName(roots);
return doCreate(type, name, roots);
}
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:LibraryTypeServiceImpl.java
示例6: LibraryTreeStructure
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
public LibraryTreeStructure(LibraryRootsComponent parentElement, LibraryRootsComponentDescriptor componentDescriptor) {
myParentEditor = parentElement;
myComponentDescriptor = componentDescriptor;
myRootElementDescriptor = new NodeDescriptor(null, null) {
@Override
public boolean update() {
myName = ProjectBundle.message("library.root.node");
return false;
}
@Override
public Object getElement() {
return this;
}
};
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:LibraryTreeStructure.java
示例7: detectRoots
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@NotNull
public static List<OrderRoot> detectRoots(@NotNull final Collection<VirtualFile> rootCandidates,
@Nullable Component parentComponent,
@Nullable Project project,
@NotNull final LibraryRootsComponentDescriptor rootsComponentDescriptor) {
return detectRoots(rootCandidates, parentComponent, project, rootsComponentDescriptor.getRootsDetector(),
rootsComponentDescriptor.getRootTypes());
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:RootDetectionUtil.java
示例8: FileOrDirectoryDependencyTabContext
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
public FileOrDirectoryDependencyTabContext(Disposable parent, ClasspathPanel panel, StructureConfigurableContext context) {
super(panel, context);
myLibraryTypes = new HashMap<LibraryRootsComponentDescriptor, LibraryType>();
myDefaultDescriptor = new DefaultLibraryRootsComponentDescriptor();
for (LibraryType<?> libraryType : LibraryEditingUtil.getSuitableTypes(myClasspathPanel)) {
LibraryRootsComponentDescriptor descriptor = null;
if (libraryType != null) {
descriptor = libraryType.createLibraryRootsComponentDescriptor();
}
if (descriptor == null) {
descriptor = myDefaultDescriptor;
}
if (!myLibraryTypes.containsKey(descriptor)) {
myLibraryTypes.put(descriptor, libraryType);
}
}
Module module = myClasspathPanel.getRootModel().getModule();
myFileChooserDescriptor = createFileChooserDescriptor();
myFileSystemTree = new FileSystemTreeImpl(module.getProject(), myFileChooserDescriptor);
Disposer.register(parent, myFileSystemTree);
myFileSystemTree.showHiddens(true);
final VirtualFile dirForSelect = ObjectUtil.chooseNotNull(module.getModuleDir(), module.getProject().getBaseDir());
if(dirForSelect != null) {
myFileSystemTree.select(dirForSelect, new Runnable() {
@Override
public void run() {
myFileSystemTree.expand(dirForSelect, null);
}
});
}
}
开发者ID:consulo,项目名称:consulo,代码行数:36,代码来源:FileOrDirectoryDependencyTabContext.java
示例9: createFileChooserDescriptor
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
private FileChooserDescriptor createFileChooserDescriptor() {
final FileChooserDescriptor chooserDescriptor;
final List<Pair<LibraryRootsComponentDescriptor, FileChooserDescriptor>> descriptors =
new ArrayList<Pair<LibraryRootsComponentDescriptor, FileChooserDescriptor>>();
for (LibraryRootsComponentDescriptor componentDescriptor : myLibraryTypes.keySet()) {
descriptors.add(Pair.create(componentDescriptor, componentDescriptor.createAttachFilesChooserDescriptor(null)));
}
if (descriptors.size() == 1) {
chooserDescriptor = descriptors.get(0).getSecond();
}
else {
chooserDescriptor = new FileChooserDescriptor(true, true, true, false, true, false) {
@Override
public boolean isFileSelectable(VirtualFile file) {
for (Pair<LibraryRootsComponentDescriptor, FileChooserDescriptor> pair : descriptors) {
if (pair.getSecond().isFileSelectable(file)) {
return true;
}
}
return false;
}
@Override
public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) {
for (Pair<LibraryRootsComponentDescriptor, FileChooserDescriptor> pair : descriptors) {
if (pair.getSecond().isFileVisible(file, showHiddenFiles)) {
return true;
}
}
return false;
}
};
}
chooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, myClasspathPanel.getRootModel().getModule());
return chooserDescriptor;
}
开发者ID:consulo,项目名称:consulo,代码行数:37,代码来源:FileOrDirectoryDependencyTabContext.java
示例10: detectRoots
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@Nonnull
public static List<OrderRoot> detectRoots(@Nonnull final Collection<VirtualFile> rootCandidates,
@Nullable Component parentComponent,
@Nullable Project project,
@Nonnull final LibraryRootsComponentDescriptor rootsComponentDescriptor) {
return detectRoots(rootCandidates, parentComponent, project, rootsComponentDescriptor.getRootsDetector(),
rootsComponentDescriptor.getRootTypes());
}
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:RootDetectionUtil.java
示例11: createLibraryFromFiles
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@Nullable
public abstract NewLibraryConfiguration createLibraryFromFiles(@NotNull LibraryRootsComponentDescriptor descriptor,
@NotNull JComponent parentComponent,
@Nullable VirtualFile contextDirectory,
@Nullable LibraryType<?> type,
final @Nullable Project project);
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:LibraryTypeService.java
示例12: createLibraryRootsComponentDescriptor
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
/**
* Override this method to customize the library roots editor
* @return {@link com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor} instance
*/
@Nullable
public LibraryRootsComponentDescriptor createLibraryRootsComponentDescriptor() {
return null;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:LibraryType.java
示例13: createLibraryRootsComponentDescriptor
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@NotNull
@Override
public LibraryRootsComponentDescriptor createLibraryRootsComponentDescriptor() {
return new DLangLibraryRootsComponentDescriptor();
}
开发者ID:shekn-itrtch,项目名称:DLangPlugin,代码行数:6,代码来源:DLangLibraryType.java
示例14: createLibraryRootsComponentDescriptor
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@NotNull
@Override
public LibraryRootsComponentDescriptor createLibraryRootsComponentDescriptor() {
return new HaxeLibraryRootsComponentDescriptor();
}
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:6,代码来源:HaxeLibraryType.java
示例15: createLibraryFromFiles
import com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor; //导入依赖的package包/类
@Nullable
public abstract NewLibraryConfiguration createLibraryFromFiles(@Nonnull LibraryRootsComponentDescriptor descriptor,
@Nonnull JComponent parentComponent,
@Nullable VirtualFile contextDirectory,
@Nullable LibraryType<?> type,
final @Nullable Project project);
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:LibraryTypeService.java
注:本文中的com.intellij.openapi.roots.libraries.ui.LibraryRootsComponentDescriptor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论