Skip to content

Commit bb02870

Browse files
Merge pull request #7 from protostuff/feature/structure-view
Structure view
2 parents 10d385d + fb4b718 commit bb02870

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+740
-46
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Available idea versions:
22
# https://www.jetbrains.com/intellij-repository/releases
33
# https://www.jetbrains.com/intellij-repository/snapshots
4-
version=0.1.1
4+
version=0.2.0-SNAPSHOT
55
ideaVersion=145.258.11
66
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
77
# Java 8 is required to run IntelliJ IDEA starting from version 16

src/main/icons-src/constant.xcf

37.2 KB
Binary file not shown.

src/main/icons-src/convert.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
#
3+
# Script for convering source icon images from XCF (GIMP) to PNG format.
4+
# Uses ImageMagic's convert utility.
5+
6+
dst='./converted'
7+
8+
function convertXcf {
9+
image=$1
10+
echo "Converting ${image}"
11+
convert -alpha on -background none -layers merge "${image}.xcf" "${dst}/${image}@tmp.png"
12+
convert -resize 32x32 "${dst}/${image}@tmp.png" "${dst}/${image}@2x.png"
13+
convert -resize 16x16 "${dst}/${image}@tmp.png" "${dst}/${image}.png"
14+
rm "${dst}/${image}@tmp.png"
15+
}
16+
17+
18+
rm -rvf $dst
19+
mkdir $dst
20+
21+
convertXcf 'proto'
22+
convertXcf 'message'
23+
convertXcf 'enum'
24+
convertXcf 'service'
25+
convertXcf 'field'
26+
convertXcf 'constant'
27+
convertXcf 'rpc'

src/main/icons-src/enum.xcf

34.9 KB
Binary file not shown.

src/main/icons-src/field.xcf

35.1 KB
Binary file not shown.

src/main/icons-src/message.xcf

45.3 KB
Binary file not shown.
File renamed without changes.

src/main/icons-src/rpc.xcf

35.4 KB
Binary file not shown.

src/main/icons-src/service.xcf

39.6 KB
Binary file not shown.

src/main/java/io/protostuff/jetbrains/plugin/Icons.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,22 @@
55
import javax.swing.*;
66

77
/**
8+
* All icons used in the plugin.
9+
*
810
* http://www.jetbrains.org/intellij/sdk/docs/reference_guide/work_with_icons_and_images.html
911
*/
1012
public class Icons {
11-
public static final Icon PROTO_ICON = IconLoader.getIcon("/icons/proto.png");
13+
14+
private static final String BASEDIR = "/io/protostuff/protostuff-jetbrains-plugin/icons/";
15+
16+
public static final Icon PROTO = IconLoader.getIcon(BASEDIR + "proto.png");
17+
public static final Icon MESSAGE = IconLoader.getIcon(BASEDIR + "message.png");
18+
public static final Icon ENUM = IconLoader.getIcon(BASEDIR + "enum.png");
19+
public static final Icon SERVICE = IconLoader.getIcon(BASEDIR + "service.png");
20+
public static final Icon FIELD = IconLoader.getIcon(BASEDIR + "field.png");
21+
public static final Icon CONSTANT = IconLoader.getIcon(BASEDIR + "constant.png");
22+
public static final Icon RPC = IconLoader.getIcon(BASEDIR + "rpc.png");
23+
24+
private Icons(){}
25+
1226
}

0 commit comments

Comments
 (0)