mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
Cleanup per SDK
This commit is contained in:
parent
c7b9635e8f
commit
ac26cc4086
@ -1,18 +0,0 @@
|
||||
<idea-plugin>
|
||||
<id>com.intellij.tutorials.module</id>
|
||||
<name>Module Type Demo</name>
|
||||
<version>1.0</version>
|
||||
<vendor>JetBrains</vendor>
|
||||
|
||||
<description>Basic example of working with module types</description>
|
||||
|
||||
<idea-version since-build="131"/>
|
||||
|
||||
<!-- Product and plugin compatibility requirements -->
|
||||
<depends>com.intellij.modules.platform</depends>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<moduleType id="DEMO_MODULE_TYPE" implementationClass="com.intellij.tutorials.module.DemoModuleType"/>
|
||||
</extensions>
|
||||
|
||||
</idea-plugin>
|
11
module/src/main/java/icons/SdkIcons.java
Normal file
11
module/src/main/java/icons/SdkIcons.java
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package icons;
|
||||
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class SdkIcons {
|
||||
public static final Icon Sdk_default_icon = IconLoader.getIcon("/icons/sdk_16.svg");
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.intellij.tutorials.module;
|
||||
package org.intellij.sdk.module;
|
||||
|
||||
import com.intellij.ide.util.projectWizard.*;
|
||||
import com.intellij.openapi.Disposable;
|
||||
@ -7,9 +7,6 @@ import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoModuleBuilder extends ModuleBuilder {
|
||||
@Override
|
||||
public void setupRootModel(ModifiableRootModel model) throws ConfigurationException {
|
@ -1,16 +1,14 @@
|
||||
package com.intellij.tutorials.module;
|
||||
package org.intellij.sdk.module;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.util.projectWizard.*;
|
||||
import com.intellij.openapi.module.*;
|
||||
import com.intellij.openapi.roots.ui.configuration.ModulesProvider;
|
||||
import icons.SdkIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoModuleType extends ModuleType<DemoModuleBuilder> {
|
||||
private static final String ID = "DEMO_MODULE_TYPE";
|
||||
|
||||
@ -43,7 +41,7 @@ public class DemoModuleType extends ModuleType<DemoModuleBuilder> {
|
||||
|
||||
@Override
|
||||
public Icon getNodeIcon(@Deprecated boolean b) {
|
||||
return AllIcons.General.Information;
|
||||
return SdkIcons.Sdk_default_icon;
|
||||
}
|
||||
|
||||
@NotNull
|
@ -1,12 +1,11 @@
|
||||
package com.intellij.tutorials.module;
|
||||
// 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 org.intellij.sdk.module;
|
||||
|
||||
import com.intellij.ide.util.projectWizard.ModuleWizardStep;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Anna Bulenkova
|
||||
*/
|
||||
public class DemoModuleWizardStep extends ModuleWizardStep {
|
||||
@Override
|
||||
public JComponent getComponent() {
|
41
module/src/main/resources/META-INF/plugin.xml
Normal file
41
module/src/main/resources/META-INF/plugin.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<idea-plugin>
|
||||
|
||||
<!-- Unique id for this plugin. Must stay constant for the life of the plugin. -->
|
||||
<id>org.intellij.sdk.module</id>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<description></description>
|
||||
<!-- Text to display as description on Preferences/Settings | Plugin page -->
|
||||
<description>
|
||||
<![CDATA[
|
||||
Demonstrates example of working with module types<br>Adds <i>SDK Demo Module</i> to <b>File | New | Project...</b>
|
||||
]]>
|
||||
</description>
|
||||
<change-notes>
|
||||
<![CDATA[
|
||||
<ul>
|
||||
<li><b>2.0.0</b> Convert to Gradle-based plugin, change plugin ID</li>
|
||||
<li><b>1.0.0</b> Release 2018.3 and earlier.</li>
|
||||
</ul>
|
||||
]]>
|
||||
</change-notes>
|
||||
|
||||
<!-- Text to display as company information on Preferences/Settings | Plugin page -->
|
||||
<vendor url="https://plugins.jetbrains.com">IntelliJ Platform SDK</vendor>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<moduleType id="DEMO_MODULE_TYPE" implementationClass="org.intellij.sdk.module.DemoModuleType"/>
|
||||
</extensions>
|
||||
|
||||
</idea-plugin>
|
58
module/src/main/resources/META-INF/pluginIcon.svg
Normal file
58
module/src/main/resources/META-INF/pluginIcon.svg
Normal file
@ -0,0 +1,58 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="81" height="80" viewBox="0 0 81 80">
|
||||
<defs>
|
||||
<linearGradient id="pluginsdk_80-a" x1="-.031%" x2="100.053%" y1="49.963%" y2="49.963%">
|
||||
<stop offset="25.81%" stop-color="#F97A12"/>
|
||||
<stop offset="45.91%" stop-color="#B07B58"/>
|
||||
<stop offset="72.41%" stop-color="#577BAE"/>
|
||||
<stop offset="91.05%" stop-color="#1E7CE5"/>
|
||||
<stop offset="100%" stop-color="#087CFA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="pluginsdk_80-b" x1="27.55%" x2="82.223%" y1="34.514%" y2="77.605%">
|
||||
<stop offset="0%" stop-color="#F97A12"/>
|
||||
<stop offset="7.18%" stop-color="#CB7A3E"/>
|
||||
<stop offset="15.41%" stop-color="#9E7B6A"/>
|
||||
<stop offset="24.2%" stop-color="#757B91"/>
|
||||
<stop offset="33.44%" stop-color="#537BB1"/>
|
||||
<stop offset="43.24%" stop-color="#387CCC"/>
|
||||
<stop offset="53.81%" stop-color="#237CE0"/>
|
||||
<stop offset="65.52%" stop-color="#147CEF"/>
|
||||
<stop offset="79.25%" stop-color="#0B7CF7"/>
|
||||
<stop offset="100%" stop-color="#087CFA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="pluginsdk_80-c" x1="63.121%" x2="40.793%" y1="97.699%" y2="-6.587%">
|
||||
<stop offset="0%" stop-color="#FE315D"/>
|
||||
<stop offset="7.84%" stop-color="#CB417E"/>
|
||||
<stop offset="16.01%" stop-color="#9E4E9B"/>
|
||||
<stop offset="24.74%" stop-color="#755BB4"/>
|
||||
<stop offset="33.92%" stop-color="#5365CA"/>
|
||||
<stop offset="43.65%" stop-color="#386DDB"/>
|
||||
<stop offset="54.14%" stop-color="#2374E9"/>
|
||||
<stop offset="65.76%" stop-color="#1478F3"/>
|
||||
<stop offset="79.4%" stop-color="#0B7BF8"/>
|
||||
<stop offset="100%" stop-color="#087CFA"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="pluginsdk_80-d" x1="25.331%" x2="93.854%" y1="24.119%" y2="132.621%">
|
||||
<stop offset="0%" stop-color="#FE315D"/>
|
||||
<stop offset="4.023%" stop-color="#F63462"/>
|
||||
<stop offset="10.37%" stop-color="#DF3A71"/>
|
||||
<stop offset="16.67%" stop-color="#C24383"/>
|
||||
<stop offset="29.12%" stop-color="#AD4A91"/>
|
||||
<stop offset="54.98%" stop-color="#755BB4"/>
|
||||
<stop offset="91.75%" stop-color="#1D76ED"/>
|
||||
<stop offset="100%" stop-color="#087CFA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<g fill-rule="nonzero" transform="translate(8 8)">
|
||||
<path fill="url(#pluginsdk_80-a)" d="M6.08754566,64 L2.66453526e-15,59.1000946 L0,26.7918961 L30,38.6703369 L10.1403967,64 L6.08754566,64 Z"/>
|
||||
<path fill="url(#pluginsdk_80-b)" d="M20.9524706,64 L52.2740919,31.9159091 L37.6708832,0.460194805 L38.0580944,1.33226763e-15 L64,0 L64,64 L20.9524706,64 Z"/>
|
||||
<path fill="url(#pluginsdk_80-c)" d="M34.4123783,0 L64,0 L64,28.0366227 L49.0078336,44 L34,0.44696173 L34.4123783,0 Z"/>
|
||||
<path fill="url(#pluginsdk_80-d)" d="M30.3358775,64 L0,64 L0,49.9709549 L6.23437817,29.2830519 L0,27.1596093 L0,0 L39.4697238,0 L58,21.3844805 L30.5381317,63.9259091 L30.3358775,64 Z"/>
|
||||
</g>
|
||||
<g fill-rule="nonzero" transform="translate(12 12)">
|
||||
<rect width="56" height="56" fill="#000"/>
|
||||
<rect width="22" height="4" x="4" y="46" fill="#FFFEFE"/>
|
||||
<path fill="#FFFEFE" d="M11.128,25.28 C8.584,25.28 6.016,24.392 4,22.592 L6.184,19.976 C7.696,21.224 9.28,22.016 11.2,22.016 C12.712,22.016 13.624,21.416 13.624,20.432 L13.624,20.384 C13.624,19.448 13.048,18.968 10.24,18.248 C6.856,17.384 4.672,16.448 4.672,13.112 L4.672,13.064 C4.672,10.016 7.12,8 10.552,8 C13,8 15.088,8.768 16.792,10.136 L14.872,12.92 C13.384,11.888 11.92,11.264 10.504,11.264 C9.088,11.264 8.344,11.912 8.344,12.728 L8.344,12.776 C8.344,13.88 9.064,14.24 11.968,14.984 C15.376,15.872 17.296,17.096 17.296,20.024 L17.296,20.072 C17.296,23.408 14.752,25.28 11.128,25.28 Z M19.512,25.04 L19.512,8.24 L26.064,8.24 C31.344,8.24 34.992,11.864 34.992,16.592 L34.992,16.64 C34.992,21.368 31.344,25.04 26.064,25.04 L19.512,25.04 Z M26.064,11.576 L23.208,11.576 L23.208,21.704 L26.064,21.704 C29.088,21.704 31.128,19.664 31.128,16.688 L31.128,16.64 C31.128,13.664 29.088,11.576 26.064,11.576 Z M37.28,25.04 L37.28,8.24 L40.976,8.24 L40.976,15.584 L47.744,8.24 L52.28,8.24 L45.416,15.368 L52.568,25.04 L48.128,25.04 L42.92,17.888 L40.976,19.904 L40.976,25.04 L37.28,25.04 Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
7
module/src/main/resources/icons/sdk_16.svg
Normal file
7
module/src/main/resources/icons/sdk_16.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="none" transform="translate(1 1)">
|
||||
<rect width="14" height="14" fill="#000"/>
|
||||
<rect width="5" height="1" x="1" y="11" fill="#FFFEFE"/>
|
||||
<path fill="#FFFEFE" d="M1,5.96113281 L1.85546875,5.96113281 C1.89648438,6.30390625 2.2421875,6.52363281 2.74023438,6.52363281 C3.20019531,6.52363281 3.52539063,6.30097656 3.52539063,5.98164062 C3.52539063,5.71210937 3.31445313,5.55683594 2.79589844,5.44550781 L2.24511719,5.32832031 C1.47460938,5.1671875 1.09667969,4.76582031 1.09667969,4.12128906 C1.09667969,3.32441406 1.73828125,2.8 2.71386719,2.8 C3.64550781,2.8 4.3046875,3.32148437 4.33105469,4.07441406 L3.49902344,4.07441406 C3.45800781,3.74042969 3.14746094,3.51777344 2.71972656,3.51777344 C2.27734375,3.51777344 1.984375,3.72285156 1.984375,4.04511719 C1.984375,4.30585937 2.18652344,4.45527344 2.68164063,4.56074219 L3.19140625,4.66914062 C4.04101563,4.84785156 4.40722656,5.2140625 4.40722656,5.8703125 C4.40722656,6.72285156 3.75390625,7.24433594 2.69335938,7.24433594 C1.68554688,7.24433594 1.03222656,6.74921875 1,5.96113281 Z M5.19603365,2.90546875 L6.86009615,2.90546875 C8.11693209,2.90546875 8.84349459,3.6671875 8.84349459,4.99140625 C8.84349459,6.36542969 8.12572115,7.1359375 6.86009615,7.1359375 L5.19603365,7.1359375 L5.19603365,2.90546875 Z M6.08079927,3.66132812 L6.08079927,6.38007812 L6.71947115,6.38007812 C7.50169771,6.38007812 7.94115084,5.89960937 7.94115084,5.00605469 C7.94115084,4.15058594 7.48704927,3.66132812 6.71947115,3.66132812 L6.08079927,3.66132812 Z M10.5170673,7.1359375 L9.63230167,7.1359375 L9.63230167,2.90839844 L10.5170673,2.90839844 L10.5170673,4.7921875 L10.5698017,4.7921875 L12.1313251,2.90839844 L13.1157001,2.90839844 L11.5746845,4.76289062 L13.2240985,7.1359375 L12.1635517,7.1359375 L10.9360126,5.36640625 L10.5170673,5.86152344 L10.5170673,7.1359375 Z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
Loading…
x
Reference in New Issue
Block a user