Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shiraji/new-instance-inspection
IntelliJ plugin Fragment newInstance Inspection
https://github.com/shiraji/new-instance-inspection
Last synced: 2 months ago
JSON representation
IntelliJ plugin Fragment newInstance Inspection
- Host: GitHub
- URL: https://github.com/shiraji/new-instance-inspection
- Owner: shiraji
- License: apache-2.0
- Created: 2015-08-18T13:47:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-18T00:18:19.000Z (over 8 years ago)
- Last Synced: 2024-05-01T22:51:29.258Z (8 months ago)
- Language: Java
- Homepage: https://plugins.jetbrains.com/plugin/7916
- Size: 222 KB
- Stars: 37
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Fragment newInstance Inspection
[![Join the chat at https://gitter.im/shiraji/new-instance-inspection](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shiraji/new-instance-inspection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Fragment%20newInstance%20Inspection-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2348)
This plugin add an inspection that check if Fragment implements following method. (if the class is MyFramgment)
```MyFramgment.java
public static MyFragment newInstance() {
MyFragment fragment = new MyFragment();
return fragment;
}
```![screenshot](website/images/new_instance_inspection_screenshot.gif)
## Settings
To change settings, go to `Preferences > Editor > Inspections > Android > Fragment should implement newInstance()`
### Method name
The method name `newInstance` is configurable.
## Installation
Use the IDE's plugin manager to install the latest version of the plugin.
or
[Download](https://github.com/shiraji/new-instance-inspection/blob/master/new-instance-inspection.jar?raw=true) jar file and then go to Preferences > Plugins > Install plugin from disk... > Select the jar file you downloaded
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Make sure you put gradle.jar to 'IntelliJ Plugin SDK'. `File > Project Structure... > SDKs > IntelliJ Plugin SDK > click + sign > Pick gradle.jar file from under IntelliJ IDEA's plugin directory`
4. Commit your changes: `git commit -am 'Add some feature'`
5. Push to the branch: `git push origin my-new-feature`
6. Submit a pull request## License
```
Copyright 2015 Yoshinori IsogaiLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```