From: Julio G. <ju...@us...> - 2004-04-15 16:29:25
|
Update of /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/sfcore/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23652/smartfrog/src/org/smartfrog/sfcore/common Modified Files: ActionDeploy.java Log Message: Improved: Placement in deploy Index: ActionDeploy.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/sfcore/common/ActionDeploy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ActionDeploy.java 15 Apr 2004 00:54:04 -0000 1.7 --- ActionDeploy.java 15 Apr 2004 16:29:16 -0000 1.8 *************** *** 83,88 **** } else if ((parent!=null)&&(parent instanceof Compound)&&(appName==null)){ //From ProcessCompoundImpl. Creates name for unnamed components... ! appName = SmartFrogCoreKeys.SF_UNNAMED + (new Date()).getTime() + "_" + ! ProcessCompoundImpl.registrationNumber++; } --- 83,88 ---- } else if ((parent!=null)&&(parent instanceof Compound)&&(appName==null)){ //From ProcessCompoundImpl. Creates name for unnamed components... ! // appName = SmartFrogCoreKeys.SF_UNNAMED + (new Date()).getTime() + "_" + ! // ProcessCompoundImpl.registrationNumber++; } *************** *** 177,199 **** //Placement if (name !=null) { ! if (name.endsWith(":")){ ! ref = Reference.fromString(name.substring(0,name.length()-1)); ! parent = (Prim) targetP.sfResolve(ref); ! name = null; ! } else { ! ref = Reference.fromString(name); ! if (ref.size() > 1) { ! ReferencePart refPart = ref.lastElement(); ! name = refPart.toString(); ! name = name.substring( ! name.lastIndexOf(HereReferencePart.HERE + " ") + ! HereReferencePart.HERE.length() + 1); ! ref.removeElement(refPart); ! parent = (Prim) targetP.sfResolve(ref); ! } } } ! //System.out.println("Parent: "+parent.toString()+" for "+name); ! Prim prim = Deploy(configuration.getUrl(), name, parent, --- 177,200 ---- //Placement if (name !=null) { ! try { ! ref = Reference.fromString(name); ! } ! catch (SmartFrogResolutionException ex) { ! throw new SmartFrogResolutionException (null,targetP.sfCompleteName(), ! MessageUtil.formatMessage(MessageKeys.MSG_ILLEGAL_REFERENCE) ! +" when parsing '"+name+"'"); ! } ! ! if (ref.size() > 1) { ! ReferencePart refPart = ref.lastElement(); ! name = refPart.toString(); ! name = name.substring( ! name.lastIndexOf(HereReferencePart.HERE + " ") + ! HereReferencePart.HERE.length() + 1); ! ref.removeElement(refPart); ! parent = (Prim) targetP.sfResolve(ref); } } ! Prim prim = Deploy(configuration.getUrl(), name, parent, |