Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » help determining file property change
help determining file property change [message #147562] Tue, 21 October 2003 22:45 Go to next message
Eclipse UserFriend
Originally posted by: jgangemi.yahoo.com

hello -

i'm trying to create a plugin that will display a lock image icon if
the file is in read-only mode. i've got that working ok, however i'm a
bit stuck trying to figure out how to monitor when the Read Only
attribute is changed so i can fire a label change event.

can anyone point me in the right direction?

thx!!!

-jae
Re: help determining file property change [message #147860 is a reply to message #147562] Wed, 22 October 2003 15:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jgangemi.yahoo.com

now that i'm feeling a bit smarter today, i'll rephrase my question.

i am interested in listening for any events that may occur when the Apply or
OK button is pressed from a resource properties window.

ie: if i right click on a file and choose properties, it shows me basic info
about the file, and gives me the option to chec/uncheck the Read-Only
and Derived attributes.

can someone point me in the direction of where i need to look for information
on how to listen for when the "OK" button is pressed in that specific window?

thx!



On Tue, 21 Oct 2003 22:45:50 -0400, jae <jgangemi@yahoo.com> wrote:

>hello -
>
> i'm trying to create a plugin that will display a lock image icon if
>the file is in read-only mode. i've got that working ok, however i'm a
>bit stuck trying to figure out how to monitor when the Read Only
>attribute is changed so i can fire a label change event.
>
> can anyone point me in the right direction?
>
> thx!!!
>
>-jae
Re: help determining file property change [message #149979 is a reply to message #147860] Mon, 27 October 2003 17:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

There is no mechanism that supports this. There isn't realy a unified
notion of "property". Each property page provider may be using a
different mechanism for storing the values you see in the property
dialog. Some of these mechanisms may support notification, but others
do not. The read-only and derived attributes, for example, are stored
in workspace metadata and there is no notification when they change.
-

jae wrote:
> ie: if i right click on a file and choose properties, it shows me basic info
> about the file, and gives me the option to chec/uncheck the Read-Only
> and Derived attributes.
>
> can someone point me in the direction of where i need to look for information
> on how to listen for when the "OK" button is pressed in that specific window?
>
> thx!
Re: help determining file property change [message #150008 is a reply to message #149979] Mon, 27 October 2003 20:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jgangemi.yahoo.com

thx for the response!

would there be any way to tell that those attributes changed at all?

i wrote a plug-in that will display a lock image over top of a file if it is
read-only (i got tired of typing and not seeing any text :) and even added
a context menu option to toggle the read-only status.

the above works well for all instances, except when someone changes the
read-only attribute thru the properties dialog.

so when i get down to it, i guess i want to know if it's possible to fire off
a call to my plugin's decorator to cause a refresh (short of trying to find
that chunk of eclipse code and "hacking" it).

thx again!

-jae

On Mon, 27 Oct 2003 17:29:13 -0500, John Arthorne <John_Arthorne@oti.com_>
wrote:

>There is no mechanism that supports this. There isn't realy a unified
>notion of "property". Each property page provider may be using a
>different mechanism for storing the values you see in the property
>dialog. Some of these mechanisms may support notification, but others
>do not. The read-only and derived attributes, for example, are stored
>in workspace metadata and there is no notification when they change.
>-
>
>jae wrote:
>> ie: if i right click on a file and choose properties, it shows me basic info
>> about the file, and gives me the option to chec/uncheck the Read-Only
>> and Derived attributes.
>>
>> can someone point me in the direction of where i need to look for information
>> on how to listen for when the "OK" button is pressed in that specific window?
>>
>> thx!
Re: help determining file property change [message #150380 is a reply to message #150008] Tue, 28 October 2003 15:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Sorry, it's not possible. The read only state of each file is not
stored in memory, and there is no filesystem notification when that
attribute changes. The platform core doesn't even know when this state
changes.
-

jae wrote:
> thx for the response!
>
> would there be any way to tell that those attributes changed at all?
>
> i wrote a plug-in that will display a lock image over top of a file if it is
> read-only (i got tired of typing and not seeing any text :) and even added
> a context menu option to toggle the read-only status.
>
> the above works well for all instances, except when someone changes the
> read-only attribute thru the properties dialog.
>
> so when i get down to it, i guess i want to know if it's possible to fire off
> a call to my plugin's decorator to cause a refresh (short of trying to find
> that chunk of eclipse code and "hacking" it).
>
> thx again!
>
> -jae
>
> On Mon, 27 Oct 2003 17:29:13 -0500, John Arthorne <John_Arthorne@oti.com_>
> wrote:
>
>
>>There is no mechanism that supports this. There isn't realy a unified
>>notion of "property". Each property page provider may be using a
>>different mechanism for storing the values you see in the property
>>dialog. Some of these mechanisms may support notification, but others
>>do not. The read-only and derived attributes, for example, are stored
>>in workspace metadata and there is no notification when they change.
>>-
>>
>>jae wrote:
>>
>>> ie: if i right click on a file and choose properties, it shows me basic info
>>>about the file, and gives me the option to chec/uncheck the Read-Only
>>>and Derived attributes.
>>>
>>> can someone point me in the direction of where i need to look for information
>>>on how to listen for when the "OK" button is pressed in that specific window?
>>>
>>> thx!
>>
>
Re: help determining file property change [message #150396 is a reply to message #150380] Tue, 28 October 2003 16:09 Go to previous message
Eclipse UserFriend
Originally posted by: jgangemi.yahoo.com

d'oh. just my luck :)

thx again for helping me out w/ this question!

-jae

On Tue, 28 Oct 2003 15:31:33 -0500, John Arthorne <John_Arthorne@oti.com_>
wrote:

>Sorry, it's not possible. The read only state of each file is not
>stored in memory, and there is no filesystem notification when that
>attribute changes. The platform core doesn't even know when this state
>changes.
>-
>
>jae wrote:
>> thx for the response!
>>
>> would there be any way to tell that those attributes changed at all?
>>
>> i wrote a plug-in that will display a lock image over top of a file if it is
>> read-only (i got tired of typing and not seeing any text :) and even added
>> a context menu option to toggle the read-only status.
>>
>> the above works well for all instances, except when someone changes the
>> read-only attribute thru the properties dialog.
>>
>> so when i get down to it, i guess i want to know if it's possible to fire off
>> a call to my plugin's decorator to cause a refresh (short of trying to find
>> that chunk of eclipse code and "hacking" it).
>>
>> thx again!
>>
>> -jae
>>
>> On Mon, 27 Oct 2003 17:29:13 -0500, John Arthorne <John_Arthorne@oti.com_>
>> wrote:
>>
>>
>>>There is no mechanism that supports this. There isn't realy a unified
>>>notion of "property". Each property page provider may be using a
>>>different mechanism for storing the values you see in the property
>>>dialog. Some of these mechanisms may support notification, but others
>>>do not. The read-only and derived attributes, for example, are stored
>>>in workspace metadata and there is no notification when they change.
>>>-
>>>
>>>jae wrote:
>>>
>>>> ie: if i right click on a file and choose properties, it shows me basic info
>>>>about the file, and gives me the option to chec/uncheck the Read-Only
>>>>and Derived attributes.
>>>>
>>>> can someone point me in the direction of where i need to look for information
>>>>on how to listen for when the "OK" button is pressed in that specific window?
>>>>
>>>> thx!
>>>
>>
Previous Topic:Possible bug in visibility element of the object contribution markup
Next Topic:Switching to 1.4 VM error
Goto Forum:
  


Current Time: Sat Apr 26 01:30:29 EDT 2025

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

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

Back to the top