Hi Sohani In a Jface tree ,a node has a method called "setIterativeRefresh(true)" check whether "GEF" based trees' may also has similar way to do this
Thanks and Regards /Jasintha On Mon, May 30, 2016 at 3:44 PM, Sohani Weerasinghe <soh...@wso2.com> wrote: > Hi Susinda, > > I have debugged and confirmed that it hits the createInNode method. > > I used refreshChildren() method of the > org.eclipse.gef.editparts.AbstractEditPart > which gets the children of the particular edit part ( the edited node) and > then it refreshes that editpart. I could not find any method to pass the > parent as a parameter to refresh > > Thanks, > Sohani > > Sohani Weerasinghe > Senior Software Engineer > WSO2, Inc: http://wso2.com > > Mobile : +94 716439774 > Blog :http://christinetechtips.blogspot.com/ > Twitter : https://twitter.com/sohanichristine > > On Mon, May 30, 2016 at 3:18 PM, Susinda Perera <susi...@wso2.com> wrote: > >> Hi Sohani >> can you put some logs to the aforesaid method confirm that it actually >> hits the createInNode method. Also once you add a child try to refresh the >> parent. >> >> Thanks >> Susinda >> >> On Mon, May 30, 2016 at 11:49 AM, Sohani Weerasinghe <soh...@wso2.com> >> wrote: >> >>> Hi Viraj/Susinda, >>> >>> I have a requirement to edit the nodes of the tree while creating the >>> tree by hand. With the current level of implementation for the leaf nodes >>> mapping, if I add an object which holds a value eg: <phone >>> primary="true">071655339</phone> then the connector should be enabled for >>> that tree node(phone). Please refer addFixedChild() method at [1]. >>> >>> Initially if I add a tree node(object) to the tree without a value and >>> then if I edit the tree node and add a value, then in the visual >>> representation I should see the connector arrow for the tree node which is >>> edited. >>> eg: >>> >>> 1. Create a schema as below >>> >>> { >>> "$schema" : null, >>> "id" : "sdada", >>> "title" : "NewRootType", >>> "type" : "object", >>> "properties" : { >>> "NewObject" : { >>> "id" : "testID", >>> "type" : "object" >>> } >>> } >>> } >>> >>> >>> >>> >>> 2. Then edit the object( NewObject) to hold a value >>> { >>> "$schema" : schema1, >>> "id" : "testID", >>> "title" : "NewRootType", >>> "type" : "object", >>> "properties" : { >>> "NewObject" : { >>> "id" : "testID", >>> "type" : "object", >>> * "value" : {* >>> * "type" : "string"* >>> * }* >>> } >>> } >>> } >>> >>> >>> >>> When editing the tree node I am calling the addFixedChild()method to >>> update the connector based on the value but the connector is not added to >>> the node. ( If i close the editor and open it then I can view the connector >>> as in the attached image). It seems even I call the addFixedChild() method, >>> the EditPart is not getting refreshed. >>> >>> I have called the refresh() method of >>> the org.eclipse.gef.editparts.AbstractEditPart but was unable to reflect >>> the changes. >>> >>> Appreciate your input on this >>> >>> [1] >>> https://github.com/wso2/devstudio-tooling-esb/blob/master/plugins/org.wso2.developerstudio.visualdatamapper.diagram/src/org/wso2/developerstudio/datamapper/diagram/edit/parts/TreeNode2EditPart.java >>> >>> Thanks, >>> Sohani >>> >>> Sohani Weerasinghe >>> Senior Software Engineer >>> WSO2, Inc: http://wso2.com >>> >>> Mobile : +94 716439774 >>> Blog :http://christinetechtips.blogspot.com/ >>> Twitter : https://twitter.com/sohanichristine >>> >> >> >> >> -- >> *Susinda Perera* >> Software Engineer >> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL) >> Mobile:(+94)716049075 >> Blog: susinda.blogspot.com >> WSO2 Inc. http://wso2.com/ >> Tel : 94 11 214 5345 Fax :94 11 2145300 >> >> > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Jasintha Dasanayake* *Senior Software EngineerWSO2 Inc. | http://wso2.com <http://wso2.com/>lean . enterprise . middleware* *mobile :- 0711368118*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev