Java Code Examples for javafx.stage.FileChooser

The following examples show how to use javafx.stage.FileChooser. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: TelegramClone   Source File: HomeController.java    License: MIT License 6 votes vote down vote up
@FXML
void attachFile(MouseEvent event) {
    try {
        FileChooser fileChooser = new FileChooser();
        File imageFile = fileChooser.showOpenDialog(new Stage());
        BufferedImage bufferedImage = ImageIO.read(imageFile);
        Image image = SwingFXUtils.toFXImage(bufferedImage, null);
        currentlySelectedUser.messagesList.add(new MessageViewModel("", getCurrentTime(), false, true, image));
        messagesListView.scrollTo(currentlySelectedUser.messagesList.size());

    } catch (IOException e) {
        e.printStackTrace();
    }


}
 
Example 2
Source Project: Schillsaver   Source File: SettingsController.java    License: MIT License 6 votes vote down vote up
/**
 * Opens a file chooser for the user to select the FFMPEG executable.
 *
 * @return
 *          The file path.
 */
private String selectFfmpegExecutablePath() {
    final var fileChooser = new FileChooser();
    fileChooser.setTitle("FFMPEG Executable Selection");
    fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));

    final File selectedFile = fileChooser.showOpenDialog(SceneManager.getInstance().getStage());

    if (selectedFile != null) {
        if (selectedFile.exists()) {
            return selectedFile.getPath();
        }
    }

    return "";
}
 
Example 3
Source Project: latexdraw   Source File: NewDrawingTest.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void commonCanDoFixture() {
	final SystemUtils utils = Mockito.mock(SystemUtils.class);
	Mockito.when(utils.getPathTemplatesDirUser()).thenReturn("");
	SystemUtils.setSingleton(utils);
	ui = Mockito.mock(JfxUI.class);
	statusWidget = Mockito.mock(Label.class);
	progressBar = Mockito.mock(ProgressBar.class);
	mainstage = Mockito.mock(Stage.class);
	file = Mockito.mock(File.class);
	modifiedAlert = Mockito.mock(Alert.class);
	openSaveManager = Mockito.mock(OpenSaver.class);
	fileChooser = Mockito.mock(FileChooser.class);
	currentFolder = Optional.empty();

	cmd = new NewDrawing(file, openSaveManager, progressBar, statusWidget, ui, fileChooser, currentFolder, mainstage, modifiedAlert);
}
 
Example 4
Source Project: java-ml-projects   Source File: App.java    License: Apache License 2.0 6 votes vote down vote up
private Parent buildUI() {
	fc = new FileChooser();
	fc.getExtensionFilters().clear();
	ExtensionFilter jpgFilter = new ExtensionFilter("JPG, JPEG images", "*.jpg", "*.jpeg", "*.JPG", ".JPEG");
	fc.getExtensionFilters().add(jpgFilter);
	fc.setSelectedExtensionFilter(jpgFilter);
	fc.setTitle("Select a JPG image");
	lstLabels = new ListView<>();
	lstLabels.setPrefHeight(200);
	Button btnLoad = new Button("Select an Image");
	btnLoad.setOnAction(e -> validateUrlAndLoadImg());

	HBox hbBottom = new HBox(10, btnLoad);
	hbBottom.setAlignment(Pos.CENTER);

	loadedImage = new ImageView();
	loadedImage.setFitWidth(300);
	loadedImage.setFitHeight(250);
	
	Label lblTitle = new Label("Label image using TensorFlow");
	lblTitle.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, 40));
	VBox root = new VBox(10,lblTitle, loadedImage, new Label("Results:"), lstLabels, hbBottom);
	root.setAlignment(Pos.TOP_CENTER);
	return root;
}
 
Example 5
Source Project: KorgPackage   Source File: MainController.java    License: GNU General Public License v3.0 6 votes vote down vote up
public void savePkgAction() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setInitialDirectory(lastFileChooserPath);
    fileChooser.setTitle("Save PKG/UPD File");
    fileChooser.getExtensionFilters().addAll(
            new FileChooser.ExtensionFilter("PKG/UPD file", "*.pkg", "*.upd"),
            new FileChooser.ExtensionFilter("All files", "*.*")
    );
    File file = fileChooser.showSaveDialog(stage);
    if (file != null) {
        lastFileChooserPath = file.getParentFile();
        PackageWriter packageWriter = new PackageWriter(file);
        List<Chunk> chunks = new ArrayList<>(chunksListView.getItems());
        packageWriter.save(chunks);
        statusLabel.setText("Finished saving package");
    }
}
 
Example 6
Source Project: pcgen   Source File: OutputPanel.java    License: GNU Lesser General Public License v2.1 6 votes vote down vote up
private void onOutputSheetEqSetButton(final ActionEvent actionEvent)
{
	FileChooser fileChooser = new FileChooser();
	fileChooser.setTitle(LanguageBundle.getString("in_Prefs_templateEqSetTitle"));
	fileChooser.setInitialDirectory(new File(ConfigurationSettings.getOutputSheetsDir()));
	fileChooser.setInitialFileName(SettingsHandler.getSelectedEqSetTemplate());
	File newTemplate = GuiUtility.runOnJavaFXThreadNow(() -> fileChooser.showOpenDialog(null));

	if (newTemplate != null)
	{
		if (newTemplate.getName().startsWith("eqsheet"))
		{
			SettingsHandler.setSelectedEqSetTemplate(newTemplate.getAbsolutePath());
		}
		else
		{
			ShowMessageDelegate.showMessageDialog(
					LanguageBundle.getString("in_Prefs_templateEqSetError"), //$NON-NLS-1$
					Constants.APPLICATION_NAME, MessageType.ERROR
			);
		}
	}

	outputSheetEqSet.setText(String.valueOf(SettingsHandler.getSelectedEqSetTemplate()));
}
 
Example 7
Source Project: pmd-designer   Source File: ControlUtil.java    License: BSD 2-Clause "Simplified" License 6 votes vote down vote up
public static void saveToFileButton(Button button, Stage popupStage, Supplier<String> content, ApplicationComponent owner, Supplier<String> initialFileName) {
    button.setOnAction(e -> {

        FileChooser chooser = new FileChooser();
        chooser.setInitialFileName(initialFileName.get());
        chooser.setTitle("Write to a file");
        File file = chooser.showSaveDialog(popupStage);

        if (file != null) {

            try (OutputStream is = Files.newOutputStream(file.toPath());
                 Writer out = new BufferedWriter(new OutputStreamWriter(is))) {

                out.write(content.get());
                SimplePopups.showActionFeedback(button, AlertType.CONFIRMATION, "File saved");

            } catch (IOException ex) {
                owner.logUserException(ex, Category.TEST_EXPORT_EXCEPTION);
            }
        }
    });
}
 
Example 8
private File chooseFile() {
  FileChooser fileChooser = new FileChooser();
  fileChooser.setTitle("Please select a file containing project parameter values for files.");
  fileChooser.getExtensionFilters().addAll(
          new FileChooser.ExtensionFilter("All Files","*.*"),
          new FileChooser.ExtensionFilter("text","*.txt"),
          new FileChooser.ExtensionFilter("csv","*.csv")
          );

  File currentFile = currentProject.getProjectFile();
  if (currentFile != null) {
    File currentDir = currentFile.getParentFile();
    if ((currentDir != null) && (currentDir.exists()))
      fileChooser.setInitialDirectory(currentDir);
  }
  return fileChooser.showOpenDialog(currentStage.getScene().getWindow());
}
 
Example 9
@Override
public void actionPerformed(ActionEvent e)
{
	FileChooser fileChooser = new FileChooser();
	fileChooser.setInitialDirectory(new File(PCGenSettings.getPortraitsDir()));
	fileChooser.setTitle(LanguageBundle.getString("in_loadPortrait"));

	// TODO: set extension filter - list of supported images

	File file = GuiUtility.runOnJavaFXThreadNow(() ->
			fileChooser.showOpenDialog(null));
	if (file != null)
	{
		character.setPortrait(file);
	}
}
 
