IJSDK-424

This commit is contained in:
JohnHake 2020-03-18 18:42:50 -07:00
parent 328e74a1fa
commit 4d6895589d
44 changed files with 63 additions and 180 deletions

View File

@ -5,6 +5,6 @@ package icons;
import com.intellij.openapi.util.IconLoader;
import javax.swing.*;
public class ActionBasicsIcons {
public class SdkIcons {
public static final Icon Sdk_default_icon = IconLoader.getIcon("/icons/sdk_16.svg");
}

View File

@ -6,7 +6,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.openapi.editor.Editor;
import icons.ActionBasicsIcons;
import icons.SdkIcons;
/**
* Creates an action group to contain menu actions. See plugin.xml declarations.
@ -26,6 +26,6 @@ public class CustomDefaultActionGroup extends DefaultActionGroup {
Editor editor = event.getData(CommonDataKeys.EDITOR);
event.getPresentation().setEnabled(editor != null);
// Take this opportunity to set an icon for the menu entry.
event.getPresentation().setIcon(ActionBasicsIcons.Sdk_default_icon);
event.getPresentation().setIcon(SdkIcons.Sdk_default_icon);
}
}

View File

@ -5,7 +5,7 @@ package org.intellij.sdk.action;
import com.intellij.openapi.actionSystem.ActionGroup;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import icons.ActionBasicsIcons;
import icons.SdkIcons;
import org.jetbrains.annotations.NotNull;
/**
@ -32,7 +32,7 @@ public class DynamicActionGroup extends ActionGroup {
return new AnAction[]{
new PopupDialogAction("Action Added at Runtime",
"Dynamic Action Demo",
ActionBasicsIcons.Sdk_default_icon)
SdkIcons.Sdk_default_icon)
};
}

View File

@ -35,7 +35,7 @@
for information about the elements and attributes used for actions and groups. -->
<!-- The <action> element adds a static menu item in first position of the Tools menu that shows PopupDialogAction. -->
<action id="org.intellij.sdk.action.PopupDialogAction" class="org.intellij.sdk.action.PopupDialogAction"
text="Action Basics Plugin: Pop Dialog Action" description="SDK action example" icon="ActionBasicsIcons.Sdk_default_icon">
text="Action Basics Plugin: Pop Dialog Action" description="SDK action example" icon="SdkIcons.Sdk_default_icon">
<override-text place="MainMenu" text="Pop Dialog Action"/>
<keyboard-shortcut first-keystroke="control alt A" second-keystroke="C" keymap="$default"/>
<mouse-shortcut keystroke="control button3 doubleClick" keymap="$default"/>
@ -46,24 +46,24 @@
IntelliJ Platform framework. (Note the lack of a group "class" attribute.) GroupedActions gets inserted after PopupDialogAction
in the Tools menu. Because the group's implementation is default, it cannot impose enable/disable conditions. Instead it
must rely on the conditions imposed by the parent menu where it is inserted. It declares one action in the group. -->
<group id="org.intellij.sdk.action.GroupedActions" text="Static Grouped Actions" popup="true" icon="ActionBasicsIcons.Sdk_default_icon">
<group id="org.intellij.sdk.action.GroupedActions" text="Static Grouped Actions" popup="true" icon="SdkIcons.Sdk_default_icon">
<add-to-group group-id="ToolsMenu" anchor="after" relative-to-action="org.intellij.sdk.action.PopupDialogAction"/>
<action class="org.intellij.sdk.action.PopupDialogAction" id="org.intellij.sdk.action.GroupPopDialogAction"
text="A Group Action" description="SDK static grouped action example" icon="ActionBasicsIcons.Sdk_default_icon">
text="A Group Action" description="SDK static grouped action example" icon="SdkIcons.Sdk_default_icon">
</action>
</group>
<!-- CustomDefaultActionGroup demonstrates declaring an action group based on a ActionGroup class supplied by this plugin.
This group is to be inserted atop the Editor Popup Menu. It declares one action in the group. -->
<group id="org.intellij.sdk.action.CustomDefaultActionGroup" class="org.intellij.sdk.action.CustomDefaultActionGroup" popup="true"
text="Popup Grouped Actions" description="Custom defaultActionGroup demo" icon="ActionBasicsIcons.Sdk_default_icon">
text="Popup Grouped Actions" description="Custom defaultActionGroup demo" icon="SdkIcons.Sdk_default_icon">
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
<action class="org.intellij.sdk.action.PopupDialogAction" id="org.intellij.sdk.action.CustomGroupedAction"
text="A Popup Action" description="SDK popup grouped action example" icon="ActionBasicsIcons.Sdk_default_icon"/>
text="A Popup Action" description="SDK popup grouped action example" icon="SdkIcons.Sdk_default_icon"/>
</group>
<!-- DynamicActionGroup demonstrates declaring an action group without a static action declaration.
An action is added to the group programmatically in the DynamicActionGroup implementation. -->
<group id="org.intellij.sdk.action.DynamicActionGroup" class="org.intellij.sdk.action.DynamicActionGroup" popup="true"
text="Dynamically Grouped Actions" description="SDK dynamically grouped action example" icon="ActionBasicsIcons.Sdk_default_icon">
text="Dynamically Grouped Actions" description="SDK dynamically grouped action example" icon="SdkIcons.Sdk_default_icon">
<add-to-group group-id="ToolsMenu" anchor="after" relative-to-action="org.intellij.sdk.action.GroupedActions"/>
</group>
</actions>

View File

@ -27,9 +27,8 @@ dependencies {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
type 'IC'
plugins 'java'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Comparing References Inspection Sample</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="193.3"/>
<!-- Evaluates java PSI -->
<depends>com.intellij.modules.java</depends>

View File

@ -28,7 +28,7 @@ test {
intellij {
version '2019.3.3'
plugins 'java'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Conditional Operator Converter</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.java</depends>
<depends>com.intellij.modules.platform</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {
version = project.version

View File

@ -6,6 +6,6 @@ import com.intellij.openapi.util.IconLoader;
import javax.swing.*;
public class EditorBasicsIcons {
public class SdkIcons {
public static final Icon Sdk_default_icon = IconLoader.getIcon("/icons/sdk_16.svg");
}

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Editor Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>
@ -40,14 +34,14 @@
class="org.intellij.sdk.editor.EditorIllustrationAction"
text="Editor Replace Text"
description="Replaces selected text with 'Replacement'."
icon="EditorBasicsIcons.Sdk_default_icon">
icon="SdkIcons.Sdk_default_icon">
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
</action>
<action id="EditorBasics.EditorHandlerIllustration"
class="org.intellij.sdk.editor.EditorHandlerIllustration"
text="Editor Add Caret"
description="Adds a second caret below the existing one."
icon="EditorBasicsIcons.Sdk_default_icon">
icon="SdkIcons.Sdk_default_icon">
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
</action>
<!-- Place this entry first in the popup menu; it's always enabled if a project and editor are open -->
@ -55,7 +49,7 @@
class="org.intellij.sdk.editor.EditorAreaIllustration"
text="Caret Position"
description="Reports information about the caret position."
icon="EditorBasicsIcons.Sdk_default_icon">
icon="SdkIcons.Sdk_default_icon">
<keyboard-shortcut keymap="$default" first-keystroke="control alt G"/>
<add-to-group group-id="EditorPopupMenu" anchor="first"/>
</action>

View File

@ -17,8 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {
version = project.version

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Facet Basics</name>
<!-- The version of this plugin -->
<version>2.1</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.lang</depends>

View File

@ -17,8 +17,8 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
plugins 'java'
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Framework Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.java</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Inspection Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements - this inspects text, which is part of the lang module -->
<depends>com.intellij.modules.lang</depends>

View File

@ -26,7 +26,7 @@ sourceSets {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Kotlin Demo</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Minimum and maximum build numbers of IDEA compatible with the plugin. -->
<idea-version since-build="191.0"/>
<!-- Indicate this plugin can be loaded in all IntelliJ Platform-based products. -->
<depends>com.intellij.modules.platform</depends>

View File

@ -8,13 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Live Templates Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform:
version 2018.3 (build #183) and newer. -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.lang</depends>

View File

@ -17,6 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
sameSinceUntilBuild = true
}
patchPluginXml {
version = project.version

View File

@ -8,11 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Maximum Open Projects Sample</name>
<!-- The version of this plugin is set by build.gradle -->
<!-- The idea-version of this plugin is overwritten by build.gradle -->
<idea-version since-build="193"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Module Type Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>

View File

@ -18,7 +18,7 @@ repositories {
intellij {
version '2019.3.3'
type 'PY'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -1,6 +1,6 @@
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.sdk.pycharm;
package org.intellij.sdk.pycharm;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;

View File

@ -3,17 +3,11 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>com.intellij.sdk.pycharm</id>
<id>org.intellij.sdk.pycharm</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: PyCharm Sample Project</name>
<!-- The version of this plugin -->
<version>0.1.0</version>
<!-- Must match the target PyCharm build -->
<idea-version since-build="192.4"/>
<!-- Requires the python plugin to run -->
<depends>com.intellij.modules.python</depends>
@ -34,10 +28,10 @@
<actions>
<!-- Define a new menu group as a last entry in the main menu -->
<group id="com.intellij.sdk.pycharm.NewGroupedActions" text="SDK: Plugin" popup="true">
<group id="org.intellij.sdk.pycharm.NewGroupedActions" text="SDK: Plugin" popup="true">
<add-to-group group-id="MainMenu" anchor="last"/>
<!-- Add a single action to the new group -->
<action id="com.intellij.sdk.pycharm.PopupDialogAction" class="com.intellij.sdk.pycharm.PopupDialogAction"
<action id="org.intellij.sdk.pycharm.PopupDialogAction" class="org.intellij.sdk.pycharm.PopupDialogAction"
text="Pop a Dialog" description="SDK PyCharm basics example" icon="SdkIcons.Sdk_default_icon">
</action>
</group>

View File

@ -18,7 +18,7 @@ repositories {
intellij {
version '2019.3.3'
plugins 'java'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -3,17 +3,11 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>org.intellij.sdk.projectModel</id>
<id>org.intellij.sdk.project.model</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Project Model Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.java</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -3,17 +3,11 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>org.jetbrains.plugins.sample.ProjectViewPane</id>
<id>org.intellij.sdk.view.pane</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Project View Pane Demo</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -3,17 +3,11 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>org.jetbrains.tutorials.ProjectWizard</id>
<id>org.intellij.sdk.project.wizard</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Project Wizard Demo</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>

View File

@ -18,7 +18,7 @@ repositories {
intellij {
version '2019.3.3'
plugins 'java'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -3,17 +3,11 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>org.jetbrains.sdk.psi</id>
<id>org.intellij.sdk.psi</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: PSI Demo</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="191"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.java</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Run Configuration Demo</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="193.1159"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>

View File

@ -32,7 +32,7 @@ dependencies {
intellij {
version '2019.3.3'
plugins 'java'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,14 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Simple Language Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform
At least 2019.2 is required. Otherwise, FileTypeFactory must be registered as an extension.
See the extensions section below. -->
<idea-version since-build="192.2"/>
<!-- Product and plugin compatibility requirements -->
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.java</depends>

View File

@ -3,7 +3,7 @@
<idea-plugin>
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
<id>org.intellij.sdk..themeBasics</id>
<id>org.intellij.sdk.themeBasics</id>
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Theme Basics</name>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Tool Window Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="193.3"/>
<!-- Indicate this plugin can be loaded in all IntelliJ Platform-based products. -->
<depends>com.intellij.modules.platform</depends>

View File

@ -17,7 +17,7 @@ repositories {
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3.3'
updateSinceUntilBuild = false
sameSinceUntilBuild = true
}
patchPluginXml {

View File

@ -8,12 +8,6 @@
<!-- Text to display as name on Preferences/Settings | Plugin page -->
<name>SDK: Tree Structure Provider Sample Project</name>
<!-- The version of this plugin -->
<version>2.0.0</version>
<!-- Compatible with the following versions of IntelliJ Platform -->
<idea-version since-build="193.3"/>
<!-- Indicate this plugin can be loaded in all IntelliJ Platform-based products. -->
<depends>com.intellij.modules.platform</depends>