Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351156

Summary: [ui] allow setting default name template in the preferences pages
Product: z_Archived Reporter: Rafal Krzewski <rafal>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED INVALID QA Contact:
Severity: enhancement    
Priority: P3 CC: andreas, christian.a.andersson, dmgloss, igor, kingamajick, tamas
Version: unspecifiedKeywords: ui, usability
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Simple text box field to set name template none

Description Rafal Krzewski CLA 2011-07-05 06:03:34 EDT
Build Identifier: m2e 1.0.0.201107051103

I find myself repeatedly changing name template to [groupId.artifactId] while importing maven projects into workspace. I would like to use this name template for all imports performed in a workspace.

A combo box on Prefernces > Maven page would be convenient.


Reproducible: Always

Steps to Reproduce:
1. Open Import > Maven > Existing maven projects wizard from Package Explorer or similar view
2. Un-fold Advanced section of the 'Select maven project' page
3. Name template combo box is blank, (which IMO is an UI error in it's own right) and when left unchanged [artifacId] template name is used for import
Comment 1 Vadim Dmitriev CLA 2011-12-25 15:16:51 EST
Created attachment 208799 [details]
Simple text box field to set name template

Simple text box to set default project name template (core m2e prefs)
Comment 2 Igor Fedorenko CLA 2011-12-27 12:09:33 EST
I think import wizard should just remember the last template used and probably few previous templates too. This is the expected behaviour. Separate preference field is not justified in this case and users will be unlikely to find it.
Comment 3 Vadim Dmitriev CLA 2011-12-27 14:27:20 EST
(In reply to comment #2)
> I think import wizard should just remember the last template used and probably
> few previous templates too. This is the expected behaviour. Separate preference
> field is not justified in this case and users will be unlikely to find it.

I agree with you, but taking the lack of experience with eclipse plugin development into consideration this shortcut approach with preferences is a lesser evil. Even useless patch attracts developers attention and helps with resolving an issue :)

If import wizard is to remember the last used value, then IMHO wizard should be redesigned:
 - "Advanced" pane (?) should be opened by default or "name template" field should be moved to the dialog's main part: if user changes his usual name pattern A to the pattern B "just for one import", he would forget it the next time he imports again. If name template will be visible by default, there will be less chance of "forgot I changed it before!" to happen.

This simple redesigning I can handle, but could you tell me where to look for a good example of the right way of persisting field's value? I suspect that eclipse "preferences" subsystem is the right one, but who knows?.. 

===
Going to the full length of the idea, wizard could be changed a little to reflect the sequence "What to import, how to import, how to configure":
 - what to import: current first page of the import wizard except it's "advanced" pane;
 - how to import: current "advanced" pane content + working set selection;
 - how to configure: current configurators selection page.

Pros:
1. Advanced pane becomes separate page ready for extension. For example, for "use by default" checkbox near "name template" field;
2. Pages become more focused of one part of the import process at a time;
3. Advanced pane removed from the footer of every page of the wizard. Personally I always considered it to be a little strange for the same set of options present throught the wizard.
Comment 4 Igor Fedorenko CLA 2011-12-27 14:40:03 EST
http://wiki.eclipse.org/FAQ_How_do_I_save_settings_for_a_dialog_or_wizard%3F

I agree that simply making import wizard remember name template will be confusing, but I can't comment on your proposed changes without looking at the new/redesigned pages. I also think changes like this should be discussed on m2e-dev first ;-)
Comment 5 Igor Fedorenko CLA 2013-09-28 23:50:33 EDT
closing old/stale bugreports
Comment 6 Denis Roy CLA 2021-04-19 13:25:38 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/