E1511 Inline Mixset Is Not Supported
[Previous]  [Next] 
|
User Manual [Previous]  [Next] E1511 Inline Mixset Is Not SupportedError reporting that most inline mixsets must have curly brackets around their content.An inline mixset is one in a class, interface or trait and where the mixset name is not followed by block denoted by curly brackets. Most of the time to specify a mixset in a class you just specify the keyword mixset, followed by the name of the mixset, followed by the block of items to be included (e.g. attributes, methods, state machines, associations). However Umple allows inline mixsets for certain entities in Umple. Inline mixsets allow for nested declarations of classes (to create subclasses), traits, and interfaces. However, empty code classes, interfaces, and traits are not allowed for inline mixsets. If you encounter this error, you can easily add a pair of curly brackets around the code that a mixset introduces. The code bellow shows how to use inline mixsets. Example/* Example to show how to define inline mixsets. */ // The mixset M1 has been defined as inline mixset. this because the definition of the mixset is followed by a class definition. mixset M1 class A { isA B; isA C; x; } // M1 also is inline mixset because it has been followed by a trait definition without curly brackets. // The usuall definition of M1 is: /* mixset M1 { trait B { y; } } */ mixset M1 trait B { y; } // M2 is an inline mixset that defines an interface. mixset M1 interface C { void method(); } class D { // M3 adds an attribute for class D. It's an inline mixset since there is no mention to which a class attr1 belongs to. // However, Umple parser understands this implicit definition. Therefore, the attr1 will be added to the class D. mixset M3 {attr1;} } //The line below will cause error since the interface E is empty. //Mixset M4 interface E {} use M1; use M2; use M3; Load the above code into UmpleOnline |