Package: EmfParsleyJavaGuiceModule

EmfParsleyJavaGuiceModule

nameinstructionbranchcomplexitylinemethod
EmfParsleyJavaGuiceModule()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindAdapterFactory()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindAdapterFactoryLabelProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindAsyncCommandStackListener()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindComposedAdapterFactory$Descriptor$RegistryToInstance()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindConfigurator()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindDiagnosticUtil()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindDiagnostician()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindDialogControlFactory()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindDialogFeatureCaptionProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindEditingActionManager()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindEditingDomainFinder()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindEditingMenuBuilder()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindEmfEventHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindEmfSelectionHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFeatureCaptionProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFeatureHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFeatureResolver()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFeaturesProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFormControlFactory()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindFormFeatureCaptionProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIContentProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIEditingStrategy()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIEditorMouseListener()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIImageHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindILabelProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIViewerMouseListener()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindIssueReporter()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindLightweightActionBarContributor()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindOutlineSelectionHandler()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindProposalCreator()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindResourceLoader()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindResourceManager()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindResourceSaveStrategy()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindTableColumnLabelProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindTableFeaturesProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindTableViewerColumnBuilder()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindTableViewerContentProvider()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindValidationRunner()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindViewerContextMenuHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindViewerDragAndDropHelper()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
bindWorkbenchActionBarContributor()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
configure(Binder)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
provideAdapterFactoryEditingDomain()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
provideEditingDomain()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueContentAssistShortcut()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueDefaultTableColumnWeight()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueIterableStringEllipses()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueIterableStringMaxLength()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueIterableStringSeparator()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueTableColumnWeights()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueTreeFormSashStyle()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
valueTreeFormSashWeights()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2015 RCP Vision (http://www.rcp-vision.com) and others.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * Lorenzo Bettini - initial API and implementation
10: *******************************************************************************/
11:
12: package org.eclipse.emf.parsley;
13:
14: import org.eclipse.emf.common.notify.AdapterFactory;
15: import org.eclipse.emf.ecore.util.Diagnostician;
16: import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
17: import org.eclipse.emf.edit.domain.EditingDomain;
18: import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
19: import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
20: import org.eclipse.emf.parsley.composite.DialogControlFactory;
21: import org.eclipse.emf.parsley.composite.FormControlFactory;
22: import org.eclipse.emf.parsley.composite.ProposalCreator;
23: import org.eclipse.emf.parsley.config.Configurator;
24: import org.eclipse.emf.parsley.ecore.FeatureResolver;
25: import org.eclipse.emf.parsley.edit.EditingDomainFinder;
26: import org.eclipse.emf.parsley.edit.IEditingStrategy;
27: import org.eclipse.emf.parsley.edit.OnTheFlyEditingStrategy;
28: import org.eclipse.emf.parsley.edit.UndoableEditingStrategy;
29: import org.eclipse.emf.parsley.edit.action.EditingActionManager;
30: import org.eclipse.emf.parsley.edit.action.EditingMenuBuilder;
31: import org.eclipse.emf.parsley.edit.actionbar.LightweightActionBarContributor;
32: import org.eclipse.emf.parsley.edit.actionbar.WorkbenchActionBarContributor;
33: import org.eclipse.emf.parsley.edit.domain.DefaultAdapterFactoryEditingDomainProvider;
34: import org.eclipse.emf.parsley.edit.domain.DefaultEditingDomainProvider;
35: import org.eclipse.emf.parsley.edit.provider.InjectableAdapterFactory;
36: import org.eclipse.emf.parsley.edit.ui.dnd.ViewerDragAndDropHelper;
37: import org.eclipse.emf.parsley.edit.ui.provider.InjectableAdapterFactoryLabelProvider;
38: import org.eclipse.emf.parsley.edit.ui.provider.TableViewerContentProvider;
39: import org.eclipse.emf.parsley.edit.ui.provider.ViewerContentProvider;
40: import org.eclipse.emf.parsley.handlers.OutlineSelectionHandler;
41: import org.eclipse.emf.parsley.internal.inject.AfterInjectTypeListener;
42: import org.eclipse.emf.parsley.internal.inject.GenericFactory;
43: import org.eclipse.emf.parsley.listeners.AsyncCommandStackListener;
44: import org.eclipse.emf.parsley.listeners.IEditorMouseListener;
45: import org.eclipse.emf.parsley.listeners.OpenDialogMouseAdapter;
46: import org.eclipse.emf.parsley.listeners.OpenPropertyViewMouseAdapter;
47: import org.eclipse.emf.parsley.menus.ViewerContextMenuHelper;
48: import org.eclipse.emf.parsley.resource.ResourceLoader;
49: import org.eclipse.emf.parsley.resource.ResourceManager;
50: import org.eclipse.emf.parsley.resource.ResourceSaveStrategy;
51: import org.eclipse.emf.parsley.runtime.service.AbstractGenericModule;
52: import org.eclipse.emf.parsley.runtime.ui.ClassLoaderImageHelper;
53: import org.eclipse.emf.parsley.runtime.ui.IImageHelper;
54: import org.eclipse.emf.parsley.ui.provider.DialogFeatureCaptionProvider;
55: import org.eclipse.emf.parsley.ui.provider.FeatureCaptionProvider;
56: import org.eclipse.emf.parsley.ui.provider.FeaturesProvider;
57: import org.eclipse.emf.parsley.ui.provider.FormFeatureCaptionProvider;
58: import org.eclipse.emf.parsley.ui.provider.TableColumnLabelProvider;
59: import org.eclipse.emf.parsley.ui.provider.TableFeaturesProvider;
60: import org.eclipse.emf.parsley.ui.provider.ViewerLabelProvider;
61: import org.eclipse.emf.parsley.util.EmfEventHelper;
62: import org.eclipse.emf.parsley.util.EmfSelectionHelper;
63: import org.eclipse.emf.parsley.util.FeatureHelper;
64: import org.eclipse.emf.parsley.validation.DiagnosticUtil;
65: import org.eclipse.emf.parsley.validation.DialogErrorReporter;
66: import org.eclipse.emf.parsley.validation.IssueReporter;
67: import org.eclipse.emf.parsley.validation.LogIssueReporter;
68: import org.eclipse.emf.parsley.validation.ValidationRunner;
69: import org.eclipse.emf.parsley.viewers.IViewerMouseListener;
70: import org.eclipse.emf.parsley.viewers.TableViewerColumnBuilder;
71: import org.eclipse.jface.viewers.IContentProvider;
72: import org.eclipse.jface.viewers.ILabelProvider;
73: import org.eclipse.swt.SWT;
74: import org.eclipse.swt.events.MouseListener;
75:
76: import com.google.inject.Binder;
77: import com.google.inject.Provider;
78:
79: /**
80: * Default Google Guice bindings; this can be used in a pure Java environment, without
81: * requiring an OSGI - Plug-in environment.
82: *
83: * @author Lorenzo Bettini
84: * @author Francesco Guidieri - only Javadocs :-)
85: *
86: */
87: public class EmfParsleyJavaGuiceModule extends AbstractGenericModule {
88:
89:         @Override
90:         public void configure(Binder binder) {
91:                 super.configure(binder);
92:                 GenericFactory.prepareFactory(binder);
93:                 AfterInjectTypeListener.bindAfterInjectTypeListener(binder);
94:         }
95:
96:         /**
97:          * The String constant for Content Assist Shortcut
98:          */
99:         public String valueContentAssistShortcut() {
100:                 return "Ctrl+Space";
101:         }
102:
103:         /**
104:          * The String constant used as a separator for Iterable string representation
105:          */
106:         public String valueIterableStringSeparator() {
107:                 return ", ";
108:         }
109:
110:         /**
111:          * The String constant used as a ellipses for Iterable string representation
112:          * when it is too long
113:          */
114:         public String valueIterableStringEllipses() {
115:                 return "...";
116:         }
117:
118:         /**
119:          * The Integer constant used as the maximum length for Iterable string representation
120:          */
121:         public Integer valueIterableStringMaxLength() {
122:                 return 80;
123:         }
124:
125:         /**
126:          * The Integer constant used as the default weight for a table's columns
127:          */
128:         public Integer valueDefaultTableColumnWeight() {
129:                 return 3;
130:         }
131:
132:         /**
133:          * The array of int weights for a table's columns
134:          * @since 2.0
135:          */
136:         public int[] valueTableColumnWeights() {
137:                 return new int[]{};
138:         }
139:
140:         /**
141:          * The int constant defining the Sash style in a TreeFormComposite
142:          */
143:         public int valueTreeFormSashStyle() {
144:                 return SWT.VERTICAL;
145:         }
146:
147:         /**
148:          * The array of int weights for the Sash of a TreeFormComposite
149:          * @since 2.0
150:          */
151:         public int[] valueTreeFormSashWeights() {
152:                 return new int[]{};
153:         }
154:
155:         /**
156:          * Use this binding to provide your own implementation of getImages methods.
157:          * Default implementation is {@link ClassLoaderImageHelper}.
158:          * @return a specialization of {@link IImageHelper}
159:          *
160:          */
161:         public Class<? extends IImageHelper> bindIImageHelper() {
162:                 return ClassLoaderImageHelper.class;
163:         }
164:
165:         /**
166:          * Use this binding to change the way your resources are loaded from the framework.
167:          * @return a specialization of {@link ResourceLoader}
168:          *
169:          */
170:         public Class<? extends ResourceLoader> bindResourceLoader() {
171:                 return ResourceLoader.class;
172:         }
173:
174:         /**
175:          * Use this binding to define the mouse listener for editors.
176:          * Default implementation is {@link OpenPropertyViewMouseAdapter}
177:          * @return a specialization of {@link IEditorMouseListener}
178:          * @see MouseListener
179:          * @see IViewerMouseListener
180:          */
181:         public Class<? extends IEditorMouseListener> bindIEditorMouseListener() {
182:                 return OpenPropertyViewMouseAdapter.class;
183:         }
184:
185:         /**
186:          * Use this binding to define the mouse listener for viewers.
187:          * Default implementation is {@link OpenDialogMouseAdapter}
188:          * @return a specialization of {@link IViewerMouseListener}
189:          * @see MouseListener
190:          */
191:         public Class<? extends IViewerMouseListener> bindIViewerMouseListener() {
192:                 return OpenDialogMouseAdapter.class;
193:         }
194:
195:         /**
196:          * Use this binding to implement the label provider.
197:          * Default implementation is {@link ViewerLabelProvider}
198:          * @return a specialization of {@link ILabelProvider}
199:          */
200:         public Class<? extends ILabelProvider> bindILabelProvider() {
201:                 return ViewerLabelProvider.class;
202:         }
203:
204:         /**
205:          * Use this binding to provide the caption provider for your EStructuralFeatures.
206:          * @return a specialization of {@link FeatureCaptionProvider}
207:          * @see FormFeatureCaptionProvider
208:          * @see DialogFeatureCaptionProvider
209:          */        
210:         public Class<? extends FeatureCaptionProvider> bindFeatureCaptionProvider() {
211:                 return FeatureCaptionProvider.class;
212:         }
213:
214:         /**
215:          * Use this binding to provide the caption provider only for Forms.
216:          * @return a specialization of {@link FormFeatureCaptionProvider}
217:          * @see FeatureCaptionProvider
218:          * @see DialogFeatureCaptionProvider
219:          */        
220:         public Class<? extends FormFeatureCaptionProvider> bindFormFeatureCaptionProvider() {
221:                 return FormFeatureCaptionProvider.class;
222:         }
223:
224:         /**
225:          * Use this binding to provide the caption provider only for Dialogs.
226:          * @return a specialization of {@link DialogFeatureCaptionProvider}
227:          * @see FeatureCaptionProvider
228:          * @see FormFeatureCaptionProvider
229:          */        
230:         public Class<? extends DialogFeatureCaptionProvider> bindDialogFeatureCaptionProvider() {
231:                 return DialogFeatureCaptionProvider.class;
232:         }
233:
234:         /**
235:          * Use this binding to provide an handler for outline selection in editors.
236:          * @return a specialization of {@link OutlineSelectionHandler}
237:          */
238:         public Class<? extends OutlineSelectionHandler> bindOutlineSelectionHandler() {
239:                 return OutlineSelectionHandler.class;
240:         }
241:
242:         /**
243:          * Use this bind to change the viewers context menu mechanisms.
244:          * @return a specialization of {@link ViewerContextMenuHelper}
245:          */
246:         public Class<? extends ViewerContextMenuHelper> bindViewerContextMenuHelper() {
247:                 return ViewerContextMenuHelper.class;
248:         }
249:
250:         /**
251:          * Use this bind to change the viewers drag and drop mechanisms.
252:          * @return a specialization of {@link ViewerDragAndDropHelper}
253:          */
254:         public Class<? extends ViewerDragAndDropHelper> bindViewerDragAndDropHelper() {
255:                 return ViewerDragAndDropHelper.class;
256:         }
257:
258:         /**
259:          * Use this bind to provide a factory that builds controls for your forms
260:          * @return a specialization of {@link FormControlFactory}
261:          * @see TreeFormFactory
262:          */
263:         public Class<? extends FormControlFactory> bindFormControlFactory() {
264:                 return FormControlFactory.class;
265:         }
266:
267:         /**
268:          * Use this bind to provide a factory that builds controls for your dialogs
269:          * @return a specialization of {@link DialogControlFactory}
270:          * @see TreeFormFactory
271:          */
272:         public Class<? extends DialogControlFactory> bindDialogControlFactory() {
273:                 return DialogControlFactory.class;
274:         }
275:
276:         /**
277:          * Use this binding to provide the label provider factory only for columns.
278:          * The default implementation will use the same implementation specified by bind method {@link #bindILabelProvider()}
279:          * @return a specialization of {@link TableColumnLabelProvider}
280:          * @see FeatureCaptionProvider
281:          */                
282:         public Class<? extends TableColumnLabelProvider> bindTableColumnLabelProvider() {
283:                 return TableColumnLabelProvider.class;
284:         }
285:
286:         /**
287:          * Use this bind to change the way columns for table are built.
288:          * @return a specialization of {@link TableViewerColumnBuilder}
289:          * @see TableViewerFactory
290:          */
291:         public Class<? extends TableViewerColumnBuilder> bindTableViewerColumnBuilder() {
292:                 return TableViewerColumnBuilder.class;
293:         }
294:
295:         /**
296:          * Use this binding to provide your implementation of a <b>action bar contributor</b> for a workbench context.
297:          * Default implementation is {@link WorkbenchActionBarContributor}
298:          * @return an implementation of {@link WorkbenchActionBarContributor}
299:          */
300:         public Class<? extends WorkbenchActionBarContributor> bindWorkbenchActionBarContributor() {
301:                 return WorkbenchActionBarContributor.class;
302:         }
303:
304:         /**
305:          * Use this bind to provide your implementation of a of <b>action bar contributor</b> without a workbench.
306:          * This scenario can be used where you have a view instead of an editor, for example in a <b>e4 application</b>.
307:          * @return an implementation of {@link LightweightActionBarContributor}
308:          * @see WorkbenchActionBarContributor
309:          */
310:         public Class<? extends LightweightActionBarContributor> bindLightweightActionBarContributor() {
311:                 return LightweightActionBarContributor.class;
312:         }
313:
314:         /**
315:          * Use this bind method to change the way Edit actions (Copy, cut and paste)
316:          * and EMF actions are added to context menu.
317:          *
318:          * @return a specialization of {@link EditingActionManager}
319:          */
320:         public Class<? extends EditingActionManager> bindEditingActionManager() {
321:                 return EditingActionManager.class;
322:         }
323:
324:         /**
325:          * Use this bind method to change the way the context and other menus are created for
326:          * Edit actions.
327:          *
328:          * @return a specialization of {@link EditingMenuBuilder}
329:          */
330:         public Class<? extends EditingMenuBuilder> bindEditingMenuBuilder() {
331:                 return EditingMenuBuilder.class;
332:         }
333:
334:         /**
335:          * Use this method to specify how the editing domain can be found
336:          * @return a specialization of {@link EditingDomainFinder}
337:          *
338:          */
339:         public Class<? extends EditingDomainFinder> bindEditingDomainFinder() {
340:                 return EditingDomainFinder.class;
341:         }
342:
343:         /**
344:          * Use this binding to provide a custom list of EStructuralFetures for your model
345:          * @return a specialization of {@link FeaturesProvider}
346:          */
347:         public Class<? extends FeaturesProvider> bindFeaturesProvider() {
348:                 return FeaturesProvider.class;
349:         }
350:
351:         /**
352:          * Use this binding to customize the way to resolve EStructuralFeatures
353:          * @return a specialization of {@link FeatureResolver}
354:          */
355:         public Class<? extends FeatureResolver> bindFeatureResolver() {
356:                 return FeatureResolver.class;
357:         }
358:
359:         /**
360:          * Use this binding to provide a custom list of EStructuralFetures only for tables.
361:          * The default behavior is to use the same class provided by {@link #bindFeaturesProvider()} method.
362:          * @return a specialization of {@link TableFeaturesProvider}
363:          * @see FeaturesProvider
364:          */
365:         public Class<? extends TableFeaturesProvider> bindTableFeaturesProvider() {
366:                 return TableFeaturesProvider.class;
367:         }
368:
369:         /**
370:          * Use this binding to customize the helper EmfSelectionHelper
371:          * @return a specialization of {@link EmfSelectionHelper}
372:          */
373:         public Class<? extends EmfSelectionHelper> bindEmfSelectionHelper() {
374:                 return EmfSelectionHelper.class;
375:         }
376:
377:         /**
378:          * Use this binding to customize the helper EmfEventHelper
379:          * @return a specialization of {@link EmfEventHelper}
380:          */
381:         public Class<? extends EmfEventHelper> bindEmfEventHelper() {
382:                 return EmfEventHelper.class;
383:         }
384:
385:         /**
386:          * Use this method to customize save mechanism
387:          * @return a specification of {@link ResourceSaveStrategy}
388:          */
389:         public Class<? extends ResourceSaveStrategy> bindResourceSaveStrategy() {
390:                 return ResourceSaveStrategy.class;
391:         }
392:
393:         /**
394:          * Use this method to customize validity checks.
395:          * @return a specification of {@link Diagnostician}
396:          */
397:         public Diagnostician bindDiagnostician() {
398:                 return Diagnostician.INSTANCE;
399:         }
400:
401:         /**
402:          * Use this method to customize tasks concerning a resource,
403:          * for example, its initialization.
404:          *
405:          * @return a specification of {@link ResourceManager}
406:          */
407:         public Class<? extends ResourceManager> bindResourceManager() {
408:                 return ResourceManager.class;
409:         }
410:
411:         /**
412:          * Use this binding to implement a custom content provider.
413:          * Default implementation is {@link ViewerContentProvider}
414:          * @return an implementation of {@link IContentProvider}
415:          */
416:         public Class<? extends IContentProvider> bindIContentProvider() {
417:                 return ViewerContentProvider.class;
418:         }
419:
420:         /**
421:          * Use this binding to implement a custom content provider for
422:          * table viewers.
423:          * Default implementation is {@link TableViewerContentProvider}
424:          * @return an implementation of {@link TableViewerContentProvider}
425:          */
426:         public Class<? extends TableViewerContentProvider> bindTableViewerContentProvider() {
427:                 return TableViewerContentProvider.class;
428:         }
429:
430:         /**
431:          * Use this method to customize the proposal provider.
432:          * @return a specification of {@link ProposalCreator}
433:          */
434:         public Class<? extends ProposalCreator> bindProposalCreator() {
435:                 return ProposalCreator.class;
436:         }
437:
438:         /**
439:          * Use this method to customize an editing strategy, to prepare the eObject for edit and update.
440:          * The default implementation is {@link OnTheFlyEditingStrategy}.
441:          * @return a specification of {@link IEditingStrategy}
442:          * @see UndoableEditingStrategy
443:          */
444:         public Class<? extends IEditingStrategy> bindIEditingStrategy() {
445:                 return OnTheFlyEditingStrategy.class;
446:         }
447:
448:         /**
449:          * Use this method to customize a {@link Configurator}.
450:          * @return a specification of {@link Configurator}
451:          * @see UndoableEditingStrategy
452:          */
453:         public Class<? extends Configurator> bindConfigurator() {
454:                 return Configurator.class;
455:         }
456:
457:         /**
458:          * Use this method to customize a {@link IssueReporter},
459:          * the default implementation is {@link DialogErrorReporter}.
460:          * @return an implementation of {@link IssueReporter}
461:          * @see LogIssueReporter        
462:          */
463:         public Class<? extends IssueReporter> bindIssueReporter() {
464:                 return DialogErrorReporter.class;
465:         }
466:
467:         /**
468:          * Use this method to customize a {@link ValidationRunner}.
469:          * @return an implementation of {@link ValidationRunner}
470:          */
471:         public Class<? extends ValidationRunner> bindValidationRunner() {
472:                 return ValidationRunner.class;
473:         }
474:
475:         /**
476:          * Use this method to customize a {@link DiagnosticUtil}.
477:          * @return an implementation of {@link DiagnosticUtil}
478:          */
479:         public Class<? extends DiagnosticUtil> bindDiagnosticUtil() {
480:                 return DiagnosticUtil.class;
481:         }
482:
483:         /**
484:          * Use this method to customize a {@link FeatureHelper}.
485:          * @return an implementation of {@link FeatureHelper}
486:          */
487:         public Class<? extends FeatureHelper> bindFeatureHelper() {
488:                 return FeatureHelper.class;
489:         }
490:
491:         /**
492:          * Use this method to customize a {@link AsyncCommandStackListener}.
493:          * @return an implementation of {@link AsyncCommandStackListener}
494:          */
495:         public Class<? extends AsyncCommandStackListener> bindAsyncCommandStackListener() {
496:                 return AsyncCommandStackListener.class;
497:         }
498:
499:         /**
500:          * Use this method to specify a provider for {@link AdapterFactoryEditingDomain}.
501:          * The default implementation is {@link DefaultAdapterFactoryEditingDomainProvider}
502:          * @return an implementation of {@link Provider} for {@link AdapterFactoryEditingDomain}
503:          */
504:         public Class<? extends Provider<AdapterFactoryEditingDomain>> provideAdapterFactoryEditingDomain() {
505:                 return DefaultAdapterFactoryEditingDomainProvider.class;
506:         }
507:
508:         /**
509:          * Use this method to specify a provider for {@link EditingDomain}. The
510:          * default implementation is {@link DefaultEditingDomainProvider}, which
511:          * simply delegates to an injected
512:          * {@link DefaultAdapterFactoryEditingDomainProvider}.
513:          *
514:          * @return an implementation of {@link Provider} for {@link EditingDomain}
515:          */
516:         public Class<? extends Provider<EditingDomain>> provideEditingDomain() {
517:                 return DefaultEditingDomainProvider.class;
518:         }
519:
520:         /**
521:          * Use this method to specify an adapter factory
522:          * The default implementation is {@link InjectableAdapterFactory}
523:          * @return an implementation of {@link AdapterFactory}
524:          */
525:         public Class<? extends AdapterFactory> bindAdapterFactory() {
526:                 return InjectableAdapterFactory.class;
527:         }
528:
529:         public Class<? extends AdapterFactoryLabelProvider> bindAdapterFactoryLabelProvider() {
530:                 return InjectableAdapterFactoryLabelProvider.class;
531:         }
532:
533:         public ComposedAdapterFactory.Descriptor.Registry bindComposedAdapterFactory$Descriptor$RegistryToInstance() {
534:                 return ComposedAdapterFactory.Descriptor.Registry.INSTANCE;
535:         }
536: }