ExPostNewAction.js 421 B

123456789101112131415161718
  1. function ExPostNewAction() {
  2. EAction.call(this);
  3. }
  4. ExPostNewAction.prototype = new EAction();
  5. ExPostNewAction.prototype.beginEvent = function() {
  6. var doc = this.getDocument();
  7. var fileName = doc.getFileName();
  8. if (fileName.length===0) {
  9. EAction.handleUserMessage("New file created");
  10. }
  11. else {
  12. EAction.handleUserMessage("Opened file: " + fileName);
  13. }
  14. this.terminate();
  15. };