[173405] (restore) Workaround for text editor IDragAndDropService usage incompatibilities
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
index 15121a3..6762a8e 100644
--- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
+++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java
@@ -66,6 +66,7 @@
import org.eclipse.jface.text.information.IInformationProvider;
import org.eclipse.jface.text.information.IInformationProviderExtension2;
import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
import org.eclipse.jface.text.source.ICharacterPairMatcher;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.IVerticalRuler;
@@ -1691,22 +1692,7 @@
matcher = (ICharacterPairMatcher) builder.getConfiguration(DocumentRegionEdgeMatcher.ID, ids[i]);
}
if (matcher == null) {
- matcher = new ICharacterPairMatcher() {
-
- public void clear() {
- }
-
- public void dispose() {
- }
-
- public int getAnchor() {
- return ICharacterPairMatcher.LEFT;
- }
-
- public IRegion match(IDocument iDocument, int i) {
- return null;
- }
- };
+ matcher = new DefaultCharacterPairMatcher(new char[]{'(', ')', '{', '}', '[', ']', '<', '>'});
}
return matcher;
}
@@ -2685,9 +2671,8 @@
* @see org.eclipse.ui.texteditor.AbstractTextEditor#initializeDragAndDrop(org.eclipse.jface.text.source.ISourceViewer)
*/
protected void initializeDragAndDrop(ISourceViewer viewer) {
- // disabled for pre-2.0M5 specific assembly
-// IPreferenceStore store= getPreferenceStore();
-// if (store != null && store.getBoolean(PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED))
+ IPreferenceStore store= getPreferenceStore();
+ if (store != null && store.getBoolean(PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED))
initializeDrop(viewer);
}