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, <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(); <BR>ProjectsPackage 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>| |<BR>| netbeans<BR>| |<BR>| mdrdemo<BR>| projectCreationDemo.class<BR>|<BR>|__projects<BR>| ProjectsPackage.class<BR>| ProjectClass.class<BR>| Contains.class<BR> ...</DIV>
<DIV>Thanks again.<BR></DIV>
<DIV> </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--