Skip to content
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

Adjust total progress based on partial task progress #111

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

Borewit
Copy link
Owner

@Borewit Borewit commented Feb 25, 2023

  1. Updates the overall progress-bar based on the progress of the sub-task bar
  2. Progress is added over the task is complete instead of before

Resolves #109

@Borewit Borewit self-assigned this Feb 25, 2023
@Borewit
Copy link
Owner Author

Borewit commented Feb 25, 2023

Build: listFix_2.6.0-PR111-5.exe

{
progress.setTotal(winLists.size());
}
progress.setTotal(winLists.size());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

NULL_DEREFERENCE: object winLists last assigned on line 93 could be null and is dereferenced at line 94.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

private javax.swing.JButton _cancelButton;
private javax.swing.JPanel _middlePanel;
private javax.swing.JLabel _overallLabel;
private javax.swing.JProgressBar _overallProgress;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7% of developers fix this issue

UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.


Suggested change
private javax.swing.JProgressBar _overallProgress;
_taskProgress = new JProgressBar();

❗❗ 6 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/listfix/view/dialogs/DualProgressDialog.java 186
src/main/java/listfix/view/dialogs/DualProgressDialog.java 184
src/main/java/listfix/view/dialogs/DualProgressDialog.java 182
src/main/java/listfix/view/dialogs/DualProgressDialog.java 181
src/main/java/listfix/view/dialogs/DualProgressDialog.java 183
src/main/java/listfix/view/dialogs/DualProgressDialog.java 187

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@sonatype-lift
Copy link

sonatype-lift bot commented Feb 26, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/Borewit/listFix/111.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/Borewit/listFix/111.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@Borewit Borewit force-pushed the improve-dual-progress-bar branch 3 times, most recently from 93c3200 to ea97a2d Compare February 26, 2023 17:01
import java.beans.PropertyChangeSupport;

public class DualProgressDialog extends javax.swing.JDialog
/**
* @param <T> the result type returned by this SwingWorker's doInBackground and get methods
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

37% of developers fix this issue

MissingSummary: A summary line is required on public/protected Javadocs.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]


private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing
{//GEN-HEADEREND:event_formWindowClosing
private void formWindowClosing(java.awt.event.WindowEvent evt)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7% of developers fix this issue

UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.


Suggested change
private void formWindowClosing(java.awt.event.WindowEvent evt)
public void windowClosing(WindowEvent evt)

❗❗ 68 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/listfix/view/dialogs/DualProgressDialog.java 122
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 202
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 155
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 221
src/main/java/listfix/view/dialogs/DualProgressDialog.java 71
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 200
src/main/java/listfix/view/dialogs/DualProgressDialog.java 113
src/main/java/listfix/view/dialogs/DualProgressDialog.java 101
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 293
src/main/java/listfix/view/dialogs/BatchExactMatchesResultsDialog.java 168

Showing 10 of 68 findings. Visit the Lift Web Console to see all.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@touwys
Copy link

touwys commented Feb 27, 2023

Build: listFix_2.6.0-PR111-5.exe

Test Results listFix_2.6.0-PR111-5

  1. Playlist tab-titles disappear. These 3 Tab-titles/text went blank after a while. (Two of the playlists were added from the PLD, and one playlist was added to the editor via menu File / Open playlist)


listFix_2 6 0-PR111-5 _ blank playlist tab-titles _ Screenshot

  1. Changing File / Option / Theme to "Darkstar": It renders Tab-titles of the playlist in the PLE completely blank.


listFix_2 6 0-PR111-5 _ blank playlist tab-titles _ Darkstar theme _ Screenshot

  1. Changing File / Option / Theme hangs the app. After force closing the app, it was restarted and the File / Option / Theme then worked properly, i.e. without hanging the app.

  2. NB: Check to verify that this operation is working as intended: Append file or playlist — That is, by activating the +sign on the PLE toolbar.

@touwys
Copy link

touwys commented Feb 27, 2023

Build: listFix_2.6.0-PR111-5.exe

Test Results listFix_2.6.0-PR111-5

1. Playlist tab-titles disappear. These 3 Tab-titles/text went blank after a while. (Two of the playlists were added from the PLD, and one playlist was added to the editor via menu File / Open playlist)


listFix_2 6 0-PR111-5 _ blank playlist tab-titles _ Screenshot

2. Changing File / Option / Theme to "Darkstar": It renders Tab-titles of the playlist in the PLE completely blank.


listFix_2 6 0-PR111-5 _ blank playlist tab-titles _ Darkstar theme _ Screenshot

3. Changing File / Option / Theme hangs the app. After force closing the app, it was restarted and the File / Option / Theme then worked properly, i.e. without hanging the app.

4. NB: Check to verify that this operation is working as intended: Append file or playlist (+sign_ on the PLE toolbar)

@Borewit Borewit force-pushed the improve-dual-progress-bar branch 2 times, most recently from 9200042 to e31b796 Compare February 27, 2023 09:59

private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing
{//GEN-HEADEREND:event_formWindowClosing
private void formWindowClosing(java.awt.event.WindowEvent ignore)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7% of developers fix this issue

UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.


Suggested change
private void formWindowClosing(java.awt.event.WindowEvent ignore)
public void windowClosing(WindowEvent evt)

ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@Borewit Borewit force-pushed the improve-dual-progress-bar branch 4 times, most recently from 7f1481e to d1ce250 Compare February 27, 2023 15:14
* You can override private methods, but you can't call private methods in the parent class :(
*/
public class PLSProperties extends Hashtable<Object, Object>
public class PLSProperties extends Hashtable<String, String>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

16% of developers fix this issue

JdkObsolete: Hashtable performs synchronization this is usually unnecessary; prefer LinkedHashMap.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@@ -873,14 +853,14 @@ private void store0(BufferedWriter bw, String comments, boolean escUnicode)
{
writeComments(bw, comments);
}
bw.write("#" + new Date().toString());
bw.write("#" + new Date());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

JavaUtilDate: Date has a bad API that leads to bugs; prefer java.time.Instant or LocalDate.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@Borewit Borewit merged commit cb6520d into main Feb 27, 2023
@Borewit Borewit deleted the improve-dual-progress-bar branch February 27, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the behavior of the dual progress bar
2 participants