Board index » jbuilder » getProjectStatus(project, dir)

getProjectStatus(project, dir)


2005-07-04 06:06:50 PM
jbuilder23
Hi,
the methode getProjectStatus is never invoked!
Why?
I have thought that this methode is invoked so that different icons are
displayed depending the status of the files in the repository.
Thanks,
m
 
 

Re:getProjectStatus(project, dir)

VCS.getProjectStatus() is used for the Team | Create Patch feature.
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

the methode getProjectStatus is never invoked!
Why?

I have thought that this methode is invoked so that different icons are
displayed depending the status of the files in the repository.

Thanks,
m


 

Re:getProjectStatus(project, dir)

So is the only way to initialize and update the Tree Icons with
VCSStatusCache.updatemap() ?? or setMap?
And do I alway have to use the mathode setStatus/updateMap after e.g.
check-out?
Thanks
m.
"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
VCS.getProjectStatus() is used for the Team | Create Patch feature.


"Michael" < XXXX@XXXXX.COM >wrote in message
news:42c90a37$ XXXX@XXXXX.COM ...
>Hi,
>
>the methode getProjectStatus is never invoked!
>Why?
>
>I have thought that this methode is invoked so that different icons are
>displayed depending the status of the files in the repository.
>
>Thanks,
>m
>
>


 

{smallsort}

Re:getProjectStatus(project, dir)

No, you only implement VCS.guessFileStatus().
The status cache is updated automatically by a background thread and the
Commit Browser. Icons are updated based upon whether the file is open or
currently visible in the Project or Files pane.
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
So is the only way to initialize and update the Tree Icons with
VCSStatusCache.updatemap() ?? or setMap?

And do I alway have to use the mathode setStatus/updateMap after e.g.
check-out?

Thanks
m.

"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news:42c95c66$ XXXX@XXXXX.COM ...
>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>
>
>"Michael" < XXXX@XXXXX.COM >wrote in message
>news:42c90a37$ XXXX@XXXXX.COM ...
>>Hi,
>>
>>the methode getProjectStatus is never invoked!
>>Why?
>>
>>I have thought that this methode is invoked so that different icons are
>>displayed depending the status of the files in the repository.
>>
>>Thanks,
>>m
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

OK, but...
guessFileStatus is invoked fo each dir.
And I only can get all file information from the repo and this take a long
time.
So when I have 10 dir I cant get the informations 10times from the repo.
Any idea?
Thanks
m.
"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
No, you only implement VCS.guessFileStatus().

The status cache is updated automatically by a background thread and the
Commit Browser. Icons are updated based upon whether the file is open or
currently visible in the Project or Files pane.


"Michael" < XXXX@XXXXX.COM >wrote in message
news:42c96abc$ XXXX@XXXXX.COM ...
>So is the only way to initialize and update the Tree Icons with
>VCSStatusCache.updatemap() ?? or setMap?
>
>And do I alway have to use the mathode setStatus/updateMap after e.g.
>check-out?
>
>Thanks
>m.
>
>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>news:42c95c66$ XXXX@XXXXX.COM ...
>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>
>>
>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>Hi,
>>>
>>>the methode getProjectStatus is never invoked!
>>>Why?
>>>
>>>I have thought that this methode is invoked so that different icons are
>>>displayed depending the status of the files in the repository.
>>>
>>>Thanks,
>>>m
>>>
>>>
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

Decorating the open files and visible files in the Project and Files panes
is all done automatically if the VCS implementation supports the feature and
the user has enabled it. There shouldn't be a reason why you need to call
that VCS method directly.
If you are writing your pane to display file status, then use
DecorationManager.decorateIcon(Icon, Node) which uses the latest cached
information about the file to return the icon to display. You can also add
yourself as a DecorationListener so you are informed when the state changes
so you can repaint.
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
OK, but...

guessFileStatus is invoked fo each dir.
And I only can get all file information from the repo and this take a long
time.
So when I have 10 dir I cant get the informations 10times from the repo.

Any idea?

Thanks
m.





"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news: XXXX@XXXXX.COM ...
>No, you only implement VCS.guessFileStatus().
>
>The status cache is updated automatically by a background thread and the
>Commit Browser. Icons are updated based upon whether the file is open or
>currently visible in the Project or Files pane.
>
>
>"Michael" < XXXX@XXXXX.COM >wrote in message
>news:42c96abc$ XXXX@XXXXX.COM ...
>>So is the only way to initialize and update the Tree Icons with
>>VCSStatusCache.updatemap() ?? or setMap?
>>
>>And do I alway have to use the mathode setStatus/updateMap after e.g.
>>check-out?
>>
>>Thanks
>>m.
>>
>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>news:42c95c66$ XXXX@XXXXX.COM ...
>>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>>
>>>
>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>>Hi,
>>>>
>>>>the methode getProjectStatus is never invoked!
>>>>Why?
>>>>
>>>>I have thought that this methode is invoked so that different icons
>>>>are displayed depending the status of the files in the repository.
>>>>
>>>>Thanks,
>>>>m
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

