Skip to content

Commit 726466b

Browse files
committed
The first version
1 parent 99b55ba commit 726466b

71 files changed

Lines changed: 5462 additions & 2 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target/
2+
nbproject/private/

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
1-
# codic-netbeans-plugin
2-
Codic Plugin for NetBeans
1+
# Codic NetBeans Plugin
2+
3+
エディタでCodicのネーミング生成機能を利用するためのNetBeansのプラグインです。
4+
5+
## 環境
6+
7+
- NetBeans 8.1+
8+
9+
## インストール
10+
11+
[releases](https://github.com/codic-project/codic-netbeans-plugin/releases)からnbmをダウンロードします。
12+
ツール > プラグイン > ダウンロード済 > プラグインの追加 からダウンロードしたnbmを選択してインストールします。
13+
14+
## 使い方
15+
16+
#### キーマップの設定
17+
18+
ツール > オプション > キーマップ で`codic-translate` のアクションに適当なショートカットを設定してください。
19+
20+
#### Codicの設定
21+
22+
ツール > オプション > その他 > Codic で以下のオプションを設定してください。
23+
プロジェクト毎に設定したい場合は、プロジェクト・プロパティ > Codicで同様の設定をすることができます。
24+
25+
- Access Token(必須:ログインした状態で[APIステータスページ](https://codic.jp/my/api_status)から取得)
26+
- Project(必須)
27+
- Casing
28+
29+
**注意1:** Casingの指定がない場合の動作は以下の通りです。
30+
31+
- スペース区切りのネーミングを取得します。
32+
- さらに、内部で他のケースにも変換したものを候補として表示します。
33+
34+
**注意2:** プロジェクト・プロパティでグローバルオプションを使うを選択して設定を有効にする場合は、保存されているAccess Tokenは初期化されます。
35+
36+
**注意3:** 一部のプロジェクト(e.g. C/C++)では、プロジェクトの設定を使用することができません。
37+
38+
39+
#### ネーミング生成
40+
41+
キーマップの設定で指定したショートカットを実行すると、ネーミング生成用のダイアログが表示されます。
42+
テキストフィールドがフォーカスされている時の各キーの動作は次の通りです。
43+
44+
|Key |動作 |
45+
|:----------------------------------|:-------------------------------------------------|
46+
|<kbd>Enter</kbd> |選択されている候補を挿入する |
47+
|<kbd>Shift</kbd> + <kbd>Enter</kbd>|ネーミングを取得する |
48+
|<kbd>Shift</kbd> + <kbd>↑</kbd> |選択されているケースを1つ上のものに変更する |
49+
|<kbd>Shift</kbd> + <kbd>↓</kbd> |選択されているケースを1つ下のものに変更する |
50+
|<kbd>↑</kbd> |選択されているネーミング候補を1つ上のものに変更する|
51+
|<kbd>↓</kbd> |選択されているネーミング候補を1つ下のものに変更する|
52+
53+
変換したい日本語をエディタ内で選択してから実行することも可能です。
54+
55+
## バグ・リクエスト
56+
57+
バグやリクエストがありましたら、GitHubの [Issues](https://github.com/codic-project/codic-netbeans-plugin/issues) へ報告をおねがいします。

license.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
The MIT license
2+
3+
Copyright (c) 2016 junichi11
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.

nb-configuration.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<org-netbeans-modules-editor-indent.text.x-fortran.CodeStyle.project.text-limit-width>132</org-netbeans-modules-editor-indent.text.x-fortran.CodeStyle.project.text-limit-width>
17+
<org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>
18+
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
19+
<org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>
20+
<org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>
21+
<org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>
22+
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
23+
<org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
24+
<netbeans.hint.license>mit</netbeans.hint.license>
25+
</properties>
26+
</project-shared-configuration>

pom.xml

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>jp.codic.plugins.netbeans</groupId>
5+
<artifactId>codic-netbeans-plugin</artifactId>
6+
<version>1.0.0</version>
7+
<packaging>nbm</packaging>
8+
<properties>
9+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10+
<netbeans.api.version>RELEASE81</netbeans.api.version>
11+
</properties>
12+
<build>
13+
<plugins>
14+
<plugin>
15+
<groupId>org.codehaus.mojo</groupId>
16+
<artifactId>nbm-maven-plugin</artifactId>
17+
<version>3.13</version>
18+
<extensions>true</extensions>
19+
<configuration>
20+
<codeNameBase>jp.codic.plugins.netbneas</codeNameBase>
21+
<author>Junichi Yamamoto(junichi11)</author>
22+
<licenseName>The MIT License</licenseName>
23+
<licenseFile>license.txt</licenseFile>
24+
<requiresRestart>true</requiresRestart>
25+
<homePageUrl>https://github.com/codic-project/codic-netbeans-plugin</homePageUrl>
26+
</configuration>
27+
</plugin>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-compiler-plugin</artifactId>
31+
<version>2.5.1</version>
32+
<configuration>
33+
<source>1.7</source>
34+
<target>1.7</target>
35+
</configuration>
36+
</plugin>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-jar-plugin</artifactId>
40+
<version>2.4</version>
41+
<configuration>
42+
<useDefaultManifestFile>true</useDefaultManifestFile>
43+
</configuration>
44+
</plugin>
45+
<plugin>
46+
<groupId>org.apache.maven.plugins</groupId>
47+
<artifactId>maven-surefire-plugin</artifactId>
48+
<version>2.15</version>
49+
</plugin>
50+
</plugins>
51+
</build>
52+
<repositories>
53+
<repository>
54+
<id>netbeans</id>
55+
<name>Repository hosting NetBeans modules</name>
56+
<url>http://bits.netbeans.org/nexus/content/groups/netbeans</url>
57+
<snapshots>
58+
<enabled>false</enabled>
59+
</snapshots>
60+
</repository>
61+
</repositories>
62+
<dependencies>
63+
<dependency>
64+
<groupId>org.netbeans.api</groupId>
65+
<artifactId>org-netbeans-api-annotations-common</artifactId>
66+
<version>${netbeans.api.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.netbeans.api</groupId>
70+
<artifactId>org-openide-util</artifactId>
71+
<version>${netbeans.api.version}</version>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.google.code.gson</groupId>
75+
<artifactId>gson</artifactId>
76+
<version>2.5</version>
77+
</dependency>
78+
<dependency>
79+
<groupId>org.netbeans.api</groupId>
80+
<artifactId>org-netbeans-modules-editor-lib</artifactId>
81+
<version>${netbeans.api.version}</version>
82+
<type>jar</type>
83+
</dependency>
84+
<dependency>
85+
<groupId>org.netbeans.api</groupId>
86+
<artifactId>org-netbeans-modules-editor</artifactId>
87+
<version>${netbeans.api.version}</version>
88+
<type>jar</type>
89+
</dependency>
90+
<dependency>
91+
<groupId>org.netbeans.api</groupId>
92+
<artifactId>org-netbeans-modules-projectapi</artifactId>
93+
<version>${netbeans.api.version}</version>
94+
<type>jar</type>
95+
</dependency>
96+
<dependency>
97+
<groupId>org.netbeans.api</groupId>
98+
<artifactId>org-openide-filesystems</artifactId>
99+
<version>${netbeans.api.version}</version>
100+
</dependency>
101+
<dependency>
102+
<groupId>org.netbeans.api</groupId>
103+
<artifactId>org-openide-awt</artifactId>
104+
<version>${netbeans.api.version}</version>
105+
<type>jar</type>
106+
</dependency>
107+
<dependency>
108+
<groupId>org.netbeans.api</groupId>
109+
<artifactId>org-netbeans-modules-options-api</artifactId>
110+
<version>${netbeans.api.version}</version>
111+
<type>jar</type>
112+
</dependency>
113+
<dependency>
114+
<groupId>org.netbeans.api</groupId>
115+
<artifactId>org-openide-dialogs</artifactId>
116+
<version>${netbeans.api.version}</version>
117+
</dependency>
118+
<dependency>
119+
<groupId>org.netbeans.api</groupId>
120+
<artifactId>org-openide-util-ui</artifactId>
121+
<version>${netbeans.api.version}</version>
122+
</dependency>
123+
<dependency>
124+
<groupId>org.netbeans.api</groupId>
125+
<artifactId>org-openide-util-lookup</artifactId>
126+
<version>${netbeans.api.version}</version>
127+
</dependency>
128+
<dependency>
129+
<groupId>org.netbeans.api</groupId>
130+
<artifactId>org-openide-windows</artifactId>
131+
<version>${netbeans.api.version}</version>
132+
</dependency>
133+
<dependency>
134+
<groupId>org.netbeans.api</groupId>
135+
<artifactId>org-openide-text</artifactId>
136+
<version>${netbeans.api.version}</version>
137+
</dependency>
138+
<dependency>
139+
<groupId>org.netbeans.external</groupId>
140+
<artifactId>org-apache-commons-lang</artifactId>
141+
<version>${netbeans.api.version}</version>
142+
</dependency>
143+
<dependency>
144+
<groupId>junit</groupId>
145+
<artifactId>junit</artifactId>
146+
<version>4.12</version>
147+
<scope>test</scope>
148+
</dependency>
149+
<dependency>
150+
<groupId>org.hamcrest</groupId>
151+
<artifactId>hamcrest-core</artifactId>
152+
<version>1.3</version>
153+
<scope>test</scope>
154+
</dependency>
155+
<dependency>
156+
<groupId>org.netbeans.api</groupId>
157+
<artifactId>org-netbeans-modules-projectuiapi</artifactId>
158+
<version>${netbeans.api.version}</version>
159+
</dependency>
160+
<dependency>
161+
<groupId>org.netbeans.api</groupId>
162+
<artifactId>org-netbeans-modules-autoupdate-services</artifactId>
163+
<version>${netbeans.api.version}</version>
164+
<type>jar</type>
165+
</dependency>
166+
<dependency>
167+
<groupId>org.netbeans.api</groupId>
168+
<artifactId>org-openide-modules</artifactId>
169+
<version>${netbeans.api.version}</version>
170+
</dependency>
171+
</dependencies>
172+
<name>Codic</name>
173+
<description>This plugin provides support for Codic.
174+
</description>
175+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* The MIT License
3+
*
4+
* Copyright 2016 junichi11.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
package jp.codic.plugins.netbeans.client;
25+
26+
/**
27+
*
28+
* @author junichi11
29+
*/
30+
public interface Candidate {
31+
32+
String getText();
33+
34+
String getTextInCasing();
35+
}

0 commit comments

Comments
 (0)