org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelJdtRenameParticipantContext Java Examples

The following examples show how to use org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelJdtRenameParticipantContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CombinedJvmJdtRenameRefactoringProvider.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RenameProcessor getRenameProcessor(IRenameElementContext renameElementContext) {
	RenameElementProcessor processor = null;
	if (renameElementContext instanceof JvmModelJdtRenameParticipantContext)
		processor = jdtRenameParticipantProcessorProvider.get();
	else if (renameElementContext instanceof CombinedJvmJdtRenameContext)
		processor = combinedRenameProcessorProvider.get();
	if (processor != null) {
		if (processor.initialize(renameElementContext))
			return processor;
		else
			return null;
	}
	return super.getRenameProcessor(renameElementContext);
}
 
Example #2
Source File: XtendJdtRenameParticipantProcessor.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example #3
Source File: AbstractDomainmodelUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #4
Source File: AbstractRuleEngineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #5
Source File: JdtRenameRefactoringParticipantProcessor.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public boolean initialize(IRenameElementContext renameElementContext) {
	Assert.isLegal(renameElementContext instanceof JvmModelJdtRenameParticipantContext);
	return super.initialize(renameElementContext);
}
 
Example #6
Source File: AbstractPureXbaseUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #7
Source File: AbstractBug462047LangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #8
Source File: AbstractXImportSectionTestLangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #9
Source File: AbstractContentAssistFragmentTestLangUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #10
Source File: AbstractXtendUiModule.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}
 
Example #11
Source File: AbstractSARLUiModule.java    From sarl with Apache License 2.0 4 votes vote down vote up
public Class<? extends JdtRenameParticipant.ContextFactory> bindJdtRenameParticipant$ContextFactory() {
	return JvmModelJdtRenameParticipantContext.ContextFactory.class;
}