Dave,
It sounds like this is working the way other long running components work in the launch configuration dialog. You can also set the task name using subTask() and setTaskName() on the progress monitor if you want to give the user more information about what is going on.
Regards, Greg Greg
This is working now.
Now when I have LSF shut down and click
a list button I get a progress monitor in the run config dialog with a
cancel button. The UI is locked at this point and I cannot do anything,
but if it is obscured and exposed it is redrawn and the UI looks 'live',
not hung. If I click the cancel button the progress monitor goes away and
the UI unlocks. I have to code the first parameter of the ILaunchConfiguration.run()
method as 'true' for this to work. If I code it 'false' the UI is still
locked but does not completely refresh.
I think what I have is the correct behavior.
If I was to figure out how to run the run() method on a separate thread
then I think I have a problem of how to deal with waiting for the query
command to complete before I can pop up the dialog, and still keep the
UI active.
Dave
From:
Greg Watson <g.watson@xxxxxxxxxxxx>
To:
Parallel Tools Platform
general developers <ptp-dev@xxxxxxxxxxx>
Date:
08/08/2013 09:35 AM
Subject:
Re: [ptp-dev]
Displaying progress monitor dialog for a job
Sent by:
ptp-dev-bounces@xxxxxxxxxxx
Dave,
Give it one more try…
Greg
On Aug 8, 2013, at 8:44 AM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
Greg
I ran a pull for PTP_7_0_0 this morning, and saw the update for initializing
the launch configuration dialog was included and still have the same problem
where tab.fLaunchConfigurationDialog is null.
Dave
From: Greg
Watson <g.watson@xxxxxxxxxxxx>
To: Parallel
Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date: 08/07/2013
04:04 PM
Subject: Re:
[ptp-dev] Displaying progress monitor dialog for a job
Sent by: ptp-dev-bounces@xxxxxxxxxxx
Dave,
Please try now.
Cheers,
Greg
On Aug 7, 2013, at 12:54 PM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
Greg
I updated to current PTP 7.0 source then tried using this new interface.
I'm getting a null pointer exception when I call widgetDescriptor.getLaunchConfigurationDialog.run(true,
true, command) where widgetDescriptor is an IWidgetDescriptor2 object and
command is an instance of a class which implements org.eclipse.jface.operation.IRunnableWithProgress.
I stepped thru the code with a debugger and my custom widget constructor
gets an instance of an UpdateModelFactory.ControlDescriptor.
I stepped thru the code which runs when I click my custom button and stepped
into widgetDescriptor.getLaunchConfigurationDialog(). In that method, I
see code that returns tab.getLaunchConfigurationDialog and I see that tab.fLaunchConfigurationDialog,
which I think getLaunchConfigurationTab returns, is null.
Dave
From: Greg
Watson <g.watson@xxxxxxxxxxxx>
To: Parallel
Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date: 08/06/2013
10:34 AM
Subject: Re:
[ptp-dev] Displaying progress monitor dialog for a job
Sent by: ptp-dev-bounces@xxxxxxxxxxx
Dave,
I suspect the problem is because you already have a modal dialog open (the
run configuration) and you can't have two modal dialogs at the same time.
Instead of a job, I think you'll need to use the ILaunchConfigurationDialog#run()
method. Assuming you have the launch configuration dialog, you'd do something
like this:
try {
launchConfigurationDialog.run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
… your code here ...
}
});
} catch (InvocationTargetException e1) {
…
} catch (InterruptedException e2) {
…
};
This will use a progress monitor that is displayed on the lower part of
the launch configuration dialog. If the first argument is true, then a
separate thread will be used. You may or may not need this, so I would
try both to see which works best. If the second argument is true, then
a cancel button will be displayed also.
Let me know if you have any other questions.
Regards,
Greg
On Aug 6, 2013, at 9:27 AM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
Greg
I'm calling this method right after creating the object. This is the code
I have to create the job where LSFCommand extends the Job class
queueQuery = new
LSFCommand(Messages.QueueCommandDesc, connection, queryCommand);
queueQuery.setUser(true);
queueQuery.addJobChangeListener(jobListener);
queueQuery.schedule();
Dave
From: Greg
Watson <g.watson@xxxxxxxxxxxx>
To: Parallel
Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
Date: 08/06/2013
08:48 AM
Subject: Re:
[ptp-dev] Displaying progress monitor dialog for a job
Sent by: ptp-dev-bounces@xxxxxxxxxxx
Dave,
Calling setUser(true) should work, but it has to be called before the job
is scheduled. Where are you setting this?
Regards,
Greg
On Aug 6, 2013, at 7:09 AM, Dave Wootton <dwootton@xxxxxxxxxx>
wrote:
I'm working on bug 413192 and have the changes to run LSF commands as a
job instead of on the UI thread mostly working. The one thing I cannot
get working is getting the progress monitor to appear as a pop up dialog.
Right now, I can click a list button in the resources tab of a LSF target
system configuration and get a progress monitor appear in the progress
view while the job is running. However, if I want to cancel the job, for
instance if LSF is down and the command hung, I cannot cancel the job unless
I close the run configuration dialog then cancel the progress monitor,
since the run configuration dialog is modal.
I'd like to have the progress monitor appear as a popup dialog with a cancel
button like I see elsewhere but I can't figure out how to make that work.
I saw a web page that suggested calling Job.setUser(true) would do this
but it is not working. I also tried setting the job priority to Job.Interactive
and that did not help.
Does anyone have suggestions how to make this work?
Dave
Dave_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________ ptp-dev mailing list ptp-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ptp-dev
|