您的位置:首页 > 编程语言

activate-power-mode 写代码的时候体验狂拽酷炫的效果 (IDEA版安装过程及问题)

2016-01-13 21:56 681 查看

初遇activate-power-mode

前一段时间在微信上看到朋友发的这个插件,就收藏了,一直没试试,今天兴致一来突然想起来这么一出,就试试

这是微信原文:

写个Hello Word 而已,要不要这么震撼?!

atom上的一个插件,可以让你写代码的时候体验狂拽酷炫的效果



这货全名叫

activate-power-mode atom package

最新版0.3.2还在继续更新,喜欢就去下载吧

Gitub页面链接

https://github.com/codeinthedark/editor/pull/1

感受一下



支持的环境

上github一看,已经支持很多ide了,https://github.com/codeinthedark/awesome-power-mode

Awesome Power Mode

A curated list of power modes as popularized in https://github.com/codeinthedark/editor/pull/1 by @JoelBesada.

Atom https://github.com/JoelBesada/activate-power-mode

Brackets https://github.com/Equals182/brackets-power-mode

Codemirror https://github.com/chinchang/code-blast-codemirror

IDEA https://github.com/ViceFantasyPlace/activate-power-mode

JavaScript https://github.com/disjukr/activate-power-mode

VIM https://github.com/mattn/vim-particle

Visual Studio https://github.com/LiamMorrow/Visual-Studio-Power-Mode

Windows https://github.com/if1live/ParticleOnTextCursor

XCode https://github.com/poboke/ActivatePowerMode

https://github.com/qfish/XActivatePowerMode

https://github.com/Dawn-/CoderPower

安装IDEA版

step1 安装插件

只是安装插件的话,只要下载jar包,然后选Preferences -> Plugins -> Install pliugin form disk -> 找到刚才下载的jar包-> OK -> restart IDEA 就好了



step2 IDEA重启时报错:Unsupported major.minor version 52.0

Plugin ‘com.jiyuanime.ActivatePowerModeApplicationPlugin’ failed to initialize and will be disabled. Please restart IntelliJ IDEA.

com.intellij.diagnostic.PluginException: com/jiyuanime/ActivatePowerModeApplicationPlugin : Unsupported major.minor version 52.0 [Plugin: com.jiyuanime.ActivatePowerModeApplicationPlugin]

at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)

at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)

at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:274)

…….

我的环境:

Platform: mac os x

IntelliJ Version: 14.1.4 Ultimate

JDK: java version “1.7.0_79”

在github #issue上得到帮助,后来发现是jdk版本问题:

jdk开发时的版本和运行时的版本不一致 会报 Unsupported major.minor version 52.0

解决方法:

又下载了jdk1.8,并安装。(我想同时保有多个jdk环境,如果没这个考虑,升级一下原来的也可以)

File -> project structure -> SDKs -> add JDK -> 选安装的jdk1.8所在路径 -> 选刚配的jdk1.8 -> apply



重新进行step1 然后成功!!!

如果只是要用下这个插件,到这就可以结束了

step3 下载activate-power-mode 源码并编译

下载源码

bash git clone https://github.com/ViceFantasyPlace/activate-power-mode.git[/code] 
如果是下载那个源码自己编译的话,需要装IDEA的SDK

File -> project structure -> SDKs -> add IntelliJ Platform Plugin SDK -> 选jdk1.8 -> apply


一定要注意:第一次运行如果没有运行配置需要创建一个Plugin Configuration

Edit Run/Debug Configurations -> add a new Plugin Configuration

-> 在 Use classpath of module 选择 activate-power-mode

-> Apply





选择刚配置的activate-power-mode进行编译,如果没有出现 error 则编译成功。

生成插件 jar 安装包

选择 Build -> Prepare Plugin module … For Deployment 将会生成一个activate-power-mode.jar 的文件在项目根目录下,这样就生成自己的activate-power-mode.jar包了,然后就可以给别人,让别人跟step1一样的步骤安装了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: