Skip to content

Commit

Permalink
Support compact1 Java 8 profile, fixes #43
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Nov 21, 2016
1 parent c9c1a15 commit 094828f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@
<compilerArgs>
<arg>-Xlint:all,-options</arg>
<arg>-Werror</arg>
<arg>-profile</arg>
<arg>compact1</arg>
</compilerArgs>
<fork>true</fork>
</configuration>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jline/reader/LineReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public interface LineReader {
String MENU_COMPLETE = "menu-complete";
String MENU_SELECT = "menu-select";
String NEG_ARGUMENT = "neg-argument";
// String PASTE_FROM_CLIPBOARD = "paste-from-clipboard";
String OVERWRITE_MODE = "overwrite-mode";
String PUT_REPLACE_SELECTION = "put-replace-selection";
String QUOTED_INSERT = "quoted-insert";
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/org/jline/reader/impl/LineReaderImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
package org.jline.reader.impl;

import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.io.Flushable;
import java.io.IOError;
import java.io.IOException;
Expand Down Expand Up @@ -3106,7 +3104,6 @@ protected Map<String, Widget> builtinWidgets() {
widgets.put(MENU_EXPAND_OR_COMPLETE, this::menuExpandOrComplete);
widgets.put(NEG_ARGUMENT, this::negArgument);
widgets.put(OVERWRITE_MODE, this::overwriteMode);
// widgets.put(PASTE_FROM_CLIPBOARD, this::pasteFromClipboard);
// widgets.put(QUIT, this::quit);
widgets.put(QUOTED_INSERT, this::quotedInsert);
widgets.put(REDISPLAY, this::redisplay);
Expand Down Expand Up @@ -4730,26 +4727,6 @@ public boolean beep() {
return true;
}

/**
* Paste the contents of the clipboard into the terminal buffer
*
* @return true if clipboard contents pasted
*/
public boolean pasteFromClipboard() {
try {
Clipboard clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();
String result = (String) clipboard.getData(DataFlavor.stringFlavor);
if (result != null) {
putString(result);
return true;
}
}
catch (Exception e) {
Log.error("Paste failed: ", e);
}
return false;
}

//
// Helpers
//
Expand Down

0 comments on commit 094828f

Please sign in to comment.