import net.sourceforge.phpdt.internal.ui.text.IPHPPartitions;
import net.sourceforge.phpdt.internal.ui.text.PHPPairMatcher;
import net.sourceforge.phpdt.internal.ui.text.SmartBackspaceManager;
+import net.sourceforge.phpdt.internal.ui.text.SmartSemicolonAutoEditStrategy;
import net.sourceforge.phpdt.internal.ui.text.java.IJavaReconcilingListener;
import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionManager;
import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionUI;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentCommand;
+import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ILineTracker;
import org.eclipse.jface.text.IRegion;
return super.requestWidgetToken(requester);
}
- /*
- * @see org.eclipse.jface.text.source.ISourceViewer#configure(org.eclipse.jface.text.source.SourceViewerConfiguration)
- */
+// /*
+// * @see org.eclipse.jface.text.source.ISourceViewer#configure(org.eclipse.jface.text.source.SourceViewerConfiguration)
+// */
+// public void configure(SourceViewerConfiguration configuration) {
+// super.configure(configuration);
+// // fCorrectionAssistant= new
+// // JavaCorrectionAssistant(CompilationUnitEditor.this);
+// // fCorrectionAssistant.install(this);
+// //TODO install SmartBracesAutoEditStrategy
+// // prependAutoEditStrategy(new SmartBracesAutoEditStrategy(this),
+// // IDocument.DEFAULT_CONTENT_TYPE);
+// }
public void configure(SourceViewerConfiguration configuration) {
- super.configure(configuration);
- // fCorrectionAssistant= new
- // JavaCorrectionAssistant(CompilationUnitEditor.this);
- // fCorrectionAssistant.install(this);
- //TODO install SmartBracesAutoEditStrategy
- // prependAutoEditStrategy(new SmartBracesAutoEditStrategy(this),
- // IDocument.DEFAULT_CONTENT_TYPE);
- }
+ super.configure(configuration);
+// fCorrectionAssistant= new JavaCorrectionAssistant(CompilationUnitEditor.this);
+// fCorrectionAssistant.install(this);
+ IAutoEditStrategy smartSemi= new SmartSemicolonAutoEditStrategy(IPHPPartitions.PHP_PARTITIONING);
+ prependAutoEditStrategy(smartSemi, IDocument.DEFAULT_CONTENT_TYPE);
+ prependAutoEditStrategy(smartSemi, IPHPPartitions.PHP_STRING_DQ);
+ prependAutoEditStrategy(smartSemi, IPHPPartitions.PHP_STRING_SQ);
+// prependAutoEditStrategy(smartSemi, IPHPPartitions.JAVA_CHARACTER);
+ }
};
/**
* Remembers data related to the current selection to be able to