Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347262 - DirectEditingFeature with TYPE_DIALOG type
Summary: DirectEditingFeature with TYPE_DIALOG type
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 0.9.0   Edit
Assignee: Matthias Gorning CLA
QA Contact:
URL:
Whiteboard: Juno M5 theme_round_offs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-26 04:14 EDT by Dobrou Mising name CLA
Modified: 2012-06-29 04:17 EDT (History)
2 users (show)

See Also:
michael.wenz: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dobrou Mising name CLA 2011-05-26 04:14:38 EDT
Build Identifier: 0.7.1.v20110111-0756

Using TYPE_DIALOG in DirectEditingFeature doesn't work. Wxecuting direct editing always fails with following exception:
java.lang.NullPointerException
at org.eclipse.graphiti.ui.internal.parts.directedit.GFDirectEd itManager.createCellEditorOn(GFDirectEditManager.java:148)
at org.eclipse.gef.tools.DirectEditManager.show(DirectEditManag er.java:397)
at org.eclipse.graphiti.ui.internal.parts.directedit.GFDirectEd itManager.show(GFDirectEditManager.java:306)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.bringUp DirectEditField(ShapeEditPart.java:693)
at org.eclipse.graphiti.ui.internal.parts.ShapeEditPart.perform Request(ShapeEditPart.java:509)
at org.eclipse.gef.tools.DelayedDirectEditHelper.run(DelayedDir ectEditHelper.java:108)
at org.eclipse.swt.widgets.Display.runTimer(Display.java:4167)
....

It seems Graphiti framework gets public constructor of abstract class DialogCellEditor with one Composite as parameter. But this constructor is only protected so null is returned ...

Reproducible: Always

Steps to Reproduce:
1. Create DirectEditingFeature
2. Set type to TYPE_DIALOG
3. Invoke DirectEditingFeature in diagram
Comment 1 Matthias Gorning CLA 2011-05-31 03:19:46 EDT
You are right. Unfortunately the type IDirectEditing.TYPE_DIALOG is currently not supported by Graphiti.

Originally it was planned to support such kind of type (that's why it is still in the interface) but we never had a concrete request.

But nevertheless the org.eclipse.jface.viewers.DialogCellEditor is an abstract class, what kind of dialog did you expect when you used this type?

BR,
Matthias
Comment 2 Dobrou Mising name CLA 2011-05-31 08:20:59 EDT
(In reply to comment #1)
> You are right. Unfortunately the type IDirectEditing.TYPE_DIALOG is currently
> not supported by Graphiti.
> 
> Originally it was planned to support such kind of type (that's why it is still
> in the interface) but we never had a concrete request.
> 
> But nevertheless the org.eclipse.jface.viewers.DialogCellEditor is an abstract
> class, what kind of dialog did you expect when you used this type?
> 
> BR,
> Matthias

I expected possibility to use some custom dialog.
I didn't know this feature is in unsupported state. I'm sorry if I missed some note in documentation...
Comment 3 Matthias Gorning CLA 2011-06-07 08:29:19 EDT
It is planned to support custom dialog celleditor's in the next release (Juno).
Comment 4 Michael Wenz CLA 2011-07-19 04:07:32 EDT
Would like to target for Juno
Comment 5 Matthias Gorning CLA 2011-12-29 07:49:16 EST
Fixed. Customers can now provide their own cell editors for the direct editing mode.

Steps to do this:

1) set direct editing type to TYPE_CUSTOM (TYPE_DIALOG has been renamed)

2) the direct editing feature must implement the interface org.eclipse.graphiti.ui.platform.ICellEditorProvider.



commit 691942cc2b886aa645d3ecd305b29a19d692698c
Author: mgorning <matthias.gorning@sap.com> 2011-12-29 13:39:31
Committer: mgorning <matthias.gorning@sap.com> 2011-12-29 13:39:31
Parent: 0ab70753d4689baba969e59de02ae3930847e465 (formatter)
Branches: origin/master, master

Bug 347262 - DirectEditingFeature with TYPE_DIALOG type  / unsupported
types removed
Comment 6 Michael Wenz CLA 2012-04-11 10:50:16 EDT
Bookkeeping: Set target release
Comment 7 Michael Wenz CLA 2012-06-29 04:17:39 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)