Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Palette Drag-and-Drop Problem

Hi, Patrick,

See some replies in-line, below.

HTH,

Christian




On Monday, Mar 9, 2015 at 09:13, TESSIER Patrick 202707 <patrick.tessier@xxxxxx>, wrote:

Hi all,

I have study the creation of the palette from the new Element Type framework.

In my context I try with Benoit to make a palette for the BDD –this diagram inherits of the class diagram):

-          I have the class diagram, where it has graphical element type for example Class_2008 that specializes uml.class element type.

-          To make the bdd,  we have make a new model element type for SysML we have for example sysml.Block that speciliaze uml.class.

-          When we try to make a new palette,  we create a new graphpical element type: Block_2008 that specialize sysml Block.

è But I dos not run.

è After debugging, this the generated  view provider of class diagram  that implies this problem:

Line 158  of the view provider

if (!UMLElementTypes.isKnownElementType(elementType) || (!(elementType instanceof IHintedType))) {

                                  return false; // foreign element type

}

 

This line say  if the element type is not called Class_2008 , this is stranger so do not let create the graphical element.

 



I changed the generated implementation of isKnownElementType(IElementType) to test whether the argument is one of the diagram’s known visual element types or any specialization thereof.  So, I would have expected this to work because the ClassDiagram has been regenerated with that change.

 

So  I propose two solutions,:

-          We change all generated view providers, but we risk big border effects, all editor based on gmf can be impacted this theses view providers.

 

-          Christian you have done a  IProxyElementType in your framework assistant that  transform for example block _2008 to class_ 2008 and allow the creation.

o   Can we move this framework into infra gmf and it directly in the mechanism of the view provider, not only for assistant?



I certainly don’t mind if that proxy type is made more generally available.  But, I wouldn’t have thought it necessary in your SysML case.  The isKnownElementType(…) should have worked.  In any case, the proper functioning of the proxy element types requires that anyways, because they are re-specializations created on the fly!



I prefer theses solution , but I have seen you framework very swftly and I have no idea about the impact if apply it directly on the view provider.

 

Thanks

Patrick

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de GÜRCAN Onder
Envoyé : mercredi 25 février 2015 16:08
À : Papyrus Project list
Objet : [PROVENANCE INTERNET] [mdt-papyrus.dev] Palette Drag-and-Drop Problem

 

Hi,

 

Has anybody have any idea what can be the reason not being able to drag-and-drop an item from a palette to a diagram? I generated a palette for UML-RT (attached), it is loaded well, but I cannot drag-and-drop and there is no exception. Any ideas?

 

Thanks in advance,

 

Best,

 

Önder GÜRCAN

Research Engineer

Commission for Atomic Energy and Alternative Energies (CEA)

Direction of Technological Research (DRT)

Systems and Technology Integration Laboratory (LIST)

Software and Systems Engineering Department (DILS)

Model-driven Engineering for Embedded Systems Laboratory (LISE)

cid:image010.jpg@01CFEA20.6984AEF0

Commissariat à l’énergie atomique et aux énergies alternatives (CEA)

Paris-Saclay Campus - Nano-INNOV | Bât. 862-PC1087 | F-91191 Gif-sur-Yvette Cedex

T. +33 (0)1 69 08 00 07  |  F. +33 (0)1 69 08 83 95  |

Onder.GURCAN@xxxxxx   |  Search Onder  |  LinkedIn  Papyrus

 


Back to the top