2023年10月10日15:53:33
parent
e41bf5ffc7
commit
4d30ad799d
|
|
@ -27,6 +27,7 @@ import javafx.event.EventHandler;
|
|||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
|
|
@ -482,15 +483,12 @@ public class EditorListImplController {
|
|||
|
||||
public void writer_file() {
|
||||
|
||||
log.info("writer_file__path:" + choose_file.get().getName());
|
||||
//获取所选table
|
||||
Tab tab = this.tabPane.getSelectionModel().getSelectedItem();
|
||||
AceEditor aceEditor = (AceEditor) tab.getContent();
|
||||
log.info("aceEditor:" + aceEditor.getFile().getName());
|
||||
|
||||
int index = listView.getSelectionModel().getSelectedIndex();
|
||||
String text = null;
|
||||
switch (index) {
|
||||
case 0 -> text = acJsEditor.getText();
|
||||
case 1 -> text = monacoEdit.text_code.getValue();
|
||||
case 2 -> text = codemirror.text_code.getValue();
|
||||
}
|
||||
String text = aceEditor.getText();
|
||||
|
||||
try {
|
||||
FileWriter writer = new FileWriter(choose_file.get());
|
||||
|
|
@ -609,7 +607,6 @@ public class EditorListImplController {
|
|||
}, file_content -> {
|
||||
|
||||
Tab tab = new Tab(file.getName());
|
||||
|
||||
ContextMenu contextMenu = new ContextMenu();
|
||||
MenuItem close = new MenuItem("close");
|
||||
MenuItem close_other_tabs = new MenuItem("close other tabs");
|
||||
|
|
@ -685,7 +682,6 @@ public class EditorListImplController {
|
|||
//添加文件选择
|
||||
FileTreeView fileTreeView = new FileTreeView(file);
|
||||
fileTreeView.setBorder(BORDER_EXLEFT);
|
||||
fileTreeView.setFixedCellSize(40);
|
||||
//fileTreeView.addItemFilter(file -> file.isDirectory() || file.getName().endsWith(".txt"));
|
||||
splitPane.getItems().add(0, fileTreeView);
|
||||
splitPane.getItems().add(1, tabPane);
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import javafx.scene.control.TreeCell;
|
|||
import javafx.scene.control.TreeItem;
|
||||
import javafx.scene.input.KeyCode;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.Text;
|
||||
import javax.naming.NoPermissionException;
|
||||
import net.imyeyu.timifx.TimiFX;
|
||||
|
|
@ -77,7 +78,7 @@ public class FileTreeView extends XTreeView<File> implements TimiFX {
|
|||
} else {
|
||||
this.setText(file.getName());
|
||||
}
|
||||
|
||||
this.setFont(new Font(15));
|
||||
this.setGraphic(file.isFile() ? this.iconFile : this.iconDirectory);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,25 @@ public enum AceTheme {
|
|||
kr_theme("theme-kr_theme.js", "ace/theme/kr_theme"),
|
||||
kuroir("theme-kuroir.js", "ace/theme/kuroir"),
|
||||
merbivore("theme-merbivore.js", "ace/theme/merbivore"),
|
||||
merbivore_soft("theme-merbivore_soft.js", "ace/theme/merbivore_soft"),
|
||||
mono_industrial("theme-mono_industrial.js", "ace/theme/mono_industrial"),
|
||||
monokai("theme-monokai.js", "ace/theme/monokai"),
|
||||
nord_dark("theme-nord_dark.js", "ace/theme/nord_dark"),
|
||||
one_dark("theme-one_dark.js", "ace/theme/one_dark"),
|
||||
pastel_on_dark("theme-pastel_on_dark.js", "ace/theme/pastel_on_dark"),
|
||||
solarized_dark("theme-solarized_dark.js", "ace/theme/solarized_dark"),
|
||||
solarized_light("theme-solarized_light.js", "ace/theme/solarized_light"),
|
||||
sqlserver("theme-sqlserver.js", "ace/theme/sqlserver"),
|
||||
terminal("theme-terminal.js", "ace/theme/terminal"),
|
||||
textmate("theme-textmate.js", "ace/theme/textmate"),
|
||||
tomorrow("theme-tomorrow.js", "ace/theme/tomorrow"),
|
||||
tomorrow_night("theme-tomorrow_night.js", "ace/theme/tomorrow_night"),
|
||||
tomorrow_night_blue("theme-tomorrow_night_blue.js", "ace/theme/tomorrow_night_blue"),
|
||||
tomorrow_night_bright("theme-tomorrow_night_bright.js", "ace/theme/tomorrow_night_bright"),
|
||||
tomorrow_night_eighties("theme-tomorrow_night_eighties.js", "ace/theme/tomorrow_night_eighties"),
|
||||
twilight("theme-twilight.js", "ace/theme/twilight"),
|
||||
vibrant_ink("theme-vibrant_ink.js", "ace/theme/vibrant_ink"),
|
||||
XCODE_JS("theme-xcode.js", "ace/theme/theme-xcode"),
|
||||
TOMORROW_NIGHT("theme-tomorrow_night.js", "ace/theme/tomorrow_night"),
|
||||
;
|
||||
|
||||
AceTheme(String name, String value) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue