[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.gmt.amw] Re: Can i use AMW Editor in my own program

Hello

1.And is labRDBM2XML.ecore from example not a weaving file? if the file is not a weaving file, where can i get one?Because amw wizard does not work in my eclise.

Yes, it is a weaving model, but it does not have a metadata file related to it. The metadata is created when you create (or load) a weaving model.


You can also get other more recent weaving models in the AMW example page.
http://www.eclipse.org/gmt/amw/examples/


2.AMW does not work in my eclipse 3.2, by wizard page. 1, when i tried to load a metamodel(.km3), i get allways an error"antlr/tokenstream", i do not know why.

This message is usually when you don't have the antlr.jar file.

AMW plugin is dependent to the ATL engine, so you should install the ATL plugin following ATL installation instructions in the dowload page. (http://www.eclipse.org/gmt/atl/download/)

This issue is probably because the engine cannot find antlr.jar.
antlr.jar should be copied in "lib" folder of "org.atl.eclipse.engine" plugin.


3.Can I use GlobalWeaverEditor like the follow code?

IWorkspaceRoot wr = ResourcesPlugin.getWorkspace().getRoot();
IProject project = wr.getProject("state");
IPath location = new Path(name);
IWorkbenchPage page = getSite().getPage();
if (!project.isOpen())
project.open(null);
IFolder folder = project.getFolder("gofState1");
IFile file = folder.getFile(location.lastSegment());
if (page != null)
{
page.openEditor(new FileEditorInput(file), "org.eclipse.weaver.editors.globalweavereditor" , true);
}

Good question. I always used AMW as a plugin. Are you doing this in a RCP application? The logic seems ok, but I but you should check if you won't have any dependency problems.



thank you again for your help!



Marcos.