Search in sources :

Example 11 with NamedElement

use of org.yakindu.base.base.NamedElement in project statecharts by Yakindu.

the class RenameElementHandler method setContext.

@Override
public void setContext(AbstractRefactoring<NamedElement> refactoring, ISelection selection) {
    NamedElement element = unwrap(selection);
    refactoring.setContextObjects(Lists.newArrayList(element));
}
Also used : NamedElement(org.yakindu.base.base.NamedElement)

Example 12 with NamedElement

use of org.yakindu.base.base.NamedElement in project statecharts by Yakindu.

the class AbstractGeneratorEntryExecutor method logStart.

protected void logStart(GeneratorEntry entry) {
    EObject elementRef = entry.getElementRef();
    String elementName = elementRef instanceof NamedElement ? ((NamedElement) elementRef).getName() : elementRef.toString();
    String targetProject = helper.getTargetProjectValue(entry).getStringValue();
    logger.log(String.format("Generating '%s' to target project '%s' ...", elementName, targetProject));
}
Also used : EObject(org.eclipse.emf.ecore.EObject) NamedElement(org.yakindu.base.base.NamedElement)

Aggregations

NamedElement (org.yakindu.base.base.NamedElement)12 EObject (org.eclipse.emf.ecore.EObject)8 ElementReferenceExpression (org.yakindu.base.expressions.expressions.ElementReferenceExpression)4 FeatureCall (org.yakindu.base.expressions.expressions.FeatureCall)4 Check (org.eclipse.xtext.validation.Check)3 Event (org.yakindu.base.types.Event)3 EntryEvent (org.yakindu.sct.model.stext.stext.EntryEvent)3 ExitEvent (org.yakindu.sct.model.stext.stext.ExitEvent)3 AssignmentExpression (org.yakindu.base.expressions.expressions.AssignmentExpression)2 Expression (org.yakindu.base.expressions.expressions.Expression)2 ArrayList (java.util.ArrayList)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 IGraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)1 IElementType (org.eclipse.gmf.runtime.emf.type.core.IElementType)1 View (org.eclipse.gmf.runtime.notation.View)1 InputDialog (org.eclipse.jface.dialogs.InputDialog)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 LazyLinkingResource (org.eclipse.xtext.linking.lazy.LazyLinkingResource)1 PostFixUnaryExpression (org.yakindu.base.expressions.expressions.PostFixUnaryExpression)1