Add "can" events and refactor Cinco Properties View
- Added new event types to the Event API
- canAttributeChange (for single-valued attributes)
- preAttributeChange (for single-valued attributes)
- canCreate (closes #281 (closed))
- canDelete
- canDoubleClick
- postDoubleClick (for GraphModels)
- canMove
- canReconnect
- canResize
- canSelect
- The Event API Extension (
de.jabc.cinco.meta.plugin.event.api.util.EventApiExtension
) has new methods for parsing attribute values, e. g.:-
toColor(String colorString)
creates aColor
from a String value -
getModel(String code, Class<M> modelClass, String fileExtension, Class<S> standaloneSetupClass)
parses a String to the AST of a Xtext grammar -
getErrors(String code, String fileExtension, Class<S> standaloneSetupClass)
returns a list of validation errors - Convinience methods for reading
Date
objects, like:getYear(Date date)
,getDayOfWeek(Date date)
,isWeekday(Date date)
, ...
-
- Refactored the Cinco Properties View
-
@color
attributes show the currently selected color in the color picker button -
@grammar
attributes use the "Text" font, configured in the Eclipse settings - Single-valued attributes will be validated depending on their type
- Single-valued attributes can show a customizable error message via the canAttributeChange event
-
- Fixes issue, where you cannot select "none" for a ModelElement attribute in the "Cinco Properties View" (closes #104 (closed))