mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added idea support
This commit is contained in:
+12
@@ -68,4 +68,16 @@ public class CCNewProjectPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public JTextField getAuthorField() {
|
||||
return myAuthorField;
|
||||
}
|
||||
|
||||
public JTextArea getDescriptionField() {
|
||||
return myDescription;
|
||||
}
|
||||
|
||||
public JTextField getNameField() {
|
||||
return myName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/pluginResources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/pluginResources/fileTemplates/internal" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/pluginResources/fileTemplates/j2ee" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="lang-api" />
|
||||
<orderEntry type="module" module-name="platform-impl" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,44 @@
|
||||
<idea-plugin version="2">
|
||||
<id>com.jetbrains.edu.interactivelearning.intellij</id>
|
||||
<name>Educational plugin for Intellij</name>
|
||||
<version>2.0</version>
|
||||
|
||||
<description><![CDATA[
|
||||
Educational plugin core for students.
|
||||
]]></description>
|
||||
|
||||
<change-notes><![CDATA[
|
||||
|
||||
]]>
|
||||
</change-notes>
|
||||
|
||||
<depends>com.intellij.modules.python</depends>
|
||||
<depends>com.jetbrains.edu.interactivelearning</depends>
|
||||
<depends>com.jetbrains.python.edu.interactivelearning.python</depends>
|
||||
|
||||
<!-- please see http://confluence.jetbrains.net/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
|
||||
on how to target different products -->
|
||||
|
||||
<depends>com.intellij.modules.lang</depends>
|
||||
|
||||
<project-components>
|
||||
|
||||
</project-components>
|
||||
|
||||
<application-components>
|
||||
|
||||
</application-components>
|
||||
|
||||
<actions>
|
||||
|
||||
</actions>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<projectTemplatesFactory implementation="EduProjectTemplateFactory"/>
|
||||
</extensions>
|
||||
|
||||
<extensionPoints>
|
||||
<extensionPoint name="EduProjectTemplate" interface="EduProjectTemplate"/>
|
||||
</extensionPoints>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -0,0 +1,28 @@
|
||||
import com.intellij.ide.util.projectWizard.WizardInputField;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.platform.ProjectTemplate;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public abstract class EduProjectTemplate implements ProjectTemplate {
|
||||
public static final ExtensionPointName<EduProjectTemplate> EP_NAME = ExtensionPointName.create("com.jetbrains.edu.interactivelearning.intellij.EduProjectTemplate");
|
||||
|
||||
public static WizardInputField createWizardInputField(String id, final String label, final JComponent component) {
|
||||
return new WizardInputField(id, id) {
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import com.intellij.ide.util.projectWizard.WizardContext;
|
||||
import com.intellij.platform.ProjectTemplate;
|
||||
import com.intellij.platform.ProjectTemplatesFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EduProjectTemplateFactory extends ProjectTemplatesFactory {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[] getGroups() {
|
||||
return new String[] {"Edu"};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ProjectTemplate[] createTemplates(@Nullable String group, WizardContext context) {
|
||||
return EduProjectTemplate.EP_NAME.getExtensions();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class StudyTreeStructureProvider implements TreeStructureProvider, DumbAw
|
||||
if (project != null) {
|
||||
if (node.getValue() instanceof PsiDirectory) {
|
||||
final PsiDirectory nodeValue = (PsiDirectory)node.getValue();
|
||||
if (!nodeValue.getName().contains(EduNames.USER_TESTS)) {
|
||||
if (!nodeValue.getName().contains(EduNames.USER_TESTS) && !nodeValue.getName().equals(".idea")) {
|
||||
StudyDirectoryNode newNode = new StudyDirectoryNode(project, nodeValue, settings);
|
||||
nodes.add(newNode);
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="54488" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="54488" binding="myInfoPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="2" hsize-policy="4" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ public class StudyNewProjectPanel{
|
||||
private JLabel myAuthorLabel;
|
||||
private JLabel myDescriptionLabel;
|
||||
private JLabel myLabel;
|
||||
private JPanel myInfoPanel;
|
||||
private final StudyProjectGenerator myGenerator;
|
||||
private static final String CONNECTION_ERROR = "<html>Failed to download courses.<br>Check your Internet connection.</html>";
|
||||
private static final String INVALID_COURSE = "Selected course is invalid";
|
||||
@@ -133,4 +134,11 @@ public class StudyNewProjectPanel{
|
||||
}
|
||||
}
|
||||
|
||||
public JComboBox getCoursesComboBox() {
|
||||
return myCoursesComboBox;
|
||||
}
|
||||
|
||||
public JPanel getInfoPanel() {
|
||||
return myInfoPanel;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user