Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 207544 - The "Parsing" step can't be cancelled
The "Parsing" step can't be cancelled
Status: RESOLVED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
7.1
All All
: P3 (vote)
: 7.3
Assigned To: Vladimir Voskresensky
issues@cnd
:
Depends on: 227759
Blocks: 197297
  Show dependency treegraph
 
Reported: 2012-01-19 23:16 UTC by jwatt
Modified: 2013-03-22 21:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jwatt 2012-01-19 23:16:40 UTC
I'm trying to get NetBeans working with the Mozilla source code.

Quite often the "Parsing" action appears in the status bar, and NetBeans becomes quite unresponsive. This is especially annoying when initially setting up a new NetBeans project. I choose the option not to build automatically after finishing making the project because I need to set some other configuration options first. Unfortunately that doesn't stop the parser from starting, even though it's not going to get good results until after I've done the first build. If it was possible to cancel the Parsing action then that would be a decent workaround for this problem, and it would also allow cancelling of the parser any other time it starts up when I don't want it churning the CPU/HDD.
Comment 1 Vladimir Voskresensky 2012-01-20 08:25:09 UTC
Hi, 

in project's context menu Code Assistance you can turn it OFF, then ON when you think it's ready.

The best way I know is:
- specify correct build and clean commands (which work for you from command line) and do clean&build 
=> magic behind the scene will figure out full set of compiled files and passed compiler options for each file given the best configured code assistance (which is almost impossible to make manually for Mozilla-like code bases)

mentioned build&clean command could be specified either in wizard "From Existing Sources" or in project properties in Build category

Btw, make sure you have NB enough memory (i.e. -J-Xmx2G) and use 32-bit jdk (--jdkhome /path/to/jdk32bits) to reduce almost twice peak memory
Comment 2 jwatt 2012-01-20 09:53:22 UTC
Hi Vladimir. I'm the same guy that filed bug 197297, so I was aware of these things since you helpfully told me about them there. :) I just think that the status bar's context menu should allow the Parsing step to be cancelled just like it normally allows other things to be cancelled. That would be quicker, more consistent, and simpler to explain on the wiki document that I'm writing about setting up NetBeans for Mozilla.

By the way, it's not clear to me whether the code assistance needs to be enabled for the Build step for the smart analyzer to collect information during the build, or if it matters if code assistance is left disabled during the build and only turned on afterwards to retrigger a Parsing step. Do you know?
Comment 3 Vladimir Voskresensky 2012-01-20 10:17:21 UTC
Hi jwatt,

Btw, as you know about Mozialla, may be you know why
make -f client.mk clean 
invocation does something strange even from command line - it starts to create new processes till computer goes out of resources.
Does "clean" work for you?
Comment 4 jwatt 2012-01-20 10:22:55 UTC
The reason I ask whether code assistance needs to be enabled for the Build step is because I turned it off in exactly the way you describe, and forgot to turn it back on again. So you can add to the list of reasons for fixing this bug that it would be less error prone to cancel the Parsing step from the status bar that to turn off code assistance and potentially forget to turn it back on again.
Comment 5 jwatt 2012-01-20 10:24:10 UTC
Regarding comment 3, I'm not sure offhand, but I'm certainly willing to help. Can you mail me offline to we can have a conversation without cluttering this bug?
Comment 6 Vladimir Voskresensky 2012-01-20 12:11:54 UTC
(In reply to comment #2)
> Hi Vladimir. I'm the same guy that filed bug 197297, so I was aware of these
> things since you helpfully told me about them there. :) I just think that the
> status bar's context menu should allow the Parsing step to be cancelled just
> like it normally allows other things to be cancelled. That would be quicker,
> more consistent, and simpler to explain on the wiki document that I'm writing
> about setting up NetBeans for Mozilla.
If you can share link to document, it would be great and I can review/comment if you'd like :-)
Comment 7 Vladimir Voskresensky 2012-01-20 12:15:43 UTC
(In reply to comment #4)
> The reason I ask whether code assistance needs to be enabled for the Build step
> is because I turned it off in exactly the way you describe, and forgot to turn
> it back on again. So you can add to the list of reasons for fixing this bug
> that it would be less error prone to cancel the Parsing step from the status
> bar that to turn off code assistance and potentially forget to turn it back on
> again.
I'm sorry, can you clarify, please. I don't understand how "cancel" from progress bar can help here.

I think system should do the following itself:
- during Build (when magic of extracting compiler flags is ON) suspend on parsing/reparsing activity
- when Build is finished and compile flags are adjusted in project => let parser make up-to-date check to see if options were changed and reparse affected files
Comment 8 jwatt 2012-01-20 15:45:01 UTC
(In reply to comment #7)
> I'm sorry, can you clarify, please. I don't understand how "cancel" from
> progress bar can help here.

If it was possible to cancel the "Parsing" activity from the status bar, then I wouldn't have needed to temporarily disable code assistance since I'd have just canceled the parsing. If I hadn't canceled code assistance, then I wouldn't have been in the position of forgetting to turn it back on. Therefore being able to cancel parsing from the status bar would be less error prone. :)
Comment 9 Vladimir Voskresensky 2012-01-20 16:07:14 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I'm sorry, can you clarify, please. I don't understand how "cancel" from
> > progress bar can help here.
> 
> If it was possible to cancel the "Parsing" activity from the status bar, then I
> wouldn't have needed to temporarily disable code assistance since I'd have just
> canceled the parsing. If I hadn't canceled code assistance, then I wouldn't
> have been in the position of forgetting to turn it back on. Therefore being
> able to cancel parsing from the status bar would be less error prone. :)
Ok. I can clean parser queue on scan cancel, but it not "disable", right?
Parser starts to work when some events have happened in system (i.e. new file created/remove/modified under source root) and it will trigger parser again, because it's not in "off" state.
Is it OK?
Comment 10 jwatt 2012-01-20 17:43:48 UTC
As long as the Parsing item in the status bar is changed to allow me to cancel it using its context menu, then I'm happy.
Comment 11 jbentonAdc 2012-08-22 22:59:37 UTC
This bug is targeted for 7.2 but still in the new state.  Is it going to be retargeted?
Comment 12 Vladimir Voskresensky 2012-08-23 05:46:08 UTC
jbentonAdc, what is your reason to stop parsing activity?
Comment 13 Vladimir Voskresensky 2012-08-23 05:48:33 UTC
http://hg.netbeans.org/cnd-main/rev/a4f1310f1079
disable code assistance for project on Cancel
Comment 14 Quality Engineering 2012-08-23 16:06:19 UTC
Integrated into 'main-golden', will be available in build *201208231248* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a4f1310f1079
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #207544 - The Parsing step can't be cancelled: disable Code Assistance when cancel parser
Comment 15 Vladimir Voskresensky 2013-03-22 21:41:56 UTC
by default it is not cancellable, start NB with -J-Dcnd.cancellable.parse=true
Comment 16 Vladimir Voskresensky 2013-03-22 21:43:45 UTC
http://hg.netbeans.org/cnd-main/rev/650cad17524f


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo