mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
[code] package structure changed
This commit is contained in:
parent
3bb3c53bd2
commit
c4bd710d27
@ -29,15 +29,15 @@
|
|||||||
<idea-version since-build="139.000" until-build="999"/>
|
<idea-version since-build="139.000" until-build="999"/>
|
||||||
|
|
||||||
<!-- Resource bundle from which the text of plugin descriptions, action names and etc. will be loaded -->
|
<!-- Resource bundle from which the text of plugin descriptions, action names and etc. will be loaded -->
|
||||||
<resource-bundle>org.jetbrains.plugins.sample.PluginSampleBundle</resource-bundle>
|
<resource-bundle>org.jetbrains.tutorials.sample.PluginSampleBundle</resource-bundle>
|
||||||
|
|
||||||
<!-- Plugin's application components -->
|
<!-- Plugin's application components -->
|
||||||
<application-components>
|
<application-components>
|
||||||
<component>
|
<component>
|
||||||
<!-- Component's interface class -->
|
<!-- Component's interface class -->
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyApplicationComponent</interface-class>
|
<interface-class>org.jetbrains.tutorials.sample.DummyApplicationComponent</interface-class>
|
||||||
<!-- Component's implementation class -->
|
<!-- Component's implementation class -->
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyApplicationComponentImpl</implementation-class>
|
<implementation-class>org.jetbrains.tutorials.sample.DummyApplicationComponentImpl</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
</application-components>
|
</application-components>
|
||||||
|
|
||||||
@ -45,8 +45,8 @@
|
|||||||
<project-components>
|
<project-components>
|
||||||
<component>
|
<component>
|
||||||
<!-- Interface and implementation classes are the same -->
|
<!-- Interface and implementation classes are the same -->
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyProjectComponent</interface-class>
|
<interface-class>org.jetbrains.tutorials.sample.DummyProjectComponent</interface-class>
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyProjectComponentImpl</implementation-class>
|
<implementation-class>org.jetbrains.tutorials.sample.DummyProjectComponentImpl</implementation-class>
|
||||||
<!-- If the "workspace" option is set "true", the component saves its state to the .iws file
|
<!-- If the "workspace" option is set "true", the component saves its state to the .iws file
|
||||||
instead of the .ipr file. Note that the <option> element is used only if the component implements the JDOMExternalizable interface. Otherwise, the use of the <option> element takes no effect.-->
|
instead of the .ipr file. Note that the <option> element is used only if the component implements the JDOMExternalizable interface. Otherwise, the use of the <option> element takes no effect.-->
|
||||||
|
|
||||||
@ -59,8 +59,8 @@
|
|||||||
<!-- Plugin's module components -->
|
<!-- Plugin's module components -->
|
||||||
<module-components>
|
<module-components>
|
||||||
<component>
|
<component>
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyModuleComponent</interface-class>
|
<interface-class>org.jetbrains.tutorials.sample.DummyModuleComponent</interface-class>
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyModuleComponentImpl</implementation-class>
|
<implementation-class>org.jetbrains.tutorials.sample.DummyModuleComponentImpl</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
</module-components>
|
</module-components>
|
||||||
|
|
||||||
@ -73,7 +73,7 @@
|
|||||||
The optional "use-shortcut-of" attribute specifies the ID of the action whose keyboard shortcut this action will use.
|
The optional "use-shortcut-of" attribute specifies the ID of the action whose keyboard shortcut this action will use.
|
||||||
The optional "description" attribute specifies the text which is displayed in the status bar when the action is focused.
|
The optional "description" attribute specifies the text which is displayed in the status bar when the action is focused.
|
||||||
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the menu item. -->
|
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the menu item. -->
|
||||||
<action id="PluginSample.DummyAction" class="org.jetbrains.plugins.sample.actions.SimpleAction" text="Dummy Action"
|
<action id="PluginSample.DummyAction" class="org.jetbrains.tutorials.sample.actions.SimpleAction" text="Dummy Action"
|
||||||
description="Illustrates how to plug an action in">
|
description="Illustrates how to plug an action in">
|
||||||
<!-- The <keyboard-shortcut> node specifies the keyboard shortcut for the action. An action can have several keyboard shortcuts.
|
<!-- The <keyboard-shortcut> node specifies the keyboard shortcut for the action. An action can have several keyboard shortcuts.
|
||||||
The mandatory "first-keystroke" attribute specifies the first keystroke of the action. The key strokes are specified according to the regular Swing rules.
|
The mandatory "first-keystroke" attribute specifies the first keystroke of the action. The key strokes are specified according to the regular Swing rules.
|
||||||
@ -107,12 +107,12 @@
|
|||||||
The optional "popup" attribute specifies how the group is presented in the menu. If a group has popup="true", actions in it
|
The optional "popup" attribute specifies how the group is presented in the menu. If a group has popup="true", actions in it
|
||||||
are placed in a submenu; for popup="false", actions are displayed as a section of the same menu delimited by separators. -->
|
are placed in a submenu; for popup="false", actions are displayed as a section of the same menu delimited by separators. -->
|
||||||
<group id="DummyDefaultActionGroup" text="Default action group">
|
<group id="DummyDefaultActionGroup" text="Default action group">
|
||||||
<action class="org.jetbrains.plugins.sample.actions.GroupedToDefaultAction" id="PluginSample.GroupedToDefaultAction"/>
|
<action class="org.jetbrains.tutorials.sample.actions.GroupedToDefaultAction" id="PluginSample.GroupedToDefaultAction"/>
|
||||||
</group>
|
</group>
|
||||||
<group class="org.jetbrains.plugins.sample.actions.DummyActionGroup" id="DummyActionGroup" text="Action Group"
|
<group class="org.jetbrains.tutorials.sample.actions.DummyActionGroup" id="DummyActionGroup" text="Action Group"
|
||||||
description="Illustration of an action group"
|
description="Illustration of an action group"
|
||||||
icon="icons/testgroup.png" popup="true">
|
icon="icons/testgroup.png" popup="true">
|
||||||
<action id="PluginSample.GroupedAction" class="org.jetbrains.plugins.sample.actions.GroupedAction"
|
<action id="PluginSample.GroupedAction" class="org.jetbrains.tutorials.sample.actions.GroupedAction"
|
||||||
text="Grouped Action" description="An action in the group"/>
|
text="Grouped Action" description="An action in the group"/>
|
||||||
<!-- The <separator> element defines a separator between actions. It can also have an <add-to-group> child element. -->
|
<!-- The <separator> element defines a separator between actions. It can also have an <add-to-group> child element. -->
|
||||||
<separator/>
|
<separator/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import com.intellij.openapi.components.ApplicationComponent;
|
import com.intellij.openapi.components.ApplicationComponent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import com.intellij.openapi.module.ModuleComponent;
|
import com.intellij.openapi.module.ModuleComponent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import com.intellij.openapi.components.ProjectComponent;
|
import com.intellij.openapi.components.ProjectComponent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample;
|
package org.jetbrains.tutorials.sample;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.actions;
|
package org.jetbrains.tutorials.sample.actions;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.ActionGroup;
|
import com.intellij.openapi.actionSystem.ActionGroup;
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.actions;
|
package org.jetbrains.tutorials.sample.actions;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.actions;
|
package org.jetbrains.tutorials.sample.actions;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.actions;
|
package org.jetbrains.tutorials.sample.actions;
|
||||||
|
|
||||||
import com.intellij.openapi.actionSystem.AnAction;
|
import com.intellij.openapi.actionSystem.AnAction;
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
import com.intellij.openapi.actionSystem.AnActionEvent;
|
@ -13,7 +13,7 @@
|
|||||||
<depends>com.intellij.modules.lang</depends>
|
<depends>com.intellij.modules.lang</depends>
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<projectViewPane implementation="org.jetbrains.plugins.sample.pane.ImagesProjectViewPane"/>
|
<projectViewPane implementation="org.jetbrains.tutorials.sample.pane.ImagesProjectViewPane"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<application-components>
|
<application-components>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.pane;
|
package org.jetbrains.tutorials.sample.pane;
|
||||||
|
|
||||||
import com.intellij.icons.AllIcons;
|
import com.intellij.icons.AllIcons;
|
||||||
import com.intellij.ide.projectView.PresentationData;
|
import com.intellij.ide.projectView.PresentationData;
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.pane;
|
package org.jetbrains.tutorials.sample.pane;
|
||||||
|
|
||||||
import com.intellij.icons.AllIcons;
|
import com.intellij.icons.AllIcons;
|
||||||
import com.intellij.ide.SelectInTarget;
|
import com.intellij.ide.SelectInTarget;
|
@ -13,7 +13,7 @@
|
|||||||
<depends>com.intellij.modules.lang</depends>
|
<depends>com.intellij.modules.lang</depends>
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<treeStructureProvider implementation="org.jetbrains.plugins.sample.tree.TextOnlyTreeStructureProvider"/>
|
<treeStructureProvider implementation="org.jetbrains.tutorials.sample.tree.TextOnlyTreeStructureProvider"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<application-components>
|
<application-components>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package org.jetbrains.plugins.sample.tree;
|
package org.jetbrains.tutorials.sample.tree;
|
||||||
|
|
||||||
import com.intellij.ide.projectView.TreeStructureProvider;
|
import com.intellij.ide.projectView.TreeStructureProvider;
|
||||||
import com.intellij.ide.projectView.ViewSettings;
|
import com.intellij.ide.projectView.ViewSettings;
|
@ -24,7 +24,7 @@ To register an action as a menu item, an <action> attribute should be added to t
|
|||||||
The optional "description" attribute specifies the text which is displayed in the status bar when the action is focused.
|
The optional "description" attribute specifies the text which is displayed in the status bar when the action is focused.
|
||||||
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the menu item. -->
|
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the menu item. -->
|
||||||
|
|
||||||
<action id="PluginSample.DummyAction" class="org.jetbrains.plugins.sample.actions.SimpleAction" text="Dummy Action" description="Illustrates how to plug an action in">
|
<action id="PluginSample.DummyAction" class="SimpleAction" text="Dummy Action" description="Illustrates how to plug an action in">
|
||||||
|
|
||||||
<!-- The <keyboard-shortcut> node specifies the keyboard shortcut for the action. An action can have several keyboard shortcuts.
|
<!-- The <keyboard-shortcut> node specifies the keyboard shortcut for the action. An action can have several keyboard shortcuts.
|
||||||
The mandatory "first-keystroke" attribute specifies the first keystroke of the action. The key strokes are specified according to the regular Swing rules.
|
The mandatory "first-keystroke" attribute specifies the first keystroke of the action. The key strokes are specified according to the regular Swing rules.
|
||||||
@ -107,7 +107,7 @@ file. In most of the cases you simply need to leave "class" attribute of the <gr
|
|||||||
will be created and filled with actions defined within it.
|
will be created and filled with actions defined within it.
|
||||||
|
|
||||||
<group id="DummyDefaultActionGroup" text="Default action group">
|
<group id="DummyDefaultActionGroup" text="Default action group">
|
||||||
<action class="org.jetbrains.plugins.sample.actions.GroupedToDefaultAction" id="PluginSample.GroupedToDefaultAction"/>
|
<action class="GroupedToDefaultAction" id="PluginSample.GroupedToDefaultAction"/>
|
||||||
</group>
|
</group>
|
||||||
See
|
See
|
||||||
[GroupedToDefaultAction.java] (https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/plugin_sample/src/org/jetbrains/plugins/sample/actions/GroupedToDefaultAction.java)
|
[GroupedToDefaultAction.java] (https://github.com/JetBrains/intellij-sdk/blob/master/code_samples/plugin_sample/src/org/jetbrains/plugins/sample/actions/GroupedToDefaultAction.java)
|
||||||
@ -132,10 +132,10 @@ belonging to this group.
|
|||||||
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the group.
|
The optional "icon" attribute specifies the icon which is displayed on the toolbar button or next to the group.
|
||||||
The optional "popup" attribute specifies how the group is presented in the menu. If a group has popup="true", actions in it
|
The optional "popup" attribute specifies how the group is presented in the menu. If a group has popup="true", actions in it
|
||||||
are placed in a submenu; for popup="false", actions are displayed as a section of the same menu delimited by separators. -->
|
are placed in a submenu; for popup="false", actions are displayed as a section of the same menu delimited by separators. -->
|
||||||
<group class="org.jetbrains.plugins.sample.actions.DummyActionGroup" id="DummyActionGroup" text="Action Group"
|
<group class="DummyActionGroup" id="DummyActionGroup" text="Action Group"
|
||||||
description="Illustration of an action group"
|
description="Illustration of an action group"
|
||||||
icon="icons/testgroup.png" popup="true">
|
icon="icons/testgroup.png" popup="true">
|
||||||
<action id="PluginSample.GroupedAction" class="org.jetbrains.plugins.sample.actions.GroupedAction"
|
<action id="PluginSample.GroupedAction" class="GroupedAction"
|
||||||
text="Grouped Action" description="An action in the group"/>
|
text="Grouped Action" description="An action in the group"/>
|
||||||
<!-- The <separator> element defines a separator between actions. It can also have an <add-to-group> child element. -->
|
<!-- The <separator> element defines a separator between actions. It can also have an <add-to-group> child element. -->
|
||||||
<separator/>
|
<separator/>
|
||||||
|
@ -43,9 +43,9 @@ This configuration file contains description, components, information about depe
|
|||||||
<application-components>
|
<application-components>
|
||||||
<component>
|
<component>
|
||||||
<!-- Component's interface class -->
|
<!-- Component's interface class -->
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyApplicationComponent</interface-class>
|
<interface-class>DummyApplicationComponent</interface-class>
|
||||||
<!-- Component's implementation class -->
|
<!-- Component's implementation class -->
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyApplicationComponentImpl</implementation-class>
|
<implementation-class>DummyApplicationComponentImpl</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
</application-components>
|
</application-components>
|
||||||
|
|
||||||
@ -53,8 +53,8 @@ This configuration file contains description, components, information about depe
|
|||||||
<project-components>
|
<project-components>
|
||||||
<component>
|
<component>
|
||||||
<!-- Interface and implementation classes are the same -->
|
<!-- Interface and implementation classes are the same -->
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyProjectComponent</interface-class>
|
<interface-class>DummyProjectComponent</interface-class>
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyProjectComponentImpl</implementation-class>
|
<implementation-class>DummyProjectComponentImpl</implementation-class>
|
||||||
<!-- If the "workspace" option is set "true", the component saves its state to the .iws file
|
<!-- If the "workspace" option is set "true", the component saves its state to the .iws file
|
||||||
instead of the .ipr file. Note that the <option> element is used only if the component implements the JDOMExternalizable interface. Otherwise, the use of the <option> element takes no effect.-->
|
instead of the .ipr file. Note that the <option> element is used only if the component implements the JDOMExternalizable interface. Otherwise, the use of the <option> element takes no effect.-->
|
||||||
|
|
||||||
@ -67,14 +67,14 @@ This configuration file contains description, components, information about depe
|
|||||||
<!-- Plugin's module components -->
|
<!-- Plugin's module components -->
|
||||||
<module-components>
|
<module-components>
|
||||||
<component>
|
<component>
|
||||||
<interface-class>org.jetbrains.plugins.sample.DummyModuleComponent</interface-class>
|
<interface-class>DummyModuleComponent</interface-class>
|
||||||
<implementation-class>org.jetbrains.plugins.sample.DummyModuleComponentImpl</implementation-class>
|
<implementation-class>DummyModuleComponentImpl</implementation-class>
|
||||||
</component>
|
</component>
|
||||||
</module-components>
|
</module-components>
|
||||||
|
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<actions>
|
<actions>
|
||||||
<action id="PluginSample.DummyAction" class="org.jetbrains.plugins.sample.actions.SimpleAction" text="Dummy Action" description="Illustrates how to plug an action in">
|
<action id="PluginSample.DummyAction" class="SimpleAction" text="Dummy Action" description="Illustrates how to plug an action in">
|
||||||
<keyboard-shortcut first-keystroke="control alt A" second-keystroke="C" keymap="$default"/>
|
<keyboard-shortcut first-keystroke="control alt A" second-keystroke="C" keymap="$default"/>
|
||||||
</action>
|
</action>
|
||||||
</actions>
|
</actions>
|
||||||
|
@ -13,7 +13,7 @@ in the
|
|||||||
configuration file:
|
configuration file:
|
||||||
|
|
||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<treeStructureProvider implementation="org.jetbrains.plugins.sample.tree.TextOnlyTreeStructureProvider"/>
|
<treeStructureProvider implementation="TextOnlyTreeStructureProvider"/>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
Two methods of the parent class need to be overridden.
|
Two methods of the parent class need to be overridden.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user