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(); } |