Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.FileDialog.open()


    browse_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(final SelectionEvent e) {
        FileDialog dialog = new FileDialog (shell, SWT.OPEN);
        dialog.setFilterNames (new String [] {"Server.met(*.met)", "All Files (*.*)"});
        dialog.setFilterExtensions (new String [] {"*.met", "*.*"});
        String result = dialog.open();
        if (result != null)
          file_path.setText(result);
    } });
   
   
View Full Code Here


      search.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
          dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" });
          String file = dialog.open();
          if (file != null)
            fInput.setText(file);
        }
      });

View Full Code Here

    FileDialog dialog = new FileDialog(getSite().getShell(), SWT.SAVE);
    dialog.setOverwrite(true);
    dialog.setFilterExtensions(new String[] { ".html" }); //$NON-NLS-1$
    dialog.setFileName("site.html"); //$NON-NLS-1$

    String fileName = dialog.open();
    if (fileName == null)
      return;

    StringBuilder content = new StringBuilder();
    content.append(fBrowser.getControl().getText());
View Full Code Here

    dialog.setText(Messages.StartupErrorDialog_SAVE_CRASH_REPORT);
    dialog.setFilterExtensions(new String[] { "*.log" }); //$NON-NLS-1$
    dialog.setFileName("rssowl.log"); //$NON-NLS-1$
    dialog.setOverwrite(true);

    String file = dialog.open();
    if (StringUtils.isSet(file)) {
      try {

        /* Check for Log Message from Core to have a complete log */
        String logMessages = CoreUtils.getAndFlushLogMessages();
View Full Code Here

    dialog.setFilterExtensions(filterExtensions.toArray(new String[filterExtensions.size()]));
    if (StringUtils.isSet(fResourceInput.getText()))
      dialog.setFileName(fResourceInput.getText());

    String string = dialog.open();
    if (string != null)
      fResourceInput.setText(string);

    updatePageComplete();
  }
View Full Code Here

  public void run() {
    FileDialog dialog = new FileDialog(fShell, SWT.SAVE);
    dialog.setText("Export all Feeds to OPML");
    dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    dialog.setFileName("feeds.opml");
    String string = dialog.open();
    if (string != null) {
      try {
        File file = new File(string);

        /* Ask for Confirmation if file exists */
 
View Full Code Here

    fCustomBrowserSearchButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
        dialog.setFileName(fCustomBrowserInput.getText());
        String path = dialog.open();
        if (path != null)
          fCustomBrowserInput.setText(path);
      }
    });
View Full Code Here

  @Override
  public void run() {
    FileDialog dialog = new FileDialog(fShell);
    dialog.setText("Import Feeds from OPML");
    dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    String string = dialog.open();
    if (string != null) {
      try {
        Controller.getDefault().importFeeds(string);
      } catch (Exception e) {
        Activator.getDefault().logError(e.getMessage(), e);
View Full Code Here

  public void run() {
    FileDialog dialog = new FileDialog(fShell, SWT.SAVE);
    dialog.setText("Export all Feeds to OPML");
    dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    dialog.setFileName("feeds.opml");
    String string = dialog.open();
    if (string != null) {
      try {
        File file = new File(string);

        /* Ask for Confirmation if file exists */
 
View Full Code Here

  @Override
  public void run() {
    FileDialog dialog = new FileDialog(fShell);
    dialog.setText("Import Feeds from OPML");
    dialog.setFilterExtensions(new String[] { "*.opml", "*.xml", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    String string = dialog.open();
    if (string != null) {
      Controller.getDefault().importFeeds(string);

      /* Force to rerun saved searches */
      JobRunner.runDelayedInBackgroundThread(new Runnable() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.