This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Run File should save the file, at least by default. Ant has an option for this that is on by default so most users will expect that build/run actions in general save files. I think it is OK to just save the file for now, in future there can perhaps be an option. patch: RCS file: /cvs/scripting/php/rtexplorer/src/org/netbeans/modules/php/rt/providers/impl/actions/RunCommand.java,v retrieving revision 1.8 diff -u -r1.8 RunCommand.java --- src/org/netbeans/modules/php/rt/providers/impl/actions/RunCommand.java 3 Oct 2007 17:37:49 -0000 1.8 +++ src/org/netbeans/modules/php/rt/providers/impl/actions/RunCommand.java 8 Oct 2007 19:50:38 -0000 @@ -50,6 +50,7 @@ import org.netbeans.modules.php.rt.spi.providers.WebServerProvider; import org.netbeans.spi.project.ActionProvider; import org.openide.ErrorManager; +import org.openide.LifecycleManager; import org.openide.awt.HtmlBrowser; import org.openide.filesystems.FileObject; import org.openide.util.Lookup; @@ -100,6 +101,7 @@ } else { for ( FileObject fileObject : getFileObjects() ) { + LifecycleManager.getDefault ().saveAll (); String path = getRelativeSrcPath(fileObject); if ( path != null ) { path = '/'+path.replace( File.separatorChar, '/'); I also noticed that scripting\php\rtexplorer defines its own constant for run.local, this is a BAD practice, it makes it hard to find the code - cannot user find usages on ActionProvider.COMMAND_RUN_SINGLE. Not to speak of the theoretical possibility that somebody would change the value of ActionProvider.COMMAND_RUN_SINGLE. public static final String RUN_LOCAL_ACTION = "run.local"; // NOI18N
file is now saved before run in command line. It was already saved before upload. Is still not saved before running on project - we plan to upload before running on server. Saving will be performed during upload.
fixed Nov 12, 2007. I have used ProjectManager.getDefault().saveProject(getProject()); as previous solution. It didn't save php files.
*** Issue 121318 has been marked as a duplicate of this issue. ***
About run.local id. There are two run commands in php project: - run on server - run in command line ActionProvider.COMMAND_RUN is used for running on server (as primary run action). So I had to create my own Id for running locally in command line.
Verified in beta.