-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
454 additions
and
144 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
*.zip | ||
*.jar | ||
out | ||
gitflow.iml | ||
*.iml |
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
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
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,70 @@ | ||
# Project setup help | ||
|
||
This is a quick overview how to setup the project for development. | ||
|
||
## 1. Make sure the plugin development plugin is enabled | ||
|
||
Start IDEA, go to *Settings -> Plugins* and make sure that `Plugin DevKit` is installed and enabled. | ||
If it's not, install it now. | ||
|
||
## 2. Clone the project from GitHub | ||
|
||
Typically you check out your fork of the project on GitHub here. | ||
|
||
## 3. Import the project into IDEA | ||
|
||
Select the *Import Project* option (e.g. by pressing shift twice and entering "import project") | ||
and navigate to the cloned repository directory when prompted. | ||
|
||
### Model | ||
|
||
Chose "From existing sources" when prompted for a model. | ||
|
||
### SDK Setup | ||
|
||
If you dont have a plugin SDK yet, click `+` to add an SDK and select *IntelliJ Platform Plugin SDK* | ||
|
||
1. Navigate to your IDEA installation and select the installation directory. | ||
2. Afterwards select a JDK when prompted | ||
|
||
Select your plugin SDK as the one to use. | ||
|
||
### Other | ||
|
||
The remaining options can be left at default | ||
|
||
## 4. Change the project type | ||
|
||
Open the projects iml file (it should be named `gitflow4idea.iml` by default) and replace its contents with this: | ||
|
||
```xml | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="PLUGIN_MODULE" version="4"> | ||
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/META-INF/plugin.xml" /> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> | ||
``` | ||
|
||
Then close and reopen the project to apply the changes. | ||
|
||
## 5. Add git4idea dependency | ||
|
||
1. Open the module settings and navigate to *Modules -> gitflow4idea (or your project name here)* and select the *Dependencies* tab. | ||
2. Click add -> "JARs or directories" and add `git4idea.jar`. | ||
This can be found in your IDEA installation directory under `plugins/git4idea/lib`. | ||
3. Change the scope of the added JAR to **provided**. | ||
|
||
## 6. Create a run configuration | ||
|
||
Go to Run/Debug configurations and create a new configuration of the type `Plugin`. Under "Use classpath of module" select the project (`gitflow4idea` by default). | ||
Click run. A new IDEA instance should start with the plugin running. | ||
|
||
And that's it. You can now make changes to the source and run them. | ||
|
||
|
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
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package gitflow; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import git4idea.commands.Git; | ||
import git4idea.commands.GitCommandResult; | ||
import git4idea.commands.GitLineHandlerListener; | ||
import git4idea.repo.GitRemote; | ||
import git4idea.repo.GitRepository; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* | ||
* | ||
* @author Opher Vishnia / opherv.com / [email protected] | ||
*/ | ||
public interface Gitflow extends Git { | ||
|
@@ -23,26 +22,27 @@ public GitCommandResult initRepo(@NotNull GitRepository repository, | |
|
||
GitCommandResult startFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@Nullable String baseBranch, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult finishFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult publishFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult pullFeature(@NotNull GitRepository repository, | ||
GitCommandResult publishFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@NotNull GitRemote remote, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult trackFeature(@NotNull GitRepository repository, | ||
GitCommandResult pullFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@NotNull GitRemote remote, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult trackFeature(@NotNull GitRepository repository, | ||
@NotNull String featureName, | ||
@NotNull GitRemote remote, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
//release | ||
|
||
GitCommandResult startRelease(@NotNull GitRepository repository, | ||
|
@@ -61,22 +61,22 @@ GitCommandResult publishRelease(@NotNull GitRepository repository, | |
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult trackRelease(@NotNull GitRepository repository, | ||
@NotNull String releaseName, | ||
@Nullable GitLineHandlerListener... listeners); | ||
@NotNull String releaseName, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
//hotfix | ||
|
||
GitCommandResult startHotfix(@NotNull GitRepository repository, | ||
@NotNull String hotfixName, | ||
@Nullable String baseBranch, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult finishHotfix(@NotNull GitRepository repository, | ||
@NotNull String hotfixName, | ||
@NotNull String tagMessage, | ||
@Nullable GitLineHandlerListener... listeners); | ||
@NotNull String hotfixName, | ||
@NotNull String tagMessage, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
GitCommandResult publishHotfix(@NotNull GitRepository repository, | ||
@NotNull String hotfixName, | ||
@Nullable GitLineHandlerListener... listeners); | ||
|
||
} |
Oops, something went wrong.