public boolean performOk() {
    boolean doctype = performDoctypeOk();
    boolean cssprofile = performCSSProfileOk();
    if (doctype || cssprofile) {
      // touch to mark for build-driven revalidation
      IResource resource = getResource();
      if (resource != null) {
        try {
          resource.accept(
              new IResourceVisitor() {

                public boolean visit(IResource resource) throws CoreException {
                  try {
                    resource.touch(null);
                  } catch (CoreException e) {
                    return false;
                  }
                  return true;
                }
              },
              IResource.DEPTH_INFINITE,
              false);
        } catch (CoreException e) {
          Logger.logException(e);
        }
      }
    }

    return super.performOk();
  }
 private boolean performDoctypeOk() {
   int index = fDocumentTypeCombo.getSelectionIndex();
   if (index > -1) {
     String id = (String) fDocumentTypeIds.get(index);
     if (id == null || id.equalsIgnoreCase(SELECT_NONE)) {
       // if none, use null
       id = null;
     }
     try {
       HTMLContentProperties.setProperty(HTMLContentProperties.DOCUMENT_TYPE, getResource(), id);
     } catch (CoreException e) {
       // maybe in future, let user know there was a problem saving
       // file
       Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
       return false;
     }
   }
   return true;
 }
 private boolean performCSSProfileOk() {
   int index = fProfileCombo.getSelectionIndex();
   if (index > -1) {
     String id = (String) fProfileIds.get(index);
     if (id == null || id.length() == 0 || id.equalsIgnoreCase(SELECT_NONE)) {
       // if none, use null
       id = null;
     }
     try {
       CSSContentProperties.setProperty(CSSContentProperties.CSS_PROFILE, getResource(), id);
     } catch (CoreException e) {
       // maybe in future, let user know there was a problem saving
       // file
       Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
       return false;
     }
   }
   return true;
 }