Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gmf-dev] problem updating view

Please use the GMF newsgroup to ask questions.

Thanks,

Antoine

On Tue, Sep 23, 2008 at 9:04 AM, Eugene Weewee <e.weewee@xxxxxxxxx> wrote:
Hello ,
 
Could someone help me with this? I have created some semantic elements programmatically as children in another one. But when I draw a connection between them, the first target element disappears from the vie but still exists in the resources. after the first connection, everything works fine.
When I first create a child element with a tool and remove it again, also everything works fine. can someone help me to solve this problem?
 
Greetings,
Toman
 

protected

EObject doDefaultElementCreation() {

Resource resource = getElementToEdit().eResource();

config.Block newElement = config.ConfigFactory.

eINSTANCE.createBlock();

ReadXml rx =

new ReadXml();

List<config.Socket> sockets = (List<Socket>) rx.getBlockSockets();

List<config.Property> properties = rx.getBlockProperties();

newElement.getProperties().addAll(properties);

newElement.getSockets().addAll(sockets);

newElement.setDescription(rx.getBlockDescription());

newElement.setName(rx.getBlockname());

for (Iterator<config.Socket> it = sockets.iterator(); it

.hasNext();) {

it.next().setBlock(newElement);

}

for (Iterator<Property> it = newElement.getProperties().iterator(); it

.hasNext();) {

it.next().setBlock(newElement);

}

resource.getContents().add(newElement);

resource.getContents().add(newElement);

System.

out.println(newElement.getSockets().size());

return newElement;

}


_______________________________________________
gmf-dev mailing list
gmf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gmf-dev




--
http://www.lunar-ocean.com/blog


Back to the top