Skip to content

Commit

Permalink
v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
skykai committed May 24, 2016
1 parent 026226a commit 1191004
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Binary file added ECTranslation1.3.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Android Studio 翻译插件,可以将英文翻译为中文.

##3.更新日志

###V1.3
- 去除对话框提示的icon。

###V1.2
- 增加翻译弹框显示的时间。
- 增加拆分单词翻译,现在支持类似:setContentView与ALIGN_CENTER的翻译了。
Expand Down
3 changes: 2 additions & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin version="2">
<id>com.boohee.plugin.translation</id>
<name>ECTranslation</name>
<version>1.2</version>
<version>1.3</version>
<vendor email="[email protected]" url="https://github.com/Skykai521">Boohee</vendor>

<description><![CDATA[
Expand All @@ -12,6 +12,7 @@
]]></description>

<change-notes><![CDATA[
<li>1.3 : New: Remove message INFO icon.</li>
<li>1.2 : New: Support more translate mode. such as: setContentView, ALIGN_CENTER</li>
<li>1.2 : New: Increase popupWindow show time.</li>
<li>1.1 : New: Code Refactoring.</li>
Expand Down
5 changes: 3 additions & 2 deletions src/RequestRunnable.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import com.google.gson.Gson;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.ui.JBColor;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
Expand All @@ -13,6 +13,7 @@
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;

import java.awt.*;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
Expand Down Expand Up @@ -76,7 +77,7 @@ private void showPopupBalloon(final String result) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
JBPopupFactory factory = JBPopupFactory.getInstance();
factory.createHtmlTextBalloonBuilder(result, MessageType.INFO, null)
factory.createHtmlTextBalloonBuilder(result, null, new JBColor(new Color(186, 238, 186), new Color(73, 117, 73)), null)
.setFadeoutTime(5000)
.createBalloon()
.show(factory.guessBestPopupLocation(mEditor) , Balloon.Position.below);
Expand Down

0 comments on commit 1191004

Please sign in to comment.