Package tk.eclipse.plugin.htmleditor

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams


  public void doValidate(){
    Context context = Context.enter();
    try {
      file.deleteMarkers(IMarker.PROBLEM,false,0);
     
      HTMLProjectParams params = new HTMLProjectParams(file.getProject());
      if(!params.getValidateJavaScript()){
        return;
      }
     
      context.setErrorReporter(new ErrorReporterImpl());
      context.initStandardObjects();
View Full Code Here


      ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
        public void run(IProgressMonitor monitor) throws CoreException {
          try {
            file.deleteMarkers(IMarker.PROBLEM,false,0);
           
            HTMLProjectParams params = new HTMLProjectParams(file.getProject());
            if(params.getValidateJSP()){
              new JSPValidator(file).doValidate();
            }
          } catch(Exception ex){
            //HTMLPlugin.logException(ex);
          }
View Full Code Here

            IFile resource = input.getFile();
            //String charset = resource.getCharset();
            //charset = "Shift_JIS";
            resource.deleteMarkers(IMarker.PROBLEM,false,0);
           
            HTMLProjectParams params = new HTMLProjectParams(resource.getProject());
            if(!params.getValidateXML()){
              return;
            }
           
            if(params.getUseDTD()==false){
              // remove DOCTYPE decl
              Matcher matcher = patternDoctypePublic.matcher(xml);
              if(matcher.find()){
                xml = removeMatched(xml,matcher.start(),matcher.end());
              }
              matcher = patternDoctypeSystem.matcher(xml);
              if(matcher.find()){
                xml = removeMatched(xml,matcher.start(),matcher.end());
              }
            }
           
            SAXParser parser = new SAXParser();
           
            String   dtd = getDTD(xml, false);
            String[] xsd = getXSD(xml, false);
           
            // Validation configuration
            if((dtd==null && xsd==null) || !params.getUseDTD()){
              parser.setFeature("http://xml.org/sax/features/validation", false);
            } else {
              parser.setFeature("http://xml.org/sax/features/validation", true);
              parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
            }
            if(xsd!=null && params.getUseDTD()){
//              parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
//              parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", xsd);
              parser.setFeature("http://apache.org/xml/features/validation/schema", true);
              parser.setFeature("http://xml.org/sax/features/namespaces", true);
            }
View Full Code Here

        return;
      }
      super.updateAssist();
     
      IFileEditorInput input = (IFileEditorInput)getEditorInput();
      HTMLProjectParams params = new HTMLProjectParams(input.getFile().getProject());
      if(params.getUseDTD()==false){
        return;
      }
     
      String xml = getDocumentProvider().getDocument(input).get();
     
View Full Code Here

TOP

Related Classes of tk.eclipse.plugin.htmleditor.HTMLProjectParams

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.