Package com.intellij.openapi.options

Examples of com.intellij.openapi.options.ConfigurationException


            mavenMgr.setMavenHome(ui.mavenHomeField.getText());
            mavenMgr.setMavenOptions(ui.mavenOptionsField.getText());
            mavenMgr.setOffline(ui.offlineCheckBox.isSelected());
        }
        catch (IllegalMavenHomeException e) {
            throw new ConfigurationException(e.getMessage());
        }
    }
View Full Code Here


   */
  public final void apply() throws ConfigurationException
  {
    if (!updateFormData())
    {
      throw new ConfigurationException(
        RevuBundle.message("general.form.hasErrors.text"), RevuBundle.message("general.plugin.title"));
    }

    int itemCount = list.getModel().getSize();
    Map<E, E> items = new HashMap<E, E>(itemCount);
View Full Code Here

      }
      catch (Exception e)
      {
        LOGGER.warn(e);
        final String details = ((e.getLocalizedMessage() == null) ? e.toString() : e.getLocalizedMessage());
        throw new ConfigurationException(
          RevuBundle.message("projectSettings.error.save.title.text", originalReview.getName(), details),
          RevuBundle.message("general.plugin.title"));
      }
    }
View Full Code Here

    }

    public void checkValid(SdkModel sdkModel) throws ConfigurationException {
        // todo: changed in GHC 7?
        if (libPath == null || !new File(libPath, "package.conf.d").exists()) {
            throw new ConfigurationException("Invalid GHC lib directory (should contain 'package.conf.d')");
        }
        String cabal = GHCUtil.getExeName("cabal");
        if (cabalPath == null || !new File(cabalPath).getName().equals(cabal) || !new File(cabalPath).isFile()) {
            throw new ConfigurationException("Please indicate the full " + cabal + " file path");
        }
    }
View Full Code Here

            inputField.selectAll();
            String message = "Input value for \"" + name + "\" must be an integer between " + min + " and " + max + ".";
            if (hint != null) {
                message = message + " " + hint;
            }
            throw new ConfigurationException(message, "Invalid config value");
        }
    }
View Full Code Here

    public static String validateStringInputValue(JTextField inputField, String name, boolean required) throws ConfigurationException {
        String value = inputField.getText().trim();
        if (required && value.length() == 0) {
            String message = "Input value for \"" + name + "\" must be specified";
            throw new ConfigurationException(message, "Invalid config value");
        }
        return value;
    }
View Full Code Here

    }
   
    public void validate() throws ConfigurationException {
        for (EnvironmentType environmentType : environmentTypes) {
            if (StringUtil.isEmpty(environmentType.getName())) {
                throw new ConfigurationException("Please provide names for all environment types.");
            }
        }
    }
View Full Code Here

            inputField.selectAll();
            String message = "Input value for \"" + name + "\" must be an integer between " + min + " and " + max + ".";
            if (hint != null) {
                message = message + " " + hint;
            }
            throw new ConfigurationException(message, "Invalid config value");
        }
    }
View Full Code Here

            String extensionsText = ConfigurationEditorUtil.validateStringInputValue(extensionTextField, fieldName, true);
            extensionTextField.setText(extensionsText);
            List<String> extensions = StringUtil.tokenize(extensionsText, ",");
            for (String extension : extensions) {
                if (allExtensions.contains(extension)) {
                    throw new ConfigurationException("Duplicate value for extension \"" + extension + "\" found.");
                }
            }
            allExtensions.addAll(extensions);
        }
    }
View Full Code Here

        configuration.defaultEncoding = getDefaultEncoding();
        configuration.setSynchronizeNonMembers(this.resyncNonMembers.isSelected());
        try {
            configuration.setDatePattern(validateDatePattern());
        } catch (Exception e) {
            throw new ConfigurationException(
                    "Bad date pattern " + this.datePatternString.getText() + ", must be a valid" +
                            " java dateFormat pattern");

        }
        final List<MksServerInfo> ignoredServersListOld = parseIgnoredServers(configuration.getIgnoredServers());
        final List<MksServerInfo> ignoredServersListNew;
        try {
            ignoredServersListNew = parseIgnoredServers(ignoredServersTA.getText());
        } catch (IllegalArgumentException e) {
            throw new ConfigurationException(e.getMessage());
        }

        for (final MksServerInfo serverInfo : ignoredServersListOld) {
            if (!ignoredServersListNew.contains(serverInfo)) {
                configuration.serverIsSiServer(serverInfo, true);
View Full Code Here

TOP

Related Classes of com.intellij.openapi.options.ConfigurationException

Copyright © 2018 www.massapicom. 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.