本文整理匯總了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);
}