mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 02:20:45 +01:00
refactor bug fix
This commit is contained in:
@@ -119,6 +119,7 @@ x Working for local code
|
||||
General Stuff
|
||||
=============
|
||||
|
||||
* Add option for toggling debug output
|
||||
x Add option for toggling debug output
|
||||
x On Run/Debug Console is visible(ProblemsList hidden)
|
||||
* update build.xml to produce dists
|
||||
* Make this a contributed mode - mode.txt, github releases feature, version numbering, git tags, etc
|
||||
|
||||
@@ -38,6 +38,7 @@ import javax.swing.JEditorPane;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JList;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
@@ -1813,6 +1814,7 @@ public class ASTGenerator {
|
||||
editor.statusError("Can't locate definition of " + selText);
|
||||
return;
|
||||
}
|
||||
errorCheckerService.pauseThread();
|
||||
treeRename.setModel(new DefaultTreeModel(defCU));
|
||||
((DefaultTreeModel) treeRename.getModel()).reload();
|
||||
frmOccurenceList.setTitle("Usage of " + selText);
|
||||
@@ -1824,14 +1826,14 @@ public class ASTGenerator {
|
||||
// I need to store the pde and java offsets beforehand because once
|
||||
// the replace starts, all offsets returned are affected
|
||||
int offsetsMap[][][] = new int[defCU.getChildCount()][2][];
|
||||
for (int i = defCU.getChildCount() - 1; i >= 0; i--) {
|
||||
for (int i = 0; i < defCU.getChildCount(); i++) {
|
||||
ASTNodeWrapper awrap = (ASTNodeWrapper) ((DefaultMutableTreeNode) (defCU
|
||||
.getChildAt(i))).getUserObject();
|
||||
offsetsMap[i][0] = awrap.getPDECodeOffsets(errorCheckerService);
|
||||
offsetsMap[i][1] = awrap.getJavaCodeOffsets(errorCheckerService);
|
||||
}
|
||||
|
||||
for (int i = defCU.getChildCount() - 1; i >= 0; i--) {
|
||||
for (int i = 0; i < defCU.getChildCount(); i++) {
|
||||
int pdeoffsets[] = offsetsMap[i][0];
|
||||
int javaoffsets[] = offsetsMap[i][1];
|
||||
// correction for pde enhancements related displacement on a line
|
||||
@@ -1845,13 +1847,15 @@ public class ASTGenerator {
|
||||
lineOffsetDisplacement.put(javaoffsets[0],
|
||||
lineOffsetDisplacementConst);
|
||||
}
|
||||
|
||||
ErrorCheckerService.scrollToErrorLine(editor, pdeoffsets[0],
|
||||
pdeoffsets[1],
|
||||
javaoffsets[1] + off,
|
||||
javaoffsets[2]);
|
||||
//int k = JOptionPane.showConfirmDialog(new JFrame(), "Rename?","", JOptionPane.OK_OPTION));
|
||||
editor.ta.setSelectedText(newName);
|
||||
}
|
||||
errorCheckerService.resumeThread();
|
||||
errorCheckerService.runManualErrorCheck();
|
||||
for (Integer lineNum : lineOffsetDisplacement.keySet()) {
|
||||
log(lineNum + "line, disp"
|
||||
+ lineOffsetDisplacement.get(lineNum));
|
||||
|
||||
@@ -378,10 +378,10 @@ public class ErrorCheckerService implements Runnable{
|
||||
Problem p = new Problem(problems[i], a[0], a[1] + 1);
|
||||
//TODO: ^Why do cheeky stuff?
|
||||
problemsList.add(p);
|
||||
log(problems[i].getMessage());
|
||||
for (String j : problems[i].getArguments()) {
|
||||
log("arg " + j);
|
||||
}
|
||||
// log(problems[i].getMessage());
|
||||
// for (String j : problems[i].getArguments()) {
|
||||
// log("arg " + j);
|
||||
// }
|
||||
// log(p.toString());
|
||||
}
|
||||
|
||||
@@ -491,10 +491,10 @@ public class ErrorCheckerService implements Runnable{
|
||||
// + problems[i].isWarning());
|
||||
|
||||
IProblem problem = problems[i];
|
||||
log(problem.getMessage());
|
||||
for (String j : problem.getArguments()) {
|
||||
log("arg " + j);
|
||||
}
|
||||
// log(problem.getMessage());
|
||||
// for (String j : problem.getArguments()) {
|
||||
// log("arg " + j);
|
||||
// }
|
||||
int a[] = calculateTabIndexAndLineNumber(problem);
|
||||
Problem p = new Problem(problem, a[0], a[1]);
|
||||
if ((Boolean) errorList[i][8]) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ExperimentalMode extends JavaMode {
|
||||
public static final boolean VERBOSE_LOGGING = true;
|
||||
//public static final boolean VERBOSE_LOGGING = false;
|
||||
public static final int LOG_SIZE = 512 * 1024; // max log file size (in bytes)
|
||||
public static boolean DEBUG = !true;
|
||||
public static boolean DEBUG = true;
|
||||
|
||||
public ExperimentalMode(Base base, File folder) {
|
||||
super(base, folder);
|
||||
|
||||
Reference in New Issue
Block a user