1.At the first time, when there are no cached information, I need to connect
to the database and get all Information about the files.
When I implement the guessfilestatus methode I must connect e.g. 10 times to
the database (10 dirs), because the guessfile methode ist invoked for each
dir.
Do u agree about that?
2. After a check-out or a refactoring the state of a file has changed and so
I must set the new state of the file and it must be repainted with a new
icon from automatically. That means the file must get a new filestatus (e.g.
renamed_in_Repo)
so that it can be repainted automatically with the new icon!
I have thought, that I must do: vcsstatuscache.setStatus(URl, FileStatus).
Isnt that right?
Thanks.
m.
"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
Decorating the open files and visible files in the Project and Files panes
is all done automatically if the VCS implementation supports the feature
and the user has enabled it. There shouldn't be a reason why you need to
call that VCS method directly.

If you are writing your pane to display file status, then use
DecorationManager.decorateIcon(Icon, Node) which uses the latest cached
information about the file to return the icon to display. You can also
add yourself as a DecorationListener so you are informed when the state
changes so you can repaint.


"Michael" < XXXX@XXXXX.COM >wrote in message
news:42c98562$ XXXX@XXXXX.COM ...
>OK, but...
>
>guessFileStatus is invoked fo each dir.
>And I only can get all file information from the repo and this take a
>long time.
>So when I have 10 dir I cant get the informations 10times from the repo.
>
>Any idea?
>
>Thanks
>m.
>
>
>
>
>
>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>news: XXXX@XXXXX.COM ...
>>No, you only implement VCS.guessFileStatus().
>>
>>The status cache is updated automatically by a background thread and the
>>Commit Browser. Icons are updated based upon whether the file is open
>>or currently visible in the Project or Files pane.
>>
>>
>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>news:42c96abc$ XXXX@XXXXX.COM ...
>>>So is the only way to initialize and update the Tree Icons with
>>>VCSStatusCache.updatemap() ?? or setMap?
>>>
>>>And do I alway have to use the mathode setStatus/updateMap after e.g.
>>>check-out?
>>>
>>>Thanks
>>>m.
>>>
>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>news:42c95c66$ XXXX@XXXXX.COM ...
>>>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>>>
>>>>
>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>>>Hi,
>>>>>
>>>>>the methode getProjectStatus is never invoked!
>>>>>Why?
>>>>>
>>>>>I have thought that this methode is invoked so that different icons
>>>>>are displayed depending the status of the files in the repository.
>>>>>
>>>>>Thanks,
>>>>>m
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

All this should be automatic -- you should not have to explicitly create a
cache entry or update it. There is a background thread which works its way
through the project determining the status of files in each directory and
firing change events as they are noticed.
The Commit Browser also updates the cache since it has to determine both
local and repository file states in order to do its job.
If you want to call VCStatusCache.setStatus() yourself, then that should
work. Use VCSStatusCache.instance(Project) to get a reference.
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
1.At the first time, when there are no cached information, I need to
connect to the database and get all Information about the files.
When I implement the guessfilestatus methode I must connect e.g. 10 times
to the database (10 dirs), because the guessfile methode ist invoked for
each dir.
Do u agree about that?

2. After a check-out or a refactoring the state of a file has changed and
so I must set the new state of the file and it must be repainted with a
new icon from automatically. That means the file must get a new filestatus
(e.g. renamed_in_Repo)
so that it can be repainted automatically with the new icon!
I have thought, that I must do: vcsstatuscache.setStatus(URl, FileStatus).
Isnt that right?
Thanks.
m.


