Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361684

Summary: DirectEditing with TYPE_MULTILINETEXT not correct
Product: [Modeling] Graphiti Reporter: Adrian Mouat <amouat>
Component: CoreAssignee: Project Inbox <graphiti-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: amouat, michael.wenz
Version: 0.8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Adrian Mouat CLA 2011-10-21 11:59:23 EDT
Hi, I just tried to use TYPE_MULTILINETEXT for direct editing. Unfortunately, it does exactly the same as TYPE_TEXT; i.e. is not multiline! 

Whenever you hit the return key it stops editing rather than starting a new line.

Naturally, I would expect this to open a multiline editor.
Comment 1 Michael Wenz CLA 2011-10-24 04:05:57 EDT
That's the default way JFace and GEF/Draw2D handle that. You can use Shift+Return to reach a new line and introduce a line break (same behaviour as e.g. in Excel).
Comment 2 Adrian Mouat CLA 2011-10-24 04:34:59 EDT
What's the point of TYPE_MULTILINETEXT then? Why not just have TYPE_TEXT?

Regardless of what other packages have done, I don't see how this is a good way to support multi-line editing.
Comment 3 Michael Wenz CLA 2011-10-24 05:13:56 EDT
(In reply to comment #2)
> What's the point of TYPE_MULTILINETEXT then? Why not just have TYPE_TEXT?
The difference is that TYPE_TEXT does not support multi line input at all, while TYPE_MULTILINETEXT does.

> Regardless of what other packages have done, I don't see how this is a good way
> to support multi-line editing.
If there is a way to overrule the underlying frameworks we can offer that option of course, but I don't see jow to do that.
Comment 4 Adrian Mouat CLA 2011-10-24 05:31:07 EDT
Thanks Michael; I see now that TYPE_TEXT doesn't support shift-enter. 

My problem is that I don't think it will be obvious to my users how they are supposed to enter multi-line text. 

At least I understand what is happening now.

Regards,

Adrian.