-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from mwillema/issue-9
Bad auto indent of closing bracket for embedded message
- Loading branch information
Showing
7 changed files
with
110 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# Protobuf NetBeans Plugin | ||
Netbeans IDE plugin to support Protocol Buffers | ||
|
||
## Installation | ||
|
||
### Installation via NetBeans Update Center | ||
The plugin is available at [http://plugins.netbeans.org/plugin/70658/](http://plugins.netbeans.org/plugin/70658/), and can be installed via the NetBeans Update Center automatically. | ||
|
||
### Manual Installation | ||
Make sure you don't have an old version installed. | ||
|
||
1. Download the [latest release](http://plugins.netbeans.org/plugin/70658/) | ||
3. Start Netbeans | ||
4. Select Tools -> Plugins -> Downloaded -> Add Plugins... | ||
5. Select the .nbm file | ||
6. Accept the license and the installation of self-signed plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 0 additions & 97 deletions
97
protobuf-editor/src/com/marcowillemart/common/lang/antlr/AntlrLine.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
protobuf-editor/test/unit/src/com/marcowillemart/common/lang/SimpleLineTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.marcowillemart.common.lang; | ||
|
||
import static org.junit.Assert.*; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Unit tests for the SimpleLine class. | ||
* | ||
* @author mwi | ||
*/ | ||
public class SimpleLineTest { | ||
|
||
private Line target; | ||
|
||
@Test | ||
public void testIndentation_none() { | ||
// Setup | ||
target = createLine("message M {}"); | ||
|
||
// Exercise & Verify | ||
assertTrue(target.indentation().isEmpty()); | ||
} | ||
|
||
@Test | ||
public void testIndentation_space() { | ||
// Setup | ||
target = createLine(" message M {}"); | ||
|
||
// Exercise & Verify | ||
assertEquals(" ", target.indentation()); | ||
} | ||
|
||
@Test | ||
public void testIndentation_tab() { | ||
// Setup | ||
target = createLine("\tmessage M {}"); | ||
|
||
// Exercise & Verify | ||
assertEquals("\t", target.indentation()); | ||
} | ||
|
||
@Test | ||
public void testIndentation_emptyLine() { | ||
// Setup | ||
target = createLine(""); | ||
|
||
// Exercise & Verify | ||
assertTrue(target.indentation().isEmpty()); | ||
} | ||
|
||
@Test | ||
public void testIndentation_onlyWhitespaces() { | ||
// Setup | ||
target = createLine(" \t "); | ||
|
||
// Exercise & Verify | ||
assertEquals(" \t ", target.indentation()); | ||
} | ||
|
||
//////////////////// | ||
// HELPER METHODS | ||
//////////////////// | ||
|
||
private static Line createLine(String text) { | ||
return new SimpleLine(1, 0, text.length(), text); | ||
} | ||
} |