/** * This method performs the actual command processing. * * @param e * the generic UI action event */ @Override public void doActionAfterCheck(ActionEvent e) { performAction(e); }
/** * Loads dragged file asking before for save if current open file is dirty. * @param e {@link ActionEvent} * @param file File to Load */ public static void loadProject(ActionEvent e, File file) { if(!Close.performAction(e)) { return; } Load.loadProjectFile(e, file, false); } }
@Override public void doActionAfterCheck(final ActionEvent e) { final JFileChooser chooser = FileDialoger.promptToOpenFile(new String[] { ".jmx" }); //$NON-NLS-1$ if (chooser == null) { return; } final File selectedFile = chooser.getSelectedFile(); if (selectedFile != null) { final boolean merging = e.getActionCommand().equals(ActionNames.MERGE); // We must ask the user if it is ok to close current project if (!merging) { // i.e. it is OPEN if (!Close.performAction(e)) { return; } } loadProjectFile(e, selectedFile, merging); } }
@Override public void doActionAfterCheck(ActionEvent e) { // We must ask the user if it is ok to close current project if (!Close.performAction(e)) { return; } // Load the file for this recent file command loadProjectFile(e, getRecentFile(e), false); }