1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

Use common constant for document partitioning

This commit is contained in:
Anton Leherbauer 2006-07-07 13:32:02 +00:00
parent 9b8671d00b
commit c3a1c183b0
2 changed files with 2 additions and 6 deletions

View file

@ -20,8 +20,6 @@ import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.editors.text.TextSourceViewerConfiguration; import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.text.ICPartitions; import org.eclipse.cdt.internal.ui.text.ICPartitions;
@ -70,7 +68,7 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
*/ */
public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) { public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) {
// the ASM editor also uses the CDocumentPartitioner // the ASM editor also uses the CDocumentPartitioner
return CUIPlugin.getDefault().getTextTools().getDocumentPartitioning(); return ICPartitions.C_PARTITIONING;
} }
/* /*

View file

@ -42,8 +42,6 @@ public class CTextTools {
} }
} }
private static final String DEFAULT_PARTITIONING = "__c_partitioning"; //$NON-NLS-1$
/** The color manager */ /** The color manager */
private CColorManager fColorManager; private CColorManager fColorManager;
/** The C source code scanner */ /** The C source code scanner */
@ -66,7 +64,7 @@ public class CTextTools {
/** The preference change listener */ /** The preference change listener */
private PreferenceListener fPreferenceListener= new PreferenceListener(); private PreferenceListener fPreferenceListener= new PreferenceListener();
/** The document partitioning used for the C partitioner */ /** The document partitioning used for the C partitioner */
private String fDocumentPartitioning = DEFAULT_PARTITIONING; private String fDocumentPartitioning = ICPartitions.C_PARTITIONING;
/** /**
* Creates a new C text tools collection and eagerly creates * Creates a new C text tools collection and eagerly creates