Skip to content

Commit

Permalink
- version bumped
Browse files Browse the repository at this point in the history
- Plugin availability for IDEA 2019.3.*
- Revised codebase because of upcoming breaking changes in IDEA 2019.3.* and above
  • Loading branch information
Grav-IntelliJ-Plugin committed Mar 8, 2020
1 parent e38d972 commit 8cd95e4
Show file tree
Hide file tree
Showing 54 changed files with 273 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions GravSupport.iml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/testresources" type="java-test-resource" />
</content>
<orderEntry type="jdk" jdkName="IntelliJ IDEA IU-193.6494.35 (2)" jdkType="IDEA JDK" />
<orderEntry type="jdk" jdkName="IntelliJ IDEA IU-193.6494.35" jdkType="IDEA JDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="yaml" level="project" />
<orderEntry type="library" scope="PROVIDED" name="twig" level="project" />
<orderEntry type="module-library" scope="PROVIDED">
<library>
<CLASSES>
Expand All @@ -22,6 +20,8 @@
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" scope="PROVIDED" name="yaml" level="project" />
<orderEntry type="library" scope="PROVIDED" name="twig" level="project" />
<orderEntry type="library" scope="PROVIDED" name="php-openapi-src" level="project" />
<orderEntry type="library" name="gson-2.8.5" level="project" />
<orderEntry type="library" name="org.eclipse.egit.github.core-2.1.5" level="project" />
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ The plugin is also available in the [JetBrains Plugins Repository](https://plugi
The latest plugin supports the following Grav versions: 1.6.*, ...

Furthermore, I only provide support for PHP 7.*. If you have a lower version than the plugin may not work correctly.
To work with Grav, the PHP extensions `mbstring`, `curl` and `openssl` must be enabled.

## Install

**JetBrains Plugins Repository**
### JetBrains Plugins Repository

Open the settings menu <kbd>CTRL+ALT+S</kbd> or _File -> Settings_ and then
go to _Plugins_. Click on the button _Browse repositories_ and search for
Open the settings menu <kbd>CTRL+ALT+S</kbd> or **File | Settings** and then
go to **Plugins**. Click on the button _Browse repositories_ and search for
**Grav Support**.
This way you will get notified if a new update is available!

**GitHub Release**
### GitHub Releases

[Download the latest plugin](https://github.com/PioBeat/GravSupport/releases) and
install it via the settings menu: <kbd>CTRL+ALT+S</kbd> or _File -> Settings_
and then search for _Plugins -> Install plugins from disk_
install it via the settings menu: <kbd>CTRL+ALT+S</kbd> or **File | Settings**
and then under the category **Plugins**, click on the configuration wheel in the top bar and select **Install Plugin from Disk...**.

<br/>

Expand Down
4 changes: 2 additions & 2 deletions resources/META-INF/grav-php-features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<extensions defaultExtensionNs="com.intellij">
<directoryProjectGenerator id="Grav"
order="first"
implementation="net.offbeatpioneer.intellij.plugins.grav.module.php.GravProjectGenerator"/>
implementation="net.offbeatpioneer.intellij.plugins.grav.extensions.module.php.GravProjectGenerator"/>
<projectTemplatesFactory
implementation="net.offbeatpioneer.intellij.plugins.grav.module.php.GravProjectTemplateFactory"/>
implementation="net.offbeatpioneer.intellij.plugins.grav.extensions.module.php.GravProjectTemplateFactory"/>
</extensions>
</idea-plugin>
32 changes: 16 additions & 16 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>net.offbeatpioneer.intellij.plugins.gravsupport</id>
<name>Grav Support</name>
<version>0.5.0</version>
<version>0.5.1</version>
<vendor email="dominik@offbeat-pioneer.net" url="http://www.offbeat-pioneer.net/">Dominik Grzelak</vendor>

<description><![CDATA[
Expand All @@ -10,7 +10,7 @@

<change-notes><![CDATA[
<p>
<span>0.5.0</span>
<span>0.5.0/0.5.1</span>
<ul>
<li>Internal Changes</li>
<ul>
Expand Down Expand Up @@ -199,26 +199,26 @@

<!-- <project-components>-->
<!-- <component>-->
<!-- <implementation-class>net.offbeatpioneer.intellij.plugins.grav.project.GravProjectComponent-->
<!-- <implementation-class>net.offbeatpioneer.intellij.plugins.grav.listener.GravProjectComponent-->
<!-- </implementation-class>-->
<!-- </component>-->
<!-- </project-components>-->

<!-- replaces the former project-component class -->
<projectListeners>
<listener class="net.offbeatpioneer.intellij.plugins.grav.project.GravProjectListener"
<listener class="net.offbeatpioneer.intellij.plugins.grav.listener.GravProjectListener"
topic="com.intellij.openapi.project.impl.ProjectLifecycleListener"/>
</projectListeners>


<extensions defaultExtensionNs="com.intellij">
<sdkType implementation="net.offbeatpioneer.intellij.plugins.grav.module.GravSdkType"/>
<sdkType implementation="net.offbeatpioneer.intellij.plugins.grav.extensions.module.GravSdkType"/>

<moduleType id="GRAV_TYPE"
implementationClass="net.offbeatpioneer.intellij.plugins.grav.module.GravModuleType"/>
implementationClass="net.offbeatpioneer.intellij.plugins.grav.extensions.module.GravModuleType"/>
<!--<framework.type implementation="net.offbeatpioneer.module.GravFrameworkType"/>-->
<moduleBuilder order="first"
builderClass="net.offbeatpioneer.intellij.plugins.grav.module.builder.GravModuleBuilder"/>
builderClass="net.offbeatpioneer.intellij.plugins.grav.extensions.module.builder.GravModuleBuilder"/>
<!--ModuleConfigurationExtensionProvider-->
<!--<fileTypeFactory implementation="com.jetbrains.php.PhpFileTypeFactory"/>-->

Expand All @@ -233,14 +233,14 @@
serviceInterface="net.offbeatpioneer.intellij.plugins.grav.storage.GravPersistentStateComponent"
serviceImplementation="net.offbeatpioneer.intellij.plugins.grav.storage.GravPersistentStateComponent"/>
<projectService
serviceInterface="net.offbeatpioneer.intellij.plugins.grav.project.settings.GravProjectSettings"
serviceImplementation="net.offbeatpioneer.intellij.plugins.grav.project.settings.GravProjectSettings"/>
serviceInterface="net.offbeatpioneer.intellij.plugins.grav.storage.GravProjectSettings"
serviceImplementation="net.offbeatpioneer.intellij.plugins.grav.storage.GravProjectSettings"/>
<applicationConfigurable groupId="languages"
displayName="Grav"
id="preferences.Grav.AppSettings"
instance="net.offbeatpioneer.intellij.plugins.grav.application.settings.GravApplicationConfigurable"/>
<projectConfigurable
instance="net.offbeatpioneer.intellij.plugins.grav.project.settings.GravProjectConfigurable"
instance="net.offbeatpioneer.intellij.plugins.grav.extensions.configurables.GravProjectConfigurable"
displayName="Grav"
groupId="language"
id="preferences.Grav.ProjectSettings"
Expand All @@ -258,14 +258,14 @@

<!-- file types are now specified individually instead of using the file type factory-->
<fileType name="Theme blueprints"
implementationClass="net.offbeatpioneer.intellij.plugins.grav.files.ThemeBlueprintsFileType"
implementationClass="net.offbeatpioneer.intellij.plugins.grav.extensions.files.ThemeBlueprintsFileType"
fieldName="INSTANCE" language="yaml" extensions="yaml"/>
<fileType name="Theme configuration"
implementationClass="net.offbeatpioneer.intellij.plugins.grav.files.ThemeConfigurationFileType"
implementationClass="net.offbeatpioneer.intellij.plugins.grav.extensions.files.ThemeConfigurationFileType"
fieldName="INSTANCE" language="yaml" extensions="yaml"/>

<!-- <fileTypeFactory-->
<!-- implementation="net.offbeatpioneer.intellij.plugins.grav.files.GravConfigurationFileTypeFactory"/>-->
<!-- implementation="net.offbeatpioneer.intellij.plugins.grav.extensions.files.GravConfigurationFileTypeFactory"/>-->
<!--File type support-->
<internalFileTemplate name="Grav Theme Blueprints"/>
<internalFileTemplate name="Grav Theme Configuration"/>
Expand All @@ -274,11 +274,11 @@
id="Grav"
anchor="right"
icon="/icons/icon_toolwindow.png"
conditionClass="net.offbeatpioneer.intellij.plugins.grav.toolwindow.SystemSettingsToolWindowFactory"
factoryClass="net.offbeatpioneer.intellij.plugins.grav.toolwindow.SystemSettingsToolWindowFactory"/>
conditionClass="net.offbeatpioneer.intellij.plugins.grav.extensions.toolwindow.SystemSettingsToolWindowFactory"
factoryClass="net.offbeatpioneer.intellij.plugins.grav.extensions.toolwindow.SystemSettingsToolWindowFactory"/>

<intentionAction>
<className>net.offbeatpioneer.intellij.plugins.grav.intentions.ConvertTwigResource</className>
<className>net.offbeatpioneer.intellij.plugins.grav.extensions.intentions.ConvertTwigResource</className>
<category>Grav</category>
<descriptionDirectoryName>ConvertTwigResource</descriptionDirectoryName>
</intentionAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
import net.offbeatpioneer.intellij.plugins.grav.assets.GravIcons;
import net.offbeatpioneer.intellij.plugins.grav.helper.NotificationHelper;
import net.offbeatpioneer.intellij.plugins.grav.helper.ProcessUtils;
import net.offbeatpioneer.intellij.plugins.grav.module.GravModuleType;
import net.offbeatpioneer.intellij.plugins.grav.project.GravProjectComponent;
import net.offbeatpioneer.intellij.plugins.grav.extensions.module.GravModuleType;
import net.offbeatpioneer.intellij.plugins.grav.helper.ProjectChecker;
import net.offbeatpioneer.intellij.plugins.grav.listener.GravProjectComponent;
import org.jetbrains.annotations.NotNull;

import java.io.File;
Expand Down Expand Up @@ -73,6 +74,10 @@ public void actionPerformed(AnActionEvent e) {
final Project project = CommonDataKeys.PROJECT.getData(dataContext);
final Module module = LangDataKeys.MODULE.getData(dataContext);
final IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);

ProjectChecker.checkProject(project);


if (view == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import com.intellij.psi.PsiElement;
import com.intellij.util.PlatformIcons;
import com.intellij.util.ui.JBUI;
import net.offbeatpioneer.intellij.plugins.grav.files.AbstractGravFileType;
import net.offbeatpioneer.intellij.plugins.grav.files.GravFileTypes;
import net.offbeatpioneer.intellij.plugins.grav.extensions.files.AbstractGravFileType;
import net.offbeatpioneer.intellij.plugins.grav.extensions.files.GravFileTypes;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiNameIdentifierOwner;
import net.offbeatpioneer.intellij.plugins.grav.project.GravProjectComponent;
import net.offbeatpioneer.intellij.plugins.grav.listener.GravProjectComponent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import com.intellij.psi.PsiElement;
import com.intellij.util.IncorrectOperationException;
import net.offbeatpioneer.intellij.plugins.grav.assets.GravIcons;
import net.offbeatpioneer.intellij.plugins.grav.files.GravFileTypes;
import net.offbeatpioneer.intellij.plugins.grav.extensions.files.GravFileTypes;
import net.offbeatpioneer.intellij.plugins.grav.helper.FileCreateUtil;
import net.offbeatpioneer.intellij.plugins.grav.helper.GravFileTemplateUtil;
import net.offbeatpioneer.intellij.plugins.grav.module.GravModuleType;
import net.offbeatpioneer.intellij.plugins.grav.project.GravProjectComponent;
import net.offbeatpioneer.intellij.plugins.grav.extensions.module.GravModuleType;
import net.offbeatpioneer.intellij.plugins.grav.listener.GravProjectComponent;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
Expand Down Expand Up @@ -71,7 +71,7 @@ protected PsiElement createFile(String name, String templateName, PsiDirectory d
@Override
protected void buildDialog(Project project, PsiDirectory directory, CustomCreateFileFromTemplateDialog.Builder builder) {
builder.setTitle(IdeBundle.message("action.create.new.class"));
for (FileTemplate fileTemplate : GravFileTemplateUtil.getAvailableThemeConfigurationTemplates()) {
for (FileTemplate fileTemplate : GravFileTemplateUtil.getAvailableThemeConfigurationTemplates(project)) {
final String templateName = fileTemplate.getName();
final String shortName = GravFileTemplateUtil.getTemplateShortName(templateName);
final Icon icon = GravIcons.Grav;
Expand Down
Loading

0 comments on commit 8cd95e4

Please sign in to comment.