use of org.eclipse.xtext.common.types.ui.refactoring.participant.JdtRenameParticipant in project xtext-xtend by eclipse.
the class XtendJdtRenameParticipantProcessor method isXtendRename.
/**
* @return true, if the triggering refactoring targets an Xtend element.
*/
protected boolean isXtendRename() {
JdtRenameParticipant jdtRenameParticipant = ((JvmModelJdtRenameParticipantContext) getRenameElementContext()).getJdtRenameParticipant();
RefactoringProcessor triggeringProcessor = jdtRenameParticipant.getProcessor().getRefactoring().getProcessor();
if (triggeringProcessor instanceof RenameElementProcessor) {
EClass targetElementEClass = ((RenameElementProcessor) triggeringProcessor).getRenameElementContext().getTargetElementEClass();
return targetElementEClass.getEPackage() == XtendPackage.eINSTANCE;
}
return false;
}
Aggregations