Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] is it an elegance solution?

My object is to add a dialog triggered by a double
click on a figure. the flowing is my code.it works well,
but I wonder it is a good solution.
        In the figure's editpart, add an  method-- performRequest inherited
 from the AbstractEditPart.

public void performRequest(Request req) {
     if(req.getType().equals(REQ_OPEN))
     MessageDialog.openInformation(
       ((DefaultEditDomain)getViewer().getEditDomain()).getEditorPart().getSite().getShell(),"Readme Editor","View Action executed");
  }



Do You Yahoo!?
启用电邮帐号,领会雅虎通[身临其境聊电影]的动感魅力,还有网络摄像头+雅虎通收音机等你来拿

Back to the top