Skip to content

Commit da0c366

Browse files
committed
cleanups
1 parent 232a11d commit da0c366

File tree

1 file changed

+7
-57
lines changed

1 file changed

+7
-57
lines changed

java/src/processing/mode/java/JavaEditor.java

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,16 @@ public class JavaEditor extends Editor {
7676
protected final String breakpointMarkerComment = " //<>//";
7777

7878
protected JMenu debugMenu;
79-
// JCheckBoxMenuItem enableDebug;
80-
// boolean debugEnabled;
81-
// JMenuItem enableDebug;
82-
8379
protected JMenuItem debugItem;
8480
protected Debugger debugger;
8581
protected boolean debugEnabled;
8682

8783
protected VariableInspector inspector;
8884
protected JMenuItem inspectorItem;
8985

90-
// private EditorToolbar javaToolbar;
91-
// private DebugToolbar debugToolbar;
92-
93-
private ErrorColumn errorBar;
86+
private ErrorColumn errorColumn;
9487

95-
// protected XQConsoleToggle btnShowConsole;
96-
// protected XQConsoleToggle btnShowErrors;
9788
protected JScrollPane errorTableScrollPane;
98-
// protected JPanel consoleProblemsPane;
9989
protected XQErrorTable errorTable;
10090
static final int ERROR_TAB_INDEX = 0;
10191

@@ -174,9 +164,9 @@ public void actionPerformed(ActionEvent e) {
174164
// remove the text area temporarily
175165
box.remove(2);
176166
textAndError.setLayout(new BorderLayout());
177-
errorBar = new ErrorColumn(this, textarea.getMinimumSize().height, jmode);
178-
textAndError.add(errorBar, BorderLayout.EAST);
179-
textarea.setBounds(0, 0, errorBar.getX() - 1, textarea.getHeight());
167+
errorColumn = new ErrorColumn(this, textarea.getMinimumSize().height, jmode);
168+
textAndError.add(errorColumn, BorderLayout.EAST);
169+
textarea.setBounds(0, 0, errorColumn.getX() - 1, textarea.getHeight());
180170
textAndError.add(textarea);
181171
// add our hacked version back to the editor
182172
box.add(textAndError);
@@ -219,16 +209,6 @@ public void rebuild() {
219209

220210
@Override
221211
public EditorFooter createFooter() {
222-
// //JPanel consolePanel = new JPanel();
223-
// JTabbedPane footer = new JTabbedPane(JTabbedPane.BOTTOM);
224-
//// tabPane.setUI(new BasicTabbedPaneUI());
225-
// footer.setUI(new SimpleTabbedPaneUI());
226-
//// tabPane.setUI(new SillyTabbedPaneUI());
227-
//// tabPane.setUI(new PlasticTabbedPaneUI());
228-
//// tabPane.setBorder(BorderFactory.createEmptyBorder());
229-
//// tabPane.setBackground(Color.RED);
230-
231-
// EditorFooter footer = new EditorFooter(this);
232212
EditorFooter footer = super.createFooter();
233213

234214
// Adding Error Table in a scroll pane
@@ -239,38 +219,8 @@ public EditorFooter createFooter() {
239219
errorTableScrollPane.setBorder(BorderFactory.createEmptyBorder());
240220
// errorTableScrollPane.setBorder(new EmptyBorder(0, Editor.LEFT_GUTTER, 0, 0));
241221
errorTableScrollPane.setViewportView(errorTable);
242-
243-
// // Adding toggle console button
244-
//// consolePanel.remove(2); // removes the line status
245-
// JPanel lineStatusPanel = new JPanel();
246-
// lineStatusPanel.setLayout(new BorderLayout());
247-
// btnShowConsole = new XQConsoleToggle(this, Language.text("editor.footer.console"), mode.getInteger("linestatus.height"));
248-
// btnShowErrors = new XQConsoleToggle(this, Language.text("editor.footer.errors"), mode.getInteger("linestatus.height"));
249-
// btnShowConsole.addMouseListener(btnShowConsole);
250-
// btnShowErrors.addMouseListener(btnShowErrors);
251-
252-
// JPanel toggleButtonPanel = new JPanel(new BorderLayout());
253-
// toggleButtonPanel.add(btnShowConsole, BorderLayout.EAST);
254-
// toggleButtonPanel.add(btnShowErrors, BorderLayout.WEST);
255-
// lineStatusPanel.add(toggleButtonPanel, BorderLayout.EAST);
256-
//// lineStatus.setBounds(0, 0, toggleButtonPanel.getX() - 1,
257-
//// toggleButtonPanel.getHeight());
258-
//// lineStatusPanel.add(lineStatus);
259-
// consolePanel.add(lineStatusPanel, BorderLayout.SOUTH);
260-
// lineStatusPanel.repaint();
261-
262-
// // Adding JPanel with CardLayout for Console/Problems Toggle
263-
//// consolePanel.remove(1); // removes the console itself
264-
// consoleProblemsPane = new JPanel(new CardLayout());
265-
// consoleProblemsPane.add(errorTableScrollPane, Language.text("editor.footer.errors"));
266-
// consoleProblemsPane.add(super.createConsolePanel(), Language.text("editor.footer.console"));
267-
// consolePanel.add(consoleProblemsPane, BorderLayout.CENTER);
268-
269-
// console = new EditorConsole(this);
270-
// footer.addPanel(Language.text("editor.footer.console"), console);
271222
footer.addPanel(errorTableScrollPane, Language.text("editor.footer.errors"), "/lib/footer/error");
272223

273-
//return consolePanel;
274224
return footer;
275225
}
276226

@@ -2593,17 +2543,17 @@ public void statusEmpty(){
25932543

25942544

25952545
public void updateErrorBar(List<Problem> problems) {
2596-
errorBar.updateErrorPoints(problems);
2546+
errorColumn.updateErrorPoints(problems);
25972547
}
25982548

25992549

26002550
public List<ErrorMarker> getErrorPoints() {
2601-
return errorBar.errorPoints;
2551+
return errorColumn.errorPoints;
26022552
}
26032553

26042554

26052555
public void repaintErrorBar() {
2606-
errorBar.repaint();
2556+
errorColumn.repaint();
26072557
}
26082558

26092559

0 commit comments

Comments
 (0)