package gov.nasa.jpl.mbee.actions.docgen;

import gov.nasa.jpl.mbee.generator.ViewPresentationGenerator;

import java.awt.event.ActionEvent;

import com.nomagic.magicdraw.actions.MDAction;
import com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Element;

public class GenerateViewPresentationAction extends MDAction {
    private static final long serialVersionUID = 1L;
    private Element            doc;
    private boolean recurse;
    public static final String actionid = "GenerateViewPresentation";
    public static final String recurseActionid = "GenerateViewPresentationR";


    public GenerateViewPresentationAction(Element e, boolean recurse) {
        super(recurse ? recurseActionid : actionid, recurse ? "Generate View": "Generate Views", null, null);
        doc = e;
        this.recurse = recurse;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        ViewPresentationGenerator vg = new ViewPresentationGenerator(doc, recurse);
        vg.generate();
    }
}

@@ -726,16 +726,17 @@
 ate View
+s
 %22: %22Gene
@@ -744,17 +744,16 @@
 ate View
-s
 %22, null,

fix recurse vs single menu label for view generation