Re: MDR use problem

sam adam <[email protected]> Mon, 24 May 2004 21:07:30 +0200 (CEST)
Newsgroups gmane.comp.java.netbeans.modules.mdr.devel
Message-ID <[email protected]>
--0-1269342103-1085425650=:63571
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi Mr Martin,  
I have of course instantiated the metamodel as in the instructions using the MDR browser. I got a package "projects" in addition to those within the MDR-standalone. I know that I have to instantiate projects package and name it before using it. How? What is wrong with the following code snippet?
[
package org.netbeans.mdrdemo;
import org.netbeans.api.mdr.MDRManager;
import org.netbeans.api.mdr.MDRepository;
import org.netbeans.api.mdr.CreationFailedException;
import projects.*;
...
MDRepository repository = MDRManager.getDefault().getDefaultRepository();       
ProjectsPackage extent= (ProjectsPackage) repository.createExtent("projects metadata",projects); ]
Do I have missed any other instruction?
Here is the organization of my work folder 

|__org
|      |
|     netbeans
|           |
|          mdrdemo
|                  projectCreationDemo.class
|
|__projects
|          ProjectsPackage.class
|          ProjectClass.class
|          Contains.class
            ...
Thanks again.

 

		
---------------------------------
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
--0-1269342103-1085425650=:63571
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>Hi Mr Martin,&nbsp; <BR>I have of course instantiated the metamodel as in the instructions using the MDR browser. I got a package "projects" in addition to those within the MDR-standalone. I know that I have to instantiate projects package and name it before using it. How? What is wrong with the following code snippet?<BR>[<BR>package org.netbeans.mdrdemo;</DIV>
<DIV>import org.netbeans.api.mdr.MDRManager;<BR>import org.netbeans.api.mdr.MDRepository;<BR>import org.netbeans.api.mdr.CreationFailedException;<BR>import projects.*;<BR>...</DIV>
<DIV>MDRepository repository = MDRManager.getDefault().getDefaultRepository();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>ProjectsPackage&nbsp;extent= (ProjectsPackage) repository.createExtent("projects metadata",projects); ]<BR>Do I have missed any other instruction?<BR>Here is the organization of my work folder </DIV>
<DIV><BR>|__org<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>|&nbsp;&nbsp;&nbsp;&nbsp; netbeans<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mdrdemo<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projectCreationDemo.class<BR>|<BR>|__projects<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProjectsPackage.class<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProjectClass.class<BR>|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Contains.class<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</DIV>
<DIV>Thanks again.<BR></DIV>
<DIV>&nbsp;</DIV><p>
		<hr size=1>
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/mail/mail_taglines/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a>
<br><br>
Dialoguez en direct avec vos amis grâce à <a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/">Yahoo! Messenger !</a>
--0-1269342103-1085425650=:63571--