QUESTION:
How do I enter Copyright information for all of my generated code files?

ANSWER:
This is done by entering the Copyright information into the CopyrightNotice
property.  This property can be found under the language (Java, C++ etc.)
tab of the component specification.  

There is no need to enter the Copyright information individually for each
component in your model.  If you run the script listed below you can enter
the Copyright information into all of the code generating components in your
model at once.  

'<<CUT HERE>>
'**********

'--------------------
'Annamalai "Vishu" Viswanathan
'08/09/99

'This script will allow you to enter Copyright information for all of your
java components in a single stroke
'Note that this will only work for those components that are already present
in the model.  If new 'components are added after the script is run then the
script will need to be run again to apply to the new 'classes.

'The script works as follows:
'1.  Run the script
'2.  Copy and paste your Copyright information into the 'Copyright Notice:'
text box
'3.  Click OK.
 
Sub Main
Begin Dialog CopyrightDialog ,,222,137,"Copyright Notice:"
        OKButton 177,8,40,14
        CancelButton 177,28,40,14
        Text 6,6,142,8,"Copyright Notice:",.Text1
        TextBox 8,20,160,108,.CopyrightText,1
End Dialog

        Dim MyDialog As CopyrightDialog

        Dim theModel As Model
        Dim theModules As ModuleCollection
        Dim theModule As Module
        Dim Copyright As String
        Dim Result1 As Boolean
        Dim Result2 As Boolean

        Result1 = Dialog(MyDialog)

        Copyright = MyDialog.CopyrightText
        Set theModel = RoseApp.CurrentModel
        Set theModules = theModel.GetAllModules
        
      For i = 1 To theModules.Count
           Set theModule = theModules.GetAt(i)
           Result2 = theModule.OverrideProperty("Java","CopyrightNotice",
Copyright)
           'If this were a C++ model the previous line would read as
follows:
          'Result2 = theModule.OverrideProperty("cg","CopyrightNotice",
Copyright)
      Next i
      
End Sub
'--------------------
'<<END>>
 
Rational Customer Service Policies and Information:
http://www.rational.com/support/info.jsp









Best Regards       
  
Wayne Denman   
Rose Technical Support Engineer          
Rational Software Corporation  Rational.com

1-800-433-5444
Rational User Conference 2002......Freedom to Create 
Lake Buena Vista, Florida, August 18-22, 2002 Rational Events

Rational Customer Service - Committed to Service Excellence
SCP Certified:  Rational Software Customer Service Support Center Practices
(SCP) Certification

-----Original Message-----
From: Ross Lloyd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 8:35 AM
To: [EMAIL PROTECTED]
Subject: (ROSE) Java and custom source headers


Hi,

Our organisation requires a custom header to be placed at the top of
all source code (copyright notice, internal revision no for example).
Is there any way when getting Rose 2002 to generate the skeleton I can
get this template placed into the source?  Also can I stop Rose removing
it when I sync my code to an updated model?

Regards
Ross


************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Post or Reply to: [EMAIL PROTECTED]
* Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
*    http://www.rational.com/support/usergroups/rose/rose_forum.jsp
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*    To: [EMAIL PROTECTED]
*    Subject: <BLANK>
*    Body: unsubscribe rose_forum
*************************************************************************

Reply via email to