Example 10
@Override
public ExitCode showSetupDialog(boolean valueCheckRequired) {

  FileChooser fileChooser = new FileChooser();
  fileChooser.setTitle("Open MZmine project");
  fileChooser.getExtensionFilters().addAll(filters);

  File currentFile = getParameter(projectFile).getValue();
  if (currentFile != null) {
    File currentDir = currentFile.getParentFile();
    if ((currentDir != null) && (currentDir.exists()))
      fileChooser.setInitialDirectory(currentDir);
  }

  File selectedFile = fileChooser.showOpenDialog(null);
  if (selectedFile == null)
    return ExitCode.CANCEL;
  getParameter(projectFile).setValue(selectedFile);

  return ExitCode.OK;

}
 
Example 11
Source Project: FlyingAgent   Source File: DetailPCController.java    License: Apache License 2.0 6 votes vote down vote up
@FXML
private void onExport() {
    if(areaMoreInfo.getText() == null || areaMoreInfo.getText().trim().isEmpty())
        return;

    FileChooser fileChooser = new FileChooser();
    FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("Text files (*.txt)", "*.txt");
    fileChooser.getExtensionFilters().add(extFilter);

    File selectedFile = fileChooser.showSaveDialog(areaMoreInfo.getScene().getWindow());
    if(selectedFile != null) {
        try {
            FileWriter fileWriter = new FileWriter(selectedFile);
            fileWriter.write(areaMoreInfo.getText().trim());
            fileWriter.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
 
Example 12
public void importDataAction() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Open File");
    fileChooser.getExtensionFilters().addAll(
            new FileChooser.ExtensionFilter("All files", "*.*")
    );
    File file = fileChooser.showOpenDialog(stage);
    if (file != null) {
        try {
            FileInputStream fileInputStream = new FileInputStream(file);
            data = new byte[(int) file.length()];
            fileInputStream.read(data, 0, (int) file.length());
            fileInputStream.close();
        } catch (IOException e) {
            System.err.println(e.getMessage());
        }
    }
}
 
Example 13
Source Project: SIMVA-SoS   Source File: ChartViewer.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * A handler for the export to JPEG option in the context menu.
 */
private void handleExportToJPEG() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Export to JPEG");
    fileChooser.setSelectedExtensionFilter(new FileChooser.ExtensionFilter(
            "JPEG", "jpg"));
    File file = fileChooser.showSaveDialog(this.getScene().getWindow());
    if (file != null) {
        try {
            ExportUtils.writeAsJPEG(this.chart, (int) getWidth(),
                    (int) getHeight(), file);
        } catch (IOException ex) {
            // FIXME: show a dialog with the error
        }
    }        
}
 
Example 14
Source Project: tcMenu   Source File: CurrentProjectEditorUIImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public Optional<String> findFileNameFromUser(boolean open) {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Choose a Menu File");
    fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("Embedded menu", "*.emf"));
    installer.getArduinoDirectory().ifPresent(path-> fileChooser.setInitialDirectory(path.toFile()));
    File f;
    if (open) {
        f = fileChooser.showOpenDialog(mainStage);
    } else {
        f = fileChooser.showSaveDialog(mainStage);
    }

    if (f != null) {
        return Optional.of(f.getPath());
    }
    return Optional.empty();
}
 
Example 15
Source Project: OEE-Designer   Source File: FileTrendController.java    License: MIT License 6 votes vote down vote up
@FXML
private void onBrowseFile() {
	// show file chooser
	FileChooser fileChooser = new FileChooser();

	if (initialDirectory != null) {
		fileChooser.setInitialDirectory(initialDirectory);
	}
	File selectedFile = fileChooser.showOpenDialog(null);

	if (selectedFile == null) {
		return;
	}
	initialDirectory = selectedFile.getParentFile();

	tfFilePath.setUserData(selectedFile);
	tfFilePath.setText(selectedFile.getAbsolutePath());
}
 
Example 16
Source Project: FXTutorials   Source File: EditorController.java    License: MIT License 6 votes vote down vote up
@FXML
private void onLoad() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setInitialDirectory(new File("./"));
    File file = fileChooser.showOpenDialog(null);
    if (file != null) {
        IOResult<TextFile> io = model.load(file.toPath());

        if (io.isOk() && io.hasData()) {
            currentTextFile = io.getData();

            areaText.clear();
            currentTextFile.getContent().forEach(line -> areaText.appendText(line + "\n"));
        } else {
            System.out.println("Failed");
        }
    }
}
 
Example 17
Source Project: AsciidocFX   Source File: DirectoryService.java    License: Apache License 2.0 6 votes vote down vote up
@Autowired
public DirectoryService(final ApplicationController controller, final FileBrowseService fileBrowser, final Current current, PathResolverService pathResolver, StoredConfigBean storedConfigBean, FileWatchService fileWatchService, ThreadService threadService, PathMapper pathMapper) {
    this.controller = controller;
    this.fileBrowser = fileBrowser;
    this.current = current;
    this.pathResolver = pathResolver;
    this.storedConfigBean = storedConfigBean;
    this.fileWatchService = fileWatchService;
    this.threadService = threadService;
    this.pathMapper = pathMapper;

    pathSaveSupplier = () -> {
        final FileChooser chooser = newFileChooser("Save Document");
        chooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Asciidoc", "*.adoc", "*.asciidoc", "*.asc", "*.ad", "*.txt", "*.*"));
        chooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Markdown", "*.md", "*.markdown", "*.txt", "*.*"));
        File file = chooser.showSaveDialog(null);
        return Objects.nonNull(file) ? file.toPath() : null;
    };

}
 
Example 18
Source Project: pcgen   Source File: PCGenFrame.java    License: GNU Lesser General Public License v2.1 6 votes vote down vote up
void showOpenPartyChooser()
{
	PropertyContext context = PCGenSettings.getInstance();
	FileChooser fileChooser = new FileChooser();
	fileChooser.setTitle("Open PCGen Party File");
	fileChooser.setInitialDirectory(new File(context.getProperty(PCGenSettings.PCP_SAVE_PATH)));

	FileChooser.ExtensionFilter extensionFilter = new FileChooser.ExtensionFilter(
			"party files only", "*.pcp"
	);
	fileChooser.getExtensionFilters().add(extensionFilter);
	fileChooser.setSelectedExtensionFilter(extensionFilter);

	File file = GuiUtility.runOnJavaFXThreadNow(() ->
			fileChooser.showOpenDialog(null));
	if (file != null)
	{
		loadPartyFromFile(file);
	}
}
 
Example 19
Source Project: MyBox   Source File: ImageManufactureController.java    License: Apache License 2.0 6 votes vote down vote up
@FXML
    public void selectReference() {
        try {
            final FileChooser fileChooser = new FileChooser();
            File path = AppVariables.getUserConfigPath(sourcePathKey);
            if (path.exists()) {
                fileChooser.setInitialDirectory(path);
            }
            fileChooser.getExtensionFilters().addAll(sourceExtensionFilter);
            File file = fileChooser.showOpenDialog(getMyStage());
            if (file == null) {
                return;
            }
            referenceSelected(file);

        } catch (Exception e) {
//            logger.error(e.toString());
        }
    }
 
Example 20
@FXML
private void loadNeuralNetwork(ActionEvent event) {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Open Resource File");

    fileChooser.setSelectedExtensionFilter(new FileChooser.ExtensionFilter("Neural Nets", "*.nnet"));
    nnFile = fileChooser.showOpenDialog(rootPane.getScene().getWindow());

    if (nnFile == null) {
        Calert.showAlert("Error", "Not a valid neural network", Alert.AlertType.ERROR);
        return;
    }

    System.out.println("Training Neural " + nnFile.getAbsolutePath());
    nnIndicator.setSelected(true);
}
 
Example 21
@Override
public void actionPerformed(ActionEvent e)
{
	FileChooser fileChooser = new FileChooser();
	fileChooser.setInitialDirectory(new File(PCGenSettings.getPortraitsDir()));
	fileChooser.setTitle(LanguageBundle.getString("in_loadPortrait"));

	// TODO: set extension filter - list of supported images

	File file = GuiUtility.runOnJavaFXThreadNow(() ->
			fileChooser.showOpenDialog(null));
	if (file != null)
	{
		character.setPortrait(file);
	}
}
 
Example 22
Source Project: Notebook   Source File: FileUtils.java    License: Apache License 2.0 6 votes vote down vote up
public static File chooseFile(){

		FileChooser fileChooser = new FileChooser();
        fileChooser.setTitle("��ѡ���ļ�");
        if(justVisitedDir == null) {
        	// ���ó�ʼĿ¼
            fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));
        } else {
            fileChooser.setInitialDirectory(justVisitedDir);
        }

        fileChooser.getExtensionFilters().addAll(new ExtensionFilter[]{new ExtensionFilter("Image Files", new String[]{"*.png", "*.jpg", "*.jpeg", "*.gif", "*.bmp"}), new ExtensionFilter("JPG", new String[]{"*.jpg"}), new ExtensionFilter("JPEG", new String[]{"*.jpeg"}), new ExtensionFilter("BMP", new String[]{"*.bmp"}), new ExtensionFilter("PNG", new String[]{"*.png"}), new ExtensionFilter("GIF", new String[]{"*.gif"})});
        File file = fileChooser.showOpenDialog(null);
        if(file != null){
        	justVisitedDir = file.getParentFile();
        }
        return file;
	}
 
Example 23
public void importDataAction() {
    FileChooser fileChooser = new FileChooser();
    fileChooser.setTitle("Open File");
    fileChooser.getExtensionFilters().addAll(
            new FileChooser.ExtensionFilter("All files", "*.*")
    );
    File file = fileChooser.showOpenDialog(stage);
    if (file != null) {
        try {
            FileInputStream fileInputStream = new FileInputStream(file);
            data = new byte[(int) file.length()];
            fileInputStream.read(data, 0, (int) file.length());
            fileInputStream.close();
        } catch (IOException e) {
            System.err.println(e.getMessage());
        }
    }
}
 
Example 24
Source Project: MyBox   Source File: ImageManufacturePaneController.java    License: Apache License 2.0 6 votes vote down vote up
@FXML
public void selectOutlineFile() {
    try {
        final FileChooser fileChooser = new FileChooser();
        File path = AppVariables.getUserConfigPath(sourcePathKey);
        if (path.exists()) {
            fileChooser.setInitialDirectory(path);
        }
        fileChooser.getExtensionFilters().addAll(CommonFxValues.AlphaImageExtensionFilter);
        final File file = fileChooser.showOpenDialog(getMyStage());
        if (file == null) {
            return;
        }
        recordFileOpened(file);
        loadOutlineSource(file);
    } catch (Exception e) {
        logger.error(e.toString());
    }
}
 
Example 25
Source Project: old-mzmine3   Source File: FileNameEditor.java    License: GNU General Public License v2.0 5 votes vote down vote up
public FileNameEditor(PropertySheet.Item parameter) {
  if (!(parameter instanceof FileNameParameter))
    throw new IllegalArgumentException();

  this.fileNameParameter = (FileNameParameter) parameter;

  // The text field
  this.textField = new TextField();
  setCenter(textField);

  // The Browse button
  browseButton = new Button("Browse");
  browseButton.setFocusTraversable(false);
  setRight(browseButton);
  setMargin(browseButton, new Insets(0, 0, 0, 10.0));
  browseButton.setOnAction(e -> {
    List<FileChooser.ExtensionFilter> extensions = fileNameParameter.getExtensions();
    FileChooser fileChooser = new FileChooser();
    File lastOpenPath = fileNameParameter.getLastOpenPath();
    if (lastOpenPath != null)
      fileChooser.setInitialDirectory(lastOpenPath);
    fileChooser.setTitle("Find file");
    if (extensions != null) {
      fileChooser.getExtensionFilters().addAll(extensions);
    }
    Window parentWindow = this.getScene().getWindow();
    File selectedFile;

    if (fileNameParameter.getFileNameParameterType() == FileNameParameter.Type.OPEN)
      selectedFile = fileChooser.showOpenDialog(parentWindow);
    else
      selectedFile = fileChooser.showSaveDialog(parentWindow);
    if (selectedFile != null) {
      textField.setText(selectedFile.getPath());
      File parentDir = selectedFile.getParentFile();
      fileNameParameter.setLastOpenPath(parentDir);
    }
  });

}
 
