vralfy / phpcsmd

Netbeans plugin to report code measurements generated by phpcs, phpmd, phpcpd and pdepend as Tasks and Annotations
27 stars 6 forks source link

this isn't working with files already open at netbeans start #1

Closed fonsecas72 closed 11 years ago

fonsecas72 commented 11 years ago

When I start netbeans generally I have files open and this files aren't being checked. Then I have to do "Check for violations".

vralfy commented 11 years ago

Have you checked the "check file on open"-option ?

Btw: grats you are the first issue reporter :) :dancers:

fonsecas72 commented 11 years ago

Yes, I had that option enabled. It works with you?

vralfy commented 11 years ago

Indeed it does ... which Netbeans version are you running?

STOP: I was able to reproduce this issue ... I'm going to fix this

fonsecas72 commented 11 years ago

I'm using 7.3 and ubuntu 12.04 I double check and it's not working. This is what I do: 1 - I have a file that has some errors. All is working as expected by saving the file, by open another file, etc. 2 - Then I close and open netbeans 3 - The previous opened file/s are opened again automaticaly 4 - No error is showed 5 - If I open another file, the errors from that file are showed as expected but If i come back to previous not working file, it still not works until I do "Check for violations".

vralfy commented 11 years ago

Update: it still scans on startup but it does not annotate the files. Perhaps the Callback is missing (which I need to add annotations to the file). If I find a way on how to get the Callback for a specific file, the problem should be fixed

vralfy commented 11 years ago

It seems that

cookie.getLineSet().getLines().size()

is 0 on startup (file: GenericAnnotationHelper)

vralfy commented 11 years ago

I see no other solution to fix the remaining problem. I will close this bug and open a second (just as reminder).