理念的IntelliJ插件在Android Studio中1.5.1不工作 [英] Idea intellij plugin not working in android studio 1.5.1

查看:299
本文介绍了理念的IntelliJ插件在Android Studio中1.5.1不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发Android的工作室测试插件,我的插件工程(创建的操作是可见的)购买Android 1.5的工作室使用时,从磁盘安装插件补充道。但是,同样的jar文件中没有的Andr​​oid 1.5.1的工作室工作。
下面是plugin.xml文件。请帮助。

I'm developing a test plugin for android studio, my plugin works (The actions created are visible ) in Android studio 1.5 when added using "install plugin from disk". But the same jar file is not working in Android studio 1.5.1. Below is the plugin.xml file. Please help.

<idea-plugin version="2">
<id>com.test.android.studio.plugin</id>
<name>test Android Studio Plugin</name>
<version>1.0</version>
<vendor email="test@test.com" url="http://www.test.com">test test Services Pvt. Ltd.</vendor>

<description>
Android Studio plugin to integrate test SDK
</description>

<change-notes>
 Release 0.0.1: Initial release.
</change-notes>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="131"/>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
     on how to target different products -->
<!-- uncomment to enable plugin in all products-->
<depends>com.intellij.modules.lang</depends>

<extensions defaultExtensionNs="com.intellij">
    <!-- Add your extensions here -->
</extensions>

<actions>
    <!-- Add your actions here -->
    <group id="Test" class="org.test.plugin.actions.TestMainActionGroup" text="Test" description="Main Test invocation Action"
           popup="true">
        <add-to-group group-id="MainMenu" anchor="last"/>

        <action id="testMode" class="org.Test.plugin.actions.TestModeAction" text="Test Mode" description="Test mode action">
            <keyboard-shortcut keymap="$default" first-keystroke="ctrl k"/>
        </action>
        <action id="invocationCode" class="org.Test.plugin.actions.InvocationCodeAction" text="Invocation Code"
                description="Test mode action">
        </action>
        <action id="onlineDoc" class="org.Test.plugin.actions.OnlineDocAction" text="Online Documentation"
                description="Test mode action">
        </action>
        <action id="aboutUs" class="org.Test.plugin.actions.AboutUsAction" text="About Us" description="Test mode action">
        </action>
    </group>

</actions>

推荐答案

由于其他答案已经指出的问题是通过使用自定义组类的行动小组而引起的。

As the other answer already pointed out the problem is caused by using a custom group class for the action group.

当你可能需要自定义操作组?

只有当你有控制你的小组的行动,如集团的行为,应在一定选择在编辑器中启用了一些自定义的逻辑,或者鼠标悬停时,或者如果你想需要一个自定义操作组动态添加行动组等。

A Custom action group is needed only if you have some custom logic that controls the behavior of your group of actions, such as the group should be enabled on some selection in the editor,or on mouse hover ,or if you want to add actions dynamically to the group etc.

如果组的目的是,把predefined行动,并在特定位置显示它的默认操作组所有你需要
它可以通过以下行很容易地完成

If the purpose of group is to group the predefined actions and display it in a particular location the default action group is all that you need and it can be easily accomplished by following lines

 <group id="Test" text="Test" description="Main Test invocation Action"
       popup="true">
    <add-to-group group-id="MainMenu" anchor="last"/>
    <!--List of predefined actions here  -->
</group>

请注意,从组标记的类属性被删除。现在IDE认为其集团为默认行动小组。

Note that the class attribute from the group tag is removed. Now the IDE considers its group as Default Action Group.

这篇关于理念的IntelliJ插件在Android Studio中1.5.1不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