/**
  * Adapts the behavior of the contained components to the change encoded in the given event.
  *
  * <p>Clients are not allowed to call this method if the old setup with text tools is in use.
  *
  * @param event the event to which to adapt
  * @see DartSourceViewerConfiguration#JavaSourceViewerConfiguration(IColorManager,
  *     IPreferenceStore, ITextEditor, String)
  */
 public void handlePropertyChangeEvent(PropertyChangeEvent event) {
   Assert.isTrue(isNewSetup());
   if (fCodeScanner.affectsBehavior(event)) {
     fCodeScanner.adaptToPreferenceChange(event);
   }
   if (fMultilineCommentScanner.affectsBehavior(event)) {
     fMultilineCommentScanner.adaptToPreferenceChange(event);
   }
   if (fSinglelineCommentScanner.affectsBehavior(event)) {
     fSinglelineCommentScanner.adaptToPreferenceChange(event);
   }
   if (fStringScanner.affectsBehavior(event)) {
     fStringScanner.adaptToPreferenceChange(event);
   }
   if (fMultilineStringScanner.affectsBehavior(event)) {
     fMultilineStringScanner.adaptToPreferenceChange(event);
   }
   if (fJavaDocScanner.affectsBehavior(event)) {
     fJavaDocScanner.adaptToPreferenceChange(event);
   }
   if (fJavaDoubleClickSelector != null
       && JavaScriptCore.COMPILER_SOURCE.equals(event.getProperty())) {
     if (event.getNewValue() instanceof String) {
       fJavaDoubleClickSelector.setSourceVersion((String) event.getNewValue());
     }
   }
 }
 @Override
 public ITextDoubleClickStrategy getDoubleClickStrategy(
     ISourceViewer sourceViewer, String contentType) {
   if (DartPartitions.DART_DOC.equals(contentType)
       || DartPartitions.DART_SINGLE_LINE_DOC.equals(contentType)) {
     return new DartDocDoubleClickStrategy();
   }
   if (DartPartitions.DART_MULTI_LINE_COMMENT.equals(contentType)
       || DartPartitions.DART_SINGLE_LINE_COMMENT.equals(contentType)) {
     return new DefaultTextDoubleClickStrategy();
   } else if (DartPartitions.DART_STRING.equals(contentType)
       || DartPartitions.DART_MULTI_LINE_STRING.equals(contentType)) {
     return new DartStringDoubleClickSelector(getConfiguredDocumentPartitioning(sourceViewer));
   }
   if (fJavaDoubleClickSelector == null) {
     fJavaDoubleClickSelector = new DartDoubleClickSelector();
     fJavaDoubleClickSelector.setSourceVersion(
         fPreferenceStore.getString(JavaScriptCore.COMPILER_SOURCE));
   }
   return fJavaDoubleClickSelector;
 }