Examples of DirectoryDialog


Examples of org.eclipse.swt.widgets.DirectoryDialog

   */
  private static String getLibraryLocation() {
    IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
    String libraryLocation = preferenceStore.getString(LOCATION_KEY);
    while (true) {
      DirectoryDialog directoryDialog = new DirectoryDialog(DesignerPlugin.getShell());
      directoryDialog.setText("Ext GWT Location");
      directoryDialog.setMessage("Choose folder with extracted Ext GWT, it should have gxt.jar file.\n"
          + "You can download it from http://www.extjs.com/products/gxt/");
      directoryDialog.setFilterPath(libraryLocation);
      libraryLocation = directoryDialog.open();
      // cancel
      if (libraryLocation == null) {
        return null;
      }
      // check for "gxt.jar" file
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

        dialog.setBlockOnOpen(true);
        dialog.open();

        updateHadoopDirLabelFromPreferences();
      } else if (e.getSource() == browse) {
        DirectoryDialog dialog = new DirectoryDialog(this.getShell());
        dialog
            .setMessage("Select a hadoop installation, containing hadoop-X-core.jar");
        dialog.setText("Select Hadoop Installation Directory");
        String directory = dialog.open();

        if (directory != null) {
          location.setText(directory);

          if (!validateHadoopLocation()) {
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

   */
  private void put(IStructuredSelection selection) throws SftpException,
      JSchException, InvocationTargetException, InterruptedException {

    // Ask the user which local directory to upload
    DirectoryDialog dialog =
        new DirectoryDialog(Display.getCurrent().getActiveShell());
    dialog.setText("Copy from local directory");
    dialog.setMessage("Copy the local directory"
        + " to the selected directories on the distributed filesystem");
    String directory = dialog.open();

    if (directory == null)
      return;

    for (DfsFolder folder : filterSelection(DfsFolder.class, selection))
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

   */
  private void get(IStructuredSelection selection) throws SftpException,
      JSchException {

    // Ask the user where to put the downloaded files
    DirectoryDialog dialog =
        new DirectoryDialog(Display.getCurrent().getActiveShell());
    dialog.setText("Copy to local directory");
    dialog.setMessage("Copy the selected files and directories from the "
        + "distributed filesystem to a local directory");
    String directory = dialog.open();

    if (directory == null)
      return;

    for (DfsPath path : filterSelection(DfsPath.class, selection)) {
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

   
    private void handleBrowse(){
     
      boolean location = locationSelectCheckBox.getSelection();
    if (!location) {
      DirectoryDialog dialog = new DirectoryDialog(this.getShell());
      String returnString = dialog.open();
      if (returnString != null) {
        outputFolderTextBox.setText(returnString);
      }
    } else {
      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
     
      ContainerSelectionDialog dialog = new ContainerSelectionDialog(
          getShell(),
          root,
          false,
          CodegenWizardPlugin
              .getResourceString("page3.containerbox.title"));
      if (dialog.open() == ContainerSelectionDialog.OK) {
        Object[] result = dialog.getResult();
        if (result.length == 1) {
          Path path = ((Path) result[0]);
          // append to the workspace path
          if (root.exists(path)) {
            outputFolderTextBox.setText(root.getLocation().append(path)
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

   *
   */
  private void handleBrowse() {
    boolean location = locationSelectCheckBox.getSelection();
    if (!location) {
      DirectoryDialog dialog = new DirectoryDialog(this.getShell());
      String returnString = dialog.open();
      if (returnString != null) {
        outputLocation.setText(returnString);
      }
    } else {
      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
     
      ContainerSelectionDialog dialog = new ContainerSelectionDialog(
          getShell(),
          root,
          false,
          CodegenWizardPlugin
              .getResourceString("page3.containerbox.title"));
      if (dialog.open() == ContainerSelectionDialog.OK) {
        Object[] result = dialog.getResult();
        if (result.length == 1) {
          Path path = ((Path) result[0]);
          // append to the workspace path
          if (root.exists(path)) {
            outputLocation.setText(root.getLocation().append(path)
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

    /**
     * Pops up the file browse dialog box
     * 
     */
    private void handleDirectoryBrowse() {
        DirectoryDialog fileDialog = new DirectoryDialog(this.getShell());
        String dirName = fileDialog.open();
        if (dirName != null) {
          javaClasspathList.add(dirName);
          updateListEntries();
        }
        updateStatusTextField(false,"");
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

      button.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent arg0) {

          if (modi == MODI.DIRECTORIES_ONLY) {
            DirectoryDialog dialog = new DirectoryDialog(button
                .getShell(), SWT.OPEN);
            dialog.setMessage(title);
            String ret = dialog.open();
            if (ret != null)
              text.setText(ret);

          } else {
            FileDialog dialog = new FileDialog(button.getShell(),
                SWT.OPEN);
            dialog.setFileName(text.getText());
            dialog.setText(title);

            String ret = dialog.open();
            if (ret != null)
              text.setText(ret);

          }
        }
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

        txtExternalLocation.addListener(SWT.Modify, locationListener);

        btnBrowseExternalLocation.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                DirectoryDialog dialog = new DirectoryDialog(getShell());
                String path = dialog.open();
                if (path != null) {
                    String cnf = File.separator + Workspace.CNFDIR;
                    if (!path.endsWith(cnf))
                        path = path + cnf;
                    txtExternalLocation.setText(path);
View Full Code Here

Examples of org.eclipse.swt.widgets.DirectoryDialog

    /**
     * This method is called when the exportMultipleFiles 'browse' button is selected.
     */
    private void chooseFromDirectory()
    {
        DirectoryDialog dialog = new DirectoryDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() );
        dialog.setText( Messages.getString( "ImportSchemasFromOpenLdapWizardPage.ChooseFolder" ) ); //$NON-NLS-1$
        dialog.setMessage( Messages.getString( "ImportSchemasFromOpenLdapWizardPage.SelectFolderToImportFrom" ) ); //$NON-NLS-1$
        if ( "".equals( fromDirectoryText.getText() ) ) //$NON-NLS-1$
        {
            dialog.setFilterPath( Activator.getDefault().getPreferenceStore().getString(
                PluginConstants.FILE_DIALOG_IMPORT_SCHEMAS_OPENLDAP ) );
        }
        else
        {
            dialog.setFilterPath( fromDirectoryText.getText() );
        }

        String selectedDirectory = dialog.open();
        if ( selectedDirectory != null )
        {
            fromDirectoryText.setText( selectedDirectory );
            fillInSchemaFilesTable( selectedDirectory );
        }
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.