Skip to content

Commit 6452da3

Browse files
committed
Keyboard shortcut does not format non java files #90
1 parent 591bc31 commit 6452da3

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ This plugin helps you to apply to a common code style in a team of Eclipse JDT a
4343
<br>
4444
<img src="https://raw.githubusercontent.com/markiewb/eclipsecodeformatter_for_netbeans/master/doc/project.png">
4545

46+
47+
<h2>Updates in 1.12.1.44 - 4.4 Fork:</h2>
48+
<ul>
49+
<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/90">Bugfix 88</a>]: Fixed: Keyboard shortcut does not format non java files</li>
50+
</ul>
51+
4652
<h2>Updates in 1.12.0.44 - 4.4 Fork:</h2>
4753
<ul>
4854
<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/89">Feature 89</a>]: Backport "Allow action to be invoked via macro"</li>

manifest.mf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Manifest-Version: 1.0
22
OpenIDE-Module: de.markiewb.netbeans.plugins.eclipse.formatter44
33
OpenIDE-Module-Layer: de/markiewb/netbeans/plugins/eclipse/formatter/layer.xml
44
OpenIDE-Module-Localizing-Bundle: de/markiewb/netbeans/plugins/eclipse/formatter/Bundle.properties
5-
OpenIDE-Module-Specification-Version: 1.12.0.44
5+
OpenIDE-Module-Specification-Version: 1.12.1.44

