Cancel button beside Eclipse Job Status Bar Progress - eclipse

Eclipse jobs can have a progress bar with a stop button on the side. However on the status bar only a small progress bar appears informing the user that a job is ongoing.
Is it possible to put a small stop button next to the progress in the status bar? This will allow the user to stop the job without opening the "Progress" view.

You should probably use a Job using setUser(true) which will display a popup dialog showing the progress with a Cancel button.

Related

Possible to have multiple buttons in a StatusItem on MacOS?

I'm trying to build a timer app on MacOS that would show the remaining time in the status bar.
Wondering if it's possible to show multiple buttons there at once? E.g. show play/pause button, reset button and the time right in the status bar.
Or are there any hacks possible, like make it a single button with 2 icons next to each other, and check the click position to see which "button" got the click?
I know I can put the extra buttons in a popover, but I'm new to MacOS dev and trying to understand the limits. Thanks!

Dash progress bar with celery

I am developing a dash application. I am using docker-compose, web and celery are few services to name.
I have a long running task for this I am using celery and I have a progress bar to display progress of that task.
So basically user clicks on run button to start the task and then a progress bar and cancel button is visible to cancel the task and run button is disabled till task is running or cancel button is clicked.
This above setup is working smooth.
Now suppose user clicks on run button i.e. progress bar and cancel button is visible and run button is disabled and after that user do one of the following below actions -
Problem:
If user closes the browser tab or
If user clicks the browser refresh button or
If user switches/clicks on any other page within the application
And now if user again returns/opens the same page again, I observed following things:
Page gets loaded with default page settings i.e. no progress bar and cancel button only run button is visible.
The task is still running in background.
What is preferred approach to handle above problems?
I am trying to get the status of the page as it was left i.e. progress bar and cancel button is visible and run button is disabled.Is this possible?
Please suggest.

Haw can I handle clicking back button in install4j?

I have a screen with really long action. I figured out that I can handle clicking 'Cancel' button by running scheduled task which checks the condition: context.isCancelling() during execution of this action. Is there any way to handle clicking 'Back' button during the action execution?
The back button is always disabled while an action is being executed, this cannot be changed programmatically.
If you want to provide a way to cancel an action and to go back to the previous screen, you have to add such a button yourself to the screen. In the action script of the button, you can set an installer variable to true and regularly check its value in the action. If the variable is set, call
context.goBackInHistory(1);
to go back to the previous screen and return from the action.

Eclipse NewSearchUI hide progress dialog while running a search query

I used the NewSearchUI.runSearchInBackground(query) to run a search query. This causes a Progress dialog to pop up, where user have the button "Run in Background". The Job.setUser() is set to true for the Job in InternalSaerchUI.runSearchInBackgound, which is why the dialog always pops up.
However I would like to hide the dialog from the beginning, so that the user can look at the search results quickly, without having to minimize the progress dialog. Is there a way to achieve that? Aside from the setting it in the preferences options and checking the run always in background checkbox.
References:
Search example
Whether a progress dialog shows up or not isn't really meant to be controlled by the initiator of a user job.
As you already pointed out, the workspace-wide preference controls if a progress dialog is shown or not.
Apart from disabling the progress dialog in general, there is no way that I know of to prevent the progress dialog from appearing.
If you think it is generally useful to hide the progress dialog for search jobs, you may want to file an enhancement request here: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform

Iphone UISearchBar Cancel Button Malfunction

I have a UISearchBar that searches and displays results successfully. If I press the cancel button mid-search, the original table is restored and all is well. If I press the search button that is on the keyboard, the search results are shown, which is great. But THEN if I press the cancel button that is on the search bar (I am using the 'search bar and display controller'), the screen goes back to normal, leaving behind only the search results and not showing the original table.
Any ideas?
Thank you!
I got it - I did not know where I could interact with the cancel button that was built into the search bar but I put code that cleaned out the search table in the -searchButtonPressed and threw that in under the search did its work!