-
Notifications
You must be signed in to change notification settings - Fork 912
Remove deprecated ProgressUtils and ProgresHandleFactory usage #8927
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
Open
mbien
wants to merge
3
commits into
apache:master
Choose a base branch
from
mbien:remove-deprecated-progresshandlefactory-usage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove deprecated ProgressUtils and ProgresHandleFactory usage #8927
mbien
wants to merge
3
commits into
apache:master
from
mbien:remove-deprecated-progresshandlefactory-usage
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use ProgressHandle instead
1500add to
ee9dc54
Compare
replaced with BaseProgressUtils and BasicAggregateProgressFactory calls
left some edge cases which had no direct replacements
ee9dc54 to
fa577ca
Compare
mbien
commented
Oct 17, 2025
Comment on lines
830
to
879
| private void resultToggleButtonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_resultToggleButtonItemStateChanged | ||
| if (resultToggleButton.isSelected()) {//GEN-LAST:event_resultToggleButtonItemStateChanged | ||
| private void resultToggleButtonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_resultToggleButtonItemStateChanged | ||
| if (resultToggleButton.isSelected()) { | ||
| ((CardLayout) (executionPanel.getLayout())).first(executionPanel); | ||
| sqlToggleButton.setSelected(false); | ||
| } | ||
| } | ||
| }//GEN-LAST:event_resultToggleButtonItemStateChanged | ||
|
|
||
| private void sqlToggleButtonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_sqlToggleButtonItemStateChanged | ||
| if (sqlToggleButton.isSelected()) {//GEN-HEADEREND:event_sqlToggleButtonItemStateChanged | ||
| ((CardLayout) (executionPanel.getLayout())).last(executionPanel);//GEN-LAST:event_sqlToggleButtonItemStateChanged | ||
| private void sqlToggleButtonItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_sqlToggleButtonItemStateChanged | ||
| if (sqlToggleButton.isSelected()) { | ||
| ((CardLayout) (executionPanel.getLayout())).last(executionPanel); | ||
| resultToggleButton.setSelected(false); | ||
| } | ||
| } | ||
| }//GEN-LAST:event_sqlToggleButtonItemStateChanged | ||
|
|
||
| private void runJPQLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runJPQLButtonActionPerformed | ||
| // Fix - 138856 | ||
| if(jpqlEditor.getText().trim().equals("")) { | ||
| switchToResultView(); | ||
| setStatus(NbBundle.getMessage(JPQLEditorTopComponent.class, "emptyQuery")); | ||
| return; | ||
| } | ||
| if (puComboBox.getSelectedItem() == null) { | ||
| logger.info("hibernate configuration combo box is empty."); | ||
| switchToResultView(); | ||
| setStatus(NbBundle.getMessage(JPQLEditorTopComponent.class, "emptyConfiguration")); | ||
| return; | ||
| } | ||
| runJPQLButton.setEnabled(false); | ||
| try { | ||
| ph = ProgressHandleFactory.createHandle(//GEN-HEADEREND:event_runJPQLButtonActionPerformed | ||
| NbBundle.getMessage(JPQLEditorTopComponent.class, "progressTaskname"));//GEN-LAST:event_runJPQLButtonActionPerformed | ||
| private void runJPQLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runJPQLButtonActionPerformed | ||
| // Fix - 138856 | ||
| if(jpqlEditor.getText().trim().equals("")) { | ||
| switchToResultView(); | ||
| setStatus(NbBundle.getMessage(JPQLEditorTopComponent.class, "emptyQuery")); | ||
| return; | ||
| } | ||
| if (puComboBox.getSelectedItem() == null) { | ||
| logger.info("hibernate configuration combo box is empty."); | ||
| switchToResultView(); | ||
| setStatus(NbBundle.getMessage(JPQLEditorTopComponent.class, "emptyConfiguration")); | ||
| return; | ||
| } | ||
| runJPQLButton.setEnabled(false); | ||
| try { | ||
| ph = ProgressHandle.createHandle( | ||
| NbBundle.getMessage(JPQLEditorTopComponent.class, "progressTaskname")); | ||
| isSqlTranslationProcessDone = true;//will be reparsed in execution thread | ||
| if (hqlParserTask != null && !hqlParserTask.isFinished() && (hqlParserTask.getDelay() != 0)) { | ||
| hqlParserTask.cancel(); | ||
| } | ||
| FileObject pXml = puObject.getPrimaryFile(); | ||
| Project project = pXml != null ? FileOwnerQuery.getOwner(pXml) : null; | ||
| PersistenceEnvironment pe = project != null ? project.getLookup().lookup(PersistenceEnvironment.class) : null; | ||
|
|
||
| PersistenceUnit pu = (PersistenceUnit) puConfigMap.get(puComboBox.getSelectedItem()); | ||
| ph.start(100); | ||
| controller.executeJPQLQuery(jpqlEditor.getText(), | ||
| puObject.getPersistence(), | ||
| pu, | ||
| pe, | ||
| getMaxRowCount(), | ||
| ph); | ||
| } catch (Exception ex) { | ||
| Exceptions.printStackTrace(ex); | ||
| } | ||
| } | ||
| }//GEN-LAST:event_runJPQLButtonActionPerformed |
Member
Author
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.
had to repair this section before being able to edit it. There was something wrong with the cogegen start/end markers.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves hundreds of warnings and shortens classpath a bit (which was already a problem in past on the windows CI runner).
[1/3] Removed deprecated
ProgressHandleFactory::createHandleusage[2/3] Removed deprecated
ProgressUtilsandAggregateProgressFactoryusage[3/3] Removed
org.netbeans.api.progress.nb dependencywhere possibleleft are just a few edge cases which had no direct replacements
history:
This effort started pre-apache (archived commit) and was never completed.