|
Re: How do I bring editor or view on an existing model instance? [message #420361 is a reply to message #420351] |
Thu, 26 June 2008 03:30 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Steve,
If you look at the generated wizard, it shows how the editor opened when
the wizard completes.
Steve Punte wrote:
> Hi,
>
> I've been using EMF for sometime now, and it's great. In particular,
> it is very helpful to have the generated EMF editor to directly
> examine data structures. However, this has always required that I
> first open an EMF instance/resource with the EMF editor first.
>
> Now I really need to have pure runtime software which simply creates
> and uses EMF objects/structures. No problem: just use
> XxxxxFactory.eINSTANCE.createYyyy().
>
> HOWEVER, it would REALLY be helpful to be able to examine and possibly
> modify such object structure using the generated EMF editor and/or
> Outline View and properties page but without going through the steps
> of using the editor UI to open a file, etc... The goal is not to have
> a file and possibly not a resource involved.
>
> Can someone suggest a, preferable simple, tactic to programmatically
> open the Editor or Outline View and properties page on an existing
> in-memory EMF generated object structure?
>
> Thanks in advance.
>
> Steve
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: How do I bring editor or view on an existing model instance? [message #420388 is a reply to message #420361] |
Fri, 27 June 2008 17:04 |
Steven Punte Messages: 34 Registered: July 2009 |
Member |
|
|
Ed:
Thanks for the reply.
Can you be a bit more specific. I've attempted modifying
XxxEdit.initializeEditingDomain() and creating a custom
AdapterFactoryEditingDomain class but with unsatisfactory results. Where
exactly should I look in the "generated wizard?"
Thanks
Steve
> Steve,
> If you look at the generated wizard, it shows how the editor opened when
> the wizard completes.
> Steve Punte wrote:
>> Hi,
>>
>> I've been using EMF for sometime now, and it's great. In particular,
>> it is very helpful to have the generated EMF editor to directly
>> examine data structures. However, this has always required that I
>> first open an EMF instance/resource with the EMF editor first.
>>
>> Now I really need to have pure runtime software which simply creates
>> and uses EMF objects/structures. No problem: just use
>> XxxxxFactory.eINSTANCE.createYyyy().
>>
>> HOWEVER, it would REALLY be helpful to be able to examine and possibly
>> modify such object structure using the generated EMF editor and/or
>> Outline View and properties page but without going through the steps
>> of using the editor UI to open a file, etc... The goal is not to have
>> a file and possibly not a resource involved.
>>
>> Can someone suggest a, preferable simple, tactic to programmatically
>> open the Editor or Outline View and properties page on an existing
>> in-memory EMF generated object structure?
>>
>> Thanks in advance.
>>
>> Steve
|
|
|
|
Re: How do I bring editor or view on an existing model instance? [message #420397 is a reply to message #420395] |
Sat, 28 June 2008 12:04 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Steve,
Yes, it's certainly possible, but you'll need to add special case
handing with the editor to deal with your type of editor input.
Steve Punte wrote:
> Ed:
>
> Oh, I see now what you are talking about: the XxxModelWizard.java file.
>
> Very interesting. The key issue is supplying some kind of
> IEditorInput to page.openEditor(). I tried used
> CommonSourceNotFoundEditorInput(), but it resulted in an internal file
> not found exception.
>
> I'm attempting to create my own IEditorInput class. I see
> MyEditorInput.getAdpter() being called with arg classes: IFile,
> IFileRevision and IResource. Hmm.
>
> My goals are to open the editor (or possibly the outline view) on an
> eCore object preferable with no reference to a file at all. Can I be
> successful headed down this path?
>
> Thanks in advance.
>
> Steve
>
>
>
>
>>> If you look at the generated wizard, it shows how the editor opened
>>> when the wizard completes.
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02948 seconds