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
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to