mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove redundant overrides of default methods
This commit is contained in:
-4
@@ -293,10 +293,6 @@ public class SmartPsiElementPointersTest extends CodeInsightTestCase {
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
pointer[0] = createPointer(aClass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
}
|
||||
};
|
||||
EditorEventMulticaster multicaster = EditorFactory.getInstance().getEventMulticaster();
|
||||
multicaster.addDocumentListener(listener);
|
||||
|
||||
+2
-4
@@ -22,15 +22,13 @@ import java.util.EventListener;
|
||||
/**
|
||||
* A listener for global color scheme change event.
|
||||
* <p/>
|
||||
* <em>NOTE: </em>The <code>EditorColorsManager</code> pushes the events down
|
||||
* the UI components hierarchy so there's no need to add a <code>JComponent</code> as a listener.
|
||||
* <em>NOTE: </em>The {@code EditorColorsManager} pushes the events down
|
||||
* the UI components hierarchy so there's no need to add a {@code JComponent} as a listener.
|
||||
* UI components also get this event triggered when global scheme itself is modified
|
||||
* so they can adjust their appearance accordingly.
|
||||
*
|
||||
* @see com.intellij.util.ComponentTreeEventDispatcher
|
||||
*/
|
||||
public interface EditorColorsListener extends EventListener {
|
||||
|
||||
void globalSchemeChange(@Nullable EditorColorsScheme scheme);
|
||||
|
||||
}
|
||||
|
||||
@@ -196,10 +196,6 @@ public class AutoHardWrapHandler {
|
||||
private boolean autoFormatted(DocumentEvent event) {
|
||||
return event.getNewLength() <= event.getOldLength() && endsWithSpaces;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
}
|
||||
};
|
||||
|
||||
caretModel.moveToOffset(wrapOffset);
|
||||
|
||||
@@ -62,10 +62,6 @@ public class SearchResults implements DocumentListener {
|
||||
myCursorPositions.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
}
|
||||
|
||||
public enum Direction {UP, DOWN}
|
||||
|
||||
|
||||
|
||||
@@ -1267,10 +1267,6 @@ public class PsiViewerDialog extends DialogWrapper implements DataProvider, Disp
|
||||
return myLastParsedTextHashCode == myNewDocumentHashCode && myEditor.getContentComponent().hasFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
myNewDocumentHashCode = event.getDocument().getText().hashCode();
|
||||
|
||||
-9
@@ -63,20 +63,11 @@ public class LocalHistoryEventDispatcher implements VirtualFileManagerListener,
|
||||
beginChangeSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeCommandFinished(CommandEvent e) { }
|
||||
|
||||
@Override
|
||||
public void commandFinished(CommandEvent e) {
|
||||
endChangeSet(e.getCommandName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionStarted() { }
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionFinished() { }
|
||||
|
||||
public void startAction() {
|
||||
myGateway.registerUnsavedDocuments(myVcs);
|
||||
myVcs.forceBeginChangeSet();
|
||||
|
||||
@@ -19,23 +19,4 @@ package com.intellij.openapi.command;
|
||||
* @deprecated Use CommandListener directly
|
||||
*/
|
||||
public abstract class CommandAdapter implements CommandListener {
|
||||
@Override
|
||||
public void commandStarted(CommandEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeCommandFinished(CommandEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commandFinished(CommandEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionStarted() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionFinished() {
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,4 @@ package com.intellij.openapi.editor.colors;
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class EditorColorsAdapter implements EditorColorsListener {
|
||||
public void globalSchemeChange(EditorColorsScheme scheme) {
|
||||
}
|
||||
}
|
||||
-4
@@ -148,10 +148,6 @@ public final class ActionPopupMenuImpl implements ActionPopupMenu, ApplicationAc
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationActivated(IdeFrame ideFrame) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationDeactivated(IdeFrame ideFrame) {
|
||||
if (myFrame == ideFrame) {
|
||||
|
||||
-3
@@ -64,9 +64,6 @@ public class EmptyEditorHighlighter implements EditorHighlighter, PrioritizedDoc
|
||||
myTextLength += e.getNewLength() - e.getOldLength();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return 2;
|
||||
|
||||
-29
@@ -96,10 +96,6 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
|
||||
|
||||
private volatile MemoryDiskConflictResolver myConflictResolver = new MemoryDiskConflictResolver();
|
||||
private final PrioritizedDocumentListener myPhysicalDocumentChangeTracker = new PrioritizedDocumentListener() {
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriority() {
|
||||
return Integer.MIN_VALUE;
|
||||
@@ -655,10 +651,6 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
|
||||
Disposer.register(disposable, () -> myConflictResolver = old);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileCreated(@NotNull VirtualFileEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileDeleted(@NotNull VirtualFileEvent event) {
|
||||
Document doc = getCachedDocument(event.getFile());
|
||||
@@ -667,19 +659,6 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileMoved(@NotNull VirtualFileMoveEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileCopied(@NotNull VirtualFileCopyEvent event) {
|
||||
fileCreated(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforePropertyChange(@NotNull VirtualFilePropertyEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeContentsChange(@NotNull VirtualFileEvent event) {
|
||||
VirtualFile virtualFile = event.getFile();
|
||||
@@ -700,14 +679,6 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Virt
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeFileDeletion(@NotNull VirtualFileEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeFileMovement(@NotNull VirtualFileMoveEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canClose(@NotNull Project project) {
|
||||
if (!myUnsavedDocuments.isEmpty()) {
|
||||
|
||||
@@ -17,7 +17,6 @@ package com.intellij.openapi.editor;
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.editor.colors.EditorColors;
|
||||
import com.intellij.openapi.editor.event.DocumentEvent;
|
||||
import com.intellij.openapi.editor.ex.EditorEx;
|
||||
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
|
||||
import com.intellij.openapi.editor.highlighter.HighlighterClient;
|
||||
@@ -365,17 +364,11 @@ public class EditorPaintingTest extends AbstractEditorTest {
|
||||
return new Iterator(startOffset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(@NotNull CharSequence text) {}
|
||||
|
||||
@Override
|
||||
public void setEditor(@NotNull HighlighterClient editor) {
|
||||
myDocument = editor.getDocument();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {}
|
||||
|
||||
private class Iterator implements HighlighterIterator {
|
||||
private int myOffset;
|
||||
|
||||
|
||||
-12
@@ -58,15 +58,6 @@ public class CvsStorageSupportingDeletionComponent extends CvsStorageComponent i
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeCommandFinished(CommandEvent event) {}
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionStarted() {}
|
||||
|
||||
@Override
|
||||
public void undoTransparentActionFinished() {}
|
||||
|
||||
@Override
|
||||
public void commandFinished(CommandEvent event) {
|
||||
myCommandLevel--;
|
||||
@@ -106,9 +97,6 @@ public class CvsStorageSupportingDeletionComponent extends CvsStorageComponent i
|
||||
return myDeleteHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileDeleted(@NotNull VirtualFileEvent event) {}
|
||||
|
||||
private boolean shouldProcessEvent(VirtualFileEvent event, boolean parentShouldBeUnderCvs) {
|
||||
if (myAnotherProjectCommand) {
|
||||
return false;
|
||||
|
||||
-4
@@ -154,10 +154,6 @@ public class GroovyMapParameterDialog extends DialogWrapper {
|
||||
});
|
||||
|
||||
((EditorTextField)myNameComboBox.getEditor().getEditorComponent()).addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
fireNameDataChanged();
|
||||
|
||||
-4
@@ -156,10 +156,6 @@ public class GroovyExtractMethodDialog extends DialogWrapper {
|
||||
private void setUpNameField() {
|
||||
myNameLabel.setLabelFor(myNameField);
|
||||
myNameField.addDocumentListener(new DocumentListener() {
|
||||
@Override
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
fireNameDataChanged();
|
||||
|
||||
@@ -91,9 +91,6 @@ public class PyIntroduceDialog extends DialogWrapper {
|
||||
});
|
||||
|
||||
((EditorTextField)myNameComboBox.getEditor().getEditorComponent()).addDocumentListener(new DocumentListener() {
|
||||
public void beforeDocumentChange(DocumentEvent event) {
|
||||
}
|
||||
|
||||
public void documentChanged(DocumentEvent event) {
|
||||
updateControls();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user