1 19 20 package org.netbeans.modules.db.explorer.actions; 21 22 import java.text.MessageFormat ; 23 24 import org.openide.*; 25 import org.openide.nodes.*; 26 import org.netbeans.modules.db.explorer.nodes.*; 27 import org.netbeans.modules.db.explorer.infos.*; 28 29 public class RemoveFromPrimaryKeyAction extends DatabaseAction { 30 static final long serialVersionUID =-7648018578177394773L; 31 32 public void performAction (Node[] activatedNodes) { 33 Node node; 34 if (activatedNodes != null && activatedNodes.length>0) node = activatedNodes[0]; 35 else return; 36 37 try { 38 DatabaseNodeInfo info = (DatabaseNodeInfo)node.getCookie(DatabaseNodeInfo.class); 39 DatabaseNodeInfo nfo = info.getParent(nodename); 40 } catch(Exception exc) { 41 String message = MessageFormat.format(bundle().getString("ERR_UnableToRemoveFromPK"), new String [] {exc.getMessage()}); DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, NotifyDescriptor.ERROR_MESSAGE)); 43 } 44 } 45 } 46 | Popular Tags |