help determining file property change [message #147562] |
Tue, 21 October 2003 22:45  |
Eclipse User |
|
|
|
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 #150008 is a reply to message #149979] |
Mon, 27 October 2003 20:15   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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!
>>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.02565 seconds