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.
Reproduced in build070626. See specification: http://wiki.netbeans.org/wiki/view/MainMenu
What is the Preview File action supposed to be? Definitely not anything from openide/core. Jano, do you have a clue?
Preview action is the action used in Form editor for previewing the GUI forms.
I'm not aware of any request of adding the form preview action into Run File menu. Was this discussed somewhere? Regardless it would be tricky to implement, it makes little sense to me. First, previewing the design is quite different from running the file. Second, the preview action is part of the GUI builder and is only available when the form is opened in the GUI builder - where it quite easy to reach. Why would anybody go find it in some Run submenu? So I suggest to fix the UI spec.
There's many actions in the main menu that only work if certain file type and editor type is selected (whole refactoring menu, source menu, Compile File, Test File, etc.). So it's okay if the preview action only works with Form editor. It would be better if it worked with all visual editors we have in NB (Form, Mobility, Visual Web) but we don't have that AFAIK. For discoverability, I'm not sure. You just assume that the preview icon in the form editor toolbar is easy to discover. If the user is used to Run File action for regular java files, she might intuitively go to the same menu to run a form file as well. In that moment she can discover the Preview action. I'm not saying it has to be there mostly because it really works only with the form editor. I can remove it from the spec and mark the Preview action as a possible candidate for the main menu after 6.0. Let me know what you think.
Unlike the other actions in the main menu, this one requires not only the form to be selected, but also to be opened in the GUI builder. The action could possibly open the form behind the scene, but that might be a bit tricky to implement. It's hard for me to imagine someone would expect preview under Run menu (it's clearly a design time feature, not run time), but I'm probably biased here and people may see it differently. Maybe if we used the Preview action consitently in all types of editors, then it could have more sense. How many editors we have in NetBeans that can provide a preview for files? If it is only form editor then I'd say it is not worth doing. Do you have any indication the action is hard to find and rather expected on some place like this? Shouldn't it be named specifically like "Preview GUI Form" then? If we could use it for more editors, then there should be one common action (defined by projects?) into which the editors would plug their functionality for particular files. Would be good to ask guys from projects about it. For these reasons I'd postpone this after 6.0.
Okay. I've added this issue into the cleanup document to solve it after 6.0 and I've removed the preview action from the spec.