This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 253861 - Allow hint to trigger for guarded code
Summary: Allow hint to trigger for guarded code
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 253553
  Show dependency tree
 
Reported: 2015-07-27 13:28 UTC by Svata Dedic
Modified: 2015-08-05 01:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed changes (10.00 KB, patch)
2015-07-27 13:29 UTC, Svata Dedic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2015-07-27 13:28:42 UTC
Currently hint code using @TriggerTreeKind is not invoked for Trees inside guarded blocks: typically the hint would produce a warning the user could not remove as the guarded section cannot be changed.

Some hint(s) may however use the @TriggerTreeKind to collect information from the source tree - see issue #253553, so the hint implementor should be able to opt out off the automagic filter.

See the diff for implementation and use.
Comment 1 Svata Dedic 2015-07-27 13:29:10 UTC
Created attachment 154950 [details]
Proposed changes
Comment 2 Svata Dedic 2015-08-03 14:37:40 UTC
Last call, if no objections are sent, I'll apply the patch tomorrow.
Comment 3 Ralph Ruijs 2015-08-03 20:46:51 UTC
R1. Why mix the names guarded and locked?

Sorry for the late reply :-)
Comment 4 Svata Dedic 2015-08-04 06:45:07 UTC
Initially it seemed to me that a more general term would cover more kinds of "code which is usually not changed"; on the second thought, I don't think we'll ever have something different than guarded blocks to protect editor's contents. Constant and its value will change to PROCESS_GUARDED and "processGuarded". Thanks.
Comment 5 Svata Dedic 2015-08-04 07:30:53 UTC
Will be implemented as jet-main#ee478d3d4ad8
Comment 6 Svata Dedic 2015-08-04 07:31:21 UTC
Oops sorry, jet-main#2f4864be94d4
Comment 7 Quality Engineering 2015-08-05 01:20:38 UTC
Integrated into 'main-silver', will be available in build *201508050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2f4864be94d4
User: Svata Dedic <sdedic@netbeans.org>
Log: #253861: TriggerOptions allows hint to specify additional trigger constraints