From c3a1c183b044e70b7906442572e33d50f1746e00 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Fri, 7 Jul 2006 13:32:02 +0000 Subject: [PATCH] Use common constant for document partitioning --- .../internal/ui/editor/asm/AsmSourceViewerConfiguration.java | 4 +--- .../src/org/eclipse/cdt/internal/ui/text/CTextTools.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmSourceViewerConfiguration.java index 32fef301e91..53f02570c80 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmSourceViewerConfiguration.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/asm/AsmSourceViewerConfiguration.java @@ -20,8 +20,6 @@ import org.eclipse.jface.text.rules.RuleBasedScanner; import org.eclipse.jface.text.source.ISourceViewer; import org.eclipse.ui.editors.text.TextSourceViewerConfiguration; -import org.eclipse.cdt.ui.CUIPlugin; - import org.eclipse.cdt.internal.ui.text.ICPartitions; @@ -70,7 +68,7 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration */ public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) { // the ASM editor also uses the CDocumentPartitioner - return CUIPlugin.getDefault().getTextTools().getDocumentPartitioning(); + return ICPartitions.C_PARTITIONING; } /* diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CTextTools.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CTextTools.java index b2c62790f53..81b4dcdc46f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CTextTools.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CTextTools.java @@ -42,8 +42,6 @@ public class CTextTools { } } - private static final String DEFAULT_PARTITIONING = "__c_partitioning"; //$NON-NLS-1$ - /** The color manager */ private CColorManager fColorManager; /** The C source code scanner */ @@ -66,7 +64,7 @@ public class CTextTools { /** The preference change listener */ private PreferenceListener fPreferenceListener= new PreferenceListener(); /** 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