1 8 package com.nightlabs.editor2d.actions; 9 10 import org.eclipse.draw2d.geometry.Point; 11 import org.eclipse.gef.requests.CreationFactory; 12 import org.eclipse.ui.IEditorPart; 13 14 import com.nightlabs.editor2d.model.ModelCreationFactory; 15 16 17 public class EditorPasteTemplateAction 18 extends PasteTemplateAction 19 { 20 21 25 public EditorPasteTemplateAction(IEditorPart editor) { 26 super(editor); 27 } 28 29 32 protected CreationFactory getFactory(Object template) 33 { 34 if (template instanceof Class ) 36 return new ModelCreationFactory((Class )template); 37 38 return null; 39 } 40 41 45 protected Point getPasteLocation() { 46 return new Point(10, 10); 47 } 48 49 } 50 | Popular Tags |