I'm not terribly familiar with SWT, but that all seems reasonable.
Given the generated Frame instance, you'll need to add an instance of
ApplicationContext.DisplayHost to it (be sure the frame is using a
layout manager that will size it to fit; e.g. BorderLayout). Then you
will need to ensure that your Pivot Application instance is properly
instantiated, and that startup() and shutdown() are called on it as
needed. Let us know how it goes.
Greg
On Oct 13, 2009, at 4:19 AM, Manoj Kumar S wrote:
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:
Created a copy of DesktopApplicationContext as RCPApplicationContext
Pass the Eclipse's Composite parent object reference to
RCPApplicationContext
When the windowedHostFrame is getting instantiated, we instantiate
it via the SWT_AWT bridge as below:
windowedHostFrame = (Frame) SWT_AWT.new_Frame( p );
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
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 <[email protected]> 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
<[email protected]> 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 <[email protected]> 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" <[email protected]
> 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.