Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] how to configure SourceViewer?

Widget properties must be set directly on the widget. These are font, foreground and background color. Besides this, the configuration is complete. You'll get the same syntax highlighting etc. as the Java editor assuming that the viewer's document is appropriately partitioned.

Kai


At 06:12 PM 8/28/2002 +0200, you wrote:
i have the following code:

JavaTextTools tools= JavaPlugin.getDefault().getJavaTextTools();

int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;

fSourceViewer= new SourceViewer(composite, null, styles);

fSourceViewer.configure(new JavaSourceViewerConfiguration(tools, null));



this seems to be not enough to make the viewer use the same settings (font, colors ...) as the java editor

what else do i have to set?

a.


_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-ui-dev




Back to the top