Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Modified / Changed file
Modified / Changed file [message #277050] Fri, 03 December 2004 09:21 Go to next message
Eclipse UserFriend
Hi

I have a requirement which is as follows:

1. Create a Java project "Hello World" using Eclipse standard wizards.
2. Add a file using Eclipse standard New-> File operation to this project
"Hello World".
3. Whenever I modify this file, the user should know that he has changed
this file.

What is the best mechanism to do this?



Warm Regards
Bala
Re: Modified / Changed file [message #277054 is a reply to message #277050] Fri, 03 December 2004 10:07 Go to previous messageGo to next message
Eclipse UserFriend
3. Whenever I modify this file, the user should know that he has changed
this file.

was not clear.

3.Whenever the user modifies this file, the user should know that he has
changed this file (using label decorator")


Balasubramaniyan K wrote:

> Hi

> I have a requirement which is as follows:

> 1. Create a Java project "Hello World" using Eclipse standard wizards.
> 2. Add a file using Eclipse standard New-> File operation to this project
> "Hello World".
> 3. Whenever I modify this file, the user should know that he has changed
> this file.

> What is the best mechanism to do this?



> Warm Regards
> Bala
Re: Modified / Changed file [message #277181 is a reply to message #277054] Mon, 06 December 2004 09:32 Go to previous message
Eclipse UserFriend
The first thing you will need is a label decorator. A description of how
to do this is in the Platform developers guide that shipw with Eclipse
(just search for "decorator") and I believe there is also an article on
the Eclipse site. Once you have a decorator (the lightweight decorator
is probably the best to use), you will need some mechanism to determine
if a file is dirty. The sequence of interactions would go something like
this.

1) You would listen to resource deltas from the resources plugin.

2) If a file you were interested in changed, you would signal that the
resource needed a label change.

3) The decorator manager would run in the background and ask your
decorator to decorate the resource.

4) Your decorator would determine what state to show (dirty or not).

For steps 2 and 4, you would need some mechanism to detemrine if a file
was dirty. For CVS, a file is dirty if the timestamp of the file differs
from the timestamp of the file recieved from the server. The Decorator
documentation will have more details about each step.

Michael

Balasubramaniyan K wrote:

>
> 3. Whenever I modify this file, the user should know that he has changed
> this file.
> was not clear.
>
> 3.Whenever the user modifies this file, the user should know that he
> has changed this file (using label decorator")
>
>
> Balasubramaniyan K wrote:
>
>> Hi
>
>
>> I have a requirement which is as follows:
>
>
>> 1. Create a Java project "Hello World" using Eclipse standard wizards.
>> 2. Add a file using Eclipse standard New-> File operation to this
>> project "Hello World".
>> 3. Whenever I modify this file, the user should know that he has
>> changed this file.
>
>
>> What is the best mechanism to do this?
>
>
>
>
>> Warm Regards
>> Bala
>
>
>
Previous Topic:clean timestamp not working or at least synchronize/outgoing pane is not being updated
Next Topic:eclipse developer plans for compatibilty with cvs 1.12.9
Goto Forum:
  


Current Time: Wed Jul 23 18:47:13 EDT 2025

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

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

Back to the top