[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Update existing diagrams after model change

Hi Alex,

many thanks, this was a big help for me. The resource handler postLoad() was exactly what I was looking for. I'm now iterating through the notational model and search for missing (external label) nodes and create some:

while (it.hasNext()) {

  Node node = it.next();

  ...

  // Checking for type "5026" children

  ...

  Node n = node.createChild(NotationPackage.Literals.NODE);
  n.setType("5026");
  n.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());

  ...

}

I'm not sure, if this is 100% correct, but it does the job.

Regards,

Holger


Alex Boyko schrieb:
Hi,

How did you introduce your new label views? In a view factory? New decorating views?
Do you extend GMF notation meta-model? If you do, you could upversion the NSURI of your notation model and then register a ResourceHandler to migrate new models to old and vice versa. The postLoad() method of the resource handler would find the views that need label views to be attached.
Hope this helps.


Cheers.
Alex