當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。