org.eclipse.xtext.xbase.ui.AbstractXbaseUiModule Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2010-2015 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.xbase.ui;
import com.google.inject.Binder;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider;
import org.eclipse.xtext.builder.builderState.IBuilderState;
import org.eclipse.xtext.builder.clustering.CurrentDescriptions;
import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource;
import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback;
import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.LexerProvider;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource;
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
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.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider;
import org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler;
import org.eclipse.xtext.ui.refactoring.IRenameStrategy;
import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
import org.eclipse.xtext.xbase.ide.contentassist.antlr.XbaseParser;
import org.eclipse.xtext.xbase.ide.contentassist.antlr.internal.InternalXbaseLexer;
import org.eclipse.xtext.xbase.ui.contentassist.XbaseProposalProvider;
import org.eclipse.xtext.xbase.ui.editor.XbaseDocumentProvider;
import org.eclipse.xtext.xbase.ui.editor.XbaseEditor;
import org.eclipse.xtext.xbase.ui.generator.trace.XbaseOpenGeneratedFileHandler;
import org.eclipse.xtext.xbase.ui.labeling.XbaseDescriptionLabelProvider;
import org.eclipse.xtext.xbase.ui.labeling.XbaseLabelProvider;
import org.eclipse.xtext.xbase.ui.outline.XbaseOutlineTreeProvider;
import org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixes;
import org.eclipse.xtext.xbase.ui.quickfix.JavaTypeQuickfixesNoImportSection;
import org.eclipse.xtext.xbase.ui.quickfix.XbaseQuickfixProvider;
import org.eclipse.xtext.xbase.ui.refactoring.XbaseRenameStrategy;
/**
* Manual modifications go to {@link XbaseUiModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractXbaseUiModule extends DefaultXbaseUiModule {
public AbstractXbaseUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Provider provideIAllContainersState() {
return Access.getJavaProjectsState();
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Class extends XtextEditor> bindXtextEditor() {
return XbaseEditor.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Class extends XtextDocumentProvider> bindXtextDocumentProvider() {
return XbaseDocumentProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
public Class extends OpenGeneratedFileHandler> bindOpenGeneratedFileHandler() {
return XbaseOpenGeneratedFileHandler.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalXbaseLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingLexer(Binder binder) {
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(org.eclipse.xtext.xbase.parser.antlr.internal.InternalXbaseLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureHighlightingTokenDefProvider(Binder binder) {
binder.bind(ITokenDefProvider.class)
.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
.to(AntlrTokenDefProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class extends ContentAssistContext.Factory> bindContentAssistContext$Factory() {
return DelegatingContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class extends IContentAssistParser> bindIContentAssistParser() {
return XbaseParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexerProvider(Binder binder) {
binder.bind(InternalXbaseLexer.class).toProvider(LexerProvider.create(InternalXbaseLexer.class));
}
// contributed by org.eclipse.xtext.xtext.generator.types.TypesGeneratorFragment2
public Class extends PrefixMatcher> bindPrefixMatcher() {
return FQNPrefixMatcher.class;
}
// contributed by org.eclipse.xtext.xtext.generator.xbase.XbaseGeneratorFragment2
public Class extends IRenameStrategy> bindIRenameStrategy() {
return XbaseRenameStrategy.class;
}
// contributed by org.eclipse.xtext.xtext.generator.xbase.XbaseGeneratorFragment2
public Class extends JavaTypeQuickfixes> bindJavaTypeQuickfixes() {
return JavaTypeQuickfixesNoImportSection.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsBuilderScope(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class extends IXtextEditorCallback> bindIXtextEditorCallback() {
return NatureAddingEditorCallback.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
return EclipseOutputConfigurationProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public void configureIResourceDescriptionsPersisted(Binder binder) {
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
}
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
public Class extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
return PersistentDataAwareDirtyResource.class;
}
// contributed by org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2
public Class extends IContentFormatterFactory> bindIContentFormatterFactory() {
return ContentFormatterFactory.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2
public Class extends IssueResolutionProvider> bindIssueResolutionProvider() {
return XbaseQuickfixProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public Class extends ILabelProvider> bindILabelProvider() {
return XbaseLabelProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
public void configureResourceUIServiceLabelProvider(Binder binder) {
binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(XbaseDescriptionLabelProvider.class);
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class extends IOutlineTreeProvider> bindIOutlineTreeProvider() {
return XbaseOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
public Class extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
return XbaseOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
public Class extends IContentProposalProvider> bindIContentProposalProvider() {
return XbaseProposalProvider.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy