Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[482239] Don’t create unnecessary binding to deprecated type #806

Merged
merged 1 commit into from Nov 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -76,7 +76,6 @@
import org.eclipse.xtext.ui.editor.formatting.IContentFormatterFactory;
import org.eclipse.xtext.ui.editor.formatting2.ContentFormatterFactory;
import org.eclipse.xtext.ui.editor.model.XtextDocumentProvider;
import org.eclipse.xtext.ui.editor.occurrences.IOccurrenceComputer;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.outline.impl.OutlineNodeElementOpener;
Expand Down Expand Up @@ -105,7 +104,6 @@
import org.eclipse.xtext.xbase.ui.jvmmodel.findrefs.JvmModelFindReferenceHandler;
import org.eclipse.xtext.xbase.ui.jvmmodel.findrefs.JvmModelReferenceQueryExecutor;
import org.eclipse.xtext.xbase.ui.jvmmodel.navigation.DerivedMemberAwareEditorOpener;
import org.eclipse.xtext.xbase.ui.jvmmodel.occurrence.JvmModelOccurrenceComputer;
import org.eclipse.xtext.xbase.ui.jvmmodel.outline.JvmOutlineNodeElementOpener;
import org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.DefaultJvmModelRenameStrategy;
import org.eclipse.xtext.xbase.ui.jvmmodel.refactoring.JvmModelDependentElementsCalculator;
Expand Down Expand Up @@ -353,11 +351,6 @@ public Class<? extends GlobalURIEditorOpener> bindGlobalURIEditorOpener() {
return GlobalDerivedMemberAwareURIEditorOpener.class;
}

// contributed by org.eclipse.xtext.xtext.generator.xbase.XbaseGeneratorFragment2
public Class<? extends IOccurrenceComputer> bindIOccurrenceComputer() {
return JvmModelOccurrenceComputer.class;
}

