Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » about getPrimaryDragEditPolicy()
about getPrimaryDragEditPolicy() [message #198902] Fri, 25 July 2008 08:03 Go to next message
yeliu is currently offline yeliuFriend
Messages: 145
Registered: July 2009
Senior Member
Hello,
In the generated diagram code,in a top node editpart code, there is a
method
/**
* @generated
*/
public org.eclipse.gef.EditPolicy getPrimaryDragEditPolicy() {
return new ();
}
why generate a return without a classtype?
How to solve this?


Thanks a lot!


Ye
Re: about getPrimaryDragEditPolicy() [message #198935 is a reply to message #198902] Fri, 25 July 2008 10:12 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Ye,

See:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg13983.html
http://www.eclipse.org/newsportal/article.php?id=14102&g roup=eclipse.modeling.gmf#14102

-----------------
Alex Shatalin
Re: about getPrimaryDragEditPolicy() [message #198976 is a reply to message #198935] Fri, 25 July 2008 12:31 Go to previous messageGo to next message
yeliu is currently offline yeliuFriend
Messages: 145
Registered: July 2009
Senior Member
Hello,
I find this property under one Gen Top level NOde xxxEditPart.this node
is the selected diagram element when build those gmf files.I don't know
which class name to fill in.How to remove the attribute from the .gmfgraph
file?
One thing I don't understand.I choose one class as Diagram element when
creating those gmf fils.so this node representing this class is the top
Node reference,and those classes contained in this classes are mapped as
child refrences .But in the generated EditPart codes,there are more than
one this node's EditPart.e.g xxxEditPart,xxxEditPart2,xxxEditPart3.why so
many edit part for one node.

Thanks !

Ye
Re: about getPrimaryDragEditPolicy() [message #199159 is a reply to message #198976] Mon, 28 July 2008 10:40 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Ye,

> which class name to fill in.How to remove the attribute from the
> .gmfgraph file?
Open this file using text editor and remove corresponding property completely.
Correct value should be calculated automatically by GMF if no custom value
was specified in .gmfgen model. The problem is: once you click to this property
in an editor and press "del" or "space" then empty string will be stored
in a model and the only way to reset this value is to edit .gmfgen model
in a text editor. BTW, another option is to delete .gmfgen model completely
from disk and re-generate it from .gmfmap one.

> as child refrences .But in the generated EditPart codes,there are more
> than one this node's EditPart.e.g
This is normal. GMF can create several EditParts for to visualize the same
domain model element in a different containment references or due to the
other conditions.

-----------------
Alex Shatalin
audit rule debug [message #199212 is a reply to message #199159] Mon, 28 July 2008 12:09 Go to previous message
yeliu is currently offline yeliuFriend
Messages: 145
Registered: July 2009
Senior Member
Hello Alex,
Thank you for answering.This problem and the one about
getCompartmentName() has be solved by delete old diagram code and .gmfgen
file and regenerate from .gmfmap.
However the audit rules still don't work somehow.I try to set
breakpoint in front of the static classes DefaultCtx in the
xxxValidationProvider.And debug diagram code, but it just runs a Eclipse
application ,no degug perspective,and even though I do something disobey
the audit rule and then select 'Validate' from 'Diagram ' menu.Nothing
happens ,no warnings appears.
How to debug generated editor?


Many thanks!

Ye
Previous Topic:Double edges are created
Next Topic:trying to add GMF plugin
Goto Forum:
  


Current Time: Sat Jun 06 10:33:47 GMT 2020

Powered by FUDForum. Page generated in 0.01661 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top