Github: unify classname prefix

This commit is contained in:
Aleksey Pivovarov
2013-07-26 16:43:54 +04:00
parent fd743b1582
commit b6bb3a1671
12 changed files with 37 additions and 37 deletions
@@ -2,6 +2,6 @@
<extensions defaultExtensionNs="com.intellij">
<checkoutCompletedListener implementation="org.jetbrains.plugins.github.GithubCheckoutListener"
order="after PlatformProjectCheckoutListener"/>
<tasks.repositoryType implementation="org.jetbrains.plugins.github.tasks.GitHubRepositoryType"/>
<tasks.repositoryType implementation="org.jetbrains.plugins.github.tasks.GithubRepositoryType"/>
</extensions>
</idea-plugin>
+1 -1
View File
@@ -15,7 +15,7 @@
serviceImplementation="org.jetbrains.plugins.github.GithubSettings"/>
<vcsAnnotationGutterActionProvider implementation="org.jetbrains.plugins.github.GithubAnnotationGutterActionProvider" />
<checkoutCompletedListener implementation="org.jetbrains.plugins.github.GithubCheckoutListener" order="after PlatformProjectCheckoutListener"/>
<vcsConfigurableProvider implementation="org.jetbrains.plugins.github.ui.GitHubSettingsConfigurable"/>
<vcsConfigurableProvider implementation="org.jetbrains.plugins.github.ui.GithubSettingsConfigurable"/>
<applicationService serviceInterface="org.jetbrains.plugins.github.GithubSslSupport"
serviceImplementation="org.jetbrains.plugins.github.GithubSslSupport"/>
@@ -9,8 +9,8 @@ import com.intellij.tasks.impl.TaskManagerImpl;
import git4idea.repo.GitRepository;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.github.api.GithubFullPath;
import org.jetbrains.plugins.github.tasks.GitHubRepository;
import org.jetbrains.plugins.github.tasks.GitHubRepositoryType;
import org.jetbrains.plugins.github.tasks.GithubRepository;
import org.jetbrains.plugins.github.tasks.GithubRepositoryType;
import java.io.File;
import java.util.ArrayList;
@@ -76,12 +76,12 @@ public class GithubCheckoutListener implements CheckoutListener {
final TaskManagerImpl manager = (TaskManagerImpl)TaskManager.getManager(project);
final TaskRepository[] allRepositories = manager.getAllRepositories();
for (TaskRepository repository : allRepositories) {
if (repository instanceof GitHubRepository) {
if (repository instanceof GithubRepository) {
return;
}
}
// Create new one if not found exists
final GitHubRepository repository = new GitHubRepository(new GitHubRepositoryType());
final GithubRepository repository = new GithubRepository(new GithubRepositoryType());
repository.setToken("");
repository.setRepoAuthor(author);
repository.setRepoName(name);
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.github.api.GithubApiUtil;
import org.jetbrains.plugins.github.api.GithubGist;
import org.jetbrains.plugins.github.ui.GitHubCreateGistDialog;
import org.jetbrains.plugins.github.ui.GithubCreateGistDialog;
import java.io.IOException;
import java.util.*;
@@ -100,7 +100,7 @@ public class GithubCreateGistAction extends DumbAwareAction {
@Nullable final VirtualFile[] files) {
// Ask for description and other params
final GitHubCreateGistDialog dialog = new GitHubCreateGistDialog(project, editor, file);
final GithubCreateGistDialog dialog = new GithubCreateGistDialog(project, editor, file);
dialog.show();
if (!dialog.isOK()) {
return;
@@ -26,11 +26,11 @@ import java.util.Date;
/**
* @author Dennis.Ushakov
*/
public class GitHubComment extends SimpleComment {
public class GithubComment extends SimpleComment {
@Nullable private final String myGravatarId;
@NotNull private final String myUserHtmlUrl;
public GitHubComment(@Nullable Date date,
public GithubComment(@Nullable Date date,
@Nullable String author,
@NotNull String text,
@Nullable String gravatarId,
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
* @author Dennis.Ushakov
*/
@Tag("GitHub")
public class GitHubRepository extends BaseRepositoryImpl {
public class GithubRepository extends BaseRepositoryImpl {
private static final Logger LOG = GithubUtil.LOG;
private Pattern myPattern = Pattern.compile("($^)");
@@ -46,16 +46,16 @@ public class GitHubRepository extends BaseRepositoryImpl {
}
@SuppressWarnings({"UnusedDeclaration"})
public GitHubRepository() {}
public GithubRepository() {}
public GitHubRepository(GitHubRepository other) {
public GithubRepository(GithubRepository other) {
super(other);
setRepoName(other.myRepoName);
setRepoAuthor(other.myRepoAuthor);
setToken(other.myToken);
}
public GitHubRepository(GitHubRepositoryType type) {
public GithubRepository(GithubRepositoryType type) {
super(type);
}
@@ -167,7 +167,7 @@ public class GitHubRepository extends BaseRepositoryImpl {
@Override
public TaskRepository getRepository() {
return GitHubRepository.this;
return GithubRepository.this;
}
@Override
@@ -183,7 +183,7 @@ public class GitHubRepository extends BaseRepositoryImpl {
return ContainerUtil.map2Array(result, Comment.class, new Function<GithubIssueComment, Comment>() {
@Override
public Comment fun(GithubIssueComment comment) {
return new GitHubComment(comment.getCreatedAt(), comment.getUser().getLogin(), comment.getBody(), comment.getUser().getGravatarId(),
return new GithubComment(comment.getCreatedAt(), comment.getUser().getLogin(), comment.getBody(), comment.getUser().getGravatarId(),
comment.getUser().getHtmlUrl());
}
});
@@ -203,7 +203,7 @@ public class GitHubRepository extends BaseRepositoryImpl {
@Override
public BaseRepository clone() {
return new GitHubRepository(this);
return new GithubRepository(this);
}
public String getRepoName() {
@@ -253,9 +253,9 @@ public class GitHubRepository extends BaseRepositoryImpl {
@Override
public boolean equals(Object o) {
if (!super.equals(o)) return false;
if (!(o instanceof GitHubRepository)) return false;
if (!(o instanceof GithubRepository)) return false;
GitHubRepository that = (GitHubRepository)o;
GithubRepository that = (GithubRepository)o;
if (!Comparing.equal(getRepoAuthor(), that.getRepoAuthor())) return false;
if (!Comparing.equal(getRepoName(), that.getRepoName())) return false;
if (!Comparing.equal(getToken(), that.getToken())) return false;
@@ -27,7 +27,7 @@ import java.util.Collections;
/**
* @author Dennis.Ushakov
*/
public class GitHubRepositoryEditor extends BaseRepositoryEditor<GitHubRepository> {
public class GithubRepositoryEditor extends BaseRepositoryEditor<GithubRepository> {
private JTextField myToken;
private JTextField myRepoName;
private JTextField myRepoAuthor;
@@ -36,7 +36,7 @@ public class GitHubRepositoryEditor extends BaseRepositoryEditor<GitHubRepositor
private JBLabel myRepoLabel;
private JCheckBox myPrivateRepo;
public GitHubRepositoryEditor(final Project project, final GitHubRepository repository, Consumer<GitHubRepository> changeListener) {
public GithubRepositoryEditor(final Project project, final GithubRepository repository, Consumer<GithubRepository> changeListener) {
super(project, repository, changeListener);
myUserNameText.setVisible(false);
myUsernameLabel.setVisible(false);
@@ -13,7 +13,7 @@ import javax.swing.*;
/**
* @author Dennis.Ushakov
*/
public class GitHubRepositoryType extends BaseRepositoryType<GitHubRepository> {
public class GithubRepositoryType extends BaseRepositoryType<GithubRepository> {
@NotNull
@Override
@@ -30,19 +30,19 @@ public class GitHubRepositoryType extends BaseRepositoryType<GitHubRepository> {
@NotNull
@Override
public TaskRepository createRepository() {
return new GitHubRepository(this);
return new GithubRepository(this);
}
@Override
public Class<GitHubRepository> getRepositoryClass() {
return GitHubRepository.class;
public Class<GithubRepository> getRepositoryClass() {
return GithubRepository.class;
}
@NotNull
@Override
public TaskRepositoryEditor createEditor(GitHubRepository repository,
public TaskRepositoryEditor createEditor(GithubRepository repository,
Project project,
Consumer<GitHubRepository> changeListener) {
return new GitHubRepositoryEditor(project, repository, changeListener);
Consumer<GithubRepository> changeListener) {
return new GithubRepositoryEditor(project, repository, changeListener);
}
}
@@ -29,12 +29,12 @@ import javax.swing.*;
* @author oleg
* @date 9/27/11
*/
public class GitHubCreateGistDialog extends DialogWrapper {
private final GitHubCreateGistPanel myGithubCreateGistPanel;
public class GithubCreateGistDialog extends DialogWrapper {
private final GithubCreateGistPanel myGithubCreateGistPanel;
public GitHubCreateGistDialog(@NotNull final Project project, @Nullable Editor editor, @Nullable VirtualFile file) {
public GithubCreateGistDialog(@NotNull final Project project, @Nullable Editor editor, @Nullable VirtualFile file) {
super(project, true);
myGithubCreateGistPanel = new GitHubCreateGistPanel();
myGithubCreateGistPanel = new GithubCreateGistPanel();
// Use saved settings for controls
final GithubSettings settings = GithubSettings.getInstance();
myGithubCreateGistPanel.setAnonymous(settings.isAnonymousGist());
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.plugins.github.ui.GitHubCreateGistPanel">
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.plugins.github.ui.GithubCreateGistPanel">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
@@ -23,7 +23,7 @@ import javax.swing.*;
* @author oleg
* @date 9/27/11
*/
public class GitHubCreateGistPanel {
public class GithubCreateGistPanel {
private JTextArea myDescriptionTextArea;
private JCheckBox myPrivateCheckBox;
private JPanel myPanel;
@@ -32,7 +32,7 @@ public class GitHubCreateGistPanel {
private JTextField myFileNameField;
private JLabel myFileNameLabel;
public GitHubCreateGistPanel() {
public GithubCreateGistPanel() {
myDescriptionTextArea.setBorder(BorderFactory.createEtchedBorder());
myFileNameLabel.setVisible(false);
myFileNameField.setVisible(false);
@@ -14,11 +14,11 @@ import javax.swing.*;
/**
* @author oleg
*/
public class GitHubSettingsConfigurable implements SearchableConfigurable, VcsConfigurableProvider {
public class GithubSettingsConfigurable implements SearchableConfigurable, VcsConfigurableProvider {
private GithubSettingsPanel mySettingsPane;
private final GithubSettings mySettings;
public GitHubSettingsConfigurable() {
public GithubSettingsConfigurable() {
mySettings = GithubSettings.getInstance();
}