"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news: XXXX@XXXXX.COM ...
>Decorating the open files and visible files in the Project and Files
>panes is all done automatically if the VCS implementation supports the
>feature and the user has enabled it. There shouldn't be a reason why you
>need to call that VCS method directly.
>
>If you are writing your pane to display file status, then use
>DecorationManager.decorateIcon(Icon, Node) which uses the latest cached
>information about the file to return the icon to display. You can also
>add yourself as a DecorationListener so you are informed when the state
>changes so you can repaint.
>
>
>"Michael" < XXXX@XXXXX.COM >wrote in message
>news:42c98562$ XXXX@XXXXX.COM ...
>>OK, but...
>>
>>guessFileStatus is invoked fo each dir.
>>And I only can get all file information from the repo and this take a
>>long time.
>>So when I have 10 dir I cant get the informations 10times from the repo.
>>
>>Any idea?
>>
>>Thanks
>>m.
>>
>>
>>
>>
>>
>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>news: XXXX@XXXXX.COM ...
>>>No, you only implement VCS.guessFileStatus().
>>>
>>>The status cache is updated automatically by a background thread and
>>>the Commit Browser. Icons are updated based upon whether the file is
>>>open or currently visible in the Project or Files pane.
>>>
>>>
>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>news:42c96abc$ XXXX@XXXXX.COM ...
>>>>So is the only way to initialize and update the Tree Icons with
>>>>VCSStatusCache.updatemap() ?? or setMap?
>>>>
>>>>And do I alway have to use the mathode setStatus/updateMap after e.g.
>>>>check-out?
>>>>
>>>>Thanks
>>>>m.
>>>>
>>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>>news:42c95c66$ XXXX@XXXXX.COM ...
>>>>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>>>>
>>>>>
>>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>>>>Hi,
>>>>>>
>>>>>>the methode getProjectStatus is never invoked!
>>>>>>Why?
>>>>>>
>>>>>>I have thought that this methode is invoked so that different icons
>>>>>>are displayed depending the status of the files in the repository.
>>>>>>
>>>>>>Thanks,
>>>>>>m
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

Is there a posibility to refresh the whole filestatus manually.
(decorations)
One way is:
Vcscache.updateMap();
Better would be a methode for refreshing the complete project(decorations).
s.th. that is fired when guessfilestatus is invoked for all directories.
(time intervall in project properties!)
Thanks.
m.
is there a way to catch the refresh event from the toolbar?
"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
All this should be automatic -- you should not have to explicitly create a
cache entry or update it. There is a background thread which works its
way through the project determining the status of files in each directory
and firing change events as they are noticed.

The Commit Browser also updates the cache since it has to determine both
local and repository file states in order to do its job.

If you want to call VCStatusCache.setStatus() yourself, then that should
work. Use VCSStatusCache.instance(Project) to get a reference.



"Michael" < XXXX@XXXXX.COM >wrote in message
news:42c99618$ XXXX@XXXXX.COM ...
>1.At the first time, when there are no cached information, I need to
>connect to the database and get all Information about the files.
>When I implement the guessfilestatus methode I must connect e.g. 10 times
>to the database (10 dirs), because the guessfile methode ist invoked for
>each dir.
>Do u agree about that?
>
>2. After a check-out or a refactoring the state of a file has changed and
>so I must set the new state of the file and it must be repainted with a
>new icon from automatically. That means the file must get a new
>filestatus (e.g. renamed_in_Repo)
>so that it can be repainted automatically with the new icon!
>I have thought, that I must do: vcsstatuscache.setStatus(URl,
>FileStatus). Isnt that right?
>Thanks.
>m.
>
>
>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>news: XXXX@XXXXX.COM ...
>>Decorating the open files and visible files in the Project and Files
>>panes is all done automatically if the VCS implementation supports the
>>feature and the user has enabled it. There shouldn't be a reason why
>>you need to call that VCS method directly.
>>
>>If you are writing your pane to display file status, then use
>>DecorationManager.decorateIcon(Icon, Node) which uses the latest cached
>>information about the file to return the icon to display. You can also
>>add yourself as a DecorationListener so you are informed when the state
>>changes so you can repaint.
>>
>>
>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>news:42c98562$ XXXX@XXXXX.COM ...
>>>OK, but...
>>>
>>>guessFileStatus is invoked fo each dir.
>>>And I only can get all file information from the repo and this take a
>>>long time.
>>>So when I have 10 dir I cant get the informations 10times from the
>>>repo.
>>>
>>>Any idea?
>>>
>>>Thanks
>>>m.
>>>
>>>
>>>
>>>
>>>
>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>news: XXXX@XXXXX.COM ...
>>>>No, you only implement VCS.guessFileStatus().
>>>>
>>>>The status cache is updated automatically by a background thread and
>>>>the Commit Browser. Icons are updated based upon whether the file is
>>>>open or currently visible in the Project or Files pane.
>>>>
>>>>
>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>news:42c96abc$ XXXX@XXXXX.COM ...
>>>>>So is the only way to initialize and update the Tree Icons with
>>>>>VCSStatusCache.updatemap() ?? or setMap?
>>>>>
>>>>>And do I alway have to use the mathode setStatus/updateMap after e.g.
>>>>>check-out?
>>>>>
>>>>>Thanks
>>>>>m.
>>>>>
>>>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>>>news:42c95c66$ XXXX@XXXXX.COM ...
>>>>>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>>>>>
>>>>>>
>>>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>>>>>Hi,
>>>>>>>
>>>>>>>the methode getProjectStatus is never invoked!
>>>>>>>Why?
>>>>>>>
>>>>>>>I have thought that this methode is invoked so that different icons
>>>>>>>are displayed depending the status of the files in the repository.
>>>>>>>
>>>>>>>Thanks,
>>>>>>>m
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


 

Re:getProjectStatus(project, dir)

Yes, you could call VCSStatusCache.updateMap() and it will update the status
of those files and fire the needed event for each file where this is a
different status.
When Project | Refresh is selected, ProjectListener.nodeChildrenChanged() is
fired with the Project as the parent parameter.
"Michael" < XXXX@XXXXX.COM >wrote in message
Quote
Is there a posibility to refresh the whole filestatus manually.
(decorations)
One way is:
Vcscache.updateMap();
Better would be a methode for refreshing the complete
project(decorations).
s.th. that is fired when guessfilestatus is invoked for all directories.
(time intervall in project properties!)

Thanks.
m.

is there a way to catch the refresh event from the toolbar?








"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news:42c9a010$ XXXX@XXXXX.COM ...
>All this should be automatic -- you should not have to explicitly create
>a cache entry or update it. There is a background thread which works its
>way through the project determining the status of files in each directory
>and firing change events as they are noticed.
>
>The Commit Browser also updates the cache since it has to determine both
>local and repository file states in order to do its job.
>
>If you want to call VCStatusCache.setStatus() yourself, then that should
>work. Use VCSStatusCache.instance(Project) to get a reference.
>
>
>
>"Michael" < XXXX@XXXXX.COM >wrote in message
>news:42c99618$ XXXX@XXXXX.COM ...
>>1.At the first time, when there are no cached information, I need to
>>connect to the database and get all Information about the files.
>>When I implement the guessfilestatus methode I must connect e.g. 10
>>times to the database (10 dirs), because the guessfile methode ist
>>invoked for each dir.
>>Do u agree about that?
>>
>>2. After a check-out or a refactoring the state of a file has changed
>>and so I must set the new state of the file and it must be repainted
>>with a new icon from automatically. That means the file must get a new
>>filestatus (e.g. renamed_in_Repo)
>>so that it can be repainted automatically with the new icon!
>>I have thought, that I must do: vcsstatuscache.setStatus(URl,
>>FileStatus). Isnt that right?
>>Thanks.
>>m.
>>
>>
>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>news: XXXX@XXXXX.COM ...
>>>Decorating the open files and visible files in the Project and Files
>>>panes is all done automatically if the VCS implementation supports the
>>>feature and the user has enabled it. There shouldn't be a reason why
>>>you need to call that VCS method directly.
>>>
>>>If you are writing your pane to display file status, then use
>>>DecorationManager.decorateIcon(Icon, Node) which uses the latest cached
>>>information about the file to return the icon to display. You can also
>>>add yourself as a DecorationListener so you are informed when the state
>>>changes so you can repaint.
>>>
>>>
>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>news:42c98562$ XXXX@XXXXX.COM ...
>>>>OK, but...
>>>>
>>>>guessFileStatus is invoked fo each dir.
>>>>And I only can get all file information from the repo and this take a
>>>>long time.
>>>>So when I have 10 dir I cant get the informations 10times from the
>>>>repo.
>>>>
>>>>Any idea?
>>>>
>>>>Thanks
>>>>m.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>>news: XXXX@XXXXX.COM ...
>>>>>No, you only implement VCS.guessFileStatus().
>>>>>
>>>>>The status cache is updated automatically by a background thread and
>>>>>the Commit Browser. Icons are updated based upon whether the file is
>>>>>open or currently visible in the Project or Files pane.
>>>>>
>>>>>
>>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>>news:42c96abc$ XXXX@XXXXX.COM ...
>>>>>>So is the only way to initialize and update the Tree Icons with
>>>>>>VCSStatusCache.updatemap() ?? or setMap?
>>>>>>
>>>>>>And do I alway have to use the mathode setStatus/updateMap after
>>>>>>e.g. check-out?
>>>>>>
>>>>>>Thanks
>>>>>>m.
>>>>>>
>>>>>>"Bill Joy" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
>>>>>>news:42c95c66$ XXXX@XXXXX.COM ...
>>>>>>>VCS.getProjectStatus() is used for the Team | Create Patch feature.
>>>>>>>
>>>>>>>
>>>>>>>"Michael" < XXXX@XXXXX.COM >wrote in message
>>>>>>>news:42c90a37$ XXXX@XXXXX.COM ...
>>>>>>>>Hi,
>>>>>>>>
>>>>>>>>the methode getProjectStatus is never invoked!
>>>>>>>>Why?
>>>>>>>>
>>>>>>>>I have thought that this methode is invoked so that different
>>>>>>>>icons are displayed depending the status of the files in the
>>>>>>>>repository.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>m
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>