diff options
| author | 2014-08-04 00:26:48 -0400 | |
|---|---|---|
| committer | 2014-08-04 00:26:48 -0400 | |
| commit | 57f45b0409d5363782052183bb090175c469f89a (patch) | |
| tree | 672b32876b420445630e58e16b67d671e45c07b6 /src/cuchaz/enigma/analysis/SourceIndex.java | |
| parent | fixed bugs with saving mappings (diff) | |
| download | enigma-fork-57f45b0409d5363782052183bb090175c469f89a.tar.gz enigma-fork-57f45b0409d5363782052183bb090175c469f89a.tar.xz enigma-fork-57f45b0409d5363782052183bb090175c469f89a.zip | |
added stable save order for mappings to hopefully help with merging
added color-coding for source identifiers
redesigned rename GUI
customized editor pane, added popup menu
finished name validation
added last-chance save on window close
Diffstat (limited to 'src/cuchaz/enigma/analysis/SourceIndex.java')
| -rw-r--r-- | src/cuchaz/enigma/analysis/SourceIndex.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuchaz/enigma/analysis/SourceIndex.java b/src/cuchaz/enigma/analysis/SourceIndex.java index ee92d1e..61c833c 100644 --- a/src/cuchaz/enigma/analysis/SourceIndex.java +++ b/src/cuchaz/enigma/analysis/SourceIndex.java | |||
| @@ -52,7 +52,7 @@ public class SourceIndex implements Iterable<Map.Entry<Entry,Token>> | |||
| 52 | return m_tokenToEntry.get( token ); | 52 | return m_tokenToEntry.get( token ); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | public Entry getEntry( int pos ) | 55 | public Map.Entry<Entry,Token> getEntry( int pos ) |
| 56 | { | 56 | { |
| 57 | // linear search is fast enough for now | 57 | // linear search is fast enough for now |
| 58 | for( Map.Entry<Entry,Token> entry : this ) | 58 | for( Map.Entry<Entry,Token> entry : this ) |
| @@ -60,7 +60,7 @@ public class SourceIndex implements Iterable<Map.Entry<Entry,Token>> | |||
| 60 | Token token = entry.getValue(); | 60 | Token token = entry.getValue(); |
| 61 | if( pos >= token.start && pos <= token.end() ) | 61 | if( pos >= token.start && pos <= token.end() ) |
| 62 | { | 62 | { |
| 63 | return entry.getKey(); | 63 | return entry; |
| 64 | } | 64 | } |
| 65 | } | 65 | } |
| 66 | return null; | 66 | return null; |