本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}