mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
move code which accesses system selection to CopyPasteManager (for RDCT-1653)
add default implementations to new CopyPasteManager methods (cherry picked from commit 28f7098deb3700a9a7f711986466cb028d4785b3) IJ-CR-147422 GitOrigin-RevId: 2555e6921edb7cfcf4c43b67772efb1bad87ec4a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b2cac236d1
commit
d20f07b063
@@ -2689,12 +2689,12 @@ a:com.intellij.openapi.ide.CopyPasteManager
|
||||
- a:getContents(java.awt.datatransfer.DataFlavor):java.lang.Object
|
||||
- s:getCutColor():java.awt.Color
|
||||
- s:getInstance():com.intellij.openapi.ide.CopyPasteManager
|
||||
- a:getSystemSelectionContents():java.awt.datatransfer.Transferable
|
||||
- getSystemSelectionContents():java.awt.datatransfer.Transferable
|
||||
- a:isCutElement(java.lang.Object):Z
|
||||
- a:isSystemSelectionSupported():Z
|
||||
- isSystemSelectionSupported():Z
|
||||
- a:removeContentChangedListener(com.intellij.openapi.ide.CopyPasteManager$ContentChangedListener):V
|
||||
- a:setContents(java.awt.datatransfer.Transferable):V
|
||||
- a:setSystemSelectionContents(java.awt.datatransfer.Transferable):V
|
||||
- setSystemSelectionContents(java.awt.datatransfer.Transferable):V
|
||||
- a:stopKillRings():V
|
||||
- a:stopKillRings(com.intellij.openapi.editor.Document):V
|
||||
com.intellij.openapi.ide.CopyPasteManager$ContentChangedListener
|
||||
|
||||
@@ -78,18 +78,22 @@ public abstract class CopyPasteManager {
|
||||
/**
|
||||
* Tells whether {@linkplain Toolkit#getSystemSelection() system selection} is supported in the current system.
|
||||
*/
|
||||
public abstract boolean isSystemSelectionSupported();
|
||||
public boolean isSystemSelectionSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns current system selection contents, or {@code null} if system selection has no contents, or if it's
|
||||
* {@linkplain #isSystemSelectionSupported() not supported}.
|
||||
*/
|
||||
public abstract @Nullable Transferable getSystemSelectionContents();
|
||||
public @Nullable Transferable getSystemSelectionContents() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets current system selection contents. Does nothing if system selection is {@linkplain #isSystemSelectionSupported() not supported}.
|
||||
*/
|
||||
public abstract void setSystemSelectionContents(@NotNull Transferable content);
|
||||
public void setSystemSelectionContents(@NotNull Transferable content) {}
|
||||
|
||||
public interface ContentChangedListener extends EventListener {
|
||||
void contentChanged(final @Nullable Transferable oldTransferable, final Transferable newTransferable);
|
||||
|
||||
Reference in New Issue
Block a user