mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -367,7 +367,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
|
||||
@NotNull
|
||||
public RangeMarker createRangeMarker(final int startOffset, final int endOffset) {
|
||||
TextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
ProperTextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
RangeMarker hostMarker = myDelegate.createRangeMarker(hostRange);
|
||||
return new RangeMarkerWindow(this, (RangeMarkerEx)hostMarker);
|
||||
}
|
||||
@@ -377,7 +377,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
if (!surviveOnExternalChange) {
|
||||
return createRangeMarker(startOffset, endOffset);
|
||||
}
|
||||
TextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
ProperTextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
//todo persistent?
|
||||
RangeMarker hostMarker = myDelegate.createRangeMarker(hostRange.getStartOffset(), hostRange.getEndOffset(), surviveOnExternalChange);
|
||||
return new RangeMarkerWindow(this, (RangeMarkerEx)hostMarker);
|
||||
@@ -408,7 +408,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
|
||||
@NotNull
|
||||
public RangeMarker createGuardedBlock(final int startOffset, final int endOffset) {
|
||||
TextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
ProperTextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
return myDelegate.createGuardedBlock(hostRange.getStartOffset(), hostRange.getEndOffset());
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
}
|
||||
|
||||
public RangeMarker getRangeGuard(final int startOffset, final int endOffset) {
|
||||
TextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
ProperTextRange hostRange = injectedToHost(new ProperTextRange(startOffset, endOffset));
|
||||
|
||||
return myDelegate.getRangeGuard(hostRange.getStartOffset(), hostRange.getEndOffset());
|
||||
}
|
||||
@@ -467,7 +467,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
|
||||
@NotNull
|
||||
public RangeMarker createRangeMarker(@NotNull final TextRange textRange) {
|
||||
TextRange hostRange = injectedToHost(new ProperTextRange(textRange));
|
||||
ProperTextRange hostRange = injectedToHost(new ProperTextRange(textRange));
|
||||
RangeMarker hostMarker = myDelegate.createRangeMarker(hostRange);
|
||||
return new RangeMarkerWindow(this, (RangeMarkerEx)hostMarker);
|
||||
}
|
||||
@@ -598,7 +598,7 @@ public class DocumentWindowImpl extends UserDataHolderBase implements Disposable
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public TextRange injectedToHost(@NotNull TextRange injected) {
|
||||
public ProperTextRange injectedToHost(@NotNull TextRange injected) {
|
||||
ProperTextRange.assertProperRange(injected);
|
||||
int start = injectedToHost(injected.getStartOffset(), false);
|
||||
int end = injectedToHost(injected.getEndOffset(), true);
|
||||
|
||||
@@ -297,7 +297,7 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
|
||||
public RangeMarker createRangeMarker(int startOffset, int endOffset, boolean surviveOnExternalChange) {
|
||||
ApplicationManagerEx.getApplicationEx().assertReadAccessToDocumentsAllowed();
|
||||
if (!(0 <= startOffset && startOffset <= endOffset && endOffset <= getTextLength())) {
|
||||
LOG.error("Incorrect offsets startOffset=" + startOffset + ", endOffset=" + endOffset + ", text length=" + getTextLength());
|
||||
LOG.error("Incorrect offsets: startOffset=" + startOffset + ", endOffset=" + endOffset + ", text length=" + getTextLength());
|
||||
}
|
||||
return surviveOnExternalChange
|
||||
? new PersistentRangeMarker(this, startOffset, endOffset,true)
|
||||
|
||||
@@ -68,11 +68,11 @@ public class StringSearcher {
|
||||
return myForwardDirection;
|
||||
}
|
||||
|
||||
public int scan(CharSequence text) {
|
||||
public int scan(@NotNull CharSequence text) {
|
||||
return scan(text,0,text.length());
|
||||
}
|
||||
|
||||
public int scan(CharSequence text, int _start, int _end) {
|
||||
public int scan(@NotNull CharSequence text, int _start, int _end) {
|
||||
LOG.assertTrue(_start <= _end, _start - _end);
|
||||
LOG.assertTrue(_end <= text.length(), text.length() - _end);
|
||||
if (myForwardDirection) {
|
||||
|
||||
@@ -14,18 +14,13 @@ package org.zmlx.hg4idea.provider.update;
|
||||
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.update.SequentialUpdatesContext;
|
||||
import com.intellij.openapi.vcs.update.UpdateEnvironment;
|
||||
import com.intellij.openapi.vcs.update.UpdateSession;
|
||||
import com.intellij.openapi.vcs.update.UpdateSessionAdapter;
|
||||
import com.intellij.openapi.vcs.update.UpdatedFiles;
|
||||
import com.intellij.openapi.vcs.update.*;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -59,10 +54,8 @@ public class HgUpdateEnvironment implements UpdateEnvironment {
|
||||
|
||||
boolean result = true;
|
||||
for (FilePath contentRoot : contentRoots) {
|
||||
if (indicator != null && indicator.isCanceled()) {
|
||||
throw new ProcessCanceledException();
|
||||
}
|
||||
if (indicator != null) {
|
||||
indicator.checkCanceled();
|
||||
indicator.startNonCancelableSection();
|
||||
}
|
||||
VirtualFile repository =
|
||||
|
||||
Reference in New Issue
Block a user