Skip to content

Handling of switch expressions and rule cases in Flow and NPECheck hint. - #35

Open
jlahoda wants to merge 5 commits into
masterfrom
flow-npecheck-switch-expr
Open

Handling of switch expressions and rule cases in Flow and NPECheck hint.#35
jlahoda wants to merge 5 commits into
masterfrom
flow-npecheck-switch-expr

Conversation

@jlahoda

@jlahoda jlahoda commented Aug 1, 2020

Copy link
Copy Markdown
Owner

No description provided.

Repository owner deleted a comment from jlahoda-jackpot Aug 1, 2020
import org.netbeans.api.java.source.CompilationInfo.CacheClearPolicy;
import org.netbeans.api.java.source.support.CancellableTreePathScanner;
import org.netbeans.api.java.source.support.CancellableTreeScanner;
import org.netbeans.modules.editor.java.TreeShims;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 105.

}

public Boolean scan(TreePath path, ConstructorData p) {
TreePath oldPath = currentPath;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 455.

if (TreeShims.SWITCH_EXPRESSION.equals(tree.getKind().name())) {
result = visitSwitchExpression(tree, p);
} else if (TreeShims.YIELD.equals(tree.getKind().name())) {
result = visitYield(tree, p);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 477.

Tree target = info.getTreeUtilities().getBreakContinueTargetTree(getCurrentPath());

resumeAfter(target, variable2State);
breakTo(target);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 1210.


Tree target = info.getTreeUtilities().getBreakContinueTargetTree(getCurrentPath());

breakTo(target);

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 1220.

private void breakTo(Tree target) {
resumeAfter(target, variable2State);

variable2State = new HashMap< Element, State>();

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 1228.


scan(ct, null);

if (TreeShims.isRuleCase(ct)) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 1259.

private void breakTo(Tree target) {
resumeAfter(target, variable2State);

variable2State = new HashMap< Element, State>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jackpot:
warning: Redundant type arguments in new expression (use diamond operator instead).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants