Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » reuse Java perspective in an RCP application
reuse Java perspective in an RCP application [message #530767] Fri, 30 April 2010 18:31 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1395
Registered: July 2009
Senior Member
Hi

I'd like to give to my RCP application the Java perspective, how can I
reuse that?

I found JavaPerspectiveFactory but it's in an internal package...

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: reuse Java perspective in an RCP application [message #531020 is a reply to message #530767] Mon, 03 May 2010 12:11 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You need to include all of JDT and Platform in your RCP app. Then you
set the default perspective in your plugin_customization.ini file:

org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaP erspective


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: reuse Java perspective in an RCP application [message #534170 is a reply to message #531020] Tue, 18 May 2010 09:27 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1395
Registered: July 2009
Senior Member
On 05/03/2010 02:11 PM, Paul Webster wrote:
> You need to include all of JDT and Platform in your RCP app. Then you
> set the default perspective in your plugin_customization.ini file:
>
> org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaP erspective
>
>

Hi

this however does not show the standard File menu, edit menu, etc...

thanks in advance
cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: reuse Java perspective in an RCP application [message #534245 is a reply to message #534170] Tue, 18 May 2010 12:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Lorenzo Bettini wrote:
>
> this however does not show the standard File menu, edit menu, etc...

That's all created by the action bar advisor for your app, in the IDE
case that's org.eclipse.ui.internal.ide.WorkbenchActionBuilder

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: reuse Java perspective in an RCP application [message #534317 is a reply to message #534245] Tue, 18 May 2010 15:53 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1395
Registered: July 2009
Senior Member
On 05/18/2010 02:56 PM, Paul Webster wrote:
> Lorenzo Bettini wrote:
>>
>> this however does not show the standard File menu, edit menu, etc...
>
> That's all created by the action bar advisor for your app, in the IDE
> case that's org.eclipse.ui.internal.ide.WorkbenchActionBuilder
>
> PW
>

Thanks Paul

so back to my original post: there's no easy way to recreate what I see
when I run eclipe with the Java perspective in my RCP application, but
to copy some code from an internal class, right?

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: reuse Java perspective in an RCP application [message #534530 is a reply to message #534317] Wed, 19 May 2010 12:45 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Lorenzo Bettini wrote:
> so back to my original post: there's no easy way to recreate what I see
> when I run eclipe with the Java perspective in my RCP application, but
> to copy some code from an internal class, right?
>

You have to basically provide everything in your RCP app that would
support the Java perspective. That means most of the setup for the IDE
workbench as well.

It's either that, or run the org.eclipse.ui.ide.workbench application.
Basically, run JDT and add your plugins to that, instead of trying to
add parts of JDT to your RCP app.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: reuse Java perspective in an RCP application [message #534550 is a reply to message #534530] Wed, 19 May 2010 13:56 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1395
Registered: July 2009
Senior Member
On 05/19/2010 02:45 PM, Paul Webster wrote:
> Lorenzo Bettini wrote:
>> so back to my original post: there's no easy way to recreate what I
>> see when I run eclipe with the Java perspective in my RCP application,
>> but to copy some code from an internal class, right?
>>
>
> You have to basically provide everything in your RCP app that would
> support the Java perspective. That means most of the setup for the IDE
> workbench as well.
>
> It's either that, or run the org.eclipse.ui.ide.workbench application.
> Basically, run JDT and add your plugins to that, instead of trying to
> add parts of JDT to your RCP app.
>
> PW
>

OK, so if I understand correcly, I must create a product configuration
which refers to my product, and uses org.eclipse.ui.ide.workbench as the
application, in fact in my plugin.xml I now have:

<extension
id="product1"
point="org.eclipse.core.runtime.products">
<product
application="org.eclipse.ui.ide.workbench"
name="SWRTJ IDE">
</product>
</extension>

I added the required plugins in the product configuration, and I can run
this product from eclipse. However, if I export it with the product
wizard, the plugins and configuration directories are created but no
executable is created...

I've been struggling with these issues (try to create a product that
runs as the application the ide workbench instead of my own application)
for days and I can't seem to solve it...

thanks in advance
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: reuse Java perspective in an RCP application [message #534552 is a reply to message #534550] Wed, 19 May 2010 14:14 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

For actually creating this kind of product, probably feature based is
useful.

org.eclipse.rcp and org.eclipse.platform are the basis for the IDE
application itself. Then include the JDT feature to get JDT on top of that.

For e4 we created a feature based product. For the runtime to work you
would need:

org.eclipse.platform (which includes org.eclipse.rcp), org.eclipse.jdt
(possibly org.eclipse.help and org.eclipse.cvs). Then we included our
feature, org.eclipse.e4.sdk.runtime.feature.

Then to generate a product (we used an Eclipse SDK p2 repository) we
also needed the org.eclipse.rcp.configuration feature. It shows up as
an error, but it is needed during the build in order to generate the
launcher (it has the binary artifacts).

See
http://dev.eclipse.org/viewcvs/index.cgi/e4/org.eclipse.e4.u i/examples/org.eclipse.e4.ui.examples.legacy.workbench/legac y-eclipse.product?view=co
for our example .product file. We have more in there because we include
all of the source plugins in our build as well (necessary to see
workbench source and get extension point help in plugin.xml editors, but
that's only if you use PDE).


PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Set Focus on PropertyDescriptor Cell
Next Topic:IViewSite (ico multi-instance view): no means to update secondaryId
Goto Forum:
  


Current Time: Wed Nov 26 14:21:23 GMT 2014

Powered by FUDForum. Page generated in 0.02348 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software