Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] cdt source viewer

 
CSourceViewerConfiguration is public API now (CDT 6.0).
See also http://bugs.eclipse.org/251406.
 
HTH,
Toni


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Kennedy, Stephen M (Steve)
Sent: Monday, September 14, 2009 8:23 PM
To: CDT General developers list.
Subject: [cdt-dev] cdt source viewer

Is there any way to get a properly configured CDT source viewer using a public API?  Currently I'm using
 
        CUIPlugin plugin = CUIPlugin.getDefault();
        ISourceViewer sourceViewer = new SourceViewer(parent, null, SWT.LEFT_TO_RIGHT | SWT.H_SCROLL | SWT.V_SCROLL);
        SourceViewerConfiguration sourceViewerConfig =
                new CSourceViewerConfiguration(
                        plugin.getTextTools().getColorManager(),
                        plugin.getCombinedPreferenceStore(),
                        null, ICPartitions.C_PARTITIONING);
        sourceViewer.configure(sourceViewerConfig);
 
but CSourceViewerConfiguration is internal and gives a "Discouraged access" warning (as would CSourceViewer if I had used that instead of SourceViewer).
 
Thanks,
 
Steve Kennedy
Alcatel-Lucent
 

Back to the top