Bug 189434 - Move Up/Down on Filters Error
Summary: Move Up/Down on Filters Error
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-05-28 09:53 EDT by Kevin Doyle CLA
Modified: 2011-05-25 10:09 EDT (History)
3 users (show)

See Also:


Attachments
Modified cloneEvent method to ensure proper constructor is being called and to keep the state of multisource attribute (1.16 KB, patch)
2007-05-31 16:25 EDT, Rupen Mardirossian CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-05-28 09:53:46 EDT
If you click Move Up/Down on filters you will get an error dialog.

Log File:

!ENTRY org.eclipse.ui 4 0 2007-05-28 09:52:08.069
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:3547)
	at org.eclipse.swt.SWT.error(SWT.java:3465)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3650)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3287)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2365)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2329)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:497)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:436)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1162)
Caused by: java.lang.NullPointerException
	at org.eclipse.rse.internal.ui.view.SystemView.moveReferencedTreeItems(SystemView.java:3927)
	at org.eclipse.rse.internal.ui.view.SystemView.findAndUpdateFilterParent(SystemView.java:3840)
	at org.eclipse.rse.internal.ui.view.SystemView$ResourceChangedJob.runInUIThread(SystemView.java:1680)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
	... 22 more

-----------Enter bugs above this line-----------
TM 2.0RC1 Testing
installation : eclipse-SDK-3.3M7
RSE install  : RSE 2.0 RC1
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-05-29 17:34:48 EDT
An NPE like this should hopefully be easy to fix
Comment 2 Rupen Mardirossian CLA 2007-05-31 16:25:11 EDT
Created attachment 69606 [details]
Modified cloneEvent method to ensure proper constructor is being called and to keep the state of multisource attribute

Found out that the NPE was being caused by the multisource attribute in the event object to be null.  This attribute was being whiped out when the object was getting cloned in the SubSystemConfiguration.java class.  I put in some conditionals in the cloneEvent method to check if there was a multisource and directed to the proper constructor.

Legal Message: I, Rupen Mardirossian, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 3 Rupen Mardirossian CLA 2007-05-31 16:31:48 EDT
Also I should note that the filters do move up and down.  Although the enabling and disabling of the "Move up" and "Move down"  options are not properly working.  When a filter is at the top of the list you will still have the option to "Move up" (This will cause it to go to the bottom of the list).
Comment 4 David McKnight CLA 2007-05-31 16:38:36 EDT
I noticed that about the move up and down actions too after trying the patch.  Could you take a look at that too?
Comment 5 Kevin Doyle CLA 2007-05-31 16:45:10 EDT
bug 176577 is open about wrong enablement of Move Up/Down on connections.
Comment 6 David McKnight CLA 2007-05-31 16:55:48 EDT
Okay, I'll commit this and leave the action enablement handling for the other defect.
Comment 7 David McKnight CLA 2007-05-31 17:03:43 EDT
I've applied this patch.  Thanks!
Comment 8 Martin Oberhuber CLA 2007-06-01 07:28:26 EDT
Dave / Rupen -- I don't see Rupen's name in the Copyright comment of
SubSystemConfiguration.java -- please add the "Contributor" line for Rupen.

Rupen, ideally your patch should have included this already as well as a change in Copyright year if the to-year is not already 2007.

Kushal please don't forget to review, it's a simple fix that you could review in Bugzilla already.
Comment 9 Kushal Munir CLA 2007-06-01 07:36:35 EDT
I approve. Opened bug 190445 to track the enabling/disabling problem.
Comment 10 David McKnight CLA 2007-06-01 09:57:05 EDT
I've added a contributor line for this.
Comment 11 Rupen Mardirossian CLA 2007-06-01 09:59:20 EDT
Sorry for the mistake Martin, I will do it for next time.
Thanks!
Comment 12 Martin Oberhuber CLA 2007-06-04 05:03:28 EDT
Dave,
The tm-log.csv was wrong for two issues:
  1. Bug number was 198434 instead of correct 189434
  2. Module stated was org.eclipse.rse.core but should be org.eclipse.rse.ui

I fixed both issues in tm-log.csv. Please review my change, then close the bug.
Please be REALLY careful and diligent that late in the game.
Comment 13 David McKnight CLA 2007-06-04 10:33:39 EDT
reviewed and looks fine.
Comment 14 Kevin Doyle CLA 2007-06-21 14:34:03 EDT
Verified with RC4.
Comment 15 Martin Oberhuber CLA 2008-08-13 13:20:19 EDT
[target cleanup] 2.0 RC2 was the original target milestone for this bug