Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324655 - "Full_template" attribute list in launch configuration does not scroll
Summary: "Full_template" attribute list in launch configuration does not scroll
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RM.PBS (show other bugs)
Version: 4.0.2   Edit
Hardware: Macintosh Mac OS X
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-07 09:34 EDT by Greg Watson CLA
Modified: 2010-09-10 12:26 EDT (History)
4 users (show)

See Also:


Attachments
Screen shot of OpenMPI on initial load of tab (73.28 KB, image/jpeg)
2010-09-09 15:11 EDT, Albert L. Rossi CLA
no flags Details
Screen shot of OpenMPI after resizing down (62.63 KB, image/jpeg)
2010-09-09 15:15 EDT, Albert L. Rossi CLA
no flags Details
Screen shot of OpenMPI after resizing up (41.95 KB, image/jpeg)
2010-09-09 15:16 EDT, Albert L. Rossi CLA
no flags Details
pe resource manager screen capture (74.98 KB, image/jpeg)
2010-09-09 15:20 EDT, David Wootton CLA
no flags Details
openmpi launch config (215.06 KB, image/tiff)
2010-09-09 15:47 EDT, Greg Watson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2010-09-07 09:34:53 EDT
If I select the "full_template" in the PBS launch configuration, there are more attributes than fit on the screen. However I am unable to scroll the attribute list to see or enter these attributes, which seems a fairly major problem.
Comment 1 Albert L. Rossi CLA 2010-09-07 11:08:42 EDT
Greg,

I mentioned this problem a long time ago and asked for suggestions as to how to solve it.  Nobody seemed to have any ideas at that point.

You can get the scrolling function if you click on another tab and then return to Resources.  This bug is truly exasperating and I just gave up on it.  I'm sure there must be someone out there who knows how to fix it ... I've encountered this scrolling issue elsewhere.

The only way I can think of to fix this is to abandon trying to build the launch tab from its widget parts and just throw everything into a table.  I don't like that solution for a number of reasons, but if there is no other solution to this ...

Suggestions?

Al
Comment 2 Dieter Krachtus CLA 2010-09-08 12:15:01 EDT
Can you try and attach listeners (Focuslistener etc.) to monitor basic widget functionality and monitor scrolling function?

Are the listeners triggered by your unsuccessful attempt to scroll?
Comment 3 Albert L. Rossi CLA 2010-09-08 14:46:19 EDT
I have discovered part of the problem, I think, though I'm not sure what to do about it.

The code for udpateLaunchAttributeControls in the ResourcesTab class has this:

rmDynamicTab.createControl(launchAttrsScrollComp, rm, queue);
				final Control dynControl = rmDynamicTab.getControl();
				launchAttrsScrollComp.setContent(dynControl);
				Point size = dynControl.computeSize(SWT.DEFAULT, SWT.DEFAULT);

				launchAttrsScrollComp.setMinSize(size);


Now, putting a print statement after this, I see the following behavior:

1. Initial load of the tab:

SIZE IS Point {345, 121}

2. Click the Applications tab, then back to Resource.  Note: no resizing is done.

SIZE IS Point {852, 957}

3. Repeat step 2.

SIZE IS Point {852, 957}

etc.

The scroll bar only appears after step 2.
Comment 4 Albert L. Rossi CLA 2010-09-09 09:54:52 EDT
I believe I have found the fix.

There are two ways to set the scrolling.  ResourcesTab currently uses the setMinSize method, but with my dynamically built composite this fails until it gets updated.  If, however, I switch the method to have the ResourcesTab set the size on the control itself (from the computed size of the control), PBS is happy.  The only other thing the PBS tab needs to do is turn off the ScrolledComposite expansion (left on because the other RMs seem to need it).

I've checked the look of the current RM tabs and they seem to be unchanged with this modification.
Comment 5 Albert L. Rossi CLA 2010-09-09 10:23:42 EDT
Applied changes as per comment 4.
Comment 6 Greg Watson CLA 2010-09-09 14:57:06 EDT
It looks like this has changed the behavior of the Open MPI launch configuration. If I create a launch configuration using Open MPI, the launch attributes panel no longer expands to fill the whole space when the size of the launch configuration is changed. This needs to be fixed.
Comment 7 Albert L. Rossi CLA 2010-09-09 15:11:29 EDT
Created attachment 178548 [details]
Screen shot of OpenMPI on initial load of tab

