Index: freeform/src/org/netbeans/modules/ant/freeform/Actions.java =================================================================== RCS file: /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java,v retrieving revision 1.12 diff -u -r1.12 Actions.java --- freeform/src/org/netbeans/modules/ant/freeform/Actions.java 6 Apr 2005 08:57:02 -0000 1.12 +++ freeform/src/org/netbeans/modules/ant/freeform/Actions.java 20 Apr 2005 12:36:00 -0000 @@ -16,6 +16,7 @@ import java.awt.event.ActionEvent; import java.io.File; import java.io.IOException; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -39,6 +40,8 @@ import org.netbeans.spi.project.support.ant.AntProjectHelper; import org.netbeans.spi.project.ui.support.CommonProjectActions; import org.netbeans.spi.project.ui.support.ProjectSensitiveActions; +import org.openide.DialogDescriptor; +import org.openide.DialogDisplayer; import org.openide.ErrorManager; import org.openide.actions.FindAction; import org.openide.actions.ToolsAction; @@ -260,6 +263,11 @@ String scriptLocation = project.evaluator().evaluate(script); FileObject scriptFile = project.helper().resolveFileObject(scriptLocation); if (scriptFile == null) { + //#57011: if the script does not exist, show a warning: + Exception noScriptFile = new Exception("No script file: " + scriptLocation); // NOI18N + + ErrorManager.getDefault().annotate(noScriptFile, MessageFormat.format(NbBundle.getMessage(Actions.class, "LBL_ScriptFileNotFoundError"), new Object[] {scriptLocation})); + ErrorManager.getDefault().notify(ErrorManager.USER, noScriptFile); return; } List/**/ targets = Util.findSubElements(actionEl); Index: freeform/src/org/netbeans/modules/ant/freeform/Bundle.properties =================================================================== RCS file: /cvs/ant/freeform/src/org/netbeans/modules/ant/freeform/Bundle.properties,v retrieving revision 1.14 diff -u -r1.14 Bundle.properties --- freeform/src/org/netbeans/modules/ant/freeform/Bundle.properties 23 Jan 2005 19:56:57 -0000 1.14 +++ freeform/src/org/netbeans/modules/ant/freeform/Bundle.properties 20 Apr 2005 12:36:00 -0000 @@ -39,3 +39,7 @@ LBL_project.xml_errors=Errors in {0} LBL_Manual_Editing_Warning=Do not use Project Properties customizer when editing this file manually. + +#If the script file is not found +# {0} - path to the script file +LBL_ScriptFileNotFoundError=Script file {0} cannot be found.