mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-29 09:47:50 +08:00
Merge branch 'update-gems'
This commit is contained in:
commit
c3aa49cb40
@ -5,6 +5,7 @@
|
||||
Thanks for contributing! Here are few useful things to know before submitting your Pull Request.
|
||||
|
||||
* Licensing - see [LICENSE.txt](LICENSE.txt)
|
||||
* [Contributing to the IntelliJ Platform](#contributing-to-the-intellij-platform)
|
||||
* [Setting up your environment](#setting-up-your-environment)
|
||||
* [Developing with Docker](#developing-with-docker)
|
||||
* [Developing locally](#developing-locally)
|
||||
@ -21,6 +22,10 @@ Thanks for contributing! Here are few useful things to know before submitting yo
|
||||
* Style guide
|
||||
* [A word on submodules](#a-word-on-submodules)
|
||||
|
||||
## Contributing to the IntelliJ Platform
|
||||
|
||||
This document describes our contribution guidelines for the IntelliJ SDK Docs. For information about contributing to the IntelliJ Platform, please visit [Contributing to the IntelliJ Platform](/basics/platform_contributions.md).
|
||||
|
||||
## Setting up your environment
|
||||
|
||||
This site runs via [Jekyll](http://jekyllrb.com), which is a popular static site generator, written in Ruby. It can be hosted locally to ensure that any changes are correct. Once set up, running the site is as easy as calling `rake preview`.
|
||||
|
@ -45,6 +45,8 @@
|
||||
* [Test Project and Testdata Directories](basics/testing_plugins/test_project_and_testdata_directories.md)
|
||||
* [Writing Tests](basics/testing_plugins/writing_tests.md)
|
||||
* [Testing Highlighting](basics/testing_plugins/testing_highlighting.md)
|
||||
* [Contributing to the IntelliJ Platform](basics/platform_contributions.md)
|
||||
* [IntelliJ Coding Guidelines](basics/intellij_coding_guidelines.md)
|
||||
* [Architecture Reference Guide](reference_guide.md)
|
||||
* [Project Model](reference_guide/project_model.md)
|
||||
* [Project](reference_guide/project_model/project.md)
|
||||
@ -146,7 +148,7 @@
|
||||
* [Tree Structure View](tutorials/tree_structure_view.md)
|
||||
* [Kotlin for Plugin Developers](tutorials/kotlin.md)
|
||||
* [Plugin Development FAQ](faq.md)
|
||||
* [Contribution Guidelines](CONTRIBUTING.md)
|
||||
* [Contribution Guidelines](CONTRIBUTING.md)
|
||||
|
||||
|
||||
|
||||
|
@ -22,10 +22,10 @@ You can check out the code either by using IntelliJ IDEA or from the command lin
|
||||
Please execute the following command:
|
||||
|
||||
```
|
||||
git clone git://git.jetbrains.org/idea/community.git idea
|
||||
git clone --depth 1 git://git.jetbrains.org/idea/community.git idea
|
||||
```
|
||||
|
||||
The [master](https://github.com/JetBrains/intellij-community/tree/master) branch currently contains the code for the development version of IntelliJ IDEA 15.x. Source code of older releases of IntelliJ IDEA can be found in the following branches:
|
||||
The [master](https://github.com/JetBrains/intellij-community/tree/master) branch currently contains the code for the most recent development version of IntelliJ IDEA. Source code of older releases of IntelliJ IDEA can be found in the following branches:
|
||||
|
||||
| IntelliJ Product version | Branch name/number |
|
||||
|--------------------------|-------------------------------------------------------------------|
|
||||
@ -41,7 +41,20 @@ The [master](https://github.com/JetBrains/intellij-community/tree/master) branch
|
||||
| 10.0.x | [x0x](https://github.com/JetBrains/intellij-community/tree/x0x) |
|
||||
| 9.x | [maia](https://github.com/JetBrains/intellij-community/tree/maia) |
|
||||
|
||||
You can also browse the source code through the Web interface.
|
||||
|
||||
The source code of stable releases of IntelliJ IDEA Community Edition is also available as a tarball:
|
||||
|
||||
- [IntelliJ IDEA Community Edition 15.0.1](http://download.jetbrains.com/idea/ideaIC-15.0.1-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 14.1.4](http://download.jetbrains.com/idea/ideaIC-14.1.4-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 13.1.6](http://download.jetbrains.com/idea/ideaIC-13.1.6-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 13.0.4](http://download.jetbrains.com/idea/ideaIC-13.0.4-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 12.1.6](http://download.jetbrains.com/idea/ideaIC-12.1.6-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 12.0.4](http://download.jetbrains.com/idea/ideaIC-12.0.4-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 11.1.4](http://download.jetbrains.com/idea/ideaIC-11.1.4-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 11.0.2](http://download.jetbrains.com/idea/ideaIC-11.0.2-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 10.5.4](http://download.jetbrains.com/idea/ideaIC-10.5.4-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 10.0.3](http://download.jetbrains.com/idea/ideaIC-10.0.3-src.tar.bz2)
|
||||
- [IntelliJ IDEA Community Edition 9.0.4](http://download.jetbrains.com/idea/ideaIC-9.0.4-src.tar.bz2)
|
||||
|
||||
## Forking on GitHub
|
||||
|
||||
|
52
basics/intellij_coding_guidelines.md
Normal file
52
basics/intellij_coding_guidelines.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
title: "IntelliJ Coding Guidelines"
|
||||
---
|
||||
|
||||
If you are writing code that you would like to contribute to the IntelliJ Platform (either as a patch or as a plugin), following these guidelines will make it easier for the JetBrains development team to review and accept your changes.
|
||||
|
||||
#### Following the Latest Source Code
|
||||
|
||||
If you submit patches, we strongly recommend building your patches against the latest version of the code from the Git repository. The easiest way to do so is to clone the JetBrains Git repository, track your work in Git, and create patches using the "git format-patch" command.
|
||||
|
||||
#### General Architectural Principles
|
||||
|
||||
Please do your best to follow common Java architectural principles. "Effective Java" by Joshua Bloch is a good place to start.
|
||||
|
||||
#### Tests
|
||||
|
||||
Most of the existing functionality of IntelliJ IDEA is covered by functional tests. If the area you're modifying is covered by tests, you must run the tests and make sure that your changes do not introduce any new test failures. It's also strongly recommended that you provide new functional tests that cover the bugs you fix or the new features that you add.
|
||||
|
||||
#### Code Formatting
|
||||
|
||||
We're generally pretty lax about code formatting, but at least the following conventions must be observed:
|
||||
|
||||
- 2 space indents in source files
|
||||
- **my** prefix for instance variables and **our** prefix for class variables
|
||||
- new source code files must include a copyright statement with the Apache 2 license and the name of the contributor.
|
||||
|
||||
The easiest way to follow our code formatting guidelines is to reformat your code submissions using the shared code style, which is included in the IntelliJ IDEA Community Edition project directory.
|
||||
|
||||
#### Inspections
|
||||
|
||||
The IntelliJ IDEA Community Edition project includes a shared inspection profile. We strongly recommend making sure that the code you submit does not contain any warnings highlighted by the inspections configured in that inspection profile.
|
||||
|
||||
#### JavaDoc Comments
|
||||
|
||||
If your code adds new OpenAPI interfaces, classes, methods or extension points, you must provide JavaDoc comments describing the parameters and intended usage of the APIs. Providing JavaDoc or other comments for other parts of the code is a good idea but isn't required.
|
||||
|
||||
#### Commits
|
||||
|
||||
To avoid unnecessary work when reviewing your changes, please follow these guidelines:
|
||||
|
||||
- Look through all of your changes in your patch or pull request before you submit it to us. Make sure that everything you've changed is there for a reason.
|
||||
- Please don't include unfinished work to the patch. Make sure that it doesn't include any TODO comments. If you added some code and ended up not needing it, please make sure that you delete it before you submit your patch.
|
||||
- Please don't include any changes that affect formatting, fixing "yellow code" (warnings) or code style along with actual changes that fix a bug or implement a feature. No one likes to leave poor code, but remember that having these changes mixed with each other complicates the process of review.
|
||||
- Please don't fix multiple problems within a single patch or pull request.
|
||||
- Please don't commit your personal changes to configuration files (runConfigurations/IDEA.xml, codeStyleSettings.xml, misc.xml, etc.) unless it is essential for the fix itself.
|
||||
- Please avoid moving or renaming classes unless it is necessary for the fix.
|
||||
|
||||
The ideal pull request would contain 1 commit with everything needed to fix the bug or implement a feature, but nothing else. "Commit early, commit often" perfectly applies only to local commits, but such "public commits" are hard to review (the reviewer needs either to go commit by commit spending more time to review work-in-progress, or to review all changes at once thus losing valuable information stored in commit messages).
|
||||
|
||||
The best would be to commit early, but then to squash all commits into one with a descriptive commit message.
|
||||
|
||||
Sometimes several commits for a single issue are also acceptable, but each of these need to be self-contained "steps" to solve the problem.
|
35
basics/platform_contributions.md
Normal file
35
basics/platform_contributions.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "Contributing to the IntelliJ Platform"
|
||||
---
|
||||
|
||||
#### Participate in the Community
|
||||
|
||||
- **Participate in newsgroups and forums**
|
||||
There are several community [forums and newsgroups](http://www.jetbrains.net/devnet/community/idea) you can join to discuss IntelliJ IDEA. The forums are an excellent source for users and contributors interested in having technical discussions, answering questions, or resolving potential issues for newcomers.
|
||||
- **Link to jetbrains.org**
|
||||
The success of any open source project depends on the number of people who use the product and contribute back to the project. By linking to jetbrains.org, you can increase the chances of a new user or contributor finding out about the project and joining the community. If you're as excited about IntelliJ IDEA Community Edition as we are, you can show it by linking to us. Project logos and other assets are [also available](https://www.jetbrains.com/company/press/).
|
||||
- **Promote IntelliJ Platform and IntelliJ IDEA Community Edition**
|
||||
Help promote the platform and IDE by using your blog, Twitter, Facebook, or submitting an article to your favorite local magazine. If you are a member of a different open source community, why not mention IntelliJ IDEA on their discussion forums or at conferences? If you love IntelliJ IDEA, don't hold back - speak up! The more developers use IntelliJ IDEA, the more bugs will be caught, the more plug-ins will be written, the more visible the project, and the more benefits the community will get!
|
||||
|
||||
#### Help Others Learn
|
||||
|
||||
- **Write documents**
|
||||
We're always looking for new articles about IntelliJ IDEA features as well as documentation for the IntelliJ Platform. You can write tutorials, how-tos, sample applications, or just share your experience with the IntelliJ Platform. You can publish your documentation on an website or blog, or submit a [pull request](/CONTRIBUTING.md) to the SDK Docs.
|
||||
- **Produce screencasts**
|
||||
Screencasts have recently become very popular as a way to show other developers how to use the tool effectively. You can record a screencast about a particular feature or use case you discovered and would like to share it with the community.
|
||||
|
||||
#### Contribute Code
|
||||
|
||||
- **File a bug report**
|
||||
Bug reports take little time to file and are very helpful to developers. This is one of the easiest contributions you can make. When you discover a problem with the IDE or the platform, please report it. Make sure you provide information about your environment (OS, JDK version), steps to reproduce the issue, as well as a written description of the problem. You can file a bug in our [YouTrack issue tracker](http://youtrack.jetbrains.net/issues/IDEA).
|
||||
Before submitting an issue, please search for already submitted ones describing the same problem - and if you find one, feel free to vote for it.
|
||||
- **Help us triage existing bug reports**
|
||||
Over the years, users have submitted thousands of issues to the IntelliJ issue tracker. Many of the unresolved issues are no longer applicable to the latest version of IntelliJ IDEA, are duplicates, or require additional information to be resolved. Leaving comments notifying about the status of such issues helps the team keep the issue tracker clean and useful for everyone.
|
||||
- **Write a plug-in**
|
||||
One of the best ways to contribute a larger piece of code, adding extra functionality to IntelliJ IDEA, is by writing a plug-in. You can submit a plug-in to the [IntelliJ IDEA plug-in repository](http://plugins.intellij.net/), making it available for all IntelliJ IDEA users. When writing a plug-in, you have control over the code and don't need to sign the contribution agreement. For more information about writing plug-ins, visit the [plug-in development documentation](http://www.jetbrains.org/display/IJOS/Writing+Plug-ins).
|
||||
- **Submit a patch**
|
||||
If you would like to improve the code in the IntelliJ Platform or the core functionality of IntelliJ IDEA, you can submit a patch in [IntelliJ's YouTrack bug database](http://youtrack.jetbrains.net/issues/IDEA) . You can either file a new issue with the patch attached, or attach a patch to an issue submitted by another user. When writing a patch, please make sure to follow the [IntelliJ Coding Guidelines](intellij_coding_guidelines.md).
|
||||
Alternatively, you can fork [the IntelliJ IDEA repository on GitHub](https://github.com/JetBrains/intellij-community), make the changes in your fork and send us a pull request.
|
||||
A developer will review your patch and, if it meets the [quality criteria](intellij_coding_guidelines.md) and fits well with the rest of the code, you'll be notified about the acceptance of the patch. You will also need to sign the [contribution agreement](http://www.jetbrains.org/display/IJOS/Contributor+Agreement) in order to complete your contribution. Just print it out, sign, scan and email to [contribute@jetbrains.com](mailto:contribute@jetbrains.com)
|
||||
- **Become a commiter and commit code directly**
|
||||
Developers with a long history of submitting high-quality patches can gain direct commit rights.
|
@ -8,7 +8,7 @@ This topic describes the [comparing_refereces_inspection](https://github.com/Je
|
||||
|
||||
The **IntelliJ Platform** provides tools designed for static code analysis (so called _code inspections_) that help you maintain and clean up your code without actually executing it. For more information, refer to [Code Inspection](http://www.jetbrains.com/idea/webhelp/code-inspection.html) in the **IntelliJ IDEA** Web Help. In **IntelliJ IDEA** you will find a set of built-in inspections that are grouped by their goals and sense.
|
||||
|
||||
You can create custom inspections through the **IntelliJ IDEA** interface (see [Creating Own Inspections](http://www.jetbrains.com/idea/webhelp/creating-own-inspections.html)). Alternatively, you can develop a plugin to implement a custom inspection.
|
||||
You can create custom inspections through the **IntelliJ IDEA** interface (see [Creating Custom Inspections](https://www.jetbrains.com/idea/help/creating-custom-inspections.html)). Alternatively, you can develop a plugin to implement a custom inspection.
|
||||
|
||||
## Techniques Used
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user