|Re: [ui-best-practices-working-group] Should editor show new wizard for empty files?|
On 04/20/2017 10:10 AM, MikaÃl Barbero wrote:
I think there is some misunderstanding: I'm not at all suggesting to move to another place, I'm suggesting that
Le 20 avr. 2017 Ã 09:44, Mickael Istria <mistria@xxxxxxxxxx> a Ãcrit :
On 04/20/2017 09:30 AM, MikaÃl Barbero wrote:
Definitely the 2nd one.Let's push the idea with a .java files:I create a new file Test.java in a project.
If it's a project without Java natureÂÂ do nothing and returnÂ ORÂ propose to add Java nature to project?fi
In this case, it seems like an heuristic of reusing some source folder in the parent hierarchy if existing, or creating a new source folder for the parent project would cover that vast majority of cases. Then, for those who are in trickier state, they'd have to go to JDT project settings (which isn't difficult).if Test.java is not in a source folderÂ Â do nothing and returnÂ Â ORÂ Âpropose to make parent folder a source folder or to move to existing source folder? if parent is project, propose to create a source folder or move to existing source folder?fi
I don't think it's user friendly to use an heuristic to move the file to a location different from where the user ask to create the java file.
* if there is one of the *parent* folder that's already configured as a JDT source folder, use this as parent folder and assume the relative path between file and source folder is the package
* if there is no parent folder configured as a JDT source, assume the folder is the source folder and set no package.
Because as the file already exists at that time, if we let user change the name, we leave room for user creating a Java error. In such case, I think it's better to force the classname to be the filename and let user refactor later if they need to.We already know it, so we can pre-fill the name field, why don't you want to let name change it in case they did a typo?
That's because you're a Java and Eclipse native ;) People coming from other tools, or from nowhere, without big experience about the language think more in term of files/resources. The proposed workflow would IMO help them.Java imposes constraints about where Java files can be put (and JDT adds some more, e.g.g, source folders), and I have the feeling that inferring the file stats (name, location) from the Java information (package names, compilation unit name) offers a better UX than inferring the Java information from the file stats. When I develop some Java code, I think in terms of Java types, packages and not files... That's also why I love my IDE, why I use "Open Type..." dialog and not "Open Resource...", etc.
Note that as I'm looking more and more at other languages and file format (am I becoming polyglot finally?) , I now tend to prefer workflows which are language independent and start to abandon Open Type in favor or Open Resources, because overall, Java constraints mentioned above make it pretty easy to browse a Java project with resources-based approach.
group mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit