protected void importString(javax.swing.JComponent c, String str) { VarTable table = (VarTable) c; final Tab tab = table.getTab(); // TO DO...make this work for a drag of several elements // since it comes from the elements tab assume the type is Elt // i.e. no need for IsElt String[] elts = str.split(ROW_SEPARATOR); if (elts.length > 2 || elts.length < 1) { GiANT.gui.appendConsoleText("\nIdeals accepts only 1 or 2 Elements from a drop.", true); return; } String args = ""; for (int i = 0; i < elts.length; i++) { String elt[] = elts[i].split(COLUMN_SEPARATOR); String eltName = elt[NAME_COL]; if (GiANT.gui.kash.isElement(eltName)) { if (i == 1 && !args.equals("")) args += ","; args += eltName; } else { GiANT.gui.appendConsoleText("\nYou can only drop Elements onto the Ideals tab.", true); return; // don't import any other data types } } if (!args.equals("")) tab.addNewVariable(args); }
public String[] getLocalNames(int codePtr) { return vars.getLocalNames(codePtr); }
public void add(Instr instr, List<FrameVar> locals, List<DynamicVar> dynamics) { code.add(instr); vars.add(locals, dynamics); }
public String[] getDynamicNames(int codePtr) { return vars.getDynamicNames(codePtr); }
public List<DynamicVar> getDynamicsAt(int index) { return vars.getDynamicsAt(index); }
public List<FrameVar> getLocalsAt(int index) { return vars.getLocalsAt(index); }