Yeah, but I start to think it could be a bit evil problem.
Well, what i want to do is basically changing the default diagrams for custom stereotypes when you make composite an element. In my case, i want to change that behaviour in order to get a "Component Diagram" for a custom stereotype with the metaclass StateMachine. I tested out with another metaclass (Component) and it exactly behaves in the same way.
So back to the bussines, it seems to me that the problem could be, in somehow, related to the technology file, not sure. The element stereotyped is in a custom toolbox. When I drag the element from the toolbox to the diagram and I make it composite, it behaves in the way in described before, (Using your suggestion) I mean, the Component diagram shows up outside of the element scope. However, if I drag the native element (the metaclass of the stereotype) from the UML toolbox, and manually I select on it Properties -> stereotype and change the stereotype to my custom stereotype, and now I make it composite, it behaves in other way, the diagram is located beneath of it as usual but the diagram type is “CompositeStructure Diagram”. I changed _defaultDiagramType attribute to different other diagrams and it always comes out with the same diagram types’; “CompositeStructure Diagram”. Awesome!!. So, I start to think this attribute has got troubles !
Using EA 7.1 b828