src/de/markiewb/netbeans/plugins/eclipse/formatter/Bundle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OpenIDE-Module-Long-Description=\
55
You only have to provide an Eclipse formatter configuration file.\n\
66
<h3>\n<font color="#FF0000">Known issue: When the Eclipse formatter is used the line-breakpoints at the formatted lines are lost. \
77
Class/Method/Field breakpoints will be preserved.\
8-
</font>\n</h3>\n<h2>Features:</h2>\n<ul>\n<li>Global configuration and project specific configuration</li>\n<li>On save action (Disabled by default)</li>\n<li>Shows the used formatter as notification (Enabled by default)</li>\n<li>Supports profiles (since 1.6)</li>\n<li>Supports format of selected text (since 1.7)</li>\n<li>Preserve breakpoints (experimental) (since 1.8)</li>\n<li>Code templates for @formatter:on/off (since 1.9)</li>\n<li>Supports <a href="https://code.google.com/a/eclipselabs.org/p/workspacemechanic/">Workspace Mechanic</a> configuration file (since 1.10)</li>\n<li>Support configuration from .settings/org.eclipse.jdt.core.prefs (absolute and relative paths) (since 1.10)</li>\n<li>On save action: Introduced option for formatting only the changed lines (since 1.10)</li>\n<li>Support configuration of linefeed (since 1.10)</li>\n<li>Support configuration of source level (since 1.10)</li>\n<li>Support for macro invocation (since 1.12)</li>\n</ul>\n\n<img src="https://raw.githubusercontent.com/markiewb/eclipsecodeformatter_for_netbeans/master/doc/global.png">\n<br>\n<img src="https://raw.githubusercontent.com/markiewb/eclipsecodeformatter_for_netbeans/master/doc/project.png">\n\n<h2>Updates in 1.12.0.44 - 4.4 Fork:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/89">Feature 89</a>]: Backport "Allow action to be invoked via macro"</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/87">Bugfix 87</a>]: Backport "Minor UI issues in options dialog"</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/88">Bugfix 88</a>]: Backport "Cannot be converted to URI/File: URI is not hierarchical."\
8+
</font>\n</h3>\n<h2>Features:</h2>\n<ul>\n<li>Global configuration and project specific configuration</li>\n<li>On save action (Disabled by default)</li>\n<li>Shows the used formatter as notification (Enabled by default)</li>\n<li>Supports profiles (since 1.6)</li>\n<li>Supports format of selected text (since 1.7)</li>\n<li>Preserve breakpoints (experimental) (since 1.8)</li>\n<li>Code templates for @formatter:on/off (since 1.9)</li>\n<li>Supports <a href="https://code.google.com/a/eclipselabs.org/p/workspacemechanic/">Workspace Mechanic</a> configuration file (since 1.10)</li>\n<li>Support configuration from .settings/org.eclipse.jdt.core.prefs (absolute and relative paths) (since 1.10)</li>\n<li>On save action: Introduced option for formatting only the changed lines (since 1.10)</li>\n<li>Support configuration of linefeed (since 1.10)</li>\n<li>Support configuration of source level (since 1.10)</li>\n<li>Support for macro invocation (since 1.12)</li>\n</ul>\n\n<img src="https://raw.githubusercontent.com/markiewb/eclipsecodeformatter_for_netbeans/master/doc/global.png">\n<br>\n<img src="https://raw.githubusercontent.com/markiewb/eclipsecodeformatter_for_netbeans/master/doc/project.png">\n\n\n<h2>Updates in 1.12.1.44 - 4.4 Fork:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/90">Bugfix 88</a>]: Fixed: Keyboard shortcut does not format non java files</li>\n</ul>\n\n<h2>Updates in 1.12.0.44 - 4.4 Fork:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/89">Feature 89</a>]: Backport "Allow action to be invoked via macro"</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/87">Bugfix 87</a>]: Backport "Minor UI issues in options dialog"</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/88">Bugfix 88</a>]: Backport "Cannot be converted to URI/File: URI is not hierarchical."\
99
</li>\n</ul>\n\n<h2>Updates in 1.10.2.1 - 4.4 Fork:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/72">Feature 72</a>]: Support formatting using Eclipse 4.4 - Fork of the 1.10.2 Version with Eclipse Luna jars</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/79">Bugfix 79</a>]: Fixed: Cannot use version 4.4 parallel to 4.5</li>\n</ul>\n\n\n<h2>Updates in 1.10.2:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/61">Feature 61</a>]: Support <a href="https://code.google.com/a/eclipselabs.org/p/workspacemechanic/">Workspace Mechanic</a> configuration file (*.epf)</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/67">Feature 67</a>]: Support configuration via <projectdir>/.settings/org.eclipse.jdt.core.prefs or absolute path to org.eclipse.jdt.core.prefs</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/68">Feature 68</a>]: Reduce download size by 77% by repacking jars with pack200</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/70">Feature 70</a>]: On save action: Introduced option for formatting only the changed lines</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/71">Feature 71</a>]: Support configuration of linefeed</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/23">Feature 23</a>]: Support configuration of source level</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/37">Feature 37</a>]: Fallback to NB formatter, if file isn't a java file</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/73">Bugfix 73</a>]: Selection in undocked windows is not respected, when called via keyboard</li>\n\n\n\n</ul>\n\n<h2>Updates in 1.9:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/63">Task 63</a>]: Update to Eclipse formatter jars from Eclipse 4.5.1 (Mars.1)</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/65">Feature 65</a>]: Code templates for @formatter:on/off (<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/wiki/Support-of-@formatter:off">More details...)\
1010
</a></li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/66">Task 66</a>]: Update requirements to NetBeans 8.0+</li>\n\n</ul>\n<h2>Updates in 1.8.0.6:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/57">Bugfix 57</a>]: Fixed: java.lang.IllegalArgumentException: bad position and run parts in EDT</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/4">Bugfix 4</a>]: Fixed: option panel isn't found by searching for "eclipse"</li>\n</ul>\n<h2>Updates in 1.8.0.5:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/56">Bugfix 56</a>]: Fixed: Format on Save - Changed files remain modified after saving them in Java Editor </li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/55">Bugfix 55</a>]: Fixed: "URI is not hierarchical" error message on calling format - add logging for this error</li>\n</ul>\n<h2>Updates in 1.8.0.4:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/47">Feature 47</a>]: Preserve Class/Method/Field breakpoints (experimental, can be disabled in options)</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/47">Bugfix 53</a>]: Fixed: Do not remove linebreakpoint, if line is not included in selection</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/52">Bugfix 52</a>]: Fixed: Cannot assign shortcut for "Format with Eclipse Formatter" action</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/46">Task 46</a>]: Update to use eclipse formatter libs from eclipse 4.4 </li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/48">Task 48</a>]: Support only NetBeans 7.4 and above</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/49">Task 49</a>]: Add donation button</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/50">Task 50</a>]: Add link to github/homepage</li>\n\n</ul>\n<h2>Updates in 1.7.1:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/41">Bugfix 41</a>]: Fixed: NPE when configuration file not found </li>\n</ul>\n<h2>Updates in 1.7:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/pull/38">Feature 38</a>]: Format selected part of document (PR by <a href="https://github.com/saadmufti">saadmufti</a>)</li>\n</ul>\n<h2>Updates in 1.6.1:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/34">Bugfix 34</a>]: Fixed: NPE while saving options when no profile is set</li>\n</ul>\n<h2>Updates in 1.6:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/30">Task 30</a>]: Update to Eclipse formatter jars from Eclipse Kepler 4.3</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/31">Feature 31</a>]: First profile in file is always used - support selection of profile</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/21">Feature 21</a>]: Project specific options: Show link to global options</li>\n</ul>\n\n<h2>Updates in 1.5:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/18">Bugfix 18</a>]: Fixed: Formatting with eclipse formatter introduces empty document in undo manager</li>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/27">Task 27</a>]: Provide a signed package for the PPUC</li>\n</ul>\n\n<h2>Updates in 1.4.1:</h2>\n<ul>\n<li>[<a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues/25">Bugfix 25</a>]: Fixed: Configured formatter.xml isn't used</li>\n</ul>\n<h2>Updates in 1.4:</h2>\n<ul>\n<li>major refactorings and fixes - see <a href="https://github.com/markiewb/eclipsecodeformatter_for_netbeans/issues?\
1111
milestone=1&page=1&state=closed">milestone 1.4@github</a></li>\n</ul>\n<h2>Note:</h2>\nPlease note that this plugin only provides support for formatting. \

src/de/markiewb/netbeans/plugins/eclipse/formatter/v44/actions/FormatAction44.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
@NbBundle.Messages({ "CTL_EclipseFormatter=Format with Eclipse formatter 4.4",
3434
"eclipse44-format=Format with Eclipse formatter 4.4" })
35-
@EditorActionRegistration(name = FormatAction44.MACRONAME, mimeType = "text/x-java", menuPath = "Source", menuPosition = 0, menuText = "#CTL_EclipseFormatter")
35+
@EditorActionRegistration(name = FormatAction44.MACRONAME, menuPath = "Source", menuPosition = 0, menuText = "#CTL_EclipseFormatter")
3636
public class FormatAction44 extends org.netbeans.editor.BaseAction {
3737
public static final String ID = "org.netbeans.eclipse.formatter.ReformatWithEclipseBeforeSaveTask44";
3838
public static final String MACRONAME = "eclipse44-format";

0 commit comments

Comments
 (0)