// File: ActionShowDocuments.java // Classes: ActionShowDocuments // Author: Kedar Patankar package edu.neu.ccs.demeter.tools.apstudio.graphedit; import java.util.Vector; import java.util.Enumeration; /** Action to show the help topics */ public class ActionShowDocuments extends Action { private Vector openDocumentNames; public ActionShowDocuments(Editor e,Vector v) { super(e); openDocumentNames=v; } public String name() { return "Show Documents dialog"; } public void doIt() { WindowDialog wd = new WindowDialog(_editor,"Windows",openDocumentNames); wd.setVisible(true); String choice=wd.getRequest(); Vector v = wd.getSelection(); if(choice.equals("SHOW")) { _editor.showDocument((String)v.elementAt(0)); _editor.setCurrentMenuString((String)v.elementAt(0)); return; } else if(choice.equals("CANCEL")) return; // Control comes here when the choice is other than Show and Cancel which will be Close // If only one filename was selected call ActionClose if(v.size()==1) { Action act=new ActionClose(_editor,_editor.getDocument((String)v.elementAt(0))); act.doIt(); } else { // else separate files into modified and nomodified vectors. Vector all = v; Vector non = _editor.get_outStanding(); Vector vClose = new Vector(); Vector vSaveNClose = new Vector(); int j=all.size(); for(int i=0;i