-
Notifications
You must be signed in to change notification settings - Fork 915
Improve maven goal re-run property handling and UI #8826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
68c27e1 to
f041ab2
Compare
|
@jglick wondering if you are available for more reviews, you likely helped developing maven support back then. |
java/maven/src/org/netbeans/modules/maven/execute/model/NetbeansActionMapping.java
Outdated
Show resolved
Hide resolved
| Object retValue = DialogDisplayer.getDefault().notify(dd); | ||
| if (retValue == DialogDescriptor.OK_OPTION) { | ||
| pnl.applyValues(mapping); | ||
| maps.getActions().remove(mapping); // deduplicate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the main fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this is just convenience that the same item isn't repeatedly stored in history if you re-run it. marked the main fix via comment
| // clear props in case of removal or changed order | ||
| for (String prop : new ArrayList<>(rc.getProperties().keySet())) { | ||
| rc.setProperty(prop, null); | ||
| } | ||
| PropertySplitter split = new PropertySplitter(epProperties.getText()); | ||
| String token = split.nextPair(); | ||
| while (token != null) { | ||
| String[] prp = StringUtils.split(token, "=", 2); //NOI18N | ||
| if (prp.length == 2) { | ||
| String[] prp = token.split("=", 2); //NOI18N | ||
| if (prp.length == 2 && !prp[0].isBlank()) { | ||
| rc.setProperty(prp[0], prp[1]); | ||
| } | ||
| token = split.nextPair(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jglick this is the main fix
jglick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds OK. Did not test.
|
thanks a lot for reviewing! will switch to the suggested |
make sure that properties are correctly removed when removed by the user and that they are set in the specified order UI: - renamed "remember as" to "save as", since it persists it to the project config - don't show save-as and history UI in re-run action, since those were only implemented for the run-goal action - avoid storing repeated runs in history - made the goal customizer panel slightly larger (similer to the ant sibling) - minor code improvements
f041ab2 to
bb5b83e
Compare
make sure that properties are correctly removed when removed by the user and that they are set in the specified order
UI:
fixes #5251