Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Getting a handle to the IFormatter
Getting a handle to the IFormatter [message #667129] Tue, 26 April 2011 23:30 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.bugzilla.post.gmail.com

What is the best way to get a handle on the IFormatter?

I have a preference page to set custom formatting options and need to
re-configure the FormattingConfig when the options are changed in the
preference page. I can get my implementation of the IFormatter to register
itself as a PreferenceChangeListener in the constructor, but I need to
unregister at some point -- for e.g. when the editor is closed. How can I
get a handle to the IFormatter from the editor?

Thanks!

Mary
Re: Getting a handle to the IFormatter [message #667180 is a reply to message #667129] Wed, 27 April 2011 08:58 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Mary,

doesn't

@Inject IFormatter formatter;

work for you?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 27.04.11 01:30, schrieb Mary K:
> What is the best way to get a handle on the IFormatter?
>
> I have a preference page to set custom formatting options and need to
> re-configure the FormattingConfig when the options are changed in the
> preference page. I can get my implementation of the IFormatter to
> register itself as a PreferenceChangeListener in the constructor, but I
> need to unregister at some point -- for e.g. when the editor is closed.
> How can I get a handle to the IFormatter from the editor?
>
> Thanks!
>
> Mary
Re: Getting a handle to the IFormatter [message #667308 is a reply to message #667180] Thu, 28 April 2011 00:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.bugzilla.post.gmail.com

Hi Sebastian,

It seems that more than instance of the formatter gets created for each
editor instance (see the three stack traces below -- I put the breakpoint in
the constructor of the formatter). But only one of them actually gets called
to do the formatting (when the Format command is executed). When I do
@Inject in the editor, I get a handle to one of the instances, but it is not
the one that did the formatting.

Thread [main] (Suspended (breakpoint at line 84 in LNGFormatter)) LNGFormatter.<init>()
line: 84 LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int,
Object[]) line: not available FastConstructor.newInstance(Object[])
line: 40 DefaultConstructionProxyFactory$1.newInstance(Object...)
line: 60 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 85 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 InjectorImpl$4$1.call(InternalContext)
line: 758 InjectorImpl.callInContext(ContextualCallable<T>)
line: 804 InjectorImpl$4.get()
line: 754 InjectorImpl.getInstance(Class<T>)
line: 793 LNGExecutableExtensionFactory(AbstractGuiceAwareExecutableEx tensionFactory).create()
line: 50 ConfigurationElement.createExecutableExtension(String)
line: 262 ConfigurationElementHandle.createExecutableExtension(String)
line: 55 WorkbenchPlugin.createExtension(IConfigurationElement,
String) line: 259 EditorDescriptor.createEditor()
line: 235 EditorManager.createPart(EditorDescriptor)
line: 845 EditorReference.createPartHelper()
line: 609 EditorReference.createPart()
line: 465
EditorReference(WorkbenchPartReference).getPart(boolean)
line: 595 EditorReference.getEditor(boolean)
line: 289 .........


Thread [main] (Suspended (breakpoint at line 84 in LNGFormatter)) LNGFormatter.<init>()
line: 84 LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int,
Object[]) line: not available FastConstructor.newInstance(Object[])
line: 40 DefaultConstructionProxyFactory$1.newInstance(Object...)
line: 60 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 85 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 SingleParameterInjector<T>.inject(Errors,
InternalContext) line: 42 SingleParameterInjector<T>.getAll(Errors,
InternalContext, SingleParameterInjector<?>[]) line: 66 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 84 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 InjectorImpl$4$1.call(InternalContext)
line: 758 InjectorImpl.callInContext(ContextualCallable<T>)
line: 804 InjectorImpl$4.get()
line: 754 XtextResourceFactory.createResource(URI)
line: 19 SynchronizedXtextResourceSet(ResourceSetImpl).createResource (URI,
String) line: 425 LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(ResourceSet,
URI) line: 7 LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResourceFor(IFile)
line: 69 LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(IStorage)
line: 61 LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(IEditorInput)
line: 49 LngResourceForEditorInputFactory.createResource(IEditorInput )
line: 55 LngDocumentProvider(XtextDocumentProvider).setDocumentConten t(IDocument,
IEditorInput, String) line: 102 LngDocumentProvider(StorageDocumentProvider).createDocument( Object)
line: 229 LngDocumentProvider(FileDocumentProvider).createElementInfo( Object)
line: 735 LngDocumentProvider(XtextDocumentProvider).createElementInfo (Object)
line: 131 LngDocumentProvider(AbstractDocumentProvider).connect(Object )
line: 400 LNGEditor(AbstractTextEditor).doSetInput(IEditorInput)
line: 4056 LNGEditor(StatusTextEditor).doSetInput(IEditorInput)
line: 217 LNGEditor(AbstractDecoratedTextEditor).doSetInput(IEditorInp ut)
line: 1444 LNGEditor(TextEditor).doSetInput(IEditorInput)
line: 169 LNGEditor(XtextEditor).doSetInput(IEditorInput)
line: 149 LNGEditor.doSetInput(IEditorInput)
line: 170 AbstractTextEditor$19.run(IProgressMonitor)
line: 3043 ModalContext.runInCurrentThread(IRunnableWithProgress,
IProgressMonitor) line: 464 ModalContext.run(IRunnableWithProgress,
boolean, IProgressMonitor, Display) line: 372 ApplicationWindow$1.run()
line: 759 BusyIndicator.showWhile(Display,
Runnable) line: 70 WorkbenchWindow(ApplicationWindow).run(boolean,
boolean, IRunnableWithProgress) line: 756 WorkbenchWindow.run(boolean,
boolean, IRunnableWithProgress) line: 2606 LNGEditor(AbstractTextEditor).internalInit(IWorkbenchWindow,
IEditorSite, IEditorInput) line: 3061 LNGEditor(AbstractTextEditor).init(IEditorSite,
IEditorInput) line: 3088 LNGEditor(XtextEditor).init(IEditorSite,
IEditorInput) line: 169 EditorManager.createSite(IEditorReference,
IEditorPart, EditorDescriptor, IEditorInput) line: 798 EditorReference.createPartHelper()
line: 647 EditorReference.createPart()
line: 465 EditorReference(WorkbenchPartReference).getPart(boolean)
line: 595 EditorReference.getEditor(boolean)
line: 289
........
.........

Thread [Worker-9] (Suspended) LNGFormatter.<init>()
line: 84 LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int,
Object[]) line: not available FastConstructor.newInstance(Object[])
line: 40 DefaultConstructionProxyFactory$1.newInstance(Object...)
line: 60 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 85 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 SingleParameterInjector<T>.inject(Errors,
InternalContext) line: 42 SingleParameterInjector<T>.getAll(Errors,
InternalContext, SingleParameterInjector<?>[]) line: 66 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 84 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
InternalContext, Class<?>) line: 94 ConstructorBindingImpl$Factory<T>.get(Errors,
InternalContext, Dependency<?>) line: 111 FactoryProxy<T>.get(Errors,
InternalContext, Dependency<?>) line: 56 InjectorImpl$4$1.call(InternalContext)
line: 758 InjectorImpl.callInContext(ContextualCallable<T>)
line: 804 InjectorImpl$4.get()
line: 754 XtextResourceFactory.createResource(URI)
line: 19 SynchronizedXtextResourceSet(ResourceSetImpl).createResource (URI,
String) line: 425 SynchronizedXtextResourceSet(ResourceSetImpl).demandCreateRe source(URI)
line: 239 SynchronizedXtextResourceSet(ResourceSetImpl).getResource(UR I,
boolean) line: 391 SynchronizedXtextResourceSet.getResource(URI,
boolean) line: 23 SynchronizedXtextResourceSet(ResourceSetImpl).getEObject(URI ,
boolean) line: 216 EcoreUtil.resolve(EObject,
ResourceSet) line: 202 EcoreUtil.resolve(EObject,
ResourceSet) line: 224 EcoreUtil.resolve(EObject,
EObject) line: 262 LocalLiteralImpl(BasicEObjectImpl).eResolveProxy(InternalEOb ject)
line: 1483 LocalLiteralImpl.getRef()
line: 145 LocalLiteralImpl.eGet(int,
boolean, boolean) line: 190 LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature,
boolean, boolean) line: 1021 LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature,
boolean) line: 1013 LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature)
line: 1008 LNGResourceDescription(DefaultResourceDescription).getRefere nceDescriptions()
line: 129 StatefulResourceDescription.<init>(IResourceDescription)
line: 55 PersistentDataAwareDirtyResource(DocumentBasedDirtyResource) .copyState(IResourceDescription)
line: 67 DirtyStateEditorSupport.modelChanged(XtextResource)
line: 318 XtextDocument.notifyModelListeners(XtextResource)
line: 102 XtextDocument$XtextDocumentLocker.afterModify(XtextResource,
Object, IUnitOfWork<?,XtextResource>) line: 154 XtextDocument$XtextDocumentLocker.afterModify(Object,
Object, IUnitOfWork) line: 1 XtextDocument$XtextDocumentLocker(IStateAccess$AbstractImpl<P >).modify(IUnitOfWork<T,P>)
line: 58 XtextDocument$XtextDocumentLocker.modify(IUnitOfWork<T,XtextResource >)
line: 161 XtextDocument.modify(IUnitOfWork<T,XtextResource>)
line: 74 XtextDocumentReconcileStrategy.reconcile(IRegion)
line: 27 XtextReconciler.run(IProgressMonitor)
line: 233 Worker.run()
line: 54"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
news:ip8l7u$sc2$1@news.eclipse.org...
> Hi Mary,
>
> doesn't
>
> @Inject IFormatter formatter;
>
> work for you?
>
> Regards,
> Sebastian
> --
> Need professional support for Eclipse Modeling?
> Go visit: http://xtext.itemis.com
>
> Am 27.04.11 01:30, schrieb Mary K:
>> What is the best way to get a handle on the IFormatter?
>>
>> I have a preference page to set custom formatting options and need to
>> re-configure the FormattingConfig when the options are changed in the
>> preference page. I can get my implementation of the IFormatter to
>> register itself as a PreferenceChangeListener in the constructor, but I
>> need to unregister at some point -- for e.g. when the editor is closed.
>> How can I get a handle to the IFormatter from the editor?
>>
>> Thanks!
>>
>> Mary
>
Re: Getting a handle to the IFormatter [message #667321 is a reply to message #667308] Thu, 28 April 2011 04:17 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.bugzilla.post.gmail.com

I guess it doesn't matter that there are many instances of the formatter...
the ConfigStore is a singleton, so all is well.
Will use @Inject to get the formatter. Thanks, Sebastian!

Mary

"Mary K" <eclipse.bugzilla.post@gmail.com> wrote in message
news:ipaade$q1s$1@news.eclipse.org...
> Hi Sebastian,
>
> It seems that more than instance of the formatter gets created for each
> editor instance (see the three stack traces below -- I put the breakpoint
> in the constructor of the formatter). But only one of them actually gets
> called to do the formatting (when the Format command is executed). When I
> do @Inject in the editor, I get a handle to one of the instances, but it
> is not the one that did the formatting.
>
> Thread [main] (Suspended (breakpoint at line 84 in LNGFormatter))
> LNGFormatter.<init>() line: 84
> LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int, Object[]) line:
> not available FastConstructor.newInstance(Object[]) line: 40
> DefaultConstructionProxyFactory$1.newInstance(Object...) line: 60
> ConstructorInjector<T>.construct(Errors, InternalContext, Class<?>) line:
> 85 ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 InjectorImpl$4$1.call(InternalContext) line: 758
> InjectorImpl.callInContext(ContextualCallable<T>) line: 804
> InjectorImpl$4.get() line: 754 InjectorImpl.getInstance(Class<T>) line:
> 793
> LNGExecutableExtensionFactory(AbstractGuiceAwareExecutableEx tensionFactory).create()
> line: 50 ConfigurationElement.createExecutableExtension(String) line: 262
> ConfigurationElementHandle.createExecutableExtension(String) line: 55
> WorkbenchPlugin.createExtension(IConfigurationElement, String) line: 259
> EditorDescriptor.createEditor() line: 235
> EditorManager.createPart(EditorDescriptor) line: 845
> EditorReference.createPartHelper() line: 609 EditorReference.createPart()
> line: 465
> EditorReference(WorkbenchPartReference).getPart(boolean)
> line: 595 EditorReference.getEditor(boolean) line: 289
> .........
>
>
> Thread [main] (Suspended (breakpoint at line 84 in LNGFormatter))
> LNGFormatter.<init>() line: 84
> LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int, Object[]) line:
> not available FastConstructor.newInstance(Object[]) line: 40
> DefaultConstructionProxyFactory$1.newInstance(Object...) line: 60
> ConstructorInjector<T>.construct(Errors, InternalContext, Class<?>) line:
> 85 ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 SingleParameterInjector<T>.inject(Errors,
> InternalContext) line: 42 SingleParameterInjector<T>.getAll(Errors,
> InternalContext, SingleParameterInjector<?>[]) line: 66
> ConstructorInjector<T>.construct(Errors, InternalContext, Class<?>) line:
> 84 ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 InjectorImpl$4$1.call(InternalContext) line: 758
> InjectorImpl.callInContext(ContextualCallable<T>) line: 804
> InjectorImpl$4.get() line: 754 XtextResourceFactory.createResource(URI)
> line: 19 SynchronizedXtextResourceSet(ResourceSetImpl).createResource (URI,
> String) line: 425
> LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(ResourceSet,
> URI) line: 7
> LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResourceFor(IFile)
> line: 69
> LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(IStorage)
> line: 61
> LngResourceForEditorInputFactory(ResourceForIEditorInputFact ory).createResource(IEditorInput)
> line: 49 LngResourceForEditorInputFactory.createResource(IEditorInput )
> line: 55
> LngDocumentProvider(XtextDocumentProvider).setDocumentConten t(IDocument,
> IEditorInput, String) line: 102
> LngDocumentProvider(StorageDocumentProvider).createDocument( Object) line:
> 229 LngDocumentProvider(FileDocumentProvider).createElementInfo( Object)
> line: 735
> LngDocumentProvider(XtextDocumentProvider).createElementInfo (Object) line:
> 131 LngDocumentProvider(AbstractDocumentProvider).connect(Object ) line:
> 400 LNGEditor(AbstractTextEditor).doSetInput(IEditorInput) line: 4056
> LNGEditor(StatusTextEditor).doSetInput(IEditorInput) line: 217
> LNGEditor(AbstractDecoratedTextEditor).doSetInput(IEditorInp ut) line: 1444
> LNGEditor(TextEditor).doSetInput(IEditorInput) line: 169
> LNGEditor(XtextEditor).doSetInput(IEditorInput) line: 149
> LNGEditor.doSetInput(IEditorInput) line: 170
> AbstractTextEditor$19.run(IProgressMonitor) line: 3043
> ModalContext.runInCurrentThread(IRunnableWithProgress, IProgressMonitor)
> line: 464 ModalContext.run(IRunnableWithProgress, boolean,
> IProgressMonitor, Display) line: 372 ApplicationWindow$1.run() line: 759
> BusyIndicator.showWhile(Display, Runnable) line: 70
> WorkbenchWindow(ApplicationWindow).run(boolean, boolean,
> IRunnableWithProgress) line: 756 WorkbenchWindow.run(boolean, boolean,
> IRunnableWithProgress) line: 2606
> LNGEditor(AbstractTextEditor).internalInit(IWorkbenchWindow, IEditorSite,
> IEditorInput) line: 3061 LNGEditor(AbstractTextEditor).init(IEditorSite,
> IEditorInput) line: 3088 LNGEditor(XtextEditor).init(IEditorSite,
> IEditorInput) line: 169 EditorManager.createSite(IEditorReference,
> IEditorPart, EditorDescriptor, IEditorInput) line: 798
> EditorReference.createPartHelper() line: 647 EditorReference.createPart()
> line: 465 EditorReference(WorkbenchPartReference).getPart(boolean) line:
> 595 EditorReference.getEditor(boolean) line: 289
> ........
> .........
>
> Thread [Worker-9] (Suspended) LNGFormatter.<init>() line: 84
> LNGFormatter$$FastClassByGuice$$d60c5edc.newInstance(int, Object[]) line:
> not available FastConstructor.newInstance(Object[]) line: 40
> DefaultConstructionProxyFactory$1.newInstance(Object...) line: 60
> ConstructorInjector<T>.construct(Errors, InternalContext, Class<?>) line:
> 85 ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 SingleParameterInjector<T>.inject(Errors,
> InternalContext) line: 42 SingleParameterInjector<T>.getAll(Errors,
> InternalContext, SingleParameterInjector<?>[]) line: 66
> ConstructorInjector<T>.construct(Errors, InternalContext, Class<?>) line:
> 84 ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 SingleFieldInjector.inject(Errors,
> InternalContext, Object) line: 56 MembersInjectorImpl<T>.injectMembers(T,
> Errors, InternalContext) line: 99 ConstructorInjector<T>.construct(Errors,
> InternalContext, Class<?>) line: 94
> ConstructorBindingImpl$Factory<T>.get(Errors, InternalContext,
> Dependency<?>) line: 111 FactoryProxy<T>.get(Errors, InternalContext,
> Dependency<?>) line: 56 InjectorImpl$4$1.call(InternalContext) line: 758
> InjectorImpl.callInContext(ContextualCallable<T>) line: 804
> InjectorImpl$4.get() line: 754 XtextResourceFactory.createResource(URI)
> line: 19 SynchronizedXtextResourceSet(ResourceSetImpl).createResource (URI,
> String) line: 425
> SynchronizedXtextResourceSet(ResourceSetImpl).demandCreateRe source(URI)
> line: 239 SynchronizedXtextResourceSet(ResourceSetImpl).getResource(UR I,
> boolean) line: 391 SynchronizedXtextResourceSet.getResource(URI, boolean)
> line: 23 SynchronizedXtextResourceSet(ResourceSetImpl).getEObject(URI ,
> boolean) line: 216 EcoreUtil.resolve(EObject, ResourceSet) line: 202
> EcoreUtil.resolve(EObject, ResourceSet) line: 224
> EcoreUtil.resolve(EObject, EObject) line: 262
> LocalLiteralImpl(BasicEObjectImpl).eResolveProxy(InternalEOb ject) line:
> 1483 LocalLiteralImpl.getRef() line: 145 LocalLiteralImpl.eGet(int,
> boolean, boolean) line: 190
> LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean,
> boolean) line: 1021
> LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature, boolean) line:
> 1013 LocalLiteralImpl(BasicEObjectImpl).eGet(EStructuralFeature) line:
> 1008
> LNGResourceDescription(DefaultResourceDescription).getRefere nceDescriptions()
> line: 129 StatefulResourceDescription.<init>(IResourceDescription) line:
> 55
> PersistentDataAwareDirtyResource(DocumentBasedDirtyResource) .copyState(IResourceDescription)
> line: 67 DirtyStateEditorSupport.modelChanged(XtextResource) line: 318
> XtextDocument.notifyModelListeners(XtextResource) line: 102
> XtextDocument$XtextDocumentLocker.afterModify(XtextResource, Object,
> IUnitOfWork<?,XtextResource>) line: 154
> XtextDocument$XtextDocumentLocker.afterModify(Object, Object, IUnitOfWork)
> line: 1
> XtextDocument$XtextDocumentLocker(IStateAccess$AbstractImpl<P >).modify(IUnitOfWork<T,P>)
> line: 58
> XtextDocument$XtextDocumentLocker.modify(IUnitOfWork<T,XtextResource >)
> line: 161 XtextDocument.modify(IUnitOfWork<T,XtextResource>) line: 74
> XtextDocumentReconcileStrategy.reconcile(IRegion) line: 27
> XtextReconciler.run(IProgressMonitor) line: 233 Worker.run() line:
> 54"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
> news:ip8l7u$sc2$1@news.eclipse.org...
>> Hi Mary,
>>
>> doesn't
>>
>> @Inject IFormatter formatter;
>>
>> work for you?
>>
>> Regards,
>> Sebastian
>> --
>> Need professional support for Eclipse Modeling?
>> Go visit: http://xtext.itemis.com
>>
>> Am 27.04.11 01:30, schrieb Mary K:
>>> What is the best way to get a handle on the IFormatter?
>>>
>>> I have a preference page to set custom formatting options and need to
>>> re-configure the FormattingConfig when the options are changed in the
>>> preference page. I can get my implementation of the IFormatter to
>>> register itself as a PreferenceChangeListener in the constructor, but I
>>> need to unregister at some point -- for e.g. when the editor is closed.
>>> How can I get a handle to the IFormatter from the editor?
>>>
>>> Thanks!
>>>
>>> Mary
>>
Previous Topic:Xtext - jdt and xbase
Next Topic:[xbase] mimic purexbase with interpreter (instead of compiler).
Goto Forum:
  


Current Time: Fri Sep 20 18:00:57 GMT 2024

Powered by FUDForum. Page generated in 0.04149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top