developerWorks: Equipping SWT Applications with Content Assistants | Linux Today

developerWorks: Equipping SWT Applications with Content Assistants

Written By
Web Webster
Web Webster
Nov 25, 2003

“The concept of content assistants is related to a specific
implementation of JFace text viewers, the class
org.eclipse.jface.text.source.SourceViewer. Instances of this class
are used throughout the Eclipse workbench to implement the various
editors. However, SourceViewers are not restricted to the Eclipse
workbench but may be used in any application that builds upon the
SWT and JFace JARs. This article demonstrates the implementation of
content assistants in the context of an Eclipse editor plug-in, and
gives some hints on how to use content assistants with ‘naked’
SourceViewers.

“Let’s implement a simple HTML editor. Here a content assistant
can be very helpful. For example, a content assistant could
generate typical HTML structures such as tables or links, or could
wrap selected text areas into style tags.

“To save time, we will implement this editor by using one of the
New Plug-in Project wizards to generate an appropriate editor
plug-in. Because this generated editor is an XML editor, and HTML
is an XML-based mark-up language, we only need to make some minor
modifications to convert this generated editor into an HTML editor.
Let’s begin…”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.