Skip to content

Commit

Permalink
issue fixed EmptyStackException
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayhada committed Mar 20, 2012
1 parent 2c0fc5d commit 86406ae
Show file tree
Hide file tree
Showing 52 changed files with 5,212 additions and 14 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,402 changes: 1,402 additions & 0 deletions RichVisualForceEditor/bin/com/vf/rich/editor/assist/old.tags

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Expand Up @@ -37,7 +37,7 @@ public ForceTagAssistProcessor() {

public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
int documentOffset) {

//System.out.println("computeCompletionProposals -- documentOffset - " + documentOffset);
String text = viewer.getDocument().get().substring(0, documentOffset);
String[] dim = getLastWord(text);
String word = dim[0];
Expand Down Expand Up @@ -112,7 +112,7 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer,
}

private String[] getLastWord(String text) {

//System.out.println("getLastWord(Text) -" + text);
StringBuffer sb = new StringBuffer();
Stack stack = new Stack();
String word = "";
Expand All @@ -123,15 +123,14 @@ private String[] getLastWord(String text) {
char c = text.charAt(i);
if (isDelimiter(c)) {
str = sb.toString();
if (str.startsWith("<") && !str.startsWith("</")
&& !str.startsWith("<!")) {
if (str.startsWith("<") && !str.startsWith("</") && !str.startsWith("<!")) {
prevTag = str.substring(1);
if (!str.endsWith("/")) {
stack.push(prevTag);
}
} else if (str.startsWith("</") && stack.size() != 0) {
stack.pop();
} else if (str.endsWith("/")) {
} else if (str.endsWith("/") && stack.size() != 0) {
stack.pop();
}
sb.setLength(0);
Expand Down

0 comments on commit 86406ae

Please sign in to comment.