Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: mask %-signs in keyword expansion
Topic Summary:
Created On: 18-May-2007 13:45
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
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.
 18-May-2007 13:45
User is offline View Users Profile Print this message


Sven Fröhlich

Posts: 3
Joined: 11-Jan-2006

Hi there,

i try to find a way to mask percent signs while Synergy/CM is doing keyword expansion.
I have a html object, which has many such signs (widht=xxx%; ...) but also keywords.

Is there a way to mask this %-signs?

I already tried different methods like %%, \% or '%' but nothing seems to work.

Any hint is appreciated.

regards,
Sven
Report this to a Moderator Report this to a Moderator
 21-May-2007 23:23
User is offline View Users Profile Print this message


David Honey

Posts: 20
Joined: 26-Sep-2002

Hi Sven,

I had a similar problem with Java source that contained string literals using %keywords. The thing to watch out for are strings of the form "%keyword: ([^%]*)%. Note the ':' after the keyword. Without that colon, the keyword expansion is only done once, usually from the source file template when the object is created. But with the "%keyword: %" form, the keyword is reexpanded on every check out and check in.

The way I solved my issue was to split the string. For example instead of:
"%cvtype:%subsystem"
I used:
"%cvtype"
+ ":%subsystem"
so that the second part was on the next line. The keyword expansion deals with lines and won't look for the closing "%" across lines.

Usually with HTML, the text is whitespace insensitive. So you may be able to break the lines so that any colon after "%name" appears on the next line rather than the following one.

Another idea is to use a different way of expressing the colon character such as using a character entity in HTML, or a character reference in XML.

Another solution is to define or use a separate type for which keyword expansion is disabled and then use that type for your problematic HTML files. However, that would mean that you could not use keywords in comments at the start of the file and have them expanded.

Lastly, there is the range_for_keyword_expand option that can be set so that it only looks at the first N characters. The problem with this is that each user can set a different value as a personal preference and this applies to all types for which expansion is performed on behalf of that user. In the case of source code files where you want to use keywords in long comment headers, N might have to be larger than the default.

Hope this helps,
David.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 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.