Dave,
Give it one more try… Greg
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
|