|
Re: Resource out of sync with the filesystem in multipage editor [message #333002 is a reply to message #328475] |
Wed, 19 November 2008 09:42   |
Eclipse User |
|
|
|
Hello,
I'm currently having the same problem.
Did you find the answer, and could you give me some hints ?
Thanks in advance,
--
Laurent
ravi wrote:
> Hi,
>
> I have created a multipage editor(extends MultiPageEditorPart) and named
> it as "Sample CEditor"
>
> On one of the page am adding a CEditor like this
>
> int index = addPage(new CEditor(), getEditorInput());
> other page contains some view.
>
> Every thing is working fine, but ...
>
> i opened a file say sample.c outside the eclipse workspace and i did
> some modifications.
>
> And when i opened the same file inside the workspace using "Text Editor"
> it prompts me with the "File Changed" dialog box and asks for,
> "The file has been changed on the file system. Do you want to load the
> changes?"
>
> If we say "Yes" it refreshes the Contents on the file.
>
> I expecting the same kind of behaviour on my "Sample CEditor", But i
> don't know how to implement...
>
> Can any one help me to do the same.....
>
>
> Thanks and Regards,
> Ravi.
>
>
>
|
|
|
|
Re: Resource out of sync with the filesystem in multipage editor [message #333009 is a reply to message #333005] |
Wed, 19 November 2008 14:04   |
Eclipse User |
|
|
|
Szymon Brandys wrote:
> You should look at
> org.eclipse.ui.texteditor.AbstractTextEditor.sanityCheckStat e(IEditorInput).
OK, I've done it, and it is indeed enlightening : there's a huge amount of work to do to correctly implement the whole sync thing, and it seems to me that it has not been made orthogonal to any kind
of editor, but just for text based editors :-(
And it does not seem to me that I can do "monkey copying", since some useful classes are package protected such as org.eclipse.ui.texteditor.EditorMessages.
-> This prevents me from using the same messages for indicating to the user that the resource is out of sync ...
-> Is there another way to do this (for custom editors) ?
Thanks in advance,
Regards,
--
Laurent
|
|
|
|
Powered by
FUDForum. Page generated in 0.02921 seconds