pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kumar S <m4ma...@gmail.com>
Subject Re: Use pivot in Eclipse RCP
Date Tue, 13 Oct 2009 08:19:39 GMT
Hi Greg,

Well, we are trying to enable pivot to be used within the Eclipse RCP
context so that same code can work across UI screens
(desktop/browser/eclipse).

Thanks for the info.  We've done the following:

   1. Created a copy of DesktopApplicationContext as RCPApplicationContext
   2. Pass the Eclipse's Composite parent object reference to
   RCPApplicationContext
   3. When the windowedHostFrame is getting instantiated, we instantiate it
   via the SWT_AWT bridge as below:
   4. windowedHostFrame = (Frame) SWT_AWT.new_Frame( p );
   5. Now, because the SWT_AWT.new_Frame returns a Frame object, we cant
   typecast it to HostFrame, that's why we had to make the HostFrame as Frame
   6. After this, We are able to render the frame within the eclipse RCP
   view context, however we get a blank frame without any objects getting
   rendered.

We are trying to understand how the SWT Display gets attached to the frame.
Are we missing anything else? Any help is appreciated.

Thanks,
-Manoj.




On Fri, Oct 9, 2009 at 7:28 PM, Greg Brown <gkbrown@mac.com> wrote:

> It is theoretically possible, but it is not something we currently support.
> You will most likely need to create a custom subclass of ApplicationContext
> that uses the AWT/SWT bridge to host the context's DisplayHost in the SWT
> Composite.
>
> Out of curiosity, what is the use case you are trying to address?
>
> Greg
>
> On Oct 9, 2009, at 9:41 AM, Manoj Kumar S wrote:
>
> Thanks  for the pointer.  I was able to integrate pivot jars into the RCP.
> Now the next step i was trying is to render the labels,text, etc onto the
> eclipse view.
>
> For swt we use the Composite object to render.
> Eg:
> Composite parent;
> label l = new label(parent, SWT.WRAP);
> l.setText("Test Label");
>
> Was wondering if its possible to render the pivot label object onto the
> RCP's Composite parent object?
>
> Thanks,
> -Manoj.
>
>
>
>
> On Thu, Oct 8, 2009 at 8:58 PM, Noel Grandin <noelgrandin@gmail.com>wrote:
>
>>
>> With Eclipse RCP, you're operating in a plugin (OSGi-type) environment, so
>> you'll probably need to configure something in the manifest or one of the
>> plugin declaration files.
>>
>> There should be a tutorial somewhere about integrating third-party jars.
>>
>> -- Noel.
>>
>>
>> Manoj Kumar S wrote:
>>
>> Thanks for the reply.  I do have all the jars in the build path already.
>> Still it never works.
>>
>> Thanks,
>> -Manoj.
>>
>>
>>
>>
>> On Thu, Oct 8, 2009 at 7:44 PM, Greg Brown <gkbrown@mac.com> wrote:
>>
>>>
>>> Sounds like you need to make sure the Pivot JARs are on your classpath.
>>>
>>> However, you are somewhat in uncharted waters. Pivot is based on AWT and Java2D,
whereas Eclipse uses SWT. You may need to use the AWT/SWT bridge to accomplish what you are
trying to do. This is not something we have tested, so you may run into issues that we are
not aware of and may not be able to resolve.
>>>
>>> But please let us know how it goes. Others may be able to share some experience
that may help, and we will try to be of assistance if we can.
>>>
>>> Greg
>>>
>>>
>>> On Thursday, October 08, 2009, at 02:50AM, "Manoj Kumar S" <m4manoj@gmail.com>
wrote:
>>> >
>>>
>>>   Hi,
>>>
>>> Was trying to use pivot in an Eclipse RCP application.  When I try to
>>> instantiate any object (like Label) within a view, i get a run time
>>> exception of NoClassDefenition found.
>>>
>>> Any one has tried this before?  Any examples?
>>>
>>> Appreciate your help.
>>>
>>> Thanks,
>>> -Manoj.
>>>
>>
>>
>>
>
>

Mime
View raw message