mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+3
-1
@@ -26,7 +26,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class JavaReadWriteAccessDetector extends ReadWriteAccessDetector {
|
||||
@Override
|
||||
public boolean isReadWriteAccessible(@NotNull final PsiElement element) {
|
||||
return element instanceof PsiVariable && !(element instanceof ImplicitVariable) || element instanceof PsiClass || element instanceof PsiAnnotationMethod && !(element instanceof PsiCompiledElement);
|
||||
return element instanceof PsiVariable && !(element instanceof ImplicitVariable)
|
||||
|| element instanceof PsiClass
|
||||
|| element instanceof PsiAnnotationMethod && !(element instanceof PsiCompiledElement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -144,7 +144,7 @@ public interface SelectionModel {
|
||||
*
|
||||
* @param listener the listener instance.
|
||||
*/
|
||||
void addSelectionListener(SelectionListener listener);
|
||||
void addSelectionListener(@NotNull SelectionListener listener);
|
||||
|
||||
/**
|
||||
* Adds a listener for receiving information about selection changes, which is removed when the given disposable is disposed.
|
||||
@@ -161,7 +161,7 @@ public interface SelectionModel {
|
||||
*
|
||||
* @param listener the listener instance.
|
||||
*/
|
||||
void removeSelectionListener(SelectionListener listener);
|
||||
void removeSelectionListener(@NotNull SelectionListener listener);
|
||||
|
||||
/**
|
||||
* Selects the entire line of text at the caret position.
|
||||
|
||||
@@ -141,11 +141,11 @@ public class SearchResults implements DocumentListener {
|
||||
|
||||
void updateFinished();
|
||||
}
|
||||
public void addListener(SearchResultsListener srl) {
|
||||
public void addListener(@NotNull SearchResultsListener srl) {
|
||||
myListeners.add(srl);
|
||||
}
|
||||
|
||||
public void removeListener(SearchResultsListener srl) {
|
||||
public void removeListener(@NotNull SearchResultsListener srl) {
|
||||
myListeners.remove(srl);
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ public class SearchResults implements DocumentListener {
|
||||
updateCursor(oldCursorRange, next);
|
||||
updateExcluded();
|
||||
notifyChanged();
|
||||
if (oldCursorRange == null || myCursor == null || !myCursor.equals(oldCursorRange)) {
|
||||
if (myCursor == null || !myCursor.equals(oldCursorRange)) {
|
||||
if (toChangeSelection) {
|
||||
mySelectionManager.updateSelection(true, true);
|
||||
}
|
||||
|
||||
+2
-2
@@ -109,12 +109,12 @@ class SelectionModelWindow implements SelectionModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSelectionListener(final SelectionListener listener) {
|
||||
public void addSelectionListener(@NotNull final SelectionListener listener) {
|
||||
myHostModel.addSelectionListener(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSelectionListener(final SelectionListener listener) {
|
||||
public void removeSelectionListener(@NotNull final SelectionListener listener) {
|
||||
myHostModel.removeSelectionListener(listener);
|
||||
}
|
||||
|
||||
|
||||
@@ -183,12 +183,12 @@ public class SelectionModelImpl implements SelectionModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSelectionListener(SelectionListener listener) {
|
||||
public void addSelectionListener(@NotNull SelectionListener listener) {
|
||||
mySelectionListeners.add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSelectionListener(SelectionListener listener) {
|
||||
public void removeSelectionListener(@NotNull SelectionListener listener) {
|
||||
boolean success = mySelectionListeners.remove(listener);
|
||||
LOG.assertTrue(success);
|
||||
}
|
||||
|
||||
+2
-2
@@ -136,12 +136,12 @@ public class TextComponentSelectionModel implements SelectionModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSelectionListener(final SelectionListener listener) {
|
||||
public void addSelectionListener(@NotNull final SelectionListener listener) {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSelectionListener(final SelectionListener listener) {
|
||||
public void removeSelectionListener(@NotNull final SelectionListener listener) {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user