wiki:HOT_TEXT_REDESIGN_R2

Version 6 (modified by vlado, 16 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=HOT_TEXT_REDESIGN_R2, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

  • The goal of this task is to integrate the new text into Sophie with all existing old functionality and addition of new features.

Overview

  • Handle Priority 2 and 3 tasks specified in HOT_TEXT_REDESIGN_R1.
    • Integrate text with new resources
    • Make persisters for all needed classes
    • Make AutoActions for all Operations in the Logic that change the text
    • Text and Text Layout performance
      • Use a profiler to find problems
      • Control memory consumption
    • Implement Chaining using the existing old functionality and the new design.
    • Implement Anchoring (as a separate task)
    • Extend the text usability documentation with proper uses of text by the client code.

Task requirements

  • Implement the tasks specified in the Overview
  • Anchoring is optional

Task result

  • Source code
  • Wiki page (text documentation)

Implementation idea

  • Specified in the Overview section

How to demo

Design

  • Integration of the new text into Sophie
    • Models
    • Views
      • Text Views
        • A new TextView abstract class is added that contains:
          • A TextViewFlow holding the data needed by the view
            • Text
            • Areas
            • Text layout
            • Mark position
            • Caret position
            • Extra highlights (from searches, etc.)
            • Editable flag
            • Note: By extending the flow the text view's state could be diversified.
          • The index of the view in a possible sequence of views (chaining or other)
          • Interaction map
          • Note: By extending the TextView itself its drawing logic could be diversified.
        • SceneTextView inheriting TextView is added.
          • It is abstract to allow overriding of its model.
          • Contains the scene element.
        • SwingTextView inheriting TextView is added to use swing drawing.

  • Element views
    • A new HotTextView interface is added to enforce the usage of TextView class.
    • HeadTextFrameView is created to represent either a single view or a view which is the head of a chain.
      • It contains the (shared) flow of the whole chain.
    • TailTextFrameView is created to represent a view which is chained.
      • It refers to its related HeadTextFrameView in the chaining.
      • Through the head view it accessed its TextViewFlow.

  • Logics
    • Modify the operation for creation of a text frame (ON_ADD_TEXT_FRAME) to use AutoActions, new resources and new text.
    • Create a new TextFlowLogic class with the following responsibilities
      • It is a basic logic and has no knowledge of how to set the model.
      • Handles all text events.
      • Calculates the needed changes to the text.
      • Fires a new SET_TEXT event to be handled by the logics that should set the model.
      • Updates the flow (the view state).
    • Create the logics that modify the model
      • SimpleTextLogic
        • Directly sets the text to the SimpleTextFlow of the view
        • Mainly used for testing purposes
      • HotTextLogic
        • Sets text to the model through AutoAction.
        • Adding a new text frame moved to HotTextLogic.
  • Testing
    • Use SwingDemoTest and LineEndsDemoTest.
  • Chaining will be done in a separate task.

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)

Attachments