Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Help on table viewer with flexiblehierarchy treeviewer

Hi Pawel,

Thank you very much for the valuable advice.
As you said, the problem with event queuing occurred because I did not
call requestMonitor.done()in my buildDelta() implementation. 

I added the done() method call and now, the custom event is getting
processed. But unfortunately another problem arised - a NullPointer
exception in TreeModelContentProvider.handleSelect(). I used
IModelDelta.SELECT flag for setting selection according to the
dispatched (custom) event. 

In my buildDelta implementation, called 
		parentDelta.setFlags(parentDelta.getFlags() |
IModelDelta.SELECT);
method. But inside the TreeModelContentProvider.handleSelect() method I
got a Nullpointer exception as below,


java.lang.NullPointerException
      at
org.eclipse.jface.viewers.CustomHashtable.hashCode(CustomHashtable.java:
264)
      at
org.eclipse.jface.viewers.CustomHashtable.get(CustomHashtable.java:236)
      at
org.eclipse.jface.viewers.TreeSelection$InitializeData.<init>(TreeSelect
ion.java:60)
      at
org.eclipse.jface.viewers.TreeSelection$InitializeData.<init>(TreeSelect
ion.java:52)
      at
org.eclipse.jface.viewers.TreeSelection.<init>(TreeSelection.java:97)
      at
org.eclipse.jface.viewers.TreeSelection.<init>(TreeSelection.java:108)
      at
org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider.han
dleSelect(TreeModelContentProvider.java:347)
      at
org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.updateN
odes(ModelContentProvider.java:1375)
      at
org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.updateM
odel(ModelContentProvider.java:1327)
      at
org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.doModel
Changed(ModelContentProvider.java:1298)
      at
org.eclipse.debug.internal.ui.viewers.model.ModelContentProvider.modelCh
anged(ModelContentProvider.java:1277)
      at
org.eclipse.cdt.dsf.ui.viewmodel.DefaultVMModelProxyStrategy$1.run(Defau
ltVMModelProxyStrategy.java:141)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at
org.eclipse.cdt.dsf.ui.viewmodel.DefaultVMModelProxyStrategy.fireModelCh
anged(DefaultVMModelProxyStrategy.java:145)
      at
org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider$2.handleSuccess(Abst
ractVMProvider.java:383)
      at
org.eclipse.cdt.dsf.concurrent.RequestMonitor.handleCompleted(RequestMon
itor.java:346)
      at
org.eclipse.cdt.dsf.concurrent.RequestMonitor$2.run(RequestMonitor.java:
291)
      at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:
134)
      at
org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
      at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
      at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
      at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
      at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:6
64)
      at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplicat
ion.java:115)
      at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.j
ava:196)
      at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplicat
ion(EclipseAppLauncher.java:110)
      at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Eclip
seAppLauncher.java:79)
      at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
369)
      at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
      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:620)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1384)

 Is any mistake in my buildDelta() implementation? Could you please help
me on this?
	

Regards,
Haseena

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Pawel Piech
Sent: Wednesday, July 13, 2011 2:42 AM
To: CDT General developers list.
Subject: Re: [cdt-dev] Help on table viewer with flexiblehierarchy
treeviewer

Hi Haseena,
 From you description I would guess that you have a bug in handling 
events where the request monitor for an event is never completed.  Check

your buildDelta() implementations.  The abstract VM provider 
implementation processes events one at a time.  So if an event is 
apparently still processing, it will queue the next one until the 
previous one finishes.

Cheers,
Pawel

On 07/12/2011 12:56 AM, Haseena L. wrote:
> No, I am not talking about graphical events. I have a doubleclick
listener, which generates and dispatches a custom event.
> It does not seem that the event dispatcher thread is blocked. The
dispatched event is received by other views.
> The received (custom) event is getting queued in
AbstarctVMProvider.ModelProxyEventQueue, but no further processing is
performed.
>
> Regards,
> Haseena
>
>
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Alena Laskavaia
> Sent: Tuesday, July 12, 2011 4:07 AM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Help on table viewer with flexible hierarchy
treeviewer
>
> Are you talking about graphical events? Are you blocking event
> dispatcher from working because of locks or just doing something else
> in main thread?
>
> On Mon, Jul 11, 2011 at 12:14 AM, Haseena L.<haseena.l@xxxxxxxxxxxxx>
wrote:
>> Hi,
>>
>>
>>
>> I am implementing a table viewer using flexible hierarchy Tree
Viewer. I
>> followed the DSF examples and could successfully implement the table
view. I
>> have 4 views which are interrelated with a unique field. My
requirement  is
>> that, when I double click a particular row in one view, the other
views
>> should be updated such that the rows containing related information
is
>> selected and highlighted.  But unfortunately this is not happening.
>>
>>
>>
>> A custom event is generated when double clicking an entry and the
event is
>> received by the other views. The event is getting queued and no
further
>> processing is being done and the data is not getting highlighted.
Could
>> someone help me on this?
>>
>>
>>
>> Regards,
>>
>> Haseena
>>
>>
>>
>>
>>
>>
>> ***** Confidentiality Statement/Disclaimer *****
>>
>> This message and any attachments is intended for the sole use of the
>> intended recipient. It may contain confidential information. Any
>> unauthorized use, dissemination or modification is strictly
prohibited. If
>> you are not the intended recipient, please notify the sender
immediately
>> then delete it from all your systems, and do not copy, use or print.
>> Internet communications are not secure and it is the responsibility
of the
>> recipient to make sure that it is virus/malicious code exempt.
>> The company/sender cannot be responsible for any unauthorized
alterations or
>> modifications made to the contents. If you require any form of
confirmation
>> of the contents, please contact the company/sender. The
company/sender is
>> not liable for any errors or omissions in the content of this
message.
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> ***** Confidentiality Statement/Disclaimer *****
>
> This message and any attachments is intended for the sole use of the
intended recipient. It may contain confidential information. Any
unauthorized use, dissemination or modification is strictly prohibited.
If you are not the intended recipient, please notify the sender
immediately then delete it from all your systems, and do not copy, use
or print. Internet communications are not secure and it is the
responsibility of the recipient to make sure that it is virus/malicious
code exempt.
> The company/sender cannot be responsible for any unauthorized
alterations or modifications made to the contents. If you require any
form of confirmation of the contents, please contact the company/sender.
The company/sender is not liable for any errors or omissions in the
content of this message.
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
***** Confidentiality Statement/Disclaimer *****

This message and any attachments is intended for the sole use of the intended recipient. It may contain confidential information. Any unauthorized use, dissemination or modification is strictly prohibited. If you are not the intended recipient, please notify the sender immediately then delete it from all your systems, and do not copy, use or print. Internet communications are not secure and it is the responsibility of the recipient to make sure that it is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or modifications made to the contents. If you require any form of confirmation of the contents, please contact the company/sender. The company/sender is not liable for any errors or omissions in the content of this message.


Back to the top