The attachment is what I see running from HEAD.  Is this not correct?
Comment 8 Albert L. Rossi CLA 2010-09-09 15:15:41 EDT
Created attachment 178549 [details]
Screen shot of OpenMPI after resizing down
Comment 9 Albert L. Rossi CLA 2010-09-09 15:16:21 EDT
Created attachment 178550 [details]
Screen shot of OpenMPI after resizing up

two more screen shots.  The panels expand and contract for me.
Comment 10 Albert L. Rossi CLA 2010-09-09 15:19:30 EDT
Greg,

what is the platform of your laptop?  Is this a Windows thing?

Al
Comment 11 David Wootton CLA 2010-09-09 15:20:21 EDT
Created attachment 178551 [details]
pe resource manager screen capture
Comment 12 Albert L. Rossi CLA 2010-09-09 15:24:11 EDT
Argh.
Comment 13 David Wootton CLA 2010-09-09 15:26:48 EDT
Explanation of my attachment above:

It looks like scrolling in the PE resource manager resource tab of the run
configuration is not working correctly. If I shrink the run configuration
window small enough, i expect horizontal and vertical scroll bars to appear. In
the attached image, there are more widgets in the tab that what appears and I
should be able to scroll in both directions.

This is on Windows XP
Comment 14 Albert L. Rossi CLA 2010-09-09 15:28:16 EDT
OK, the only way then to preserve earlier behavior without constraining the RM implementations to do something they aren't currently doing is, to my thinking, going to necessitate an API addition to the the ResourcesTab knows what the LaunchConfigTab wants done with the parent, I think.  I tried a few schemes where PBS just tries to override what is going on in the ResourcesTab but they didn't seem to work.  I can try that one last time, but I'm not hopeful.
Comment 15 Greg Watson CLA 2010-09-09 15:47:11 EDT
Created attachment 178559 [details]
openmpi launch config

Here's what I see. This is on a Mac.
Comment 16 Greg Watson CLA 2010-09-09 15:50:30 EDT
Why do the other RM's work differently to the PBS RM?
Comment 17 Albert L. Rossi CLA 2010-09-09 15:53:13 EDT
This time I think I've nailed it.  Silly I didn't see it before.  

I've restored the old way of doing things to the ResourcesTab; I just found the correct place in the code for the PBS Launch Tab to override this (earlier attempts placed the override in a method which is called once, but which relies for the UI construction on an auxiliary which may be called multiple times; moving the fix into the subroutine seems to do the trick without mucking with the ptp.launch layer).

Dave, Greg,  could you check to make sure the correct behavior has been restored?

I won't close the bug or update 4_0 until you give me the go ahead.  I've committed changes to HEAD only.
Comment 18 Greg Watson CLA 2010-09-09 15:57:53 EDT
Yes, fixed for Open MPI. I think it's also fixed for PE, Dave to confirm. Please commit to 4.0.

Thanks!
Comment 19 Albert L. Rossi CLA 2010-09-09 15:58:31 EDT
Answering comment 16.

The PBS launch tab allows for the UI to be rebuilt when the template is changed.  The sequence on initial load ends up calling a skeletal build of the control and then again with the full template; the point of entry for the second time is not from the ResourcesTab method where the ScrolledComposite is sized; if I don't preserve that setting or reset it in the second instance, it gets clobbered.

The other RMs don't have anything like this going on.
Comment 20 Albert L. Rossi CLA 2010-09-09 16:13:12 EDT
Committed to 4_0 as well.

Will close when Dave confirms.
Comment 21 David Wootton CLA 2010-09-10 12:23:21 EDT
Scrolling in the PE RM run configuration resource tab works correctly now.
Comment 22 Albert L. Rossi CLA 2010-09-10 12:26:39 EDT
Thanks, Dave.