Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: displaying coloured diffs in attributes
Topic Summary:
Created On: 9-Aug-2007 14:35
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 9-Aug-2007 14:35
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

Getting Coloured Mark up into ordinary attributes was to my knowledge something you couldn't do. However, I just imported a word document into DOORS and discovered that the background color is not stripped out, it seems that the rtf markup code that does the background color can be displayed in text attributes and can be added to the doors diff function. This is very useful for my difference tool that compares any attribute in any baseline against any other attribute in the baseline or current. You get a very immediate visual cue as to where something has changed. All you have to do to get this functionality is to add the highlight1 and highlight2 tags to the diff command as displayed in the code snippet - I imagine that this might be useful to others. Remember that you need to pass the resulting string/buffer to the attribute enclosed in the richText function to get the colours

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 9-Aug-2007 15:00
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Very nice, works in layout DXL, too.

Peter
Report this to a Moderator Report this to a Moderator
 9-Aug-2007 16:38
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

Richard - where is your original code for the difference tool?

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts

Edited: 9-Aug-2007 at 16:39 by Kevin Murphy
Report this to a Moderator Report this to a Moderator
 10-Jan-2008 20:05
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Thats amazing, thank you for sharing!
Is there a way to show blue/underline & red/strikeout to match the format of Word track changes?

Al
Report this to a Moderator Report this to a Moderator
 10-Jan-2008 20:48
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Very nice. I expanded your example, attached. I wonder about the standardization of 'highlight1' and 'highlight2'; for me that's Red and Green. Wonder how we can explicitely call out Red or Blue or Maroon or whatever.

- Louie
Report this to a Moderator Report this to a Moderator
 10-Jan-2008 20:50
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I've had several tools that used diff() for a while now. I didn't realize people didn't know about it. It's been mentioned on here before. Actually I recently posted a tool that used it.

Thread ID 8816 (replace the number in your navigation bar with that one)

Kevin, its a built in DOORS function. Far better than using the delta.inc library in /example/include which has a known bug.

Also, resText, oldText, newText all need to be Buffers, not strings. For all the info on it, just type "diff" in in the DXL help file Index. Pulls it right up.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 10-Jan-2008 at 21:15 by David Pechacek
Report this to a Moderator Report this to a Moderator
 11-Jan-2008 13:19
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

You can select your own colours by adding a colour table to the RTF string.

Edit the values for Red, green and blue to change colours.

If you display the information in a layout dxl column, then you can have different colour fonts instead of different colour background.

See this Example displaying coloured fonts in layout dxl

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.