1 26 27 package org.objectweb.util.browser.plugin.java; 28 29 import org.objectweb.util.browser.api.DropAction; 30 import org.objectweb.util.browser.api.DropTreeView; 31 import org.objectweb.util.browser.api.Entry; 32 import org.objectweb.util.browser.core.api.ContextContainer; 33 34 41 public class AddToContext 42 implements DropAction 43 { 44 45 51 57 63 69 72 public void execute(DropTreeView dropTreeView) throws Exception { 73 if(dropTreeView!=null){ 74 Entry entryToAdd = dropTreeView.getDragSourceEntry(); 75 ContextContainer cc = (ContextContainer)dropTreeView.getSelectedObject(); 76 if(entryToAdd!=null && cc!=null){ 77 cc.addEntry(entryToAdd.getName().toString(),dropTreeView.getDragSourceObject()); 78 dropTreeView.getTree().refresh(); 79 } 80 } 81 } 82 83 } | Popular Tags |