How to restore all editors after restart? [message #462687] |
Wed, 31 January 2007 16:08 |
Eclipse User |
|
|
|
Originally posted by: Henry.Grippa.googlemail.com
I have provided my own editor (which is extended AbstractTextEditor) but
it doesn't restore after application restart.
Could anyone please tell me how to do this?
Regards,
Henry
|
|
|
|
Re: How to restore all editors after restart? [message #462751 is a reply to message #462690] |
Wed, 31 January 2007 19:31 |
Eclipse User |
|
|
|
Originally posted by: Henry.Grippa.googlemail.com
You mean that if I will implement IPersistableElement the editors will
restore automatically?
Snjezana Peco wrote:
> Your editor input has to implement IPersistableElement.
> FileEditorInput can serve as an example.
>
> Snjeza
>
> Henry Grippa wrote:
>> I have provided my own editor (which is extended AbstractTextEditor)
>> but it doesn't restore after application restart.
>> Could anyone please tell me how to do this?
>>
>> Regards,
>> Henry
|
|
|
|
Re: How to restore all editors after restart? [message #462756 is a reply to message #462754] |
Wed, 31 January 2007 20:49 |
Eclipse User |
|
|
|
Originally posted by: Henry.Grippa.googlemail.com
I have done all of these. I have also registered my factory with
"org.eclipse.ui.elementFactories" extension point.
But it doesn't work
Snjezana Peco wrote:
> Yes, if you implement IPersistableElement correctly.
> You should pay attention to the following:
> FileEditorInput.getFactoryId()
> FileEditorInput.saveState()
> FileEditorInputFactory.createElement()
>
> Look at EditorReference.getEditorInput() in order to see how Eclipse
> restores the editor input.
>
> Snjeza
>
> Henry Grippa wrote:
>> You mean that if I will implement IPersistableElement the editors
>> will restore automatically?
>>
>> Snjezana Peco wrote:
>>> Your editor input has to implement IPersistableElement.
>>> FileEditorInput can serve as an example.
>>>
>>> Snjeza
>>>
>>> Henry Grippa wrote:
>>>> I have provided my own editor (which is extended
>>>> AbstractTextEditor) but it doesn't restore after application restart.
>>>> Could anyone please tell me how to do this?
>>>>
>>>> Regards,
>>>> Henry
|
|
|
Re: How to restore all editors after restart? [message #462760 is a reply to message #462754] |
Wed, 31 January 2007 21:08 |
Eclipse User |
|
|
|
Originally posted by: Henry.Grippa.googlemail.com
Thank you very much.
It works.
I have found my bug - I didn't implement getPersistable() correctly.
Snjezana Peco wrote:
> Yes, if you implement IPersistableElement correctly.
> You should pay attention to the following:
> FileEditorInput.getFactoryId()
> FileEditorInput.saveState()
> FileEditorInputFactory.createElement()
>
> Look at EditorReference.getEditorInput() in order to see how Eclipse
> restores the editor input.
>
> Snjeza
>
> Henry Grippa wrote:
>> You mean that if I will implement IPersistableElement the editors
>> will restore automatically?
>>
>> Snjezana Peco wrote:
>>> Your editor input has to implement IPersistableElement.
>>> FileEditorInput can serve as an example.
>>>
>>> Snjeza
>>>
>>> Henry Grippa wrote:
>>>> I have provided my own editor (which is extended
>>>> AbstractTextEditor) but it doesn't restore after application restart.
>>>> Could anyone please tell me how to do this?
>>>>
>>>> Regards,
>>>> Henry
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03850 seconds