Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Troubles while setting the GMF editor inside a MultiPageEditor
Troubles while setting the GMF editor inside a MultiPageEditor [message #700267] Sat, 23 July 2011 04:55 Go to next message
bunta Choudhary is currently offline bunta ChoudharyFriend
Messages: 39
Registered: December 2010
Member
I am getting lots of exception mainly with cast exception while trying to add the GMF generated editor inside a multipageeditor .

Like Grid and Rulers stop working. Can anybody suggest me the solution.

Actually My problem is here -

Actually I am dumping the generated GMF Editor inside MultiPageEditor createPage method like this -
ShapesDiagramEditor editor = new ShapesDiagramEditor();
			int index = addPage(editor, getEditorInput());
			setPageText(index, "Design");



Well as soon as I do the above, the GMF autogenerated properties named Rulers and Grid shows ClassCastException as (as we click on the properties menus)
Quote:
java.lang.ClassCastException: multipageeditor.editors.MultiPageEditor cannot be cast to org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramWorkbenchPart
at org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection.initWorkspacePropertyListener(RulerGridPropertySection.java:879)
at org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection.setInput(RulerGridPropertySection.java:624)
at org.eclipse.ui.views.properties.tabbed.TabContents$5.run(TabContents.java:181)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.ui.views.properties.tabbed.TabContents.setInput(TabContents.java:184)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:212)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)



So this is the actual issue I am facing and I could not resolve the same
Along with this I am not able to set even the background color for editor, it won't reflect anything.

[Updated on: Wed, 27 July 2011 04:35]

Report message to a moderator

Re: Troubles while setting the GMF editor inside a MultiPageEditor [message #701147 is a reply to message #700267] Sun, 24 July 2011 18:06 Go to previous messageGo to next message
Aurelien Pupier is currently offline Aurelien PupierFriend
Messages: 579
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I think that you need to provide more details in order that someone can help you.

See the following links that might help you to integrate GMF in a Multi-page editor:
http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Sharing_single_EditingDomain_instance_across_several_diagrams
http://www.eclipse.org/articles/article.php?file=Article-Integrating-EMF-GMF-Editors/index.html

Regards,


Aurélien Pupier - Bonitasoft S.A.
My company Eclipse-related blog
Re: Troubles while setting the GMF editor inside a MultiPageEditor [message #702331 is a reply to message #701147] Tue, 26 July 2011 08:21 Go to previous message
bunta Choudhary is currently offline bunta ChoudharyFriend
Messages: 39
Registered: December 2010
Member
@Aurelien Pupier
I modified my question showing the exact error I am getting.
Previous Topic:Model changes triggered by Edit Helper Advice
Next Topic:Is it possible to have multiple input on the workbench?
Goto Forum:
  


Current Time: Thu Dec 18 11:39:09 GMT 2014

Powered by FUDForum. Page generated in 0.03226 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software