Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [emf-dev] incorporating emf editor into existing RCP

Thanks a lot, that fixed it. I modified my MyModelEditor class's
createModel() method as you suggested below.

--Gabe

-----Original Message-----
From: emf-dev-bounces@xxxxxxxxxxx [mailto:emf-dev-bounces@xxxxxxxxxxx]
On Behalf Of Ed Merks
Sent: Wednesday, April 25, 2007 3:11 AM
To: Eclipse Modelling Framework
Cc: emf-dev@xxxxxxxxxxx; emf-dev-bounces@xxxxxxxxxxx
Subject: Re: [emf-dev] incorporating emf editor into existing RCP

Gabe,

Folks at Intel are working on Eclipse projects and I do seem them
posting
answers to newsgroups, such as the TPTP newsgroup, so you it should be
possible for you to access the newsgroups, which is where we'd prefer to
see user's questions.

An RCP application typically doesn't include the workspace and hence
can't
depend on anything to do with IFile, so an EMF generated RCP editor's
createModel does this:

  public void createModel()
  {
    URI resourceURI = URI.createURI(getEditorInput().getName());

instead of this:

  public void createModel()
  {
    // Assumes that the input is a file object.
    //
    IFileEditorInput modelFile = (IFileEditorInput)getEditorInput();
    URI resourceURI = URI.createPlatformResourceURI
(modelFile.getFile().getFullPath().toString(), true);

So don't add any code that assumes the editor in put in an
IFileEditorInput
if you want that code to run in RCP.


Ed Merks/Toronto/IBM@IBMCA
mailto: merks@xxxxxxxxxx
905-413-3265  (t/l 969)




 

             "Schnaubelt, Gabe

             T"

             <gabe.t.schnaubel
To 
             t@xxxxxxxxx>              <emf-dev@xxxxxxxxxxx>

             Sent by:
cc 
             emf-dev-bounces@e

             clipse.org
Subject 
                                       [emf-dev] incorporating emf
editor  
                                       into existing RCP

             04/24/2007 08:04

             PM

 

 

             Please respond to

             Eclipse Modelling

                 Framework

             <emf-dev@eclipse.

                   org>

 

 





I?m trying to incorporate an editor I generated from my model into an
existing RCP. I can successfully use the editor as a plugin to an
Eclipse
SDK run configuration. However, when I try to use it in my RCP I get the
attached error msg.

What I did was followed along with the Library tutorial and generated an
RCP from the model. Then, I looked through the generated code for the
application and added the necessary parts into my RCP app. I added
things
like the File menu actions, the openEditor(Workbench, URI) method, etc.
I
can browse for my model file and after I click ?OK? on the error message
I
see an empty editor window with the correct filename in the title.

I?ve tried to connect to the newsgroup over port 80 but am unable to
from
my business network. Please reply with any help.

Thanks, Gabe[attachment "error.JPG" deleted by Ed Merks/Toronto/IBM]
_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev


_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev


Back to the top