Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Open file with e3.x editor in e4 application(How to open an editor / set the editor input?)
Open file with e3.x editor in e4 application [message #1709473] Mon, 28 September 2015 17:10 Go to next message
Marianne Stecklina is currently offline Marianne StecklinaFriend
Messages: 5
Registered: September 2015
Junior Member
I am looking for a way to open a Custom Graphiti Editor (e3.x) in my e4 application.

Dirk Fahland recommends in his tutorial to use an e3.x application and add an e4-product on top of it for this purpose, see dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/.
I tried this and it turned out that many of the nice e4 features did not work anymore (for example defining the main menu or handlers in the Application.e4xmi).

Basically I am looking for an e4 equivalent for the following openFile-Handler:

       @Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		URI uri = URI.createFileURI("N:/testdiagrams/test.filedi");
		URIEditorInput editorInput = new URIEditorInput(uri);
		IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
		page.openEditor(editorInput, "MyProject.graphitieditor");
		return null;
	}


What is the best way to achieve opening a file with my editor without giving up so much of the concept of defining the components in Application.e4xmi?
Re: Open file with e3.x editor in e4 application [message #1732834 is a reply to message #1709473] Fri, 20 May 2016 07:59 Go to previous messageGo to next message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 27
Registered: March 2016
Junior Member
http://www.vogella.com/tutorials/Eclipse4Services/article.html#selectedservices_partservice

See 6.6
Re: Open file with e3.x editor in e4 application [message #1732855 is a reply to message #1732834] Sat, 21 May 2016 06:11 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2787
Registered: July 2012
Senior Member
Maybe our migration tutorial helps. Unfortunately it is currently only available in German but we think about translating it soon.

https://jaxenter.de/tutorial-so-portieren-sie-eclipse-3-anwendungen-auf-eclipse-4-39492

But maybe the examples or the related GitHub project gives some ideas
Previous Topic:[BUG?] Eclipse Mars.2 on Ubuntu 16.04 Beta errant behavior
Next Topic:Visibility of new editor part
Goto Forum:
  


Current Time: Mon Sep 28 22:30:15 GMT 2020

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

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

Back to the top