// contributed by org.eclipse.xtext.xtext.generator.xbase.XbaseGeneratorFragment2
public Class<? extends IJavaSearchParticipation> bindIJavaSearchParticipation() {
return IJavaSearchParticipation.No.class;
Expand Down
Expand Up @@ -276,7 +276,7 @@ class XtendUiModule extends org.eclipse.xtend.ide.AbstractXtendUiModule {
return RichStringAwareToggleCommentAction.Factory
}

override Class<? extends IOccurrenceComputer> bindIOccurrenceComputer() {
def Class<? extends IOccurrenceComputer> bindIOccurrenceComputer() {
return OccurrenceComputer
}

Expand Down
Expand Up @@ -319,7 +319,6 @@ public Class<? extends ToggleSLCommentAction.Factory> bindToggleCommentFactory()
return RichStringAwareToggleCommentAction.Factory.class;
}

@Override
public Class<? extends IOccurrenceComputer> bindIOccurrenceComputer() {
return OccurrenceComputer.class;
}
Expand Down
Expand Up @@ -11,6 +11,7 @@

/**
* @author Jan Koehnlein - Initial contribution and API
* @deprecated use {@link DefaultOccurrenceComputer} instead.
*/
@Deprecated
public class JvmModelOccurrenceComputer extends DefaultOccurrenceComputer {
Expand Down
6 changes: 3 additions & 3 deletions plugins/org.eclipse.xtext.xbase.ui/plugin.xml_gen
Expand Up @@ -947,23 +947,23 @@
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.eclipse.xtext.xbase.annotations.ui.XbaseWithAnnotationsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="org.eclipse.xtext.xbase.annotations.ui.xbasewithannotations.check.fast">
markerType="org.eclipse.xtext.xbase.ui.xbasewithannotations.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="org.eclipse.xtext.xbase.annotations.ui.XbaseWithAnnotationsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="org.eclipse.xtext.xbase.annotations.ui.xbasewithannotations.check.normal">
markerType="org.eclipse.xtext.xbase.ui.xbasewithannotations.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="org.eclipse.xtext.xbase.annotations.ui.XbaseWithAnnotationsExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="org.eclipse.xtext.xbase.annotations.ui.xbasewithannotations.check.expensive">
markerType="org.eclipse.xtext.xbase.ui.xbasewithannotations.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
Expand Down
Expand Up @@ -152,8 +152,6 @@ class XbaseGeneratorFragment2 extends AbstractXtextGeneratorFragment {
'org.eclipse.xtext.xbase.ui.jvmmodel.outline.JvmOutlineNodeElementOpener'.typeRef)
.addTypeToType('org.eclipse.xtext.ui.editor.GlobalURIEditorOpener'.typeRef,
'org.eclipse.xtext.common.types.ui.navigation.GlobalDerivedMemberAwareURIEditorOpener'.typeRef)
.addTypeToType('org.eclipse.xtext.ui.editor.occurrences.IOccurrenceComputer'.typeRef,
'org.eclipse.xtext.xbase.ui.jvmmodel.occurrence.JvmModelOccurrenceComputer'.typeRef)
.addTypeToType('org.eclipse.xtext.common.types.ui.query.IJavaSearchParticipation'.typeRef,
new TypeReference('org.eclipse.xtext.common.types.ui.query', 'IJavaSearchParticipation.No'))
// DerivedMemberAwareEditorOpener
Expand Down
Expand Up @@ -260,35 +260,32 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui
TypeReference _typeRef_16 = TypeReference.typeRef("org.eclipse.xtext.ui.editor.GlobalURIEditorOpener");
TypeReference _typeRef_17 = TypeReference.typeRef("org.eclipse.xtext.common.types.ui.navigation.GlobalDerivedMemberAwareURIEditorOpener");
GuiceModuleAccess.BindingFactory _addTypeToType_8 = _addTypeToType_7.addTypeToType(_typeRef_16, _typeRef_17);
TypeReference _typeRef_18 = TypeReference.typeRef("org.eclipse.xtext.ui.editor.occurrences.IOccurrenceComputer");
TypeReference _typeRef_19 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.jvmmodel.occurrence.JvmModelOccurrenceComputer");
GuiceModuleAccess.BindingFactory _addTypeToType_9 = _addTypeToType_8.addTypeToType(_typeRef_18, _typeRef_19);
TypeReference _typeRef_20 = TypeReference.typeRef("org.eclipse.xtext.common.types.ui.query.IJavaSearchParticipation");
TypeReference _typeRef_18 = TypeReference.typeRef("org.eclipse.xtext.common.types.ui.query.IJavaSearchParticipation");
TypeReference _typeReference_2 = new TypeReference("org.eclipse.xtext.common.types.ui.query", "IJavaSearchParticipation.No");
GuiceModuleAccess.BindingFactory _addTypeToType_10 = _addTypeToType_9.addTypeToType(_typeRef_20, _typeReference_2);
_addTypeToType_10.addConfiguredBinding("LanguageSpecificURIEditorOpener", statement);
GuiceModuleAccess.BindingFactory _addTypeToType_9 = _addTypeToType_8.addTypeToType(_typeRef_18, _typeReference_2);
_addTypeToType_9.addConfiguredBinding("LanguageSpecificURIEditorOpener", statement);
} else {
TypeReference _typeRef_21 = TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.IRenameStrategy");
TypeReference _typeRef_22 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.refactoring.XbaseRenameStrategy");
bindingFactory.addTypeToType(_typeRef_21, _typeRef_22);
TypeReference _typeRef_19 = TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.IRenameStrategy");
TypeReference _typeRef_20 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.refactoring.XbaseRenameStrategy");
bindingFactory.addTypeToType(_typeRef_19, _typeRef_20);
}
IXtextGeneratorLanguage _language = this.getLanguage();
Grammar _grammar = _language.getGrammar();
boolean _usesXImportSection = this._xbaseUsageDetector.usesXImportSection(_grammar);
if (_usesXImportSection) {
TypeReference _typeRef_23 = TypeReference.typeRef("org.eclipse.xtext.xbase.imports.IUnresolvedTypeResolver");
TypeReference _typeRef_24 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.imports.InteractiveUnresolvedTypeResolver");
GuiceModuleAccess.BindingFactory _addTypeToType_11 = bindingFactory.addTypeToType(_typeRef_23, _typeRef_24);
TypeReference _typeRef_25 = TypeReference.typeRef("org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider");
TypeReference _typeRef_26 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.contentassist.ImportingTypesProposalProvider");
GuiceModuleAccess.BindingFactory _addTypeToType_12 = _addTypeToType_11.addTypeToType(_typeRef_25, _typeRef_26);
TypeReference _typeRef_27 = TypeReference.typeRef("org.eclipse.xtext.ui.editor.templates.XtextTemplateContextType");
TypeReference _typeRef_28 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.templates.XbaseTemplateContextType");
_addTypeToType_12.addTypeToType(_typeRef_27, _typeRef_28);
TypeReference _typeRef_21 = TypeReference.typeRef("org.eclipse.xtext.xbase.imports.IUnresolvedTypeResolver");
TypeReference _typeRef_22 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.imports.InteractiveUnresolvedTypeResolver");
GuiceModuleAccess.BindingFactory _addTypeToType_10 = bindingFactory.addTypeToType(_typeRef_21, _typeRef_22);
TypeReference _typeRef_23 = TypeReference.typeRef("org.eclipse.xtext.common.types.xtext.ui.ITypesProposalProvider");
TypeReference _typeRef_24 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.contentassist.ImportingTypesProposalProvider");
GuiceModuleAccess.BindingFactory _addTypeToType_11 = _addTypeToType_10.addTypeToType(_typeRef_23, _typeRef_24);
TypeReference _typeRef_25 = TypeReference.typeRef("org.eclipse.xtext.ui.editor.templates.XtextTemplateContextType");
TypeReference _typeRef_26 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.templates.XbaseTemplateContextType");
_addTypeToType_11.addTypeToType(_typeRef_25, _typeRef_26);
} else {
TypeReference _typeRef_29 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixes");
TypeReference _typeRef_30 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixesNoImportSection");
bindingFactory.addTypeToType(_typeRef_29, _typeRef_30);
TypeReference _typeRef_27 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixes");
TypeReference _typeRef_28 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixesNoImportSection");
bindingFactory.addTypeToType(_typeRef_27, _typeRef_28);
}
IXtextGeneratorLanguage _language_1 = this.getLanguage();
GuiceModuleAccess _eclipsePluginGenModule = _language_1.getEclipsePluginGenModule();
Expand All @@ -299,18 +296,18 @@ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _bui
if (_inheritsXbaseWithAnnotations) {
IXtextGeneratorLanguage _language_3 = this.getLanguage();
GuiceModuleAccess _eclipsePluginGenModule_1 = _language_3.getEclipsePluginGenModule();
TypeReference _typeRef_31 = TypeReference.typeRef("org.eclipse.xtext.xbase.annotations.ui.DefaultXbaseWithAnnotationsUiModule");
_eclipsePluginGenModule_1.setSuperClass(_typeRef_31);
TypeReference _typeRef_29 = TypeReference.typeRef("org.eclipse.xtext.xbase.annotations.ui.DefaultXbaseWithAnnotationsUiModule");
_eclipsePluginGenModule_1.setSuperClass(_typeRef_29);
} else {
IXtextGeneratorLanguage _language_4 = this.getLanguage();
GuiceModuleAccess _eclipsePluginGenModule_2 = _language_4.getEclipsePluginGenModule();
TypeReference _typeRef_32 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.DefaultXbaseUiModule");
_eclipsePluginGenModule_2.setSuperClass(_typeRef_32);
TypeReference _typeRef_30 = TypeReference.typeRef("org.eclipse.xtext.xbase.ui.DefaultXbaseUiModule");
_eclipsePluginGenModule_2.setSuperClass(_typeRef_30);
}
IXtextGeneratorLanguage _language_5 = this.getLanguage();
GuiceModuleAccess _webGenModule = _language_5.getWebGenModule();
TypeReference _typeRef_33 = TypeReference.typeRef("org.eclipse.xtext.xbase.web.DefaultXbaseWebModule");
_webGenModule.setSuperClass(_typeRef_33);
TypeReference _typeRef_31 = TypeReference.typeRef("org.eclipse.xtext.xbase.web.DefaultXbaseWebModule");
_webGenModule.setSuperClass(_typeRef_31);
}

protected void doGenerateXtendInferrer() {
Expand Down