Package org.eclipse.wst.validation.internal

Examples of org.eclipse.wst.validation.internal.ProjectConfiguration


   * (which is based on current document)
   *
   * @return ProjectConfiguration
   */
  static private ProjectConfiguration getProjectConfiguration(IFile file) {
    ProjectConfiguration projectConfiguration = null;
    if (file != null) {
      IProject project = file.getProject();
      if (project != null) {
        try {
          projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
View Full Code Here


    if (file == null) {
      return true;
    }

    boolean enabled = true;
    ProjectConfiguration configuration = getProjectConfiguration(file);
    if (configuration != null) {
      org.eclipse.wst.validation.internal.ValidatorMetaData metadata = ValidationRegistryReader.getReader().getValidatorMetaData(JSPBatchValidator.class.getName());
      if (configuration != null && metadata != null) {
        if (!configuration.isBuildEnabled(metadata) && !configuration.isManualEnabled(metadata))
          enabled = false;
      }
    }
    return enabled;
  }
View Full Code Here

    ValidationConfiguration configuration = null;
    if (file != null) {
      IProject project = file.getProject();
      if (project != null) {
        try {
          ProjectConfiguration projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
          configuration = projectConfiguration;
          if (projectConfiguration == null || projectConfiguration.useGlobalPreference()) {
            configuration = ConfigurationManager.getManager().getGlobalConfiguration();
          }
        }
        catch (InvocationTargetException e) {
          Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
View Full Code Here

    ValidationConfiguration configuration = null;
    if (file != null) {
      IProject project = file.getProject();
      if (project != null) {
        try {
          ProjectConfiguration projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
          configuration = projectConfiguration;
          if (projectConfiguration == null || projectConfiguration.useGlobalPreference()) {
            configuration = ConfigurationManager.getManager().getGlobalConfiguration();
          }
        }
        catch (InvocationTargetException e) {
          Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
View Full Code Here

        monitor.worked(1);
      }

      // Disable HTML validator
      try {
        ProjectConfiguration projectConfig
          = ConfigurationManager.getManager().getProjectConfiguration(project);
        ValidatorMetaData[] meta = projectConfig.getValidators();
        List enables = new ArrayList();
        for(int i=0;i<meta.length;i++){
          if(!meta[i].getValidatorUniqueName().equals(HTMLValidator.class.getName())){
            enables.add(meta[i]);
          }
        }
        projectConfig.setDoesProjectOverride(true);

        projectConfig.setEnabledManualValidators(
            (ValidatorMetaData[])enables.toArray(new ValidatorMetaData[enables.size()]));
        projectConfig.setEnabledBuildValidators(
            (ValidatorMetaData[])enables.toArray(new ValidatorMetaData[enables.size()]));

      } catch(Exception ex){
        //ex.printStackTrace();
      }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.validation.internal.ProjectConfiguration

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.