Skip to content

Commit

Permalink
Adding initial project files
Browse files Browse the repository at this point in the history
  • Loading branch information
RAVEENSR committed Nov 5, 2017
1 parent 67f29cf commit 20f2aed
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# IntelliJ project files
*.iml
.idea
out
gen
.gradle/
build/
28 changes: 28 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
buildscript {
repositories {
maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
}

}

plugins {
id "org.jetbrains.intellij" version "0.2.17"
}

repositories {
mavenCentral()
}

apply plugin: 'java'
sourceCompatibility = 1.8
group 'org.myorg'
version '1.0-SNAPSHOT'

apply plugin: 'org.jetbrains.intellij'
intellij {
//For a full list of IntelliJ IDEA releases, please see https://www.jetbrains.com/intellij-repository/releases.
version 'IC-2017.2.5'
pluginName 'Sample-Plugin'
updateSinceUntilBuild false
plugins 'coverage' //Bundled plugin dependencies
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'SimplePlugin'

40 changes: 40 additions & 0 deletions src/main/java/org/myorg/SimpleFileType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.myorg;

import com.intellij.openapi.fileTypes.LanguageFileType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.Icon;

public class SimpleFileType extends LanguageFileType {

public static final SimpleFileType INSTANCE = new SimpleFileType();

private SimpleFileType() {
super(SimpleLanguage.INSTANCE);
}

@NotNull
@Override
public String getName() {
return "Simple file";
}

@NotNull
@Override
public String getDescription() {
return "Simple language file";
}

@NotNull
@Override
public String getDefaultExtension() {
return "simple";
}

@Nullable
@Override
public Icon getIcon() {
return SimpleIcons.ICON;
}
}
13 changes: 13 additions & 0 deletions src/main/java/org/myorg/SimpleFileTypeFactory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.myorg;

import com.intellij.openapi.fileTypes.FileTypeConsumer;
import com.intellij.openapi.fileTypes.FileTypeFactory;
import org.jetbrains.annotations.NotNull;

public class SimpleFileTypeFactory extends FileTypeFactory {

@Override
public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) {
fileTypeConsumer.consume(SimpleFileType.INSTANCE, "simple");
}
}
9 changes: 9 additions & 0 deletions src/main/java/org/myorg/SimpleIcons.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.myorg;

import com.intellij.openapi.util.IconLoader;

import javax.swing.*;

public class SimpleIcons {
public static final Icon ICON = IconLoader.getIcon("/icons/simple.png");
}
11 changes: 11 additions & 0 deletions src/main/java/org/myorg/SimpleLanguage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.myorg;

import com.intellij.lang.Language;

public class SimpleLanguage extends Language {
public static final SimpleLanguage INSTANCE = new SimpleLanguage();

private SimpleLanguage() {
super("Simple");
}
}
35 changes: 35 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<idea-plugin>
<id>org.myorg</id>
<name>Simple</name>
<version>1.0</version>
<vendor email="sample@sample.com" url="sample.com">Sample</vendor>

<description><![CDATA[
Enter short description for your plugin here.<br>
<em>most HTML tags may be used</em>
]]></description>

<change-notes><![CDATA[
Add change notes here.<br>
<em>most HTML tags may be used</em>
]]>
</change-notes>

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

<!-- 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">
<fileTypeFactory implementation="org.myorg.SimpleFileTypeFactory"/>
</extensions>

<actions>
<!-- Add your actions here -->
</actions>

</idea-plugin>
Binary file added src/main/resources/icons/simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 20f2aed

Please sign in to comment.