question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reference to JetBrains is added when overriding method

See original GitHub issue

Do this in VS:

  1. Create a class that extends DbContext
  2. Inside the class, type “override” and from the selection list that appears after you press space select “OnModelCreating” and let VS do its magic of adding the method and all the necessary usings.

Now look at the using statements. Notice that “using JetBrains.Annotations” was added. The overriden method looks like:

protected override void OnModelCreating([NotNullAttribute]ModelBuilder builder)
{
    base.OnModelCreating(builder);
}

There is a compilation error saying that NotNullAttribute is not accessible due to its protection level.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bricelamcommented, Apr 5, 2018

Duplicate of dotnet/roslyn#5646

0reactions
Eiloncommented, Apr 5, 2018

@BukeMan please file a bug at https://github.com/dotnet/roslyn/issues with detailed steps to reproduce, including the version numbers. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Override methods of a superclass - IntelliJ IDEA
On the Code menu, click Override methods Ctrl 0O . · Select the methods to override (hold the Shift or Ctrl key to...
Read more >
Reference to JetBrains is added when overriding method #462
Do this in VS: Create a class that extends DbContext Inside the class, type "override" and from the selection list that appears after...
Read more >
How to make autocomplete show methods suggestions for ...
Right click in your editor pane for class A , go to 'Generate...' -> 'Override Methods...'. You'll then be presented with a list...
Read more >
An Introduction to Refactoring with IntelliJ IDEA
As for parameters, it can rename them in the class hierarchy in case of overridden methods. Those options are available by hitting Shift...
Read more >
Android Studio Bumble Bee Essentials - Java Edition: ...
LifecycleRegistry; import org.jetbrains.annotations. ... instance initialized with a reference to itself, and a getLifecycle() method congured to return the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found