Rabbit Escape  2017-01-14_18:33:47_+0000__(tag:_v0.10.1)
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
rabbitescape.ui.swing.GitHubIssue Class Reference

encapsulates what has been retrieved about a github issue More...

Collaboration diagram for rabbitescape.ui.swing.GitHubIssue:
Collaboration graph
[legend]

Public Member Functions

 GitHubIssue (int gitHubIssueNumber, String gitHubIssueTitle, String openingCommentBody)
 Creates a GitHubIssue with no labels. More...
 
 GitHubIssue (int gitHubIssueNumber, String gitHubIssueTitle, String openingCommentBody, String[] labels)
 
int getNumber ()
 
boolean isLevel ()
 
boolean isBug ()
 
boolean setCurrentWorldIndex (int index)
 
int getCurrentWorldIndex ()
 
String getCurrentWorld ()
 
void fetchComments (GitHubClient ghc)
 
String getWorld (int i)
 
String getBody ()
 
void addToBody (String bodyIn)
 Keeps a copy of the body text and parses out the worlds. More...
 
String getTitle ()
 
void setTitle (String titleIn)
 

Static Public Member Functions

static String stripEscape (String s1)
 Tidy up escape characters. - Remove \ before " - Remove to covert Win EOL to Unix EOL - Undouble \. More...
 
static String realNewlines (String s)
 Replace
with actual newline chars. More...
 

Static Private Member Functions

static void checkAddWorldIndices (ArrayList< Integer > startIndices, ArrayList< Integer > endIndices, int startIndex, int endIndex)
 Add location of world in the body string to the list. Only add if the new world is not inside another. Backtick worlds are parsed first, so they win. More...
 
static void findBacktickWorlds (String bodyAdd, ArrayList< String > braveNewWrappedWorlds, ArrayList< Integer > startIndices, ArrayList< Integer > endIndices)
 parse out worlds from markdown contained in triple backticks More...
 
static void findIndentWorlds (String bodyAdd, ArrayList< String > braveNewWrappedWorlds, ArrayList< Integer > startIndices, ArrayList< Integer > endIndices)
 parse out worlds from markdown contained in indent blocks Appends to the ArrayList<Integer> describing the worlds location. More...
 
static String fixWorld (String world)
 Perform some automatic fixing Can't be as strict as when loading from files. More...
 

Private Attributes

int number
 
boolean isLevel
 github issue number. More...
 
boolean isBug
 
String body = ""
 
String title
 body text excluding world text. More...
 
ArrayList< String > wrappedWorlds
 
int worldIndex = 0
 Worlds are []. These have
. More...
 

Static Private Attributes

static final String replaceWorldsWith = "\n-----\n"
 Some issues have multiple worlds: current selected index. More...
 
static final String commentSeparator = "\n*****\n"
 

Detailed Description

encapsulates what has been retrieved about a github issue

Constructor & Destructor Documentation

rabbitescape.ui.swing.GitHubIssue.GitHubIssue ( int  gitHubIssueNumber,
String  gitHubIssueTitle,
String  openingCommentBody 
)

Creates a GitHubIssue with no labels.

rabbitescape.ui.swing.GitHubIssue.GitHubIssue ( int  gitHubIssueNumber,
String  gitHubIssueTitle,
String  openingCommentBody,
String[]  labels 
)

Member Function Documentation

void rabbitescape.ui.swing.GitHubIssue.addToBody ( String  bodyIn)

Keeps a copy of the body text and parses out the worlds.

static void rabbitescape.ui.swing.GitHubIssue.checkAddWorldIndices ( ArrayList< Integer >  startIndices,
ArrayList< Integer >  endIndices,
int  startIndex,
int  endIndex 
)
staticprivate

Add location of world in the body string to the list. Only add if the new world is not inside another. Backtick worlds are parsed first, so they win.

void rabbitescape.ui.swing.GitHubIssue.fetchComments ( GitHubClient  ghc)
static void rabbitescape.ui.swing.GitHubIssue.findBacktickWorlds ( String  bodyAdd,
ArrayList< String >  braveNewWrappedWorlds,
ArrayList< Integer >  startIndices,
ArrayList< Integer >  endIndices 
)
staticprivate

parse out worlds from markdown contained in triple backticks

static void rabbitescape.ui.swing.GitHubIssue.findIndentWorlds ( String  bodyAdd,
ArrayList< String >  braveNewWrappedWorlds,
ArrayList< Integer >  startIndices,
ArrayList< Integer >  endIndices 
)
staticprivate

parse out worlds from markdown contained in indent blocks Appends to the ArrayList<Integer> describing the worlds location.

static String rabbitescape.ui.swing.GitHubIssue.fixWorld ( String  world)
staticprivate

Perform some automatic fixing Can't be as strict as when loading from files.

String rabbitescape.ui.swing.GitHubIssue.getBody ( )
String rabbitescape.ui.swing.GitHubIssue.getCurrentWorld ( )
int rabbitescape.ui.swing.GitHubIssue.getCurrentWorldIndex ( )
int rabbitescape.ui.swing.GitHubIssue.getNumber ( )
String rabbitescape.ui.swing.GitHubIssue.getTitle ( )
String rabbitescape.ui.swing.GitHubIssue.getWorld ( int  i)
Parameters
iSome issues contain multiple worlds. Ask for them by index.
Returns
World string with newline characters.
boolean rabbitescape.ui.swing.GitHubIssue.isBug ( )
boolean rabbitescape.ui.swing.GitHubIssue.isLevel ( )
static String rabbitescape.ui.swing.GitHubIssue.realNewlines ( String  s)
static

Replace
with actual newline chars.

boolean rabbitescape.ui.swing.GitHubIssue.setCurrentWorldIndex ( int  index)
Returns
true if it can be set (is not out of range)
void rabbitescape.ui.swing.GitHubIssue.setTitle ( String  titleIn)
static String rabbitescape.ui.swing.GitHubIssue.stripEscape ( String  s1)
static

Tidy up escape characters. - Remove \ before " - Remove to covert Win EOL to Unix EOL - Undouble \.

Member Data Documentation

String rabbitescape.ui.swing.GitHubIssue.body = ""
private
final String rabbitescape.ui.swing.GitHubIssue.commentSeparator = "\n*****\n"
staticprivate
boolean rabbitescape.ui.swing.GitHubIssue.isBug
private
boolean rabbitescape.ui.swing.GitHubIssue.isLevel
private

github issue number.

<

int rabbitescape.ui.swing.GitHubIssue.number
private
final String rabbitescape.ui.swing.GitHubIssue.replaceWorldsWith = "\n-----\n"
staticprivate

Some issues have multiple worlds: current selected index.

<

String rabbitescape.ui.swing.GitHubIssue.title
private

body text excluding world text.

<

int rabbitescape.ui.swing.GitHubIssue.worldIndex = 0
private

Worlds are []. These have
.

<

ArrayList<String> rabbitescape.ui.swing.GitHubIssue.wrappedWorlds
private

The documentation for this class was generated from the following file: