Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse 3.x RCP application editor(Compilation error in Eclipse 3.x editor)
Eclipse 3.x RCP application editor [message #870291] Mon, 07 May 2012 15:14 Go to next message
Rajesh KP is currently offline Rajesh KPFriend
Messages: 13
Registered: May 2012
Junior Member
I've a working Eclipse 3.x RCP application in which I've an editor which creates the EditorSite as below -

......
EditorSite editorSite = new EditorSite(
editorRef,
editor,
(WorkbenchPage) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
(EditorDescriptor) ed );
.......

Since the EditorSite signature has changed in Eclipse 4.x I got the below compilation error -
"The type org.eclipse.e4.ui.model.application.ui.basic.MPart cannot be resolved. It is indirectly referenced from required .class files"

Isn't the 3.x RCP application expected to work as it is in e4 without any code changes? What am I missing? Some dependencies?


Thanks
-KPRajesh



-KPRajesh
Re: Eclipse 3.x RCP application editor [message #870312 is a reply to message #870291] Mon, 07 May 2012 15:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
Why are you using EditorSite and not IEditorSite? You are referencing
internals here!

The compilation problem is one of compiletime vs runtime classpath [1]
which means that projects compiling against internals in 3.x will work
without problems.

Not sure we should reexport our model in 4.x though. Could you please
file a bug including this informations.

Tom

[1]http://mcaffer.com/2011/01/managing-development-time-dependencies/

Am 07.05.12 17:14, schrieb Rajesh KP:
> I've a working Eclipse 3.x RCP application in which I've an editor which
> creates the EditorSite as below -
> .....
> EditorSite editorSite = new EditorSite(
> editorRef,
> editor,
> (WorkbenchPage)
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
> (EditorDescriptor) ed );
> ......
>
> Since the EditorSite signature has changed in Eclipse 4.x I got the
> below compilation error - "The type
> org.eclipse.e4.ui.model.application.ui.basic.MPart cannot be resolved.
> It is indirectly referenced from required .class files"
>
> Isn't the 3.x RCP application expected to work as it is in e4 without
> any code changes? What am I missing? Some dependencies?
>
>
> Thanks
> -KPRajesh
>
Re: Eclipse 3.x RCP application editor [message #870315 is a reply to message #870291] Mon, 07 May 2012 16:01 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

A 3.x RCP app that uses the API will compile and run in both 3.8 and 4.2.

If you use internals (and you're not supposed to) it will not compile in 4.2 and even if you build it on 3.8, it will not run in 4.2 (you'll get runtime errors)

PW


Re: Eclipse 3.x RCP application editor [message #870317 is a reply to message #870291] Mon, 07 May 2012 16:02 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
Just saw this you are never supposed to create an EditorSite instance
yourself this code is completely wrong.

What is the reason you are doing this! It can't never work and could be
haven been broken in any Eclipse 3.x release not only 4.x.

Tom

Am 07.05.12 17:14, schrieb Rajesh KP:
> I've a working Eclipse 3.x RCP application in which I've an editor which
> creates the EditorSite as below -
> .....
> EditorSite editorSite = new EditorSite(
> editorRef,
> editor,
> (WorkbenchPage)
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),
> (EditorDescriptor) ed );
> ......
>
> Since the EditorSite signature has changed in Eclipse 4.x I got the
> below compilation error - "The type
> org.eclipse.e4.ui.model.application.ui.basic.MPart cannot be resolved.
> It is indirectly referenced from required .class files"
>
> Isn't the 3.x RCP application expected to work as it is in e4 without
> any code changes? What am I missing? Some dependencies?
>
>
> Thanks
> -KPRajesh
>
Previous Topic:Questions concerning @PreDestroy and @PreSave
Next Topic:Multiple Perspectives in an RCP e4 Application
Goto Forum:
  


Current Time: Sun Dec 21 03:28:25 GMT 2014

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

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