Fixed ?
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / preferences / TemplatePreferencePage.java
index ca44370..f375353 100644 (file)
@@ -11,13 +11,13 @@ import net.sourceforge.phpdt.internal.corext.template.Template;
 import net.sourceforge.phpdt.internal.corext.template.TemplateMessages;
 import net.sourceforge.phpdt.internal.corext.template.TemplateSet;
 import net.sourceforge.phpdt.internal.corext.template.Templates;
+import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
 import net.sourceforge.phpdt.internal.ui.text.template.TemplateContentProvider;
 import net.sourceforge.phpdt.internal.ui.text.template.TemplateLabelProvider;
 import net.sourceforge.phpdt.internal.ui.util.SWTUtil;
 import net.sourceforge.phpdt.ui.text.JavaTextTools;
+import net.sourceforge.phpdt.ui.text.PHPSourceViewerConfiguration;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
-import net.sourceforge.phpeclipse.phpeditor.PHPEditorEnvironment;
-import net.sourceforge.phpeclipse.phpeditor.PHPSourceViewerConfiguration;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.dialogs.ErrorDialog;
@@ -96,7 +96,7 @@ public class TemplatePreferencePage
    * @see PreferencePage#createContents(Composite)
    */
   protected Control createContents(Composite ancestor) {
-    PHPEditorEnvironment.connect(this);
+ //   PHPEditorEnvironment.connect(this);
     Composite parent = new Composite(ancestor, SWT.NONE);
     GridLayout layout = new GridLayout();
     layout.numColumns = 2;
@@ -263,7 +263,7 @@ public class TemplatePreferencePage
     fPatternViewer = createViewer(parent);
 
     //         fFormatButton= new Button(parent, SWT.CHECK);
-    //         fFormatButton.setText(TemplateMessages.getString("TemplatePreferencePage.use.code.formatter")); //$NON-NLS-1$
+    //         fFormatButton.setText(ObfuscatorMessages.getString("TemplatePreferencePage.use.code.formatter")); //$NON-NLS-1$
     //        GridData gd1= new GridData();
     //        gd1.horizontalSpan= 2;
     //        fFormatButton.setLayoutData(gd1);
@@ -360,7 +360,7 @@ public class TemplatePreferencePage
     document.setDocumentPartitioner(partitioner);
     partitioner.connect(document);
 
-    viewer.configure(new PHPSourceViewerConfiguration(tools, null));
+    viewer.configure(new PHPSourceViewerConfiguration(tools, null, IPHPPartitions.PHP_PARTITIONING));
     // (tools, null));
     viewer.setEditable(false);
     viewer.setDocument(document);
@@ -610,7 +610,7 @@ public class TemplatePreferencePage
     }
 
     PHPeclipsePlugin.getDefault().savePluginPreferences();
-    PHPEditorEnvironment.disconnect(this);
+ //   PHPEditorEnvironment.disconnect(this);
     return super.performOk();
   }
 
@@ -625,7 +625,7 @@ public class TemplatePreferencePage
       openReadErrorDialog(e);
     }
 
-    PHPEditorEnvironment.disconnect(this);
+   // PHPEditorEnvironment.disconnect(this);
     return super.performCancel();
   }