Default - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Default

Description:

Hover support is optional. ... ITextHover and Ruler Hovering requires a new class ... By default, text hovering is not provided by the SourceViewerConfiguration ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 10
Provided by: ANNA235
Category:
Tags: default | hover

less

Transcript and Presenter's Notes

Title: Default


1
eclipse A Smart Development Platform
  • Editors
  • A "typical" implementation pattern of IDE

ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
2
eclipse A Smart Development Platform
  • What is Editor ?
  • A tool that edits and manages a particular
    content type.
  • Will provide customized behavior for manipulating
    the data represented by the resource.
  • What types of Editors are possible ?
  • Editors usually provide application-specific
    semantics.
  • Editors can come in all shapes and sizes.
  • Text Editors
  • Form Editors
  • MultiPage Editors

ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
3
eclipse A Smart Development Platform
General Structure of an Editor An editor must
implement IEditorPart and is often built by
extending the EditorPart class. An editor
implements its user interface in the
createPartControl method.  Every editor
requires an IEditorInput. An editor input is a
description of something to be edited. Like a
filename. There are 2 generic IEditorInput
types available called as IFileEditorInput
(represents a File in the FileSystem) and
IStorageEditorInput (represents a ByteStream)?
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
4
eclipse A Smart Development Platform
  • TextEditors
  • Platform provides a default Text Editing Facility
    using the default TextEditor of the Workbench.
    The interface is ITextEditor which is build on
    IEditorPart.
  • The Text Editing Framework is specified in the
    org.eclipse.ui.texteditor
  • There is a concrete implementation class
    available called as TextEditor found inside
    org.eclipse.ui.editors.text
  • TextEditor framework provides the following
    features
  • Presentation and Editing of Text
  • Cut/Copy/Paste
  • SyntaxHighlighting
  • Content Assist
  • Text oulining pages etc.

ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
5
eclipse A Smart Development Platform
Creating our own Editor Extension point
org.eclipse.ui.editors is used Plug-ins need to
extend the EditorPart to add their own
functionality. ltextension point
"org.eclipse.ui.editors"gt lteditor id
"org.eclipse.ui.examples.readmetool.ReadmeEditor"
name"Editors.ReadmeEditor icon"icons/obj16
/editor.png" class"org.eclipse.ui.examples.read
metool.ReadmeEditor" extensions"readme"
contributorClass"org.eclipse.ui.examples.readmet
ool.ReadmeEditorActionBarContributor"gt
lt/editorgt lt/extensiongt
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
6
eclipse A Smart Development Platform
Configuring a source viewer The SourceViewer is
the central hub for configuring your editor with
pluggable behavior such as text hovering and
syntax highlighting.  The editor supplies a
SourceViewerConfiguration that is used to
configure the SourceViewer when it is created.
We need to override initializeEditor() in the
editor code and set your own source viewer
configuration into the editor.  The new
Configuration should be extended from
SourceViewerConfiguration.
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
7
eclipse A Smart Development Platform
Text Hovering By default, text hovering is not
provided by the SourceViewerConfiguration Hover
support is optional.  The sourceviewerconfigurat
ion class needs to override two methods called as
getTextHover() Text Hovering and
getAnnotationHover() Ruler Hover TextHovering
requires a new implementation of a class that
implements ITextHover and Ruler Hovering requires
a new class implementation that implements
IAnnotationHover We need to override
initializeEditor() in the editor code and set
your own source viewer configuration into the
editor.  The new Configuration should be extended
from SourceViewerConfiguration.
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
8
eclipse A Smart Development Platform
Content Assist By default, text hovering is not
provided by the SourceViewerConfiguration Hover
support is optional.  ContentAssisting requires
to implement a new class the implements
IContentAssistProcessor. SyntaxColoring Syntax
coloring is provided in the platform text
framework using a model of damage, repair, and
reconciling. As the user modifies text in an
editor, parts of the editor must be redisplayed
to show the changes.  Computing the text that
must be redisplayed is known as computing
damage. 
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
9
eclipse A Smart Development Platform
A repairer must be able to derive all of the
information it needs from a damage region in
order to successfully describe the repairs that
are needed for a particular content type.
Reconciling describes the overall process of
maintaining the presentation of a document as
changes are made in the editor. Presentation
reconcilers should be provided with a repairer
and damager pair for each content type to be
found in the document.  For Text Editors,
platform has defined rule-based document scanners
to compute and repair damage.  Rule based
Document scanners are created by extending
RuleBasedScanner. You need to provide a Token for
every rule which talks about the color that
should be given if the Damaged text satisfies the
condition.
ANCiT consulting reserves all rights even in the
event of industrial property rights. We reserve
all rights of disposal such as copying and
passing on to third parties.
Write a Comment
User Comments (0)
About PowerShow.com