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
Peter Wu
committed
Aug 16, 2017
1 parent
da2f85f
commit a41d89f
Showing
22 changed files
with
344 additions
and
41 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
Empty file.
Empty file.
Empty file.
84 changes: 84 additions & 0 deletions
84
...va/cn/bestwu/intellij/plugins/gradle/codeInsight/completion/config/ConfigurationView.form
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,84 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="cn.bestwu.intellij.plugins.gradle.codeInsight.completion.config.ConfigurationView"> | ||
<grid id="27dc6" binding="dpPanel" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="0" left="0" bottom="0" right="0"/> | ||
<constraints> | ||
<xy x="20" y="20" width="805" height="463"/> | ||
</constraints> | ||
<properties/> | ||
<border type="none" title="Gradle Dependencies And Plugins Helper configuration"> | ||
<font style="1"/> | ||
</border> | ||
<children> | ||
<vspacer id="a3320"> | ||
<constraints> | ||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
</vspacer> | ||
<grid id="9e381" binding="nexusPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="0" left="0" bottom="0" right="0"/> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties/> | ||
<border type="none" title="Nexus Search"/> | ||
<children> | ||
<component id="49c07" class="javax.swing.JCheckBox" binding="useNexus"> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<text value="Us&e Nexus for search"/> | ||
</properties> | ||
</component> | ||
<component id="6f8e9" class="javax.swing.JLabel"> | ||
<constraints> | ||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<font style="1"/> | ||
<labelFor value="8a9de"/> | ||
<text value="nexus search url:"/> | ||
</properties> | ||
</component> | ||
<component id="8a9de" class="javax.swing.JTextField" binding="nexusSearchUrlField"> | ||
<constraints> | ||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> | ||
<preferred-size width="150" height="-1"/> | ||
</grid> | ||
</constraints> | ||
<properties> | ||
<text value="http://maven.aliyun.com/nexus/service/local/lucene/search"/> | ||
</properties> | ||
</component> | ||
</children> | ||
</grid> | ||
<grid id="ce259" binding="mavenIndexPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> | ||
<margin top="0" left="0" bottom="0" right="0"/> | ||
<constraints> | ||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties/> | ||
<border type="none" title="MavenIndex Search"/> | ||
<children> | ||
<component id="3672" class="javax.swing.JCheckBox" binding="useMavenIndex"> | ||
<constraints> | ||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<text value="Us&e MavenIndex for search"/> | ||
</properties> | ||
</component> | ||
</children> | ||
</grid> | ||
<component id="25b52" class="javax.swing.JButton" binding="resetButton"> | ||
<constraints> | ||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/> | ||
</constraints> | ||
<properties> | ||
<text value="&Reset to default values"/> | ||
</properties> | ||
</component> | ||
</children> | ||
</grid> | ||
</form> |
83 changes: 83 additions & 0 deletions
83
...va/cn/bestwu/intellij/plugins/gradle/codeInsight/completion/config/ConfigurationView.java
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,83 @@ | ||
package cn.bestwu.intellij.plugins.gradle.codeInsight.completion.config; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
import javax.swing.JButton; | ||
import javax.swing.JCheckBox; | ||
import javax.swing.JPanel; | ||
import javax.swing.JTextField; | ||
import org.jetbrains.idea.maven.model.MavenRemoteRepository; | ||
|
||
|
||
public class ConfigurationView { | ||
|
||
private JPanel nexusPanel; | ||
private JButton resetButton; | ||
private JCheckBox useNexus; | ||
private JTextField nexusSearchUrlField; | ||
private JPanel dpPanel; | ||
private JPanel mavenIndexPanel; | ||
private JCheckBox useMavenIndex; | ||
// private JButton addRemoteRepo; | ||
private Set<MavenRemoteRepository> remoteRepositories = new HashSet<>(); | ||
|
||
public ConfigurationView() { | ||
useNexus.addActionListener( | ||
actionEvent -> nexusSearchUrlField.setEnabled(useNexus.isSelected())); | ||
// useMavenIndex.addActionListener( | ||
// actionEvent -> addRemoteRepo.setEnabled(useMavenIndex.isSelected())); | ||
// addRemoteRepo.addActionListener(e -> { | ||
// final RemoteRepositoryEditor repositoryEditor = new RemoteRepositoryEditor( | ||
// "Add Maven Remote Repository", "", "", new EditValidator()); | ||
// if (repositoryEditor.showAndGet()) { | ||
// remoteRepositories.add(new MavenRemoteRepository(repositoryEditor.getName(), null, | ||
// repositoryEditor.getValue(), null, null, null)); | ||
// } | ||
// }); | ||
} | ||
|
||
public JPanel getDpPanel() { | ||
return dpPanel; | ||
} | ||
|
||
|
||
public String getNexusSearchUrlField() { | ||
return nexusSearchUrlField.getText(); | ||
} | ||
|
||
public void setNexusSearchUrlField(String nexusSearchUrlField) { | ||
this.nexusSearchUrlField.setText(nexusSearchUrlField); | ||
} | ||
|
||
public boolean getUseNexus() { | ||
return useNexus.isSelected(); | ||
} | ||
|
||
public void setUseNexus(boolean selected) { | ||
useNexus.setSelected(selected); | ||
nexusSearchUrlField.setEnabled(selected); | ||
} | ||
|
||
|
||
public Set<MavenRemoteRepository> getRemoteRepositories() { | ||
return remoteRepositories; | ||
} | ||
|
||
public void setRemoteRepositories( | ||
Set<MavenRemoteRepository> remoteRepositories) { | ||
this.remoteRepositories = remoteRepositories; | ||
} | ||
|
||
public boolean getUseMavenIndex() { | ||
return useMavenIndex.isSelected(); | ||
} | ||
|
||
public void setUseMavenIndex(boolean selected) { | ||
useMavenIndex.setSelected(selected); | ||
// addRemoteRepo.setEnabled(selected); | ||
} | ||
|
||
public JButton getResetButton() { | ||
return resetButton; | ||
} | ||
} |
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
Empty file modified
0
...intellij/plugins/gradle/codeInsight/completion/GradleDependenciesCompletionContributor.kt
100644 → 100755
Empty file.
Empty file modified
0
...ellij/plugins/gradle/codeInsight/completion/GradleKtsDependenciesCompletionContributor.kt
100644 → 100755
Empty file.
Empty file modified
0
...stwu/intellij/plugins/gradle/codeInsight/completion/GradlePluginsCompletionContributor.kt
100644 → 100755
Empty file.
Empty file modified
0
.../kotlin/cn/bestwu/intellij/plugins/gradle/codeInsight/completion/GradlePluginsSearcher.kt
100644 → 100755
Empty file.
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
Empty file modified
0
...estwu/intellij/plugins/gradle/codeInsight/completion/OpenJcenterOrMavenCentralProvider.kt
100644 → 100755
Empty file.
Empty file modified
0
src/main/kotlin/cn/bestwu/intellij/plugins/gradle/codeInsight/completion/Util.kt
100644 → 100755
Empty file.
Oops, something went wrong.