1 18 19 package org.objectweb.jac.ide.diagrams; 20 21 import CH.ifa.draw.framework.DrawingEditor; 22 import CH.ifa.draw.framework.Figure; 23 import org.objectweb.jac.aspects.gui.DisplayContext; 24 import org.objectweb.jac.aspects.gui.EventHandler; 25 import org.objectweb.jac.aspects.gui.InvokeEvent; 26 import org.objectweb.jac.core.rtti.ClassRepository; 27 28 public class MethodCreationTool extends AbstractActionTool { 29 30 public MethodCreationTool(DrawingEditor newDrawingEditor, 31 DisplayContext context) { 32 super(newDrawingEditor,context,ClassFigure.class); 33 } 34 35 public void action(Figure figure) { 36 EventHandler.get().onInvoke( 37 context, 38 new InvokeEvent( 39 null, 40 ((ClassFigure)figure).getSubstance(), 41 ClassRepository.get().getClass(org.objectweb.jac.ide.Class.class) 42 .getMethod("addMethod(org.objectweb.jac.ide.Method)"))); 43 } 44 45 } 46 | Popular Tags |