-
Notifications
You must be signed in to change notification settings - Fork 10
Add line numbers and code folding #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -13,22 +13,16 @@ | |||
| */ | ||||
| package org.httprpc.sierra.tools.previewer; | ||||
|
|
||||
| import org.fife.rsta.ui.search.FindDialog; | ||||
| import org.fife.rsta.ui.search.ReplaceDialog; | ||||
| import org.fife.rsta.ui.search.SearchEvent; | ||||
| import org.fife.rsta.ui.search.SearchListener; | ||||
| import org.fife.ui.autocomplete.AutoCompletion; | ||||
| import org.fife.ui.autocomplete.CompletionProvider; | ||||
| import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; | ||||
| import org.fife.ui.rsyntaxtextarea.SyntaxConstants; | ||||
| import org.fife.ui.rtextarea.SearchEngine; | ||||
| import org.fife.ui.rtextarea.SearchResult; | ||||
| import org.httprpc.sierra.Outlet; | ||||
| import org.httprpc.sierra.UILoader; | ||||
| import org.httprpc.sierra.tools.previewer.engine.RenderingEngine; | ||||
| import org.httprpc.sierra.tools.previewer.model.RenderError; | ||||
| import org.httprpc.sierra.tools.previewer.model.RenderResult; | ||||
|
|
||||
| import java.awt.BorderLayout; | ||||
| import java.awt.Toolkit; | ||||
| import java.awt.event.KeyEvent; | ||||
| import java.io.File; | ||||
| import java.io.IOException; | ||||
| import java.nio.file.Files; | ||||
| import java.nio.file.Path; | ||||
| import java.nio.file.StandardOpenOption; | ||||
| import java.util.concurrent.ExecutionException; | ||||
| import java.util.function.Consumer; | ||||
| import javax.swing.ImageIcon; | ||||
| import javax.swing.JFileChooser; | ||||
| import javax.swing.JFrame; | ||||
|
|
@@ -38,7 +32,6 @@ | |||
| import javax.swing.JMenuItem; | ||||
| import javax.swing.JOptionPane; | ||||
| import javax.swing.JPanel; | ||||
| import javax.swing.JScrollPane; | ||||
| import javax.swing.JSplitPane; | ||||
| import javax.swing.KeyStroke; | ||||
| import javax.swing.SwingWorker; | ||||
|
|
@@ -47,16 +40,22 @@ | |||
| import javax.swing.event.DocumentEvent; | ||||
| import javax.swing.event.DocumentListener; | ||||
| import javax.swing.filechooser.FileNameExtensionFilter; | ||||
| import java.awt.BorderLayout; | ||||
| import java.awt.Toolkit; | ||||
| import java.awt.event.KeyEvent; | ||||
| import java.io.File; | ||||
| import java.io.IOException; | ||||
| import java.nio.file.Files; | ||||
| import java.nio.file.Path; | ||||
| import java.nio.file.StandardOpenOption; | ||||
| import java.util.concurrent.ExecutionException; | ||||
| import java.util.function.Consumer; | ||||
| import org.fife.rsta.ui.search.FindDialog; | ||||
| import org.fife.rsta.ui.search.ReplaceDialog; | ||||
| import org.fife.rsta.ui.search.SearchEvent; | ||||
| import org.fife.rsta.ui.search.SearchListener; | ||||
| import org.fife.ui.autocomplete.AutoCompletion; | ||||
| import org.fife.ui.autocomplete.CompletionProvider; | ||||
| import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; | ||||
| import org.fife.ui.rsyntaxtextarea.SyntaxConstants; | ||||
| import org.fife.ui.rtextarea.RTextScrollPane; | ||||
| import org.fife.ui.rtextarea.SearchEngine; | ||||
| import org.fife.ui.rtextarea.SearchResult; | ||||
| import org.httprpc.sierra.Outlet; | ||||
| import org.httprpc.sierra.UILoader; | ||||
| import org.httprpc.sierra.tools.previewer.engine.RenderingEngine; | ||||
| import org.httprpc.sierra.tools.previewer.model.RenderError; | ||||
| import org.httprpc.sierra.tools.previewer.model.RenderResult; | ||||
|
|
||||
| /** | ||||
| * The main application window for the Sierra UI Previewer. UI is defined in | ||||
|
|
@@ -85,19 +84,21 @@ public class MainFrame extends JFrame implements SearchListener { | |||
| private @Outlet JMenuItem exitItem = null; | ||||
| private @Outlet JMenuItem aboutItem = null; | ||||
| private @Outlet JSplitPane splitPane = null; | ||||
| private @Outlet JScrollPane editorScrollPane = null; | ||||
| private @Outlet JPanel previewPanel = null; | ||||
| private @Outlet JLabel statusBar = null; | ||||
| private @Outlet JLabel filePathLabel = null; // The <label> for the file path | ||||
| private @Outlet JLabel filePathLabel = null; | ||||
|
|
||||
|
|
||||
| // --- Manually Created Components --- | ||||
| private FindDialog findDialog = null; | ||||
| private ReplaceDialog replaceDialog = null; | ||||
| private RSyntaxTextArea editorPane = null; | ||||
| private RTextScrollPane editorScrollPane = null; | ||||
|
|
||||
|
|
||||
| public MainFrame() { | ||||
| super("Sierra UI Previewer"); | ||||
|
|
||||
|
||||
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it editable by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep good catch, I'll remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you configure your editor so it doesn't reorder imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, will do!