-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from scala-ide/issue/show-only-accessible-memb…
…ers-1000784 Only show accessible members in the completion lists.
- Loading branch information
Showing
3 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...la-ide.sdt.core.tests/test-workspace/completion/src/accessibility/AccessibilityTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package accessibility { | ||
|
||
class Foo { | ||
private def secretPrivate(): Unit | ||
private[this] def secretPrivateThis(): Unit | ||
|
||
protected def secretProtected(): Unit | ||
|
||
protected[accessibility] def secretProtectedInPackage(): Unit | ||
|
||
def secretPublic(): Unit | ||
|
||
def someTests(other: Foo) { | ||
other.secr /*!*/ // should be all but scretThis | ||
|
||
this.secr /*!*/ // should hit five completions | ||
} | ||
} | ||
|
||
class AccessibilityChecks extends Foo { | ||
def someTests { | ||
this.secr /*!*/ // should not list secretPrivate* | ||
} | ||
} | ||
|
||
class UnrelatedClass { | ||
def someTests(foo: Foo) { | ||
foo.secr /*!*/ // should list public and protected[accessiblity] | ||
} | ||
} | ||
|
||
} | ||
|
||
package other { | ||
class SomeChecsk { | ||
def foo(o: accessibility.Foo) { | ||
o.secr /*!*/ // should only match secretPublic | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters