Skip to content

Documentation for semantic annotation extension to Scala IDE #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

afitz
Copy link

@afitz afitz commented Jun 13, 2014

Documentation for semantic annotation extension to Scala IDE (task #1001989, scala-ide/scala-ide#644)

Disclaimer required by the lawyers:

THE FOLLOWING DISCLAIMER APPLIES TO ALL SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE:
THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.
ONLY THE SOFTWARE CODE AND OTHER MATERIALS CONTRIBUTED IN CONNECTION WITH THIS SOFTWARE, IF ANY, THAT ARE ATTACHED TO (OR OTHERWISE ACCOMPANY) THIS SUBMISSION (AND ORDINARY COURSE CONTRIBUTIONS OF FUTURES PATCHES THERETO) ARE TO BE CONSIDERED A CONTRIBUTION. NO OTHER SOFTWARE CODE OR MATERIALS ARE A CONTRIBUTION

~~~~~~~

For example to highlight all method usages on Scala mutable collections one has to create
a plugin with a single classes inside that define your traversers and highlihter::
Copy link
Member

Choose a reason for hiding this comment

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

You mean 'containing a single class', 'that defines', 'highlighter'.

* ``MethodTraverserDef`` - searches for all method calls of given method
* ``AnnotationTrverserDef`` - searches for all usages of methods annotated with given annotation

(all above by 'method' understands ``val``s, ``var``s, ``def``s and/or ``lazy val``s)
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work the way you would expect. An '\ ' sequence is needed between the literal block and the s to get the effect you want:

``val``\ s, ``var``\ s, ``def``\ s and/or ``lazy val``\ s

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, didn't know that. This format is so strange..

@huitseeker
Copy link
Member

@Kwestor ping ! ✋

@Kwestor
Copy link
Member

Kwestor commented Jul 15, 2014

Thanks for ping, I pinged @afitz to update this (I don't meet legal requirements for updating PRs).

@Kwestor
Copy link
Member

Kwestor commented Jul 18, 2014

@huitseeker PR updated

@kiritsuku
Copy link
Member

I would like to see this one rebased on #104 once it is merged. I created the index dev/ide-extensions/ide-extensions.rst, where you should mention this extension. Furthermore, it would be nice if you would move this to dev/ide-extensions/editor then we don't need update links once we get more extensions.

Extending Scala IDE |new|
=========================

Custom semantic annotations
Copy link
Member

Choose a reason for hiding this comment

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

Once you rebased this on the other PR, you can make this the main heading.

Copy link
Member

Choose a reason for hiding this comment

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

Sure.

@kiritsuku
Copy link
Member

While working on another feature it turned out that I had to remove this extension point and replace it with a better one. The current one is built upon a deprecated API, the one I created is completely new and hooked entirely into the editor.

I'll update the docs of this PR accordingly once my relevant work is merged. But there is not much to do because beside from using another extension point, there is not much that changes.

@huitseeker
Copy link
Member

This seems to have been forgotten. Any news, @sschaef ?

@kiritsuku
Copy link
Member

Yes, this PR is obsolete. I have replaced the introduced extension point with another one in scala-ide/scala-ide#761. Most parts of the documentation is still valid, but the code has changed a little bit. I'll create a new doc PR once save actions are merged.

@huitseeker huitseeker mentioned this pull request Sep 16, 2014
34 tasks
@dragos dragos closed this Oct 7, 2014
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.

6 participants