Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Code for Outline
Code for Outline [message #70373] Thu, 26 October 2006 14:32 Go to next message
Eclipse UserFriend
Hey,

I have a simple editor working but don't have anything in the Outline, I
don't use 'name' as one of the EAttributes and believe that Outline
defualts to getName() for each node displayed.

Can anyone tell me where to locate this code so I can change it?

Thanks,

Gaff
Re: Code for Outline [message #70394 is a reply to message #70373] Thu, 26 October 2006 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Is this it?

package org.eclipse.gmf.runtime.diagram.ui.editparts;

public class TreeEditPart
..
..
..
..

protected String getText() {
if (getParser() != null)
return getParser().getPrintString(referenceAdapter,
ParserOptions.NONE.intValue());
EObject eObject = ((View) getModel()).getElement();
if (eObject == null) {
return ""; //$NON-NLS-1$
}
String name = EMFCoreUtil.getName(eObject); // <---------
return name == null ? "" : name; //$NON-NLS-1$
}
Re: Code for Outline [message #70917 is a reply to message #70394] Fri, 27 October 2006 10:44 Go to previous message
Eclipse UserFriend
Hi ;
yes that is it; Edit Parts displayed in the outline view (while in tree
mode) are TreeEditParts

Gaff wrote:



>
>
> Is this it?
>
> package org.eclipse.gmf.runtime.diagram.ui.editparts;
>
> public class TreeEditPart
> .
> .
> .
> .
>
> protected String getText() {
> if (getParser() != null)
> return getParser().getPrintString(referenceAdapter,
> ParserOptions.NONE.intValue());
> EObject eObject = ((View) getModel()).getElement();
> if (eObject == null) {
> return ""; //$NON-NLS-1$
> }
> String name = EMFCoreUtil.getName(eObject); // <---------
> return name == null ? "" : name; //$NON-NLS-1$
> }
>
>
Previous Topic:Helpers Generation
Next Topic:Runtime: how to prevent reconnecting connections?
Goto Forum:
  


Current Time: Tue Jul 22 14:39:27 EDT 2025

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

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

Back to the top