• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LibraryRootsComponentDescriptor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AppUser类代码示例发布时间:2022-05-23
下一篇:
Java WorldGenerator类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap