是否有用于文件浏览器对话框按钮的 Eclipse 插件?

Is there a Eclipse plugin for a File Browser Dialog button?

我已经在网上搜索了一段时间,但还没有找到制作按钮的简单解决方案,该按钮可以在 Eclipse 程序中打开文件浏览对话框。我现在正在使用 WindowBuilder,这对我来说似乎很奇怪,必须做很多事情才能在他们的 GUI 中添加一个简单的 "Browse..." 按钮。

希望有人能帮我解决这个问题,谢谢!

我使用这个代码:

 private Button browse;
   browse = new Button(outerGroup, SWT.PUSH);
        browse.setText("Browse ...");
        browse.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,1,0));
        browse.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                DirectoryDialog dialog = new DirectoryDialog(shell, SWT.NULL);
                String path = dialog.open();
                if (path != null) {
                    //do stuff with path
                }
            }

        });