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: Getting module details in pre-triggered DXL code
Topic Summary:
Created On: 31-Jan-2005 12:29
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.
Answer This question was answered by Louie Landale, on Friday, March 11, 2005 5:05 PM

Answer:
I don't think the DOORS explorer method will work since it will give false info if you open a module by some other means, such as following a link. If your pre-open trigger is stored in each module, then you can use the "stored" command to figure out the base name of the module. In any case, you can't find the triggers therein unless you open the module anyway.

Consider a post-open-module trigger that closes the module if things don't go that well. Perhaps making it a priority 1 Trigger will cause it to run completely before other triggers fire (I don't know).

If your goal is to find and destroy hostile triggers then you can use the "-T" command line switch to do so, but I think you need to be a DOORS admin for that to work: put this in the 'Target' of some DOORS icon: "...doors.exe -T". Then write code seaching for triggers.

If your goal is to find and display all triggers that WILL fire when you open a module ... good luck. You'll need to look for triggers in the Module, the housing Project, and in the Database. Good luck parsing trigger assembly code to figure out which ones apply to your module. Dumping that stuff and letting someone look it over looks like the "best" choice, such as it is.

- Louie
 31-Jan-2005 12:29
User is offline View Users Profile Print this message


Chris Brooke

Posts: 2
Joined: 19-Aug-2004

Hi,

I need to get details of a module in pre-triggered dxl code. This includes the name of the module being opened and the name of triggers contained within it. I cant use the normal m=current affair as the module has not been effectively opened yet. One possible solution is to get the name from the module highlighted in the main DOORS interface. Any ideas how to solve this one?
Report this to a Moderator Report this to a Moderator
 31-Jan-2005 13:48
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

To get the currently highlighted module in the DOORS explorer, you could try the following code. I've used the type ModName_, as I don't think the module will be open yet, since you'll be using it a pre-open trigger.

Item i = getSelectedItem
ModName_ modHandle = null
if (type(i) == "Formal")
{
modHandle = module(i)
}

if (!null modHandle)
{
// get info about the module
string modName = name(modHandle)
string fullModName = fullName(modHandle)
}

Edited: 31-Jan-2005 at 13:51 by Antonio Norkus
Report this to a Moderator Report this to a Moderator
 31-Jan-2005 19:27
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
I don't think the DOORS explorer method will work since it will give false info if you open a module by some other means, such as following a link. If your pre-open trigger is stored in each module, then you can use the "stored" command to figure out the base name of the module. In any case, you can't find the triggers therein unless you open the module anyway.

Consider a post-open-module trigger that closes the module if things don't go that well. Perhaps making it a priority 1 Trigger will cause it to run completely before other triggers fire (I don't know).

If your goal is to find and destroy hostile triggers then you can use the "-T" command line switch to do so, but I think you need to be a DOORS admin for that to work: put this in the 'Target' of some DOORS icon: "...doors.exe -T". Then write code seaching for triggers.

If your goal is to find and display all triggers that WILL fire when you open a module ... good luck. You'll need to look for triggers in the Module, the housing Project, and in the Database. Good luck parsing trigger assembly code to figure out which ones apply to your module. Dumping that stuff and letting someone look it over looks like the "best" choice, such as it is.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 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.