Community
Participate
Working Groups
In the Types view, the New > Other... > File wizard doesn't have current package filled in if nothing is selected in the Types view.
The wizard is provided by platform UI. They should apapt the selection to IResource and take the parent of the IResource in this case.
Simon, I'm not sure I understand what I should/should not be seeing. Can you be really specific? For example, - build I20030611 - open Types view - make sure nothing is selected in Package Explorer view (deselect current Java file) - in the Types view right click - New->Other...->Simple File and then click Next button Is this where you are expecting the parent folder to be filled in?
3.0M-1 Make sure nothing is selected in the Types view, use the context menu in the Types view to invoke New > Other... > Simple > File. The parent folder should be filled in, but is not.
The New > Otrher > File wizard is provided by platform UI, so there is little JDT/UI can do right now to fix the problem. One idea is that the wizard takes the selection provider of the types view and checks if it is a IInputProvider (which is the case for the types view). On an empty selection the view could take the input as a parent folder. Moving back to Platform UI.
Bonus question: With the Types view having focus and no Type being selected, the selection is effectively the containing package, shouldn't the semantics of "New > Other... > File" be "create a new file in this package"? So why can you navigate *out* of this package in the wizard? If you want to create a file in another package you should first select that other package in the Packages view and then invoke "New > Other... > File". The current behaviour is like sitting down in a restaurant and expect to be able to ask for food from other restaurants.
Any behaviour that would require you to close a wizard, reselect and then re- open wouldbe very annoying - pre selecting the current workbench selection for the user is meant as a timesaver but not as the only way to select a parent.
Yes, but there is no such requirement. If you intend to create something in a package, the logical thing is to use a navigational view to navigate to that package first and then invoke an action on that package to create an instance of whatever (e.g. a file). Given that, the possibility to navigate away in the wizard is just confusing. If you at that point change your mind, you have to close the wizard, yes. But that is just like if you change your mind and decide to create a class instead of a file.
There are currently no plans to work on this feature