1 26 27 package org.objectweb.util.explorer.plugin.java; 28 29 import org.objectweb.util.explorer.api.DropAction; 30 import org.objectweb.util.explorer.api.DropTreeView; 31 import org.objectweb.util.explorer.api.Entry; 32 import org.objectweb.util.explorer.core.common.api.ContextContainer; 33 34 35 43 public class MoveToContext 44 implements DropAction 45 { 46 47 53 59 65 71 74 public void execute(DropTreeView dropTreeView) throws Exception { 75 if(dropTreeView!=null){ 76 Entry entryToAdd = dropTreeView.getDragSourceEntry(); 77 ContextContainer cc = (ContextContainer)dropTreeView.getSelectedObject(); 78 if(entryToAdd!=null && cc!=null){ 79 cc.addEntry(entryToAdd.getName().toString(),dropTreeView.getDragSourceObject()); 80 dropTreeView.getTree().removeEntry(entryToAdd.getName()); 81 } 82 } 83 } 84 85 } 86 | Popular Tags |