Skip to content

Commit

Permalink
Do not prevent finish for "incomplete" mappings
Browse files Browse the repository at this point in the history
Currently in #finish of the wizard it can happen that the wizard do not
finish if m2e thinks the mapping is incomplete, but this is a very bad
user experience as there is not indication of what has to be done.

Instead a page should set its completion status (in this case the button
is disabled) and instruct the user what to do instead.

Fix #1371
  • Loading branch information
laeubi committed Jun 5, 2023
1 parent 70879e6 commit 3e19191
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.PlatformUI;

import org.apache.maven.project.MavenProject;
Expand Down Expand Up @@ -600,18 +599,6 @@ public List<IMavenDiscoveryProposal> getSelectedDiscoveryProposals() {
return mappingConfiguration.getSelectedProposals();
}

/*
* Mapping is complete when mappings are handled (a proposal has been selected, or if it is an uninteresting phase).
*/
public boolean isMappingComplete() {
for(TreeItem item : treeViewer.getTree().getItems()) {
if(!isHandled((ILifecycleMappingLabelProvider) item.getData())) {
return false;
}
}
return true;
}

/*
* Populate list with ignore options (should be called last)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ public void addPages() {

@Override
public boolean performFinish() {
if(lifecycleMappingPage != null && !lifecycleMappingPage.isMappingComplete()) {
return false;
}

final List<IMavenDiscoveryProposal> proposals = getMavenDiscoveryProposals();

boolean doIgnore = !lifecycleMappingPage.getIgnore().isEmpty() || !lifecycleMappingPage.getIgnoreParent().isEmpty()
Expand Down

0 comments on commit 3e19191

Please sign in to comment.