Merge "Fix the order of the users in the Google login panel - maintain the insertion order." into idea133
diff --git a/lib-working/javax.servlet-api-3.1.0.jar b/lib-working/javax.servlet-api-3.1.0.jar
deleted file mode 100644
index 6b14c3d..0000000
--- a/lib-working/javax.servlet-api-3.1.0.jar
+++ /dev/null
Binary files differ
diff --git a/lib-working/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar b/lib/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar
similarity index 100%
rename from lib-working/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar
rename to lib/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar
Binary files differ
diff --git a/lib-working/google-gct-login-context-pg.jar b/lib/google-gct-login-context-pg.jar
similarity index 100%
rename from lib-working/google-gct-login-context-pg.jar
rename to lib/google-gct-login-context-pg.jar
Binary files differ
diff --git a/lib-working/google-http-client-jackson-1.18.0-rc.jar b/lib/google-http-client-jackson-1.18.0-rc.jar
similarity index 100%
rename from lib-working/google-http-client-jackson-1.18.0-rc.jar
rename to lib/google-http-client-jackson-1.18.0-rc.jar
Binary files differ
diff --git a/lib-working/google.login.jar b/lib/google.gdt.eclipse.login.common.jar
similarity index 100%
rename from lib-working/google.login.jar
rename to lib/google.gdt.eclipse.login.common.jar
Binary files differ
diff --git a/lib-working/jackson-core-asl-1.9.11.jar b/lib/jackson-core-asl-1.9.11.jar
similarity index 100%
rename from lib-working/jackson-core-asl-1.9.11.jar
rename to lib/jackson-core-asl-1.9.11.jar
Binary files differ
diff --git a/login/login.iml b/login/google-login.iml
similarity index 69%
rename from login/login.iml
rename to login/google-login.iml
index 897f97a..b99a3bb 100644
--- a/login/login.iml
+++ b/login/google-login.iml
@@ -5,11 +5,15 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/testSrc" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="openapi" />
+ <orderEntry type="module" module-name="platform-impl" />
<orderEntry type="library" name="Guava" level="project" />
+ <orderEntry type="library" name="google-api-java-client" level="project" />
+ <orderEntry type="library" name="jcip" level="project" />
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
@@ -22,7 +26,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$APPLICATION_HOME_DIR$/lib/jcip-annotations.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -31,19 +35,36 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/google.login.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/google-gct-login-context-pg.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../lib/google-http-client-jackson-1.18.0-rc.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../lib/google.gdt.eclipse.login.common.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
- <root url="jar://$MODULE_DIR$/../lib-working/google.login.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/google.gdt.eclipse.login.common.jar!/" />
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="library" name="google-api-java-client" level="project" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/google-http-client-jackson-1.18.0-rc.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/jackson-core-asl-1.9.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -52,35 +73,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/google-api-services-oauth2-v2-rev70-1.18.0-rc.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/jackson-core-asl-1.9.11.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/javax.servlet-api-3.1.0.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module" module-name="platform-impl" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../lib-working/google-gct-login-context-pg.jar!/" />
+ <root url="jar://$MODULE_DIR$/../lib/javax.servlet-api-3.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
diff --git a/resources/icons/google.png b/login/resources/icons/google.png
similarity index 100%
rename from resources/icons/google.png
rename to login/resources/icons/google.png
Binary files differ
diff --git a/resources/icons/[email protected] b/login/resources/icons/[email protected]
similarity index 100%
rename from resources/icons/[email protected]
rename to login/resources/icons/[email protected]
Binary files differ
diff --git a/resources/icons/loginAvatar.png b/login/resources/icons/loginAvatar.png
similarity index 100%
rename from resources/icons/loginAvatar.png
rename to login/resources/icons/loginAvatar.png
Binary files differ
diff --git a/resources/icons/[email protected] b/login/resources/icons/[email protected]
similarity index 100%
rename from resources/icons/[email protected]
rename to login/resources/icons/[email protected]
Binary files differ
diff --git a/login/src/com/google/gct/login/ui/GoogleLoginActionButton.java b/login/src/com/google/gct/login/ui/GoogleLoginActionButton.java
index 3457485..21b0628 100644
--- a/login/src/com/google/gct/login/ui/GoogleLoginActionButton.java
+++ b/login/src/com/google/gct/login/ui/GoogleLoginActionButton.java
@@ -35,10 +35,20 @@
private Icon defaultIcon;
private final static String SIGN_IN_MESSAGE = "Sign in to Google...";
private final static String DEFAULT_AVATAR = "/icons/loginAvatar.png";
+ private final static String SHOW_LOGIN_BUTTON_PROPERTY = "show.google.login.button";
+
public GoogleLoginActionButton(AnAction action, Presentation presentation, String place, @NotNull Dimension minimumSize) {
super(action, presentation, place, minimumSize);
+ // The Google login toolbar item is hidden by default temporarily.
+ // To view the login button, add "-Dshow.google.login.button=true" to the JVM options
+ boolean showLoginButton = Boolean.getBoolean(SHOW_LOGIN_BUTTON_PROPERTY);
+ if(!showLoginButton) {
+ setVisible(false);
+ return;
+ }
+
GoogleLogin.getInstance().setLoginMenuItemContribution(this);
defaultIcon = IconLoader.getIcon(DEFAULT_AVATAR);
updateUi();