Skip to content

Commit

Permalink
provide icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Feb 25, 2024
1 parent 6d96b42 commit 0504fd1
Show file tree
Hide file tree
Showing 8 changed files with 218 additions and 20 deletions.
96 changes: 96 additions & 0 deletions files/icons/vue_js_toolbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/main/java/de/espend/idea/vuejs/VueJsIcons.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package de.espend.idea.vuejs;

import com.intellij.openapi.util.IconLoader;

import javax.swing.*;

/**
* @author Daniel Espendiller <[email protected]>
*/
public class VueJsIcons {
public static final Icon VUE_JS_TOOLBOX = IconLoader.getIcon("/icons/vue_js_toolbox_linemarker.png", VueJsIcons.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.intellij.psi.PsiManager;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.util.indexing.FileBasedIndex;
import de.espend.idea.vuejs.VueJsIcons;
import de.espend.idea.vuejs.index.ComponentUsageIndex;
import de.espend.idea.vuejs.utils.VueJsUtil;
import org.jetbrains.annotations.Nls;
Expand Down Expand Up @@ -50,8 +51,8 @@ public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElemen
return;
}

NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(VuejsIcons.Vue)
.setTooltipText("Navigate to Usages")
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(VueJsIcons.VUE_JS_TOOLBOX)
.setTooltipText("Vue.js Toolbox: Navigate to Usages")
.setTargetRenderer(MyFileReferencePsiElementListCellRenderer::new)
.setTargets(NotNullLazyValue.lazy(() -> {
Collection<PsiElement> elements = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import com.intellij.psi.PsiFile;
import com.intellij.psi.xml.XmlTag;
import com.intellij.psi.xml.XmlTokenType;
import de.espend.idea.vuejs.VueJsIcons;
import de.espend.idea.vuejs.target.LocalFileComponentTargetSupplier;
import de.espend.idea.vuejs.utils.VueJsUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.vuejs.VuejsIcons;

import java.util.Collection;
import java.util.List;
Expand Down Expand Up @@ -47,8 +47,8 @@ public void collectSlowLineMarkers(@NotNull List<? extends PsiElement> psiElemen

String componentTag = xmlTag.getName();
if (components.containsKey(componentTag)) {
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(VuejsIcons.Vue)
.setTooltipText("Navigate to Vue.js file")
NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(VueJsIcons.VUE_JS_TOOLBOX)
.setTooltipText("Vue.js Toolbox: Navigate to Vue.js file")
.setTargets(NotNullLazyValue.lazy(new LocalFileComponentTargetSupplier(components, componentTag, psiElement)));

lineMarkerInfos.add(builder.createLineMarkerInfo(psiElement));
Expand Down
24 changes: 15 additions & 9 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<!-- Unique identifier of the plugin. It should be FQN. It cannot be changed between the plugin versions. -->
<id>de.espend.idea.vuejs</id>

<!-- Public plugin name should be written in Title Case.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-name -->
<name>Vue.js Toolbox</name>

<!-- A displayed Vendor name or Organization ID displayed on the Plugins Page. -->
<vendor email="[email protected]" url="http://espend.de?p=de.espend.idea.vuejs">espend_de</vendor>

<!-- Description of the plugin displayed on the Plugin Page and IDE Plugin Manager.
Simple HTML elements (text formatting, paragraphs, and lists) can be added inside of <![CDATA[ ]]> tag.
Guidelines: https://plugins.jetbrains.com/docs/marketplace/plugin-overview-page.html#plugin-description -->
<description><![CDATA[
Enter short description for your plugin here.<br>
<em>most HTML tags may be used</em>
]]></description>
<p>Provides additional <a href="https://vuejs.org/">Vue.js</a> support to all JetBrains IDEs that
<a href="https://www.jetbrains.com/products/#lang=js&type=ide">support JavaScript</a>.</p>
<h2>Features</h2>
<ul>
<li>LineMarker of components usages file</li>
<li>LineMarker for vue.js application entrypoint</li>
<li>LineMarker for vue.js application entrypoints</li>
</ul>
<h2>Getting started</h2>
<p>For information on getting started, head over to the <a href="https://www.jetbrains.com/help/">documentation</a> for your IDE.
For WebStorm, you can check out this section in the <a href="https://www.jetbrains.com/help/webstorm/vue-js.html">documentation</a>.</p>
]]></description>
<category>JavaScript Frameworks and Tools</category>

<!-- Product and plugin compatibility requirements.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
Expand Down
102 changes: 96 additions & 6 deletions src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/icons/[email protected]
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 0504fd1

Please sign in to comment.