mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: remove dead code
This commit is contained in:
committed by
Aleksey Pivovarov
parent
ead3aa097e
commit
e65de82d70
-25
@@ -79,31 +79,6 @@ public class UpToDateLineNumberProviderImpl implements UpToDateLineNumberProvide
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean endsWithSeparator(final CharSequence string) {
|
||||
if ((string == null) || (string.length() == 0)) {
|
||||
return false;
|
||||
}
|
||||
final char latest = string.charAt(string.length() - 1);
|
||||
return ('\n' == latest) || ('\r' == latest);
|
||||
}
|
||||
|
||||
// annotated content is not aware about latest line ends with end-line separator or not. ignore latest separator difference then
|
||||
private String fixLatestLineSeparator(final Document document, final String content) {
|
||||
final CharSequence documentSequence = document.getCharsSequence();
|
||||
if (endsWithSeparator(documentSequence) && (! endsWithSeparator(content))) {
|
||||
int numCharsToCopy = 1;
|
||||
final int docLen = documentSequence.length();
|
||||
if (docLen > 1) {
|
||||
final char beforeLatest = documentSequence.charAt(docLen - 2);
|
||||
if (('\r' == beforeLatest) || ('\n' == beforeLatest)) {
|
||||
numCharsToCopy = 2;
|
||||
}
|
||||
}
|
||||
return content + documentSequence.subSequence(docLen - numCharsToCopy, docLen);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
public int getLineNumber(int currentNumber) {
|
||||
LineStatusTracker tracker = myLineStatusTrackerManagerI.getLineStatusTracker(myDocument);
|
||||
if (tracker == null) {
|
||||
|
||||
Reference in New Issue
Block a user