Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342383 - Migrate Xtext support in old Remus to current Remus
Summary: Migrate Xtext support in old Remus to current Remus
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Remus (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Tom Seidel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-10 16:27 EDT by Joerg Reichert CLA
Modified: 2020-05-07 09:59 EDT (History)
0 users

See Also:


Attachments
first rough non working draft (102.78 KB, application/octet-stream)
2011-04-10 16:34 EDT, Joerg Reichert CLA
no flags Details
Fixed version to integrate Xtext (228.50 KB, application/zip)
2011-04-14 09:45 EDT, Tom Seidel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Reichert CLA 2011-04-10 16:27:25 EDT
Build Identifier: Eclipse SDK, Version: 3.7.0, Build id: I20110310-1119, Remus Information Management (Incubation)	0.1.0.201104061020

The Xtext extension (http://www.richclient2.de/2009_09_01/extending-rim-with-xtext/#more-219) only works with an older Remus version. It should be updated to Xtext 1.0.2 and current Remus. 

Actually I started working on that task but did not get it running yet (see appendix), the editor is still a simple text editor.

With Xtext 1.0 it is now possible to remove the dependecy on JDT. 

Maybe the Xtext forms integration can be also used: http://mdenutshell.blogspot.com/2010/09/how-to-embed-xtext-editors-within.html

Reproducible: Always
Comment 1 Joerg Reichert CLA 2011-04-10 16:34:52 EDT
Created attachment 192909 [details]
first rough non working draft
Comment 2 Tom Seidel CLA 2011-04-14 09:45:30 EDT
Created attachment 193255 [details]
Fixed version to integrate Xtext
Comment 3 Tom Seidel CLA 2011-04-14 09:46:57 EDT
FIXED, actually the only thing that had to be changed was

Injector injector = org.xtext.example.ui.internal.MyDslActivator.getInstance().getInjector("org.xtext.example.MyDsl");

to

Injector injector = org.xtext.example.ui.internal.MyDslActivator
.getInstance().getInjector("org.xtext.example.MyDsl");

in org.remus.infomngmnt.mydsl.extension.XTextDelegationEditorPart
Comment 4 Tom Seidel CLA 2011-04-14 09:48:27 EDT
Sorry, typo:

WAS:

Injector injector = Guice.createInjector(new org.xtext.example.MyDslRuntimeModule());

IS:

Injector injector = org.xtext.example.ui.internal.MyDslActivator
.getInstance().getInjector("org.xtext.example.MyDsl");
Comment 5 Joerg Reichert CLA 2011-04-14 11:51:50 EDT
Great, it works. Note that you have to adapt the .ui project to export the internal package, where the org.xtext.example.ui.internal.MyDslActivator resides.

One thing I missed in the new information unit extension point is the possibility to define an icon or have I overseen something?

In the MyDslInformationRepresentation I commented out the getBodyForIndexing - is this method resp. its functionality superfluent now?

(In reply to comment #4)
> Sorry, typo:
> 
> WAS:
> 
> Injector injector = Guice.createInjector(new
> org.xtext.example.MyDslRuntimeModule());
> 
> IS:
> 
> Injector injector = org.xtext.example.ui.internal.MyDslActivator
> .getInstance().getInjector("org.xtext.example.MyDsl");
Comment 6 Tom Seidel CLA 2011-04-14 12:01:49 EDT
To define an image for the information unit you have to add a dependency to org.eclipse.remus.ui.infotypes bundle. Afterwards you can create an extension org.eclipse.remus.ui.infotypes.infotypeimages to map the information-type to an icon.
Comment 7 Joerg Reichert CLA 2011-04-14 12:14:37 EDT
Great, set informationType to MYDSL and selected the icon and it works.

(In reply to comment #6)
> To define an image for the information unit you have to add a dependency to
> org.eclipse.remus.ui.infotypes bundle. Afterwards you can create an extension
> org.eclipse.remus.ui.infotypes.infotypeimages to map the information-type to an
> icon.