本文整理了Java中org.eclipse.jface.text.BadLocationException.printStackTrace()
方法的一些代码示例,展示了BadLocationException.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BadLocationException.printStackTrace()
方法的具体详情如下:
包路径:org.eclipse.jface.text.BadLocationException
类名称:BadLocationException
方法名:printStackTrace
暂无
代码示例来源:origin: org.eclipse/org.eclipse.ui.workbench.texteditor
public void apply(IDocument document, char trigger, int offset) {
try {
String replacement= fString.substring(offset - fOffset);
document.replace(offset, 0, replacement);
} catch (BadLocationException x) {
// TODO Auto-generated catch block
x.printStackTrace();
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.code.editor
@Override
public void apply(IDocument document) {
try {
document.replace(replacementOffset, replacementLength, replacementString);
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
@Override
public void apply(IDocument document, char trigger, int offset) {
try {
String replacement= fString.substring(offset - fOffset);
document.replace(offset, 0, replacement);
} catch (BadLocationException x) {
// TODO Auto-generated catch block
x.printStackTrace();
}
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.text.ui
public void replaceTextRange(int pos, int length, String text) {
try {
fDocument.replace(pos, length, text);
} catch (BadLocationException x) {
//TODO Log it
x.printStackTrace();
}
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.code.editor
@Override
public void apply(IDocument document) {
try {
document.replace(replacementOffset, replacementLength, replacementString);
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
代码示例来源:origin: cbeust/testng-eclipse
public void apply(IDocument document) {
TextEdit edits = m_rewriter.rewriteAST(document, null);
UndoEdit undo = null;
try {
undo = edits.apply(document);
} catch(MalformedTreeException e) {
e.printStackTrace();
} catch(BadLocationException e) {
e.printStackTrace();
}
}
代码示例来源:origin: org.apache.directory.studio/ldifeditor
e.printStackTrace();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: biz.aQute/aQute.bnd
public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
IDocument doc = textViewer.getDocument();
try {
int start = offset;
int end = offset;
while (start >= 0 && isWordChar(doc.getChar(start)))
start--;
while (end < doc.getLength() && isWordChar(doc.getChar(end)))
end++;
start++;
int length = Math.min(doc.getLength(), end - start);
start = Math.max(0,start);
return new Region(start, length);
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: biz.aQute/bnd
public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
IDocument doc = textViewer.getDocument();
try {
int start = offset;
int end = offset;
while (start >= 0 && isWordChar(doc.getChar(start)))
start--;
while (end < doc.getLength() && isWordChar(doc.getChar(end)))
end++;
start++;
int length = Math.min(doc.getLength(), end - start);
start = Math.max(0,start);
return new Region(start, length);
} catch (BadLocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/**
* Apply the given edit on the given string and return the updated string.
* Return the given string if anything wrong happen while applying the edit.
*
* @param original the given string
* @param edit the given edit
*
* @return the updated string
*/
public final static String editedString(String original, TextEdit edit) {
if (edit == null) {
return original;
}
SimpleDocument document = new SimpleDocument(original);
try {
edit.apply(document, TextEdit.NONE);
return document.get();
} catch (MalformedTreeException e) {
e.printStackTrace();
} catch (BadLocationException e) {
e.printStackTrace();
}
return original;
}
代码示例来源:origin: org.apache.uima/ruta-ep-ide-ui
public IRegion match(IDocument document, int offset) {
if (document == null || offset < 0) {
throw new IllegalArgumentException();
}
try {
fOffset = offset;
fDocument = document;
if (!isBrace(fDocument.getChar(offset))
&& (offset == 0 || !isBrace(fDocument.getChar(offset - 1)))) {
return null;
}
updatePairs();
if (matchPairsAt() && fStartPos != fEndPos)
return new Region(fStartPos, fEndPos - fStartPos + 1);
} catch (BadLocationException e) {
if (DLTKCore.DEBUG_PARSER)
e.printStackTrace();
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
widgetEndLine= Math.min(visibleEndLine, end(range) - 1);
} catch (BadLocationException x) {
x.printStackTrace();
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
e.printStackTrace();
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.text.ui
} catch (BadLocationException e) {
e.printStackTrace();
内容来源于网络,如有侵权,请联系作者删除!