mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Simplify file chooser API; fix EA-35601
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -252,7 +252,7 @@ public class ExternalAnnotationsManagerImpl extends ExternalAnnotationsManager {
|
||||
final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||||
descriptor.setTitle(ProjectBundle.message("external.annotations.root.chooser.title", entry.getPresentableName()));
|
||||
descriptor.setDescription(ProjectBundle.message("external.annotations.root.chooser.description"));
|
||||
final VirtualFile file = FileChooser.chooseFile(project, descriptor);
|
||||
final VirtualFile file = FileChooser.chooseFile(descriptor, project, null);
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,7 +78,7 @@ public class MoveClassesOrPackagesToNewDirectoryDialog extends DialogWrapper {
|
||||
final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||||
myDestDirectoryField.getButton().addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
final VirtualFile file = FileChooser.chooseFile(myDirectory.getProject(), descriptor, directory.getVirtualFile());
|
||||
final VirtualFile file = FileChooser.chooseFile(descriptor, myDirectory.getProject(), directory.getVirtualFile());
|
||||
if (file != null) {
|
||||
myDestDirectoryField.setText(FileUtil.toSystemDependentName(file.getPath()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user