Example 26
Source Project: constellation   Source File: TableViewUtilities.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Write data from the given table to a CSV file.
 *
 * @param table the table to retrieve data from.
 * @param selectedOnly if true, only the data from selected rows in the
 * table will be included in the output file.
 */
public static void exportToCsv(final TableView<ObservableList<String>> table, final boolean selectedOnly) {
    Platform.runLater(() -> {
        final FileChooser fileChooser = new FileChooser();
        final ExtensionFilter csvFilter = new ExtensionFilter("CSV files", "*.csv");
        fileChooser.getExtensionFilters().add(csvFilter);
        final File csvFile = fileChooser.showSaveDialog(null);
        if (csvFile != null) {
            PluginExecution.withPlugin(new ExportToCsvFilePlugin(csvFile, table, selectedOnly)).executeLater(null);
        }
    });
}
 
Example 27
public static void onConnectFileSourceCamera() {
	 Platform.runLater(()->{});
	 
	FileChooser fileChooser = new FileChooser();
	fileChooser.setTitle("Open Image File");
	File f = fileChooser.showOpenDialog(BowlerStudioModularFrame.getPrimaryStage());
	if(f!=null){
		AbstractImageProvider p = new StaticFileProvider(f);
		String name = "image";
		addConnection(p,name);
	}
}
 
Example 28
private void onSelectFileClicked() {
    FileChooser chooser = new FileChooser();
    chooser.setTitle("Add files to the auxilliary classpath");
    chooser.getExtensionFilters().addAll(
            new FileChooser.ExtensionFilter("Java archives", "*.jar", "*.war", "*.ear"),
            new FileChooser.ExtensionFilter("Java class files", "*.class")
    );
    List<File> files = chooser.showOpenMultipleDialog(designerRoot.getMainStage());
    fileListView.getItems().addAll(files);
}
 
Example 29
Source Project: latexdraw   Source File: NewDrawing.java    License: GNU General Public License v3.0 5 votes vote down vote up
public NewDrawing(final @Nullable File file, final @NotNull OpenSaver<Label> openSaveManager, final @NotNull ProgressBar progressBar,
	final @NotNull Label statusWidget, final @NotNull JfxUI ui, final @NotNull FileChooser fileChooser, final @NotNull Optional<File> currentFolder,
	final @NotNull Stage mainstage, final @NotNull Alert modifiedAlert) {
	super(file, openSaveManager, progressBar, statusWidget, ui);
	this.fileChooser = fileChooser;
	this.currentFolder = currentFolder;
	this.mainstage = mainstage;
	this.modifiedAlert = modifiedAlert;
}
 
Example 30
Source Project: arma-dialog-creator   Source File: ADCProjectInitWindow.java    License: MIT License 5 votes vote down vote up
public ImportTab() {
	VBox root = getTabVbox(20);
	Label lblImportProject = new Label(bundle.getString("import_project_title"));
	Label lblLocateDesc = new Label(bundle.getString("locate_description_ext_tip"));
	lblLocateDesc.setWrapText(true);

	Button btnLocate = new Button(bundle.getString("locate_description_ext"));
	btnLocate.setOnAction(event -> {
		FileChooser fc = new FileChooser();
		fc.getExtensionFilters().add(ADCStatic.DESCRIPTION_EXT);
		File descExt = fc.showOpenDialog(projectInitWindow.myStage);
		if (descExt == null) {
			return;
		}
		ImportDialogsDialog d = new ImportDialogsDialog(projectInitWindow, projectInitWindow.getWorkspace().getWorkspaceDirectory(), descExt);
		d.show();
		if (d.wasCancelled()) {
			return;
		}
		throw new UnsupportedOperationException();
		//projectInit = d.getProjectInit();
		//projectInitWindow.forceOkProperty.set(true);
		//projectInitWindow.ok();

	});
	ScrollPane scrollPaneDesc = new ScrollPane(lblLocateDesc);
	scrollPaneDesc.setFitToWidth(true);
	root.getChildren().addAll(
			lblImportProject,
			new Label(bundle.getString("locate_description_ext_pretip")),
			scrollPaneDesc,
			btnLocate
	);

	tabImport.setContent(root);

	projectConfigSet.updateValue(false);
}