A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.ui / src / net / sourceforge / phpeclipse / xml / ui / internal / text / DTDConfiguration.java
index 1728c8b..282771f 100644 (file)
@@ -8,7 +8,7 @@
  * Contributors:
  *     Igor Malinin - initial contribution
  *
- * $Id: DTDConfiguration.java,v 1.2 2005-05-06 00:55:41 stefanbjarni Exp $
+ * $Id: DTDConfiguration.java,v 1.3 2006-10-21 23:14:13 pombredanne Exp $
  */
 
 package net.sourceforge.phpeclipse.xml.ui.internal.text;
@@ -24,7 +24,6 @@ import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
 
-
 /**
  * DTD editor configuration.
  * 
@@ -34,9 +33,10 @@ public class DTDConfiguration extends SourceViewerConfiguration {
        private DTDTextTools dtdTextTools;
 
        private ITextDoubleClickStrategy dcsDefault;
+
        private ITextDoubleClickStrategy dcsSimple;
 
-       public DTDConfiguration( DTDTextTools tools ) {
+       public DTDConfiguration(DTDTextTools tools) {
                dtdTextTools = tools;
 
                dcsDefault = new TextDoubleClickStrategy();
@@ -44,24 +44,24 @@ public class DTDConfiguration extends SourceViewerConfiguration {
        }
 
        /*
-        * @see SourceViewerConfiguration#getDoubleClickStrategy(ISourceViewer, String)
+        * @see SourceViewerConfiguration#getDoubleClickStrategy(ISourceViewer,
+        *      String)
         */
        public ITextDoubleClickStrategy getDoubleClickStrategy(
-               ISourceViewer sourceViewer, String contentType
-       ) {
-               if ( XMLPartitionScanner.XML_PI.equals(contentType) ) {
+                       ISourceViewer sourceViewer, String contentType) {
+               if (XMLPartitionScanner.XML_PI.equals(contentType)) {
                        return dcsSimple;
                }
 
-               if ( XMLPartitionScanner.XML_COMMENT.equals(contentType) ) {
+               if (XMLPartitionScanner.XML_COMMENT.equals(contentType)) {
                        return dcsSimple;
                }
 
-               if ( XMLPartitionScanner.XML_DECL.equals(contentType) ) {
+               if (XMLPartitionScanner.XML_DECL.equals(contentType)) {
                        return dcsSimple;
                }
 
-               if ( XMLPartitionScanner.DTD_CONDITIONAL.equals(contentType) ) {
+               if (XMLPartitionScanner.DTD_CONDITIONAL.equals(contentType)) {
                        return dcsSimple;
                }
 
@@ -71,52 +71,48 @@ public class DTDConfiguration extends SourceViewerConfiguration {
        /*
         * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredContentTypes(ISourceViewer)
         */
-       public String[] getConfiguredContentTypes( ISourceViewer sourceViewer ) {
-               return new String[] {
-                       IDocument.DEFAULT_CONTENT_TYPE,
-                       XMLPartitionScanner.XML_PI,
-                       XMLPartitionScanner.XML_COMMENT,
-                       XMLPartitionScanner.XML_DECL,
-                       XMLPartitionScanner.DTD_CONDITIONAL,
-               };
+       public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
+               return new String[] { IDocument.DEFAULT_CONTENT_TYPE,
+                               XMLPartitionScanner.XML_PI, XMLPartitionScanner.XML_COMMENT,
+                               XMLPartitionScanner.XML_DECL,
+                               XMLPartitionScanner.DTD_CONDITIONAL, };
        }
 
        /*
         * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(ISourceViewer)
         */
        public IPresentationReconciler getPresentationReconciler(
-               ISourceViewer sourceViewer
-       ) {
+                       ISourceViewer sourceViewer) {
                PresentationReconciler reconciler = new PresentationReconciler();
 
                DefaultDamagerRepairer dr;
 
-               dr = new DefaultDamagerRepairer( dtdTextTools.getDTDTextScanner() );
-               reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE );
-               reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE );
+               dr = new DefaultDamagerRepairer(dtdTextTools.getDTDTextScanner());
+               reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
+               reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
 
-               reconciler.setDamager( dr, XMLPartitionScanner.XML_PI );
-               reconciler.setRepairer( dr, XMLPartitionScanner.XML_PI );
+               reconciler.setDamager(dr, XMLPartitionScanner.XML_PI);
+               reconciler.setRepairer(dr, XMLPartitionScanner.XML_PI);
 
-               dr = new DefaultDamagerRepairer( dtdTextTools.getXMLPIScanner() );
+               dr = new DefaultDamagerRepairer(dtdTextTools.getXMLPIScanner());
 
-               reconciler.setDamager( dr, XMLPartitionScanner.XML_PI );
-               reconciler.setRepairer( dr, XMLPartitionScanner.XML_PI );
+               reconciler.setDamager(dr, XMLPartitionScanner.XML_PI);
+               reconciler.setRepairer(dr, XMLPartitionScanner.XML_PI);
 
-               dr = new DefaultDamagerRepairer( dtdTextTools.getXMLCommentScanner() );
+               dr = new DefaultDamagerRepairer(dtdTextTools.getXMLCommentScanner());
 
-               reconciler.setDamager( dr, XMLPartitionScanner.XML_COMMENT );
-               reconciler.setRepairer( dr, XMLPartitionScanner.XML_COMMENT );
+               reconciler.setDamager(dr, XMLPartitionScanner.XML_COMMENT);
+               reconciler.setRepairer(dr, XMLPartitionScanner.XML_COMMENT);
 
-               dr = new DefaultDamagerRepairer( dtdTextTools.getXMLDeclScanner() );
+               dr = new DefaultDamagerRepairer(dtdTextTools.getXMLDeclScanner());
 
-               reconciler.setDamager( dr, XMLPartitionScanner.XML_DECL );
-               reconciler.setRepairer( dr, XMLPartitionScanner.XML_DECL );
+               reconciler.setDamager(dr, XMLPartitionScanner.XML_DECL);
+               reconciler.setRepairer(dr, XMLPartitionScanner.XML_DECL);
 
-               dr = new DefaultDamagerRepairer( dtdTextTools.getDTDConditionalScanner() );
+               dr = new DefaultDamagerRepairer(dtdTextTools.getDTDConditionalScanner());
 
-               reconciler.setDamager( dr, XMLPartitionScanner.DTD_CONDITIONAL );
-               reconciler.setRepairer( dr, XMLPartitionScanner.DTD_CONDITIONAL );
+               reconciler.setDamager(dr, XMLPartitionScanner.DTD_CONDITIONAL);
+               reconciler.setRepairer(dr, XMLPartitionScanner.DTD_CONDITIONAL);
 
                return reconciler;
        }