Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Customized line-break behaviour(How to add functionality for different types of line-breaks to my graphical editor?)
Customized line-break behaviour [message #521456] Wed, 17 March 2010 16:11 Go to next message
Matthias M. is currently offline Matthias M.Friend
Messages: 27
Registered: July 2009
Junior Member

Hi there,

My Problem:
I would like to give my user the opportunity to enter different line-breaks:
a) line-breaks which are only shown in the graphical editor
b) line-breaks which are shown in either the graphical editor and other locations like property-pages, exports and so on

My questions:
1) How could I save which kind of line-break I have? Is there anything like a invisible control character which I could use for case a)?
Or will I have to use some character combination which I have to make invisible in the properypages, exports etc?

2) I already found the place in WrapTextCellEditor where CTRL+Enter is handled. How can I replace the created standard line-break by my character from 1)?

Thanks for your help!


Re: Customized line-break behaviour [message #521732 is a reply to message #521456] Thu, 18 March 2010 15:43 Go to previous message
Matthias M. is currently offline Matthias M.Friend
Messages: 27
Registered: July 2009
Junior Member

Well Ive been doing some research on both of my questions:

1) I took U+200B (zero-width space) to save my line-breaks. There is only one big flaw in this method: Every time I place a normal white-space before my U+200B the program freezes completely. As debug-view tells me, that everything is running all right I assume there must be a bug in the swt-platform implementation?
Anybody knows if I can do anything in this case?
Or is there some other character which I could use? I tried some others as well like U+200C,D and U+FEFF, but received the same error...

2) That was not really difficult: I overwrite the doSetValue(), fireApplyEditorValue() and keyReleaseOccured() methods in my CellEditor and refreshLabelText() in my LabelEditPart and do some String.replace()...

Previous Topic:How to deactivate creating a figure by draging a rectangle in the diagram editor?
Next Topic:Keeping platform:/ URIs absolute in hrefs
Goto Forum:

Current Time: Sun Feb 28 22:35:55 GMT 2021

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

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

Back to the top