Read only archive ; use for new issues
Bug 475 - Can not change java package for nested modules and interfaces.
Summary: Can not change java package for nested modules and interfaces.
Status: NEW
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 2.1
Hardware: All All
: P2 enhancement
Assignee: Gerald Brose
Depends on:
Reported: 2004-05-06 14:04 CEST by Christian Spreuer
Modified: 2004-05-06 14:04 CEST (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Spreuer 2004-05-06 14:04:53 CEST
1) Symptom A
If you have nested modules in your idl file, it is not possible to use
 -i2jpackage to change the java package name for the inner module.
E.g. for the two idls (which are from a 3GPP standard)

module BasicCmIRPSystem { ...
  module AttributeTypes {...
  }; ...
module GenericNetworkResourcesIRPSystem { ...
  module AttributeTypes {...
  }; ...

I want to have full control over all four java package names.

Currently, I help myself by specifying three options, exploiting how i2jpackage 
works internally:
 -i2jpackage BasicCmIRPSystem:com.siemens.test.corba3gpp.basiccm
 -i2jpackage AttributeTypes:at
but I want control over the full package names.

2) Symptom B
Also, I have no control about the package name for structs that are defined 
within interfaces, e.g.
module KernelCmNotifDefs { ...
  interface AttributeValueChange { ...
    struct ModifiedAttribute { ...
The default package name for the struct is 
which is inacceptable within our project as it contains uppercase.

3) Proposed change
The syntax I wish for -i2jpackage is

This requires at least that in parser::addI2JPackage()
       int split_idx = mapping.indexOf(':');
be replaced with
       int split_idx = mapping.lastindexOf(':');
but this is not enough as mapping is done on individual names.