Home » Eclipse Projects » Rich Client Platform (RCP) » file change events
file change events [message #460101] |
Wed, 13 December 2006 11:57  |
Eclipse User |
|
|
|
Originally posted by: peter_ossipov.mail.ru
Hi everybody!
Is there a way to add a listener somewhere, so that if an *.xml file is
changed from somewhere I could be notified of it. I mean, I have
searched regarding this and everybody talks about
IResourceChangeListener and some workspaces. But it just confuses me - I
do not have any workspaces - it is just a file somewhere in the file
system, not related to eclipse at all!
So, thanks so much in advance.
|
|
| | | | |
Re: file change events [message #460116 is a reply to message #460114] |
Thu, 14 December 2006 05:27   |
Eclipse User |
|
|
|
Originally posted by: peter_ossipov.mail.ru
Huh, I cannot figure out where DocumentProviderRegistry in 3.2
Documentations says org.eclipse.ui.texteditor.DocumentProviderRegistry,
but I have not got this plug-in...
Peter Osipov wrote:> Thanks, Vikram!
> Let me try it out!
> Vikram wrote:
>> You could create links to the XML Files outside of the eclipse workspace.
>> Then register a document provider for xml extensions in the plugin.xml.
>>
>> So, if you have an XML File object, the steps would be:
>>
>> IFile linkFile = ..// create a File link for the XML File
>> IEditorInput inp = new FileEditorInput(linkFile);
>> DocumentProviderRegistry dpr = DocumentProviderRegistry.getDefault();
>> IDocumentProvider dp = dpr.getDocumentProvider(inp);
>> dp.connect(inp);
>>
>> Your registered document provider will be invoked when changes are
>> made to the underlying
>> XML file.
>>
>> Hope this helps
>>
>>
>>
>> "Peter Osipov" <peter_ossipov@mail.ru> wrote in message
>> news:elpbcs$1ht$1@utils.eclipse.org...
>>> Hi everybody!
>>> Is there a way to add a listener somewhere, so that if an *.xml file
>>> is changed from somewhere I could be notified of it. I mean, I have
>>> searched regarding this and everybody talks about
>>> IResourceChangeListener and some workspaces. But it just confuses me
>>> - I do not have any workspaces - it is just a file somewhere in the
>>> file system, not related to eclipse at all!
>>> So, thanks so much in advance.
>>
>>
|
|
|
Re: file change events [message #460118 is a reply to message #460116] |
Thu, 14 December 2006 05:36   |
Eclipse User |
|
|
|
Peter Osipov wrote:
> Huh, I cannot figure out where DocumentProviderRegistry in 3.2
> Documentations says
> org.eclipse.ui.texteditor.DocumentProviderRegistry, but I have not got
> this plug-in...
It's in org.eclipse.ui.editors which is not officially part of RCP.
Dani
>
> Peter Osipov wrote:> Thanks, Vikram!
>
>> Let me try it out!
>> Vikram wrote:
>>
>>> You could create links to the XML Files outside of the eclipse
>>> workspace.
>>> Then register a document provider for xml extensions in the plugin.xml.
>>>
>>> So, if you have an XML File object, the steps would be:
>>>
>>> IFile linkFile = ..// create a File link for the XML File
>>> IEditorInput inp = new FileEditorInput(linkFile);
>>> DocumentProviderRegistry dpr = DocumentProviderRegistry.getDefault();
>>> IDocumentProvider dp = dpr.getDocumentProvider(inp);
>>> dp.connect(inp);
>>>
>>> Your registered document provider will be invoked when changes are
>>> made to the underlying
>>> XML file.
>>>
>>> Hope this helps
>>>
>>>
>>>
>>> "Peter Osipov" <peter_ossipov@mail.ru> wrote in message
>>> news:elpbcs$1ht$1@utils.eclipse.org...
>>>
>>>> Hi everybody!
>>>> Is there a way to add a listener somewhere, so that if an *.xml
>>>> file is changed from somewhere I could be notified of it. I mean, I
>>>> have searched regarding this and everybody talks about
>>>> IResourceChangeListener and some workspaces. But it just confuses
>>>> me - I do not have any workspaces - it is just a file somewhere in
>>>> the file system, not related to eclipse at all!
>>>> So, thanks so much in advance.
>>>
>>>
>>>
|
|
|
Re: file change events [message #460120 is a reply to message #460118] |
Thu, 14 December 2006 05:45   |
Eclipse User |
|
|
|
Originally posted by: peter_ossipov.mail.ru
Huh. thanks God, you told me!
Let me try it.
Daniel Megert wrote:
> Peter Osipov wrote:
>
>> Huh, I cannot figure out where DocumentProviderRegistry in 3.2
>> Documentations says
>> org.eclipse.ui.texteditor.DocumentProviderRegistry, but I have not got
>> this plug-in...
>
> It's in org.eclipse.ui.editors which is not officially part of RCP.
>
> Dani
>
>>
>> Peter Osipov wrote:> Thanks, Vikram!
>>
>>> Let me try it out!
>>> Vikram wrote:
>>>
>>>> You could create links to the XML Files outside of the eclipse
>>>> workspace.
>>>> Then register a document provider for xml extensions in the plugin.xml.
>>>>
>>>> So, if you have an XML File object, the steps would be:
>>>>
>>>> IFile linkFile = ..// create a File link for the XML File
>>>> IEditorInput inp = new FileEditorInput(linkFile);
>>>> DocumentProviderRegistry dpr = DocumentProviderRegistry.getDefault();
>>>> IDocumentProvider dp = dpr.getDocumentProvider(inp);
>>>> dp.connect(inp);
>>>>
>>>> Your registered document provider will be invoked when changes are
>>>> made to the underlying
>>>> XML file.
>>>>
>>>> Hope this helps
>>>>
>>>>
>>>>
>>>> "Peter Osipov" <peter_ossipov@mail.ru> wrote in message
>>>> news:elpbcs$1ht$1@utils.eclipse.org...
>>>>
>>>>> Hi everybody!
>>>>> Is there a way to add a listener somewhere, so that if an *.xml
>>>>> file is changed from somewhere I could be notified of it. I mean, I
>>>>> have searched regarding this and everybody talks about
>>>>> IResourceChangeListener and some workspaces. But it just confuses
>>>>> me - I do not have any workspaces - it is just a file somewhere in
>>>>> the file system, not related to eclipse at all!
>>>>> So, thanks so much in advance.
>>>>
>>>>
>>>>
|
|
|
Re: file change events [message #460121 is a reply to message #460120] |
Thu, 14 December 2006 05:47   |
Eclipse User |
|
|
|
Originally posted by: peter_ossipov.mail.ru
Dani, can you tell me where I can download that plug-in?
Peter Osipov wrote:
> Huh. thanks God, you told me!
> Let me try it.
> Daniel Megert wrote:
>> Peter Osipov wrote:
>>
>>> Huh, I cannot figure out where DocumentProviderRegistry in 3.2
>>> Documentations says
>>> org.eclipse.ui.texteditor.DocumentProviderRegistry, but I have not
>>> got this plug-in...
>>
>> It's in org.eclipse.ui.editors which is not officially part of RCP.
>>
>> Dani
>>
>>>
>>> Peter Osipov wrote:> Thanks, Vikram!
>>>
>>>> Let me try it out!
>>>> Vikram wrote:
>>>>
>>>>> You could create links to the XML Files outside of the eclipse
>>>>> workspace.
>>>>> Then register a document provider for xml extensions in the
>>>>> plugin.xml.
>>>>>
>>>>> So, if you have an XML File object, the steps would be:
>>>>>
>>>>> IFile linkFile = ..// create a File link for the XML File
>>>>> IEditorInput inp = new FileEditorInput(linkFile);
>>>>> DocumentProviderRegistry dpr = DocumentProviderRegistry.getDefault();
>>>>> IDocumentProvider dp = dpr.getDocumentProvider(inp);
>>>>> dp.connect(inp);
>>>>>
>>>>> Your registered document provider will be invoked when changes are
>>>>> made to the underlying
>>>>> XML file.
>>>>>
>>>>> Hope this helps
>>>>>
>>>>>
>>>>>
>>>>> "Peter Osipov" <peter_ossipov@mail.ru> wrote in message
>>>>> news:elpbcs$1ht$1@utils.eclipse.org...
>>>>>
>>>>>> Hi everybody!
>>>>>> Is there a way to add a listener somewhere, so that if an *.xml
>>>>>> file is changed from somewhere I could be notified of it. I mean,
>>>>>> I have searched regarding this and everybody talks about
>>>>>> IResourceChangeListener and some workspaces. But it just confuses
>>>>>> me - I do not have any workspaces - it is just a file somewhere in
>>>>>> the file system, not related to eclipse at all!
>>>>>> So, thanks so much in advance.
>>>>>
>>>>>
>>>>>
|
|
|
Re: file change events [message #460123 is a reply to message #460121] |
Thu, 14 December 2006 05:57  |
Eclipse User |
|
|
|
Peter Osipov wrote:
> Dani, can you tell me where I can download that plug-in?
Either download Eclipse Platform or Eclipse SDK.
Dani
> Peter Osipov wrote:
>
>> Huh. thanks God, you told me!
>> Let me try it.
>> Daniel Megert wrote:
>>
>>> Peter Osipov wrote:
>>>
>>>> Huh, I cannot figure out where DocumentProviderRegistry in 3.2
>>>> Documentations says
>>>> org.eclipse.ui.texteditor.DocumentProviderRegistry, but I have not
>>>> got this plug-in...
>>>
>>>
>>> It's in org.eclipse.ui.editors which is not officially part of RCP.
>>>
>>> Dani
>>>
>>>>
>>>> Peter Osipov wrote:> Thanks, Vikram!
>>>>
>>>>> Let me try it out!
>>>>> Vikram wrote:
>>>>>
>>>>>> You could create links to the XML Files outside of the eclipse
>>>>>> workspace.
>>>>>> Then register a document provider for xml extensions in the
>>>>>> plugin.xml.
>>>>>>
>>>>>> So, if you have an XML File object, the steps would be:
>>>>>>
>>>>>> IFile linkFile = ..// create a File link for the XML File
>>>>>> IEditorInput inp = new FileEditorInput(linkFile);
>>>>>> DocumentProviderRegistry dpr =
>>>>>> DocumentProviderRegistry.getDefault();
>>>>>> IDocumentProvider dp = dpr.getDocumentProvider(inp);
>>>>>> dp.connect(inp);
>>>>>>
>>>>>> Your registered document provider will be invoked when changes
>>>>>> are made to the underlying
>>>>>> XML file.
>>>>>>
>>>>>> Hope this helps
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Peter Osipov" <peter_ossipov@mail.ru> wrote in message
>>>>>> news:elpbcs$1ht$1@utils.eclipse.org...
>>>>>>
>>>>>>> Hi everybody!
>>>>>>> Is there a way to add a listener somewhere, so that if an *.xml
>>>>>>> file is changed from somewhere I could be notified of it. I
>>>>>>> mean, I have searched regarding this and everybody talks about
>>>>>>> IResourceChangeListener and some workspaces. But it just
>>>>>>> confuses me - I do not have any workspaces - it is just a file
>>>>>>> somewhere in the file system, not related to eclipse at all!
>>>>>>> So, thanks so much in advance.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
|
|
|
Goto Forum:
Current Time: Tue Apr 15 02:10:25 EDT 2025
Powered by FUDForum. Page generated in 0.02927 seconds
|