Order of AbstractVcs.start() and ProjectComponent.projectOpened()

Right now AV.start() is called before PC.projectOpened(). From my point of view it doesn't make sense. AV.start() and stop() will be called when switching VCS after a project has been opened. So to make it always consistent maybe it should be called right after projectOpened() so the constraints are clear. For me projectOpened would do all the once per project initialization and then start() would activate all VCS processes (listening to VFS changes...)
Right now it is very confusing and requires special handling
If you agree I will submit a request

Jacques

5 comments
Comment actions Permalink

There may be a good reason for doing it that way.
I guess they'll say so when the request is filed.
In any case, that is a major change that they better
advertise loudly if it is done.

Jacques Morel wrote:

Right now AV.start() is called before PC.projectOpened(). From my point of view it doesn't make sense. AV.start() and stop() will be called when switching VCS after a project has been opened. So to make it always consistent maybe it should be called right after projectOpened() so the constraints are clear. For me projectOpened would do all the once per project initialization and then start() would activate all VCS processes (listening to VFS changes...)
Right now it is very confusing and requires special handling
If you agree I will submit a request

Jacques


--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Comment actions Permalink

I agree on all counts Erb. I was merely giving them feedback and that is why I did not submit it as a request right away. I want too to understand the reason behind it. However if there is valid reason to do it, it would be better to clean it up now than later. I guess you did not say if you agreed with me. I am in the middle of refactoring my initialization code and it allowed me to think a little bit about something I assumed for so long and I find the current component/vcs initialization architecture confusing. Better method names, cleaner callback constraints would help tremendously in that respect. But like you said I barely know the system so there must be good reason to do it this way.
And yes it should be documented as should have been all the other changes that completely broke the old API ;)

Jacques

0
Comment actions Permalink

Not sure how I feel about the order of the calls. Hasn't caused serious dependency issues for me.
What I would like more would be a way to do a one-time init of the VCS after all API components
(managers, etc.) have been created (that is, I guess right before the default project is opened.)

Jacques Morel wrote:

I agree on all counts Erb. I was merely giving them feedback and that is why I did not submit it as a request right away. I want too to understand the reason behind it. However if there is valid reason to do it, it would be better to clean it up now than later. I guess you did not say if you agreed with me. I am in the middle of refactoring my initialization code and it allowed me to think a little bit about something I assumed for so long and I find the current component/vcs initialization architecture confusing. Better method names, cleaner callback constraints would help tremendously in that respect. But like you said I barely know the system so there must be good reason to do it this way.
And yes it should be documented as should have been all the other changes that completely broke the old API ;)

Jacques


--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Comment actions Permalink

So THAT's what that's for :)

Jacques Morel wrote:

You might want to vote for this http://www.intellij.net/tracker/idea/viewSCR?publicId=14726
or use StartupManager.registerPostStartupActivity (See http://www.intellij.net/forums/thread.jsp?forum=18&thread=39823#554066 )

Jacques


--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

Please sign in to leave a comment.