[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
|
wg, I'm not by any means an expert on the RCP, so you should look around for
more information on that. I know that there is quite a lot of information on
eclipse.org concerning the RCP, as well as an "eclipse.platform.rcp"
newsgroup. A starting point might be eclipse.org/rcp, which redirects to
http://wiki.eclipse.org/index.php/Rich_Client_Platform .
liam
"wg" <wg12977@xxxxxxxx> wrote in message
news:c8be78c150f061c779b4abba78a8e72e$1@xxxxxxxxxxxxxxxxxx
> Hello Liam
>
> I just work with rcp, could you tell / give me more Informations about,
> how to do that, look the follow code, it works fine in my own rcp program.
> but if i change the editor ID to
> org.eclipse.weaver.GlobalWeaverEditor,then i get error message" unable to
> open editor, unknow Editor ID" or " not a weaving file...."
>
> I want to ask, is there Possible, direct use AMW Editor in my own program.
> or not?
>
> thank you!
>
>
>
> 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)
> {
> IDE.openEditor(page, new FileEditorInput(file),
> //under is Editor ID, if i change to globalweavereditor, then there is
> Problem.
> "org.eclipse.jdt.ui.CompilationUnitEditor" , true);
> }
>