You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(86) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(114) |
Feb
(254) |
Mar
(166) |
Apr
(122) |
May
(131) |
Jun
(59) |
Jul
(201) |
Aug
(85) |
Sep
(80) |
Oct
(64) |
Nov
(103) |
Dec
(36) |
2005 |
Jan
(231) |
Feb
(204) |
Mar
(71) |
Apr
(54) |
May
(50) |
Jun
(120) |
Jul
(17) |
Aug
(124) |
Sep
(75) |
Oct
(154) |
Nov
(37) |
Dec
(143) |
2006 |
Jan
(346) |
Feb
(170) |
Mar
|
Apr
|
May
(273) |
Jun
(113) |
Jul
(427) |
Aug
(570) |
Sep
(212) |
Oct
(550) |
Nov
(348) |
Dec
(314) |
2007 |
Jan
(709) |
Feb
(223) |
Mar
(104) |
Apr
(24) |
May
(11) |
Jun
(3) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert L. <rle...@us...> - 2007-02-28 08:03:32
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23248/src/templates/CppLocalTemplates Modified Files: MUsesDefGetConnectionCtxImplDefinition MUsesDefAdapterDefinition MInterfaceDef MUsesDefGetCtxConnectionPrototype MUsesDefGetConnectionPrototypeVV MUsesDefAdapterVariable Log Message: bug fix: wrong use of local impl. interfaces Index: MUsesDefGetConnectionPrototypeVV =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetConnectionPrototypeVV,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MUsesDefGetConnectionPrototypeVV 5 Jan 2007 14:17:25 -0000 1.6 --- MUsesDefGetConnectionPrototypeVV 28 Feb 2007 08:03:28 -0000 1.7 *************** *** 1,2 **** ! virtual %(CCMUsesType)s::SmartPtr get_connection_%(Identifier)s() = 0; --- 1,2 ---- ! virtual %(UsesType)s::SmartPtr get_connection_%(Identifier)s() = 0; Index: MUsesDefAdapterVariable =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefAdapterVariable,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MUsesDefAdapterVariable 5 Jan 2007 14:17:25 -0000 1.7 --- MUsesDefAdapterVariable 28 Feb 2007 08:03:28 -0000 1.8 *************** *** 1,3 **** ! %(CCMUsesType)s::SmartPtr %(Identifier)s_receptacle; --- 1,3 ---- ! %(UsesType)s::SmartPtr %(Identifier)s_receptacle; Index: MUsesDefGetCtxConnectionPrototype =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetCtxConnectionPrototype,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MUsesDefGetCtxConnectionPrototype 5 Jan 2007 14:17:24 -0000 1.10 --- MUsesDefGetCtxConnectionPrototype 28 Feb 2007 08:03:28 -0000 1.11 *************** *** 1,3 **** ! %(CCMUsesType)s::SmartPtr get_connection_%(Identifier)s() throw(::Components::NoConnection); --- 1,3 ---- ! %(UsesType)s::SmartPtr get_connection_%(Identifier)s() throw(::Components::NoConnection); Index: MInterfaceDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MInterfaceDef,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** MInterfaceDef 26 Feb 2007 15:30:15 -0000 1.26 --- MInterfaceDef 28 Feb 2007 08:03:28 -0000 1.27 *************** *** 135,147 **** %(Identifier)sAdapter::%(Identifier)sAdapter() { - validConnection_ = false; - facet_ = NULL; } %(Identifier)sAdapter::%(Identifier)sAdapter(%(InterfaceCCMName)s* f) ! : facet_(f) { - validConnection_ = true; } --- 135,147 ---- %(Identifier)sAdapter::%(Identifier)sAdapter() + : facet_(NULL) + , validConnection_(false) { } %(Identifier)sAdapter::%(Identifier)sAdapter(%(InterfaceCCMName)s* f) ! : facet_(f) ! , validConnection_(f!=NULL) { } Index: MUsesDefAdapterDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefAdapterDefinition,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MUsesDefAdapterDefinition 5 Jan 2007 14:17:25 -0000 1.11 --- MUsesDefAdapterDefinition 28 Feb 2007 08:03:28 -0000 1.12 *************** *** 11,16 **** throw ::Components::AlreadyConnected(); } ! %(Identifier)s_receptacle = %(CCMUsesType)s::SmartPtr( ! dynamic_cast< %(CCMUsesType)s* >(f.ptr())); } --- 11,15 ---- throw ::Components::AlreadyConnected(); } ! %(Identifier)s_receptacle = f; } *************** *** 28,32 **** } %(UsesType)s::SmartPtr f = %(Identifier)s_receptacle; ! %(Identifier)s_receptacle = %(CCMUsesType)s::SmartPtr(); return f; } --- 27,31 ---- } %(UsesType)s::SmartPtr f = %(Identifier)s_receptacle; ! %(Identifier)s_receptacle.forget(); return f; } *************** *** 40,44 **** throw ::Components::InvalidConnection(); } ! if(%(Identifier)s_receptacle == %(CCMUsesType)s::SmartPtr()) throw ::Components::NoConnection(); return %(Identifier)s_receptacle; --- 39,43 ---- throw ::Components::InvalidConnection(); } ! if(!%(Identifier)s_receptacle) throw ::Components::NoConnection(); return %(Identifier)s_receptacle; Index: MUsesDefGetConnectionCtxImplDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MUsesDefGetConnectionCtxImplDefinition,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MUsesDefGetConnectionCtxImplDefinition 5 Jan 2007 14:17:25 -0000 1.11 --- MUsesDefGetConnectionCtxImplDefinition 28 Feb 2007 08:03:28 -0000 1.12 *************** *** 1,9 **** ! %(CCMUsesType)s::SmartPtr CCM_%(ComponentType)s_Context_impl::get_connection_%(Identifier)s() throw(::Components::NoConnection) { ! %(UsesType)s::SmartPtr r = ! component_local_adapter->get_connection_%(Identifier)s(); ! return %(CCMUsesType)s::SmartPtr(dynamic_cast< %(CCMUsesType)s*>(r.ptr())); } --- 1,7 ---- ! %(UsesType)s::SmartPtr CCM_%(ComponentType)s_Context_impl::get_connection_%(Identifier)s() throw(::Components::NoConnection) { ! return component_local_adapter->get_connection_%(Identifier)s(); } |
From: Robert L. <rle...@us...> - 2007-02-28 08:03:31
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23248/src/ccmtools/CppGenerator Modified Files: CppAssemblyGenerator.java Log Message: bug fix: wrong use of local impl. interfaces Index: CppAssemblyGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppAssemblyGenerator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CppAssemblyGenerator.java 27 Feb 2007 15:19:24 -0000 1.4 --- CppAssemblyGenerator.java 28 Feb 2007 08:03:28 -0000 1.5 *************** *** 18,22 **** import java.util.logging.Logger; import ccmtools.CcmtoolsException; - import ccmtools.generator.java.metamodel.ProvidesDef; import ccmtools.parser.assembly.metamodel.Assembly; import ccmtools.parser.assembly.metamodel.AssemblyElement; --- 18,21 ---- |
From: Robert L. <rle...@us...> - 2007-02-28 08:02:19
|
Update of /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22867/test/CppAssembly/sample_logger Modified Files: OutputStreamLogger_logger_impl.cc _check_main.cc Log Message: bug fix: wrong use of local impl. interfaces Index: OutputStreamLogger_logger_impl.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger/OutputStreamLogger_logger_impl.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OutputStreamLogger_logger_impl.cc 22 Feb 2007 13:31:04 -0000 1.1 --- OutputStreamLogger_logger_impl.cc 28 Feb 2007 08:02:16 -0000 1.2 *************** *** 38,42 **** throw(::Components::CCMException) { ! ::wamas::io::CCM_OutputStream::SmartPtr os = component->ctx->get_connection_stream(); for(std::string::const_iterator it=message.begin(); it!=message.end(); ++it) { --- 38,42 ---- throw(::Components::CCMException) { ! ::wamas::io::OutputStream::SmartPtr os = component->ctx->get_connection_stream(); for(std::string::const_iterator it=message.begin(); it!=message.end(); ++it) { Index: _check_main.cc =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/CppAssembly/sample_logger/_check_main.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _check_main.cc 22 Feb 2007 13:31:05 -0000 1.1 --- _check_main.cc 28 Feb 2007 08:02:16 -0000 1.2 *************** *** 13,19 **** --- 13,23 ---- try { + std::cout << "# creating home" << std::endl; StdErrLoggerHome home; + std::cout << "# creating component" << std::endl; comp = home.create(); + std::cout << "# provide logger" << std::endl; logger = comp->provide_logger(); + std::cout << "# configuration complete" << std::endl; comp->configuration_complete(); } *************** *** 27,30 **** --- 31,35 ---- try { + std::cout << "# business logic" << std::endl; logger->print("Hello World!"); } *************** *** 38,41 **** --- 43,47 ---- try { + std::cout << "# tear down" << std::endl; comp->remove(); } |
From: Robert L. <rle...@us...> - 2007-02-27 15:19:28
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27382/src/ccmtools/CppGenerator Modified Files: CppAssemblyGenerator.java Log Message: now support "provide" and "set attribute" after "configuration complete" Index: CppAssemblyGenerator.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/CppGenerator/CppAssemblyGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CppAssemblyGenerator.java 21 Feb 2007 16:05:57 -0000 1.3 --- CppAssemblyGenerator.java 27 Feb 2007 15:19:24 -0000 1.4 *************** *** 28,35 **** import ccmtools.parser.assembly.metamodel.Port; import ccmtools.parser.idl.metamodel.CcmModelHelper; import ccmtools.parser.idl.metamodel.BaseIDL.MContained; import ccmtools.parser.idl.metamodel.BaseIDL.MInterfaceDef; import ccmtools.parser.idl.metamodel.BaseIDL.MOperationDef; - import ccmtools.parser.idl.metamodel.BaseIDL.MPrimitiveKind; import ccmtools.parser.idl.metamodel.ComponentIDL.MComponentDef; import ccmtools.parser.idl.metamodel.ComponentIDL.MHomeDef; --- 28,35 ---- import ccmtools.parser.assembly.metamodel.Port; import ccmtools.parser.idl.metamodel.CcmModelHelper; + import ccmtools.parser.idl.metamodel.BaseIDL.MAttributeDef; import ccmtools.parser.idl.metamodel.BaseIDL.MContained; import ccmtools.parser.idl.metamodel.BaseIDL.MInterfaceDef; import ccmtools.parser.idl.metamodel.BaseIDL.MOperationDef; import ccmtools.parser.idl.metamodel.ComponentIDL.MComponentDef; import ccmtools.parser.idl.metamodel.ComponentIDL.MHomeDef; *************** *** 194,199 **** protected String variable_AssemblyInnerComponentVariableCreation() { ! StringBuffer code_homes = new StringBuffer(); ! StringBuffer code_creation = new StringBuffer(); HashMap<String, String> home_map = new HashMap<String, String>(); int counter = 0; --- 194,201 ---- protected String variable_AssemblyInnerComponentVariableCreation() { ! if (currentAssembly == null) ! return ""; ! StringBuilder code_homes = new StringBuilder(); ! StringBuilder code_creation = new StringBuilder(); HashMap<String, String> home_map = new HashMap<String, String>(); int counter = 0; *************** *** 202,226 **** { MComponentDef comp_def = map.get(key); ! MHomeDef home = getHome(comp_def); ! String home_type = getLocalCxxName(home, "::"); ! String home_var = home_map.get(home_type); ! if (home_var == null) { ! home_var = "home" + counter; ! ++counter; ! home_map.put(home_type, home_var); ! code_homes.append(TAB); ! code_homes.append(home_type); ! code_homes.append(" "); ! code_homes.append(home_var); ! code_homes.append(";\n"); } - code_creation.append(TAB); - code_creation.append(key); - code_creation.append("_ = "); - code_creation.append(home_var); - code_creation.append(".create();\n"); } ! return code_homes.toString() + code_creation.toString(); } --- 204,258 ---- { MComponentDef comp_def = map.get(key); ! String comp_alias = currentAssembly.getComponents().get(key).getAlias(); ! if (comp_alias != null) { ! // calling home-finder ! throw new RuntimeException("no yet implemented"); // TODO ! } ! else ! { ! MHomeDef home = getHome(comp_def); ! String home_type = getLocalCxxName(home, "::"); ! String home_var = home_map.get(home_type); ! if (home_var == null) ! { ! home_var = "home" + counter; ! ++counter; ! home_map.put(home_type, home_var); ! code_homes.append(TAB); ! code_homes.append(home_type); ! code_homes.append(" "); ! code_homes.append(home_var); ! code_homes.append(";\n"); ! } ! code_creation.append(TAB); ! code_creation.append(key); ! code_creation.append("_ = "); ! code_creation.append(home_var); ! code_creation.append(".create();\n"); } } ! StringBuilder result = new StringBuilder(); ! result.append(code_homes); ! result.append(code_creation); ! for (AssemblyElement e : currentAssembly.getElements()) ! { ! if (e instanceof Constant) ! { ! Constant c = (Constant) e; ! Port target = c.getTarget(); ! String value = c.getValue().toString(); ! StringBuilder code = new StringBuilder(); ! code.append(TAB); ! code.append(target.getComponent()); ! code.append("_->"); ! code.append(target.getConnector()); ! code.append("("); ! code.append(value); ! code.append(");\n"); ! result.append(code); ! } ! } ! return result.toString(); } *************** *** 245,248 **** --- 277,282 ---- protected String variable_AssemblyInnerHomeInclude() { + if (currentAssembly == null) + return ""; HashSet<String> include_set = new HashSet<String>(); StringBuffer code = new StringBuffer(); *************** *** 250,260 **** for (String key : map.keySet()) { ! MComponentDef comp_def = map.get(key); ! MHomeDef home = getHome(comp_def); ! String inc_name = getLocalCxxIncludeName(home); ! if (!include_set.contains(inc_name)) { ! code.append("#include <" + inc_name + "_gen.h>\n"); ! include_set.add(inc_name); } } --- 284,298 ---- for (String key : map.keySet()) { ! String comp_alias = currentAssembly.getComponents().get(key).getAlias(); ! if (comp_alias == null) { ! MComponentDef comp_def = map.get(key); ! MHomeDef home = getHome(comp_def); ! String inc_name = getLocalCxxIncludeName(home); ! if (!include_set.contains(inc_name)) ! { ! code.append("#include <" + inc_name + "_gen.h>\n"); ! include_set.add(inc_name); ! } } } *************** *** 300,316 **** } Port source = c.getFacet(); ! if (source.getComponent() == null) ! { ! // connect from an outer receptacle ! code.append("ctx->get_connection_"); ! } ! else ! { ! // connect from the facet of an inner component ! code.append(source.getComponent()); ! code.append("_->provide_"); ! } ! code.append(source.getConnector()); ! code.append("()"); code.append(code_tail); activation_code.append(code); --- 338,342 ---- } Port source = c.getFacet(); ! code.append(getFacetValue(source)); code.append(code_tail); activation_code.append(code); *************** *** 331,349 **** activation_code.append(code); } - else if (e instanceof Constant) - { - Constant c = (Constant) e; - Port target = c.getTarget(); - String value = c.getValue().toString(); - StringBuilder code = new StringBuilder(); - code.append(TAB2); - code.append(target.getComponent()); - code.append("_->"); - code.append(target.getConnector()); - code.append("("); - code.append(value); - code.append(");\n"); - activation_code.append(code); - } } for (Object o : comp_def.getFacets()) --- 357,360 ---- *************** *** 442,445 **** --- 453,460 ---- return variable_AssemblyTargetVariable(); } + if (dataType.equals("AssemblyGetFacetCode")) + { + return variable_AssemblyGetFacetCode(); + } return super.data_MProvidesDef(dataType, dataValue); } *************** *** 453,456 **** --- 468,522 ---- } + protected String variable_AssemblyGetFacetCode() + { + if (currentAssembly == null) + return ""; + MProvidesDef provides = (MProvidesDef) currentNode; + StringBuilder result = new StringBuilder(); + result.append(TAB).append("if(ccm_activate_ok) {\n"); + result.append(TAB2).append("facet->target = "); + result.append(getAssemblyInitFacetTargetValue(provides)).append(";\n"); + result.append(TAB).append("}\n"); + return result.toString(); + } + + private String getAssemblyInitFacetTargetValue( MProvidesDef provides ) + { + String name = provides.getIdentifier(); + for (AssemblyElement e : currentAssembly.getElements()) + { + if (e instanceof Connection) + { + Connection c = (Connection) e; + Port target = c.getReceptacle(); + if (target.getComponent() == null && target.getConnector().equals(name)) + { + Port source = c.getFacet(); + return getFacetValue(source); + } + } + } + throw new RuntimeException("facet " + name + " is not connected to an inner component"); + } + + private static String getFacetValue( Port source ) + { + StringBuilder code = new StringBuilder(); + if (source.getComponent() == null) + { + // connect from an outer receptacle + code.append("ctx->get_connection_"); + } + else + { + // connect from the facet of an inner component + code.append(source.getComponent()); + code.append("_->provide_"); + } + code.append(source.getConnector()); + code.append("()"); + return code.toString(); + } + protected String generateOperationImpl( MProvidesDef provides, MOperationDef op ) { *************** *** 473,475 **** --- 539,588 ---- return code.toString(); } + + protected String data_MAttributeDef( String dataType, String dataValue ) + { + if (dataType.equals("AssemblyAttributeSetterCode")) + { + return variable_AssemblyAttributeSetterCode(); + } + return super.data_MAttributeDef(dataType, dataValue); + } + + protected String variable_AssemblyAttributeSetterCode() + { + if (currentAssembly == null) + return ""; + MAttributeDef attr = (MAttributeDef) currentNode; + String source = attr.getIdentifier(); + StringBuilder result = new StringBuilder(); + boolean empty = true; + for (AssemblyElement e : currentAssembly.getElements()) + { + if (e instanceof Attribute) + { + Attribute a = (Attribute) e; + if (a.getSource().equals(source)) + { + Port target = a.getTarget(); + StringBuilder code = new StringBuilder(); + code.append(TAB2); + code.append(target.getComponent()); + code.append("_->"); + code.append(target.getConnector()); + code.append("(this->"); + code.append(source); + code.append("_);\n"); + if (empty) + { + result.append(TAB + "if(ccm_activate_ok) {\n"); + empty = false; + } + result.append(code); + } + } + } + if (!empty) + result.append(TAB + "}\n"); + return result.toString(); + } } |
From: Robert L. <rle...@us...> - 2007-02-27 15:19:28
|
Update of /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27382/src/templates/CppLocalTemplates Modified Files: MComponentDef MProvidesDefGetFacetDefinition MAttributeDefImplDefinition Log Message: now support "provide" and "set attribute" after "configuration complete" Index: MAttributeDefImplDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MAttributeDefImplDefinition,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MAttributeDefImplDefinition 2 Jan 2007 13:26:19 -0000 1.8 --- MAttributeDefImplDefinition 27 Feb 2007 15:19:23 -0000 1.9 *************** *** 11,14 **** --- 11,15 ---- { %(Identifier)s_ = value; + %(AssemblyAttributeSetterCode)s } Index: MProvidesDefGetFacetDefinition =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MProvidesDefGetFacetDefinition,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MProvidesDefGetFacetDefinition 21 Feb 2007 16:04:48 -0000 1.8 --- MProvidesDefGetFacetDefinition 27 Feb 2007 15:19:23 -0000 1.9 *************** *** 8,11 **** --- 8,12 ---- %(ComponentType)s_%(Identifier)s_impl* facet = new %(ComponentType)s_%(Identifier)s_impl(this); + %(AssemblyGetFacetCode)s %(Identifier)s_ = dynamic_cast< %(CCMProvidesType)s* >(facet); return %(Identifier)s_; Index: MComponentDef =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/templates/CppLocalTemplates/MComponentDef,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** MComponentDef 21 Feb 2007 16:04:48 -0000 1.25 --- MComponentDef 27 Feb 2007 15:19:23 -0000 1.26 *************** *** 428,431 **** --- 428,432 ---- %(MSupportsDefVariable)s %(AssemblyInnerComponentVariable)s + bool ccm_activate_ok; public: *************** *** 488,491 **** --- 489,493 ---- %(Identifier)s_impl::%(Identifier)s_impl() + : ccm_activate_ok(false) { %(MProvidesDefGetFacetPointerInit)s *************** *** 516,519 **** --- 518,522 ---- throw Components::CCMException(Components::CREATE_ERROR); } + ccm_activate_ok = true; } |
From: Robert L. <rle...@us...> - 2007-02-27 12:51:15
|
Update of /cvsroot/ccmtools/java-environment/src/Components In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27417/src/Components Modified Files: HomeFinder.java Log Message: Java assemblies Index: HomeFinder.java =================================================================== RCS file: /cvsroot/ccmtools/java-environment/src/Components/HomeFinder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HomeFinder.java 10 Jan 2007 16:11:29 -0000 1.1 --- HomeFinder.java 27 Feb 2007 12:51:07 -0000 1.2 *************** *** 45,49 **** else { ! throw new HomeNotFound(); } } --- 45,49 ---- else { ! throw new HomeNotFound(name); } } |
From: Robert L. <rle...@us...> - 2007-02-27 12:36:20
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21862/src/ccmtools/generator/java/templates/jet Modified Files: ComponentDefAssemblyClass.jet Added Files: AttributeDefAssemblyImplementation.jet Log Message: now support "set attribute" after "configuration complete" Index: ComponentDefAssemblyClass.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ComponentDefAssemblyClass.jet,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ComponentDefAssemblyClass.jet 27 Feb 2007 08:28:16 -0000 1.8 --- ComponentDefAssemblyClass.jet 27 Feb 2007 12:36:16 -0000 1.9 *************** *** 74,78 **** { try { - // create inner components <% for(Iterator i=component.getAssemblyAttributeInitialisation(); i.hasNext();) --- 74,77 ---- *************** *** 134,138 **** AttributeDef attr = (AttributeDef)i.next(); %> ! <%=attr.generateApplicationImplementation()%> <% } --- 133,137 ---- AttributeDef attr = (AttributeDef)i.next(); %> ! <%=attr.generateAssemblyImplementation(component.getAssemblyAttributeTarget(attr.getIdentifier()))%> <% } --- NEW FILE: AttributeDefAssemblyImplementation.jet --- <%@ jet package="ccmtools.generator.java.templates" class="AttributeDefAssemblyImplementationTemplate" imports="ccmtools.generator.java.metamodel.* " %> <% AttributeDef attr = (AttributeDef) argument; %> public <%=attr.getType().generateJavaMapping()%> <%=attr.getIdentifier()%>() throws CCMException { return this.<%=attr.getIdentifier()%>_; } public void <%=attr.getIdentifier()%>(<%=attr.getType().generateJavaMapping()%> value) throws CCMException { this.<%=attr.getIdentifier()%>_ = value; <% for(String code:attr.assembly_extra_code) { %> <%=code%> <% } %> } |
From: Robert L. <rle...@us...> - 2007-02-27 12:36:20
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21862/src/ccmtools/generator/java/templates Modified Files: ComponentDefAssemblyClassTemplate.java Added Files: AttributeDefAssemblyImplementationTemplate.java Log Message: now support "set attribute" after "configuration complete" Index: ComponentDefAssemblyClassTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ComponentDefAssemblyClassTemplate.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ComponentDefAssemblyClassTemplate.java 27 Feb 2007 08:28:16 -0000 1.8 --- ComponentDefAssemblyClassTemplate.java 27 Feb 2007 12:36:16 -0000 1.9 *************** *** 31,35 **** protected final String TEXT_14 = " " + NL + "" + NL + " public "; protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " private boolean ccm_activate_ok;" + NL + "" + NL + " " + NL + " public "; ! protected final String TEXT_16 = "Impl()" + NL + " throws CCMException" + NL + " {" + NL + " \ttry {" + NL + "\t\t\t// create inner components \t"; protected final String TEXT_17 = NL; protected final String TEXT_18 = " " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; --- 31,35 ---- protected final String TEXT_14 = " " + NL + "" + NL + " public "; protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " private boolean ccm_activate_ok;" + NL + "" + NL + " " + NL + " public "; ! protected final String TEXT_16 = "Impl()" + NL + " throws CCMException" + NL + " {" + NL + " \ttry {"; protected final String TEXT_17 = NL; protected final String TEXT_18 = " " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + "" + NL + " /* " + NL + " * Supported interface methods " + NL + " */" + NL + "" + NL + " /** Supported interface attributes */" + NL; *************** *** 157,161 **** stringBuffer.append(TEXT_23); ! stringBuffer.append(attr.generateApplicationImplementation()); } --- 157,161 ---- stringBuffer.append(TEXT_23); ! stringBuffer.append(attr.generateAssemblyImplementation(component.getAssemblyAttributeTarget(attr.getIdentifier()))); } --- NEW FILE: AttributeDefAssemblyImplementationTemplate.java --- package ccmtools.generator.java.templates; import ccmtools.generator.java.metamodel.*; public class AttributeDefAssemblyImplementationTemplate { protected static String nl; public static synchronized AttributeDefAssemblyImplementationTemplate create(String lineSeparator) { nl = lineSeparator; AttributeDefAssemblyImplementationTemplate result = new AttributeDefAssemblyImplementationTemplate(); nl = null; return result; } protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = NL + " public "; protected final String TEXT_2 = " "; protected final String TEXT_3 = "()" + NL + " throws CCMException" + NL + " {" + NL + " return this."; protected final String TEXT_4 = "_;" + NL + " } " + NL + "" + NL + " public void "; protected final String TEXT_5 = "("; protected final String TEXT_6 = " value)" + NL + " throws CCMException" + NL + " {" + NL + " this."; protected final String TEXT_7 = "_ = value;"; protected final String TEXT_8 = NL; protected final String TEXT_9 = " " + NL + " }"; protected final String TEXT_10 = NL; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); AttributeDef attr = (AttributeDef) argument; stringBuffer.append(TEXT_1); stringBuffer.append(attr.getType().generateJavaMapping()); stringBuffer.append(TEXT_2); stringBuffer.append(attr.getIdentifier()); stringBuffer.append(TEXT_3); stringBuffer.append(attr.getIdentifier()); stringBuffer.append(TEXT_4); stringBuffer.append(attr.getIdentifier()); stringBuffer.append(TEXT_5); stringBuffer.append(attr.getType().generateJavaMapping()); stringBuffer.append(TEXT_6); stringBuffer.append(attr.getIdentifier()); stringBuffer.append(TEXT_7); for(String code:attr.assembly_extra_code) { stringBuffer.append(TEXT_8); stringBuffer.append(code); } stringBuffer.append(TEXT_9); stringBuffer.append(TEXT_10); return stringBuffer.toString(); } } |
From: Robert L. <rle...@us...> - 2007-02-27 12:36:20
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/metamodel In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21862/src/ccmtools/generator/java/metamodel Modified Files: ComponentDef.java AttributeDef.java Log Message: now support "set attribute" after "configuration complete" Index: AttributeDef.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/metamodel/AttributeDef.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AttributeDef.java 16 Jan 2007 09:25:22 -0000 1.10 --- AttributeDef.java 27 Feb 2007 12:36:16 -0000 1.11 *************** *** 1,10 **** package ccmtools.generator.java.metamodel; import java.util.Set; - import ccmtools.generator.java.templates.AttributeDefAdapterFromCorbaTemplate; import ccmtools.generator.java.templates.AttributeDefAdapterLocalTemplate; import ccmtools.generator.java.templates.AttributeDefAdapterToCorbaTemplate; import ccmtools.generator.java.templates.AttributeDefApplicationImplementationTemplate; import ccmtools.generator.java.templates.AttributeDefDeclarationTemplate; --- 1,11 ---- package ccmtools.generator.java.metamodel; + import java.util.List; import java.util.Set; import ccmtools.generator.java.templates.AttributeDefAdapterFromCorbaTemplate; import ccmtools.generator.java.templates.AttributeDefAdapterLocalTemplate; import ccmtools.generator.java.templates.AttributeDefAdapterToCorbaTemplate; import ccmtools.generator.java.templates.AttributeDefApplicationImplementationTemplate; + import ccmtools.generator.java.templates.AttributeDefAssemblyImplementationTemplate; import ccmtools.generator.java.templates.AttributeDefDeclarationTemplate; *************** *** 86,89 **** --- 87,98 ---- return new AttributeDefApplicationImplementationTemplate().generate(this); } + + public String generateAssemblyImplementation(List<String> assembly_extra_code) + { + this.assembly_extra_code = assembly_extra_code; + return new AttributeDefAssemblyImplementationTemplate().generate(this); + } + + public List<String> assembly_extra_code; Index: ComponentDef.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/metamodel/ComponentDef.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ComponentDef.java 27 Feb 2007 08:28:16 -0000 1.27 --- ComponentDef.java 27 Feb 2007 12:36:15 -0000 1.28 *************** *** 309,312 **** --- 309,313 ---- { ArrayList<String> list = new ArrayList<String>(); + list.add(TAB3 + "// create inner components"); for (String key : getAssemblyLocalComponents().keySet()) { *************** *** 345,348 **** --- 346,368 ---- } } + list.add("\n" + TAB3 + "// set constant attributes"); + for (AssemblyElement e : assembly_.getElements()) + { + if (e instanceof Constant) + { + Constant c = (Constant) e; + Port target = c.getTarget(); + String value = c.getValue().toString(); + StringBuffer code = new StringBuffer(); + code.append(TAB3); + code.append(target.getComponent()); + code.append("_."); + code.append(target.getConnector()); + code.append("("); + code.append(value); + code.append(");"); + list.add(code.toString()); + } + } return list.iterator(); } *************** *** 402,420 **** list.add(code.toString()); } - else if (e instanceof Constant) - { - Constant c = (Constant) e; - Port target = c.getTarget(); - String value = c.getValue().toString(); - StringBuffer code = new StringBuffer(); - code.append(TAB3); - code.append(target.getComponent()); - code.append("_."); - code.append(target.getConnector()); - code.append("("); - code.append(value); - code.append(");"); - list.add(code.toString()); - } } for (ProvidesDef p : getFacet()) --- 422,425 ---- *************** *** 430,433 **** --- 435,472 ---- } + public List<String> getAssemblyAttributeTarget( String source ) + { + ArrayList<String> list = new ArrayList<String>(); + boolean empty = true; + for (AssemblyElement e : assembly_.getElements()) + { + if (e instanceof Attribute) + { + Attribute a = (Attribute) e; + if (a.getSource().equals(source)) + { + Port target = a.getTarget(); + StringBuilder code = new StringBuilder(); + code.append(TAB3); + code.append(target.getComponent()); + code.append("_."); + code.append(target.getConnector()); + code.append("(this."); + code.append(source); + code.append("_);"); + if (empty) + { + list.add(TAB2 + "if(ccm_activate_ok) {"); + empty = false; + } + list.add(code.toString()); + } + } + } + if (!empty) + list.add(TAB2 + "}"); + return list; + } + private static String getFacetValue( Port source ) { |
From: Robert L. <rle...@us...> - 2007-02-27 09:25:31
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/test1 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4664/test/JavaAssembly/test1 Modified Files: Makefile Log Message: Java assemblies Index: Makefile =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/test/JavaAssembly/test1/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 19 Feb 2007 09:08:48 -0000 1.3 --- Makefile 27 Feb 2007 09:25:28 -0000 1.4 *************** *** 6,7 **** --- 6,10 ---- java wamas.Main rm `find -name '*.class'` + + clean: + rm -rf wamas |
From: Robert L. <rle...@us...> - 2007-02-27 09:23:54
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/yyy In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3775/test/JavaAssembly/prototype2/yyy Removed Files: kfhsdök Log Message: xxx --- kfhsdök DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:22:43
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/yyy In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3296/test/JavaAssembly/prototype2/yyy Added Files: kfhsdök Log Message: yyy --- NEW FILE: kfhsdök --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:21:52
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/yyy In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2831/test/JavaAssembly/prototype2/yyy Log Message: Directory /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/yyy added to the repository |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:55
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/idl3/component/wamas In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/idl3/component/wamas Removed Files: H3.idl C3.idl Log Message: remove folder "xxx" --- H3.idl DELETED --- --- C3.idl DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:55
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/idl3/interface/wamas/Test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/idl3/interface/wamas/Test Removed Files: I1.idl I2.idl I3.idl Log Message: remove folder "xxx" --- I2.idl DELETED --- --- I3.idl DELETED --- --- I1.idl DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:54
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/src/wamas In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/src/wamas Removed Files: H3Factory.java C3Impl.java C3i1Impl.java Main.java H3Impl.java Log Message: remove folder "xxx" --- H3Factory.java DELETED --- --- Main.java DELETED --- --- C3Impl.java DELETED --- --- H3Impl.java DELETED --- --- C3i1Impl.java DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:54
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/idl3/component/wamas/Test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/idl3/component/wamas/Test Removed Files: C2.idl C1.idl H1.idl H2.idl Log Message: remove folder "xxx" --- H1.idl DELETED --- --- C2.idl DELETED --- --- C1.idl DELETED --- --- H2.idl DELETED --- |
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/src-gen/wamas/Test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/src-gen/wamas/Test Removed Files: I2Adapter.java C2Adapter.java H1Implicit.java H2.java CCM_H2.java CCM_I3.java CCM_H1Implicit.java H1Explicit.java I1.java H2Adapter.java CCM_H2Explicit.java CCM_C1_ContextImpl.java CCM_H2Implicit.java H2Implicit.java C1Adapter.java CCM_C2_ContextImpl.java CCM_C2.java H1Deployment.java CCM_I1.java H1.java I3Adapter.java CCM_C1_Context.java CCM_H1.java I1Adapter.java C1.java I2.java CCM_C1.java H2Deployment.java C2.java CCM_H1Explicit.java I3.java CCM_C2_Context.java H1Adapter.java H2Explicit.java CCM_I2.java Log Message: remove folder "xxx" --- CCM_C2.java DELETED --- --- C2.java DELETED --- --- C2Adapter.java DELETED --- --- I3.java DELETED --- --- CCM_C1.java DELETED --- --- I1.java DELETED --- --- H1Adapter.java DELETED --- --- C1.java DELETED --- --- H1.java DELETED --- --- H1Deployment.java DELETED --- --- I1Adapter.java DELETED --- --- I3Adapter.java DELETED --- --- H2Implicit.java DELETED --- --- H1Implicit.java DELETED --- --- CCM_I2.java DELETED --- --- CCM_I1.java DELETED --- --- H2Explicit.java DELETED --- --- CCM_C1_ContextImpl.java DELETED --- --- CCM_H1Explicit.java DELETED --- --- CCM_C2_Context.java DELETED --- --- CCM_C1_Context.java DELETED --- --- H1Explicit.java DELETED --- --- CCM_H1Implicit.java DELETED --- --- H2.java DELETED --- --- I2Adapter.java DELETED --- --- CCM_H2Explicit.java DELETED --- --- CCM_C2_ContextImpl.java DELETED --- --- I2.java DELETED --- --- H2Adapter.java DELETED --- --- CCM_H2Implicit.java DELETED --- --- CCM_H1.java DELETED --- --- H2Deployment.java DELETED --- --- CCM_I3.java DELETED --- --- C1Adapter.java DELETED --- --- CCM_H2.java DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:53
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/src/wamas/Test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/src/wamas/Test Removed Files: C2Impl.java H2Impl.java C2i2Impl.java H2Factory.java H1Impl.java C1i1Impl.java C1Impl.java H1Factory.java Log Message: remove folder "xxx" --- H2Factory.java DELETED --- --- H1Impl.java DELETED --- --- C2i2Impl.java DELETED --- --- C1i1Impl.java DELETED --- --- H2Impl.java DELETED --- --- C1Impl.java DELETED --- --- C2Impl.java DELETED --- --- H1Factory.java DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:52
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx/src-gen/wamas In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx/src-gen/wamas Removed Files: C3.java H3Deployment.java H3Implicit.java H3.java H3Explicit.java CCM_C3.java CCM_H3.java CCM_H3Explicit.java C3Adapter.java CCM_H3Implicit.java CCM_C3_Context.java H3Adapter.java CCM_C3_ContextImpl.java Log Message: remove folder "xxx" --- H3Adapter.java DELETED --- --- CCM_H3Explicit.java DELETED --- --- H3Implicit.java DELETED --- --- C3.java DELETED --- --- CCM_C3_Context.java DELETED --- --- CCM_C3_ContextImpl.java DELETED --- --- H3Explicit.java DELETED --- --- CCM_C3.java DELETED --- --- H3.java DELETED --- --- CCM_H3Implicit.java DELETED --- --- CCM_H3.java DELETED --- --- H3Deployment.java DELETED --- --- C3Adapter.java DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:16:52
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2/xxx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv504/test/JavaAssembly/prototype2/xxx Removed Files: .cvsignore Log Message: remove folder "xxx" --- .cvsignore DELETED --- |
From: Robert L. <rle...@us...> - 2007-02-27 09:11:55
|
Update of /cvsroot/ccmtools/ccmtools/test/JavaAssembly/prototype2 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31044/test/JavaAssembly/prototype2 Added Files: .cvsignore Log Message: Java assemblies --- NEW FILE: .cvsignore --- xxx |
From: Robert L. <rle...@us...> - 2007-02-27 09:07:19
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29224/src/ccmtools/parser/assembly Modified Files: assembly.flex bnf.txt Log Message: "const" is an alias for "constant" Index: bnf.txt =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/bnf.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bnf.txt 23 Feb 2007 14:15:33 -0000 1.4 --- bnf.txt 27 Feb 2007 09:07:15 -0000 1.5 *************** *** 26,30 **** attribute := "attribute" internal_port "=" external_port ";" ! constant := "constant" internal_port "=" value ";" value := STRING | NUMBER --- 26,30 ---- attribute := "attribute" internal_port "=" external_port ";" ! constant := ("constant" | "const") internal_port "=" value ";" value := STRING | NUMBER Index: assembly.flex =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/parser/assembly/assembly.flex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** assembly.flex 23 Feb 2007 14:15:33 -0000 1.5 --- assembly.flex 27 Feb 2007 09:07:15 -0000 1.6 *************** *** 87,90 **** --- 87,93 ---- "this" { return symbol(sym.THIS); } "to" { return symbol(sym.TO); } + + /* aliases */ + "const" { return symbol(sym.CONSTANT); } /* operators and separators */ |
From: Robert L. <rle...@us...> - 2007-02-27 08:28:25
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11416/src/ccmtools/generator/java/templates Modified Files: ProvidesDefGetMethodAssemblyImplementationTemplate.java ComponentDefAssemblyClassTemplate.java Log Message: now support "provide" after "configuration complete" Index: ComponentDefAssemblyClassTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ComponentDefAssemblyClassTemplate.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ComponentDefAssemblyClassTemplate.java 26 Feb 2007 15:49:42 -0000 1.7 --- ComponentDefAssemblyClassTemplate.java 27 Feb 2007 08:28:16 -0000 1.8 *************** *** 30,34 **** protected final String TEXT_13 = NL; protected final String TEXT_14 = " " + NL + "" + NL + " public "; ! protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " " + NL + " public "; protected final String TEXT_16 = "Impl()" + NL + " throws CCMException" + NL + " {" + NL + " \ttry {" + NL + "\t\t\t// create inner components \t"; protected final String TEXT_17 = NL; --- 30,34 ---- protected final String TEXT_13 = NL; protected final String TEXT_14 = " " + NL + "" + NL + " public "; ! protected final String TEXT_15 = "_Context ctx;" + NL + " " + NL + " private boolean ccm_activate_ok;" + NL + "" + NL + " " + NL + " public "; protected final String TEXT_16 = "Impl()" + NL + " throws CCMException" + NL + " {" + NL + " \ttry {" + NL + "\t\t\t// create inner components \t"; protected final String TEXT_17 = NL; *************** *** 47,51 **** protected final String TEXT_30 = NL + "\t\t\t"; protected final String TEXT_31 = "_.configuration_complete();"; ! protected final String TEXT_32 = " " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + " public void ccm_passivate() " + NL + " throws CCMException" + NL + " {" + NL + " // Who calls this method?" + NL + " }" + NL + "" + NL + " public void ccm_remove() " + NL + " throws CCMException" + NL + " {" + NL + " \ttry {"; protected final String TEXT_33 = NL + "\t\t\t"; protected final String TEXT_34 = "_.remove();"; --- 47,51 ---- protected final String TEXT_30 = NL + "\t\t\t"; protected final String TEXT_31 = "_.configuration_complete();"; ! protected final String TEXT_32 = NL + NL + "\t\t\tccm_activate_ok = true; " + NL + " \t} catch(Exception e) {" + NL + " \t\tthrow new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR);" + NL + " \t}" + NL + " }" + NL + "" + NL + " public void ccm_passivate() " + NL + " throws CCMException" + NL + " {" + NL + " // Who calls this method?" + NL + " }" + NL + "" + NL + " public void ccm_remove() " + NL + " throws CCMException" + NL + " {" + NL + " \ttry {"; protected final String TEXT_33 = NL + "\t\t\t"; protected final String TEXT_34 = "_.remove();"; Index: ProvidesDefGetMethodAssemblyImplementationTemplate.java =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/ProvidesDefGetMethodAssemblyImplementationTemplate.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProvidesDefGetMethodAssemblyImplementationTemplate.java 27 Feb 2007 07:07:25 -0000 1.3 --- ProvidesDefGetMethodAssemblyImplementationTemplate.java 27 Feb 2007 08:28:15 -0000 1.4 *************** *** 23,29 **** protected final String TEXT_7 = "_ = new "; protected final String TEXT_8 = "."; ! protected final String TEXT_9 = "Impl(this);" + NL + " \treturn "; ! protected final String TEXT_10 = "_;" + NL + " }"; ! protected final String TEXT_11 = NL; public String generate(Object argument) --- 23,31 ---- protected final String TEXT_7 = "_ = new "; protected final String TEXT_8 = "."; ! protected final String TEXT_9 = "Impl(this);" + NL + " \tif(ccm_activate_ok) {" + NL + " \t\t"; ! protected final String TEXT_10 = "_.target = "; ! protected final String TEXT_11 = ";" + NL + " \t}" + NL + " \treturn "; ! protected final String TEXT_12 = "_;" + NL + " }"; ! protected final String TEXT_13 = NL; public String generate(Object argument) *************** *** 54,58 **** --- 56,64 ---- stringBuffer.append(provides.getIdentifier()); stringBuffer.append(TEXT_10); + stringBuffer.append(provides.getComponent().getAssemblyInitFacetTargetValue(provides)); stringBuffer.append(TEXT_11); + stringBuffer.append(provides.getIdentifier()); + stringBuffer.append(TEXT_12); + stringBuffer.append(TEXT_13); return stringBuffer.toString(); } |
From: Robert L. <rle...@us...> - 2007-02-27 08:28:24
|
Update of /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11416/src/ccmtools/generator/java/templates/jet Modified Files: ComponentDefAssemblyClass.jet ProvidesDefGetMethodAssemplyImplementation.jet Log Message: now support "provide" after "configuration complete" Index: ComponentDefAssemblyClass.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ComponentDefAssemblyClass.jet,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ComponentDefAssemblyClass.jet 26 Feb 2007 15:49:42 -0000 1.7 --- ComponentDefAssemblyClass.jet 27 Feb 2007 08:28:16 -0000 1.8 *************** *** 67,70 **** --- 67,72 ---- public <%=component.generateCcmIdentifier()%>_Context ctx; + private boolean ccm_activate_ok; + public <%=component.getIdentifier()%>Impl() *************** *** 180,184 **** <% } ! %> } catch(Exception e) { throw new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR); --- 182,188 ---- <% } ! %> ! ! ccm_activate_ok = true; } catch(Exception e) { throw new CCMException(e.getMessage(), CCMExceptionReason.CREATE_ERROR); Index: ProvidesDefGetMethodAssemplyImplementation.jet =================================================================== RCS file: /cvsroot/ccmtools/ccmtools/src/ccmtools/generator/java/templates/jet/ProvidesDefGetMethodAssemplyImplementation.jet,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProvidesDefGetMethodAssemplyImplementation.jet 27 Feb 2007 07:07:25 -0000 1.3 --- ProvidesDefGetMethodAssemplyImplementation.jet 27 Feb 2007 08:28:16 -0000 1.4 *************** *** 12,15 **** --- 12,18 ---- { <%=provides.getIdentifier()%>_ = new <%=provides.generateJavaNamespace()%>.<%=provides.getComponent().getIdentifier()%><%=provides.getIdentifier()%>Impl(this); + if(ccm_activate_ok) { + <%=provides.getIdentifier()%>_.target = <%=provides.getComponent().getAssemblyInitFacetTargetValue(provides)%>; + } return <%=provides.getIdentifier()%>_; } |