svnno****@sourc*****
svnno****@sourc*****
2009年 3月 29日 (日) 15:37:32 JST
Revision: 3021 http://svn.sourceforge.jp/view?root=jiemamy&view=rev&rev=3021 Author: daisuke_m Date: 2009-03-29 15:37:31 +0900 (Sun, 29 Mar 2009) Log Message: ----------- [ECL-40] メモの削除時、削除後に親editPartを取得しようとして、null を返されていた。 null時はrefresh不要なので、単純にreturnするように変更。 Modified Paths: -------------- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java -------------- next part -------------- Modified: hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java =================================================================== --- hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java 2009-03-29 04:43:49 UTC (rev 3020) +++ hestia/trunk/org.jiemamy.eclipse.ui/src/main/java/org/jiemamy/eclipse/editor/editpart/diagram/StickyEditPart.java 2009-03-29 06:37:31 UTC (rev 3021) @@ -23,6 +23,7 @@ import org.eclipse.draw2d.Label; import org.eclipse.draw2d.Panel; import org.eclipse.draw2d.StackLayout; +import org.eclipse.gef.EditPart; import org.eclipse.gef.GraphicalEditPart; import org.eclipse.gef.GraphicalViewer; import org.eclipse.gef.commands.Command; @@ -129,7 +130,11 @@ @Override protected void refreshVisuals() { - RootModel rootModel = (RootModel) getParent().getModel(); + EditPart parentEditPart = getParent(); + if (parentEditPart == null) { + return; + } + RootModel rootModel = (RootModel) parentEditPart.getModel(); StickyModel stickyModel = (StickyModel) getModel(); GraphicalEditPart editPart = (GraphicalEditPart) getParent();