Editor ed = (Editor) Globals.curEditor();
Editor ed = Globals.curEditor();
    public void doIt() {        Editor ed = (Editor) Globals.curEditor();        if (ed == null)            return;        Frame frame = ed.findFrame();        ZoomDialog dlg = new ZoomDialog(frame);        dlg.setMagnification((int) (ed.getScale() * 100));        if (dlg.display() == ZoomDialog.OK) {            int magnification = dlg.getMagnification();            ed.setScale(((double) magnification) / 100);        }        ed.getJComponent().scrollRectToVisible(new Rectangle(0, 0, 1, 1));    }