当前位置: 首页>>代码示例>>Java>>正文


Java FileChooserDescriptorFactory.createSingleFileDescriptor方法代码示例

本文整理汇总了Java中com.intellij.openapi.fileChooser.FileChooserDescriptorFactory.createSingleFileDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java FileChooserDescriptorFactory.createSingleFileDescriptor方法的具体用法?Java FileChooserDescriptorFactory.createSingleFileDescriptor怎么用?Java FileChooserDescriptorFactory.createSingleFileDescriptor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.fileChooser.FileChooserDescriptorFactory的用法示例。


在下文中一共展示了FileChooserDescriptorFactory.createSingleFileDescriptor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OpenBlazeWorkspaceFileActionDialog

import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory; //导入方法依赖的package包/类
OpenBlazeWorkspaceFileActionDialog(
    Project project, WorkspacePathResolver workspacePathResolver) {
  super(project, /* canBeParent */ false, IdeModalityType.PROJECT);
  this.project = project;

  component = new JPanel(new GridBagLayout());
  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileDescriptor();
  fileTextField =
      WorkspaceFileTextField.create(
          workspacePathResolver, descriptor, PATH_FIELD_WIDTH, myDisposable);

  component.add(new JBLabel("Path:"));
  component.add(fileTextField.getField(), UiUtil.getFillLineConstraints(0));

  UiUtil.fillBottom(component);
  init();
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:18,代码来源:OpenBlazeWorkspaceFileAction.java

示例2: chooseFile

import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory; //导入方法依赖的package包/类
public static VirtualFile chooseFile(@Nullable Project project, String title, String description, boolean showFileSystemRoots, boolean hideIgnored, @Nullable VirtualFile toSelect){
    final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileDescriptor();
    descriptor.setTitle(title);
    descriptor.setDescription(description);
    descriptor.setShowFileSystemRoots(showFileSystemRoots);
    descriptor.setHideIgnored(hideIgnored);
    return FileChooser.chooseFile(descriptor, project, toSelect);
}
 
开发者ID:hykes,项目名称:CodeGen,代码行数:9,代码来源:PsiUtil.java

示例3: getFile

import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory; //导入方法依赖的package包/类
@Nullable
@Override
public VirtualFile getFile(@NotNull Project project) {
  final FileChooserDescriptor xmlDescriptor = FileChooserDescriptorFactory.createSingleFileDescriptor(StdFileTypes.XML);
  xmlDescriptor.setTitle("Choose a File with Tests Result");
  return FileChooser.chooseFile(xmlDescriptor, project, null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ImportTestsFromFileAction.java

示例4: createUIComponents

import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory; //导入方法依赖的package包/类
private void createUIComponents() {
    textField = new JTextField();
    browseFilesListener = new BrowseFilesListener(textField, "Select Directory for Default Grav Installation", "", FileChooserDescriptorFactory.createSingleFileDescriptor());
    fieldPanel = ModuleWizardStep.createFieldPanel(textField, "", browseFilesListener);
}
 
开发者ID:PioBeat,项目名称:GravSupport,代码行数:6,代码来源:ApplicationConfigForm.java

示例5: getGradleProjectFileChooserDescriptor

import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory; //导入方法依赖的package包/类
/**
 * Allows to retrieve file chooser descriptor that filters gradle scripts.
 * <p/>
 * <b>Note:</b> we want to fall back to the standard {@link FileTypeDescriptor} when dedicated gradle file type
 * is introduced (it's processed as groovy file at the moment). We use open project descriptor here in order to show
 * custom gradle icon at the file chooser ({@link icons.GradleIcons#Gradle}, is used at the file chooser dialog via
 * the dedicated gradle project open processor).
 */
@NotNull
public static FileChooserDescriptor getGradleProjectFileChooserDescriptor() {
  return FileChooserDescriptorFactory.createSingleFileDescriptor(GradleConstants.EXTENSION);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:GradleUtil.java


注:本文中的com.intellij.openapi.fileChooser.FileChooserDescriptorFactory.createSingleFileDescriptor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。