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 42 public class AddToContext 43 implements DropAction 44 { 45 46 52 58 64 70 73 public void execute(DropTreeView dropTreeView) throws Exception { 74 if(dropTreeView!=null){ 75 Entry entryToAdd = dropTreeView.getDragSourceEntry(); 76 ContextContainer cc = (ContextContainer)dropTreeView.getSelectedObject(); 77 if(entryToAdd!=null && cc!=null){ 78 cc.addEntry(entryToAdd.getName().toString(),dropTreeView.getDragSourceObject()); 79 } 80 } 81 } 82 83 } | Popular Tags |