Examples of HTMLProjectParams


Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

          try {
            IFileEditorInput input = (IFileEditorInput)getEditorInput();
            IFile file = input.getFile();
            file.deleteMarkers(IMarker.PROBLEM,false,0);
           
            HTMLProjectParams params = new HTMLProjectParams(file.getProject());
            if(params.getValidateHTML()){
              new HTMLValidator(input.getFile()).doValidate();
            }
          } catch(Exception ex){
            //HTMLPlugin.logException(ex);
          }
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

      try {
        ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
          public void run(IProgressMonitor monitor) throws CoreException {
            try {
              IFileEditorInput input = (IFileEditorInput)getEditorInput();
              HTMLProjectParams params = new HTMLProjectParams(input.getFile().getProject());
              if(params.getRemoveMarkers()){
                input.getFile().deleteMarkers(IMarker.PROBLEM,false,0);
              }
            } catch(Exception ex){
            }
          }
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

          IFile file = input.getFile();
         
          file.deleteMarkers(IMarker.PROBLEM,false,0);
         
          try {
            HTMLProjectParams params = new HTMLProjectParams(file.getProject());
            if(!params.getValidateDTD()){
              return;
            }
           
            new DTDParser(new StringReader(getHTMLSource())).parse();
          } catch(DTDParseException ex){
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

          try {
            IFileEditorInput input = (IFileEditorInput)getEditorInput();
            IFile file = input.getFile();
            file.deleteMarkers(IMarker.PROBLEM,false,0);
           
            HTMLProjectParams params = new HTMLProjectParams(file.getProject());
            if(params.getValidateJSP()){
              new JSPValidator(input.getFile()).doValidate();
            }
          } catch(Exception ex){
            //HTMLPlugin.logException(ex);
          }
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

            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);
            String[] xsd = getXSD(xml);
           
            // 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

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

        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

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

        manager.generateUniqueLaunchConfigurationNameFrom(file.getName()));
   
    wc.setAttribute(JavaScriptLaunchConstants.ATTR_JAVASCRIPT_FILE, fullPath);
   
    try {
      HTMLProjectParams params = new HTMLProjectParams(file.getProject());
      String[] javaScripts = params.getJavaScripts();
      List includes = new ArrayList();
      for(int i=0;i<javaScripts.length;i++){
        includes.add(javaScripts[i]);
      }
     
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

   * @param project
   */
  public void update(IFile file){
    try {
     
      HTMLProjectParams params = new HTMLProjectParams(file.getProject());
      String[] javaScripts = params.getJavaScripts();
      IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot();
      functions.clear();
     
      for(int i=0;i<javaScripts.length;i++){
        InputStream in = null;
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

  private JSPInfo(IFile file, String source, boolean include) {
    super();
   
    try {
      // load project preference
      HTMLProjectParams params = new HTMLProjectParams(file.getProject());
      String webapproot = params.getRoot();
   
      // processing for include direcive
      IContainer basedir = file.getProject();
      if (!webapproot.equals("") && !webapproot.equals("/")) {
        basedir = basedir.getFolder(new Path(webapproot));
View Full Code Here

Examples of tk.eclipse.plugin.htmleditor.HTMLProjectParams

      try {
        ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
          public void run(IProgressMonitor monitor) throws CoreException {
            try {
              IFileEditorInput input = (IFileEditorInput)getEditorInput();
              HTMLProjectParams params = new HTMLProjectParams(input.getFile().getProject());
              if(params.getRemoveMarkers()){
                input.getFile().deleteMarkers(IMarker.PROBLEM,false,0);
              }
            } catch(Exception ex){
            }
          }
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.