« Back to Track Changes

RE: Track Change with Comments v_2

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Track Change with Comments
Answer
8/19/14 8:13 AM
Enable to create comment boxes where the developer has the opportunity to notice his changes.

RE: Track Change with Comments
Answer
8/26/14 9:37 AM as a reply to Mehmet Albayrak.
The following package provides a functionality for an object to create/delete comment boxes on the right handside as modeling nodes. For this purpose the "HOTSPOT" functionality of the GraphRep is combined with a "Pragramcall"-attribute to create/delete the comment box as you can see below.    

Download:
          Library
                Track Changes - Create_CommentBox_Library v1.0.abl
          AdoScripts
                WriteComment.asc       
                ClearComment.asc  

ADOxx Realisation Hands On:

1)
MODELING LANGUAGE:
   Create  the following four classes:

  • Start-Class

  • Task-Class;
    including a hotspot on the right upper corner which triggers the Programcall: WriteComment.asc (see above). 
    Notice: This package provides only a simple positioning. 

     1GRAPHREP
     2PEN color:black
     3FILL r:220 g:220 b:220
     4RECTANGLE x:-1.5cm y:0cm w:3cm h:1.5cm
     5
     6FILL color:lemonchiffon
     7RECTANGLE x:1.5cm y:-0.5cm w:0.7cm h:0.5cm
     8SET coli:"darkslategray"
     9STRETCH off SHADOW off
    10AVAL ed:"WriteComment"
    11
    12
    13FONT "Wingdings" h:16pt color: (coli)
    14TEXT "!" x:1.6cm y:-0.55cm w:0.5cm h:.5cm
    15
    16HOTSPOT "WriteComment" x:1.5cm y:-0.5cm w:0.7cm h:0.5cm text: "Write Comment"


  • Comment-Class;
    including a hotspot which triggers the Programcall: ClearComment.asc (see above)

     1GRAPHREP layer:0 sizing:asymmetrical
     2FONT h: (PT 8)
     3PEN color:red outline
     4FILL color:lemonchiffon
     5RECTANGLE x:c y:c w:6cm h:1.5cm
     6ATTR "Name" line-break:words x:.2cm y:.05cm
     7ATTRBOX "Comment" x:0.2cm y: 0.45cm w:5.2 h:1.3cm
     8ATTR "Comment" x:0.2cm y: 0.45cm w:5.2cm h:1.3cm line-break:words row:3
     9
    10RECTANGLE x:6cm y:-0.5cm w:0.7cm h:.5cm
    11PEN w:0.07cm color:red
    12LINE x1:6.1cm y1:-0.1cm x2:6.6cm y2:-0.4cmLINE x1:6.6cm y1:-0.1cm x2:6.1cm y2:-0.4cm
    13
    14HOTSPOT "Clear Comment" x:6cm y:-0.5cm w:0.7cm h:.5cm text: "Clear Comment"


  • End-Class

The above mentioned HOTSPOT for creating a comment box is placed on the right upper corner of the object and is marked with a pen in a rectangle. 
       
            



You can find the HOTSPOT for deleting the comment box right upper corner of the comment box.

             

RE: Track Change with Comments v_2
Answer
8/29/14 12:55 PM as a reply to Mehmet Albayrak.
The package below is the second ver sion of creating comments. This package contains a functionality that enables the user to switch to the 'Comment Mode'  and back. In this 'Comment Mode' the user can create/delete comments. The created comments
  1. give also information about the name of the current user and the creating time.
  2. are fixed in the 'Comment Area'
  3. are saved in the record table 'Comment Table'.
Download:
          Library:
                 Track Canges - CommentBox Library v2.0.abl
          GraphReps:
                   ModelGraphRepTrackChange.leo 
                   TaskClassGraphRep.leo
          AdoScripts:
                   WriteComment.asc
                   ClearComment.asc

To build this functionality, please follow the steps below
  1. a) Create __ModelTypeMetaData__ with the following attributes:
         -- ModelGraphRepTrackChange (Longstring)
        -- CommentModeAttrRep (Longstring)
         -- Comment Mode (Enumeration) 
         -- CommentAreaSize (Enumeration)
         -- ModelingAreaSize (Enumeration)
         -- TypeSize (Enumeration)
    b) Define Modeltype with the corresponding 'AttrRep' and 'GraphRep'

  2. Create Task-class with the following attributes:
    -- ClearComment (Programcall)
    -- Comment (Longstring)
    -- CommentAreaSizeExp (Expression)
    -- CommentBox (Enumeration)
    -- CommentInfo (String)
    -- CommentMode (Expression)
    -- CommentTable (Record)
    -- WriteComment (Programcall)
    -- ModelingAreaSizeExp (Expression)
  3. Create Start-class
  4. Create End-class
  5. Create the connector any2any


The screenshots below should give you an overview of the functionalties.

1. Switch to Comment mode







2. Add Comment HOTSPOT


                                         

3. Write your comment




4. Display Comment + Info




5. Clear Comment HOTSPOT





6. Save comment in a record table