# HG changeset patch # User Jaroslav Tulach # Date 1484683957 -3600 # Node ID fe294d0f12977c4949e9605a10372f374a79a90a # Parent c2fdec0483a75baf8c42af5d51f7f03fa7dad262 Making the project compilable diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/compiler/XelfiCompilerMain.java --- a/src/main/java/xelfi/compiler/XelfiCompilerMain.java Tue Jan 17 21:11:58 2017 +0100 +++ b/src/main/java/xelfi/compiler/XelfiCompilerMain.java Tue Jan 17 21:12:37 2017 +0100 @@ -5,19 +5,16 @@ package xelfi.compiler; -import sun.tools.javac.*; -import sun.tools.java.*; import java.io.*; -class XelfiCompilerMain extends Main implements MainCompiler +class XelfiCompilerMain extends Object implements MainCompiler { /** Output from compiler is send here. */ protected XelfiCompilerOutput out; XelfiCompilerMain(XelfiCompilerOutput o) { - super(o, "javac"); out = o; } @@ -37,7 +34,7 @@ args[0] = file.toString(); output("Compiling: " + args[0]); } - compile(args); +// compile(args); output("\n"); } diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/CallStackView.java --- a/src/main/java/xelfi/debugger/CallStackView.java Tue Jan 17 21:11:58 2017 +0100 +++ b/src/main/java/xelfi/debugger/CallStackView.java Tue Jan 17 21:12:37 2017 +0100 @@ -11,14 +11,6 @@ import xelfi.top.TopLevel; import xelfi.top.TopDialog; -import sun.tools.debug.*; // needs TCP/IP -//import symantec.tools.debug.*; // doesn't need TCP/IP - -/** - * This is a view on the data given by the Debugger. - * It is a view on a stack of method calls in the actually traced thread. - */ - public class CallStackView extends TopDialog { private Debugger document; diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/Debugger.java --- a/src/main/java/xelfi/debugger/Debugger.java Tue Jan 17 21:11:58 2017 +0100 +++ b/src/main/java/xelfi/debugger/Debugger.java Tue Jan 17 21:12:37 2017 +0100 @@ -18,7 +18,6 @@ import xelfi.compiler.Output; import xelfi.execution.RunOptions; -import sun.tools.debug.*; // needs TCP/IP //import symantec.tools.debug.*; // doesn't need TCP/IP /** @@ -840,7 +839,7 @@ try { - RemoteClass rc = rsf.getRemoteClass(); + RemoteStackFrame.Name rc = rsf.getRemoteClass(); if (rc == null) System.out.println("invalid stack frame"); diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/DebuggerCallback.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/DebuggerCallback.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +interface DebuggerCallback { + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/LocalsView.java --- a/src/main/java/xelfi/debugger/LocalsView.java Tue Jan 17 21:11:58 2017 +0100 +++ b/src/main/java/xelfi/debugger/LocalsView.java Tue Jan 17 21:12:37 2017 +0100 @@ -11,7 +11,6 @@ import xelfi.top.TopLevel; import xelfi.top.TopDialog; -import sun.tools.debug.*; // needs TCP/IP //import symantec.tools.debug.*; // doesn't need TCP/IP /** @@ -61,33 +60,6 @@ return; } - RemoteStackVariable rsv[] = document.getStackVariables(); - - if (rsv == null) - { - list.clear(); - return; - } - - int indexOfSelected = list.getSelectedIndex(); - if (indexOfSelected != -1) - list.deselect(indexOfSelected); - - for(int i = 0; i < rsv.length; i++) - { - String line = rsv[i].getName(); - - line += ": "+document.getCurrentValue(rsv[i].getName()); - - if (i > list.countItems()-1) - list.addItem(line); - else - if (!list.getItem(i).equals(line)) - list.replaceItem(line, i); - } - - if (rsv.length < list.countItems()) - list.delItems(rsv.length, list.countItems()-1); } /** diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteArray.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteArray.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteArray extends RemoteValue { + + RemoteValue getElement(int index) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteValue[] getElements() { + throw new UnsupportedOperationException(); + } +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteChar.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteChar.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,5 @@ +package xelfi.debugger; + +class RemoteChar extends RemoteValue { + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteClass.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteClass.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteClass { + + String clearBreakpointLine(int lineNumber) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteField getMethod(String main) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + String setBreakpointLine(int lineNumber) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + String setBreakpointMethod(RemoteField rf) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteDebugger.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteDebugger.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,37 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +public class RemoteDebugger { + + public RemoteDebugger(String string, Debugger aThis, boolean b) { + } + + RemoteClass findClass(String className) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + Object[] listBreakpoints() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteThreadGroup run(int i, String[] args) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void close() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteThreadGroup[] listThreadGroups(Object object) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteField.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteField.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,9 @@ +package xelfi.debugger; + +class RemoteField extends RemoteValue { + + String getName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteObject.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteObject.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,13 @@ +package xelfi.debugger; + +class RemoteObject extends RemoteValue { + + RemoteValue getFieldValue(String token) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteField[] getFields() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteStackFrame.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteStackFrame.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteStackFrame { + + RemoteStackVariable[] getLocalVariables() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + String getMethodName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + Name getRemoteClass() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + int getLineNumber() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + static class Name { + + public Name() { + } + + public String getName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteStackVariable.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteStackVariable.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,30 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteStackVariable { + + boolean methodArgument() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + String getName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + boolean inScope() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteValue getValue() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteString.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteString.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,5 @@ +package xelfi.debugger; + +class RemoteString extends RemoteValue { + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteThread.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteThread.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,48 @@ +package xelfi.debugger; + +class RemoteThread extends RemoteValue { + RemoteStackVariable[] getStackVariables() { + return new RemoteStackVariable[0]; + } + + int getCurrentFrameIndex() { + return 1; + } + + String getName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void cont() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void resetCurrentFrameIndex() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void next() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void stop() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteStackFrame[] dumpStack() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + void step(boolean b) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteStackVariable getStackVariable(String token) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteStackFrame getCurrentFrame() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteThreadGroup.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteThreadGroup.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,22 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteThreadGroup { + + Object getName() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + RemoteThread[] listThreads(boolean b) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/RemoteValue.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/xelfi/debugger/RemoteValue.java Tue Jan 17 21:12:37 2017 +0100 @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package xelfi.debugger; + +/** + * + * @author devel + */ +class RemoteValue { + +} diff -r c2fdec0483a7 -r fe294d0f1297 src/main/java/xelfi/debugger/ThreadsView.java --- a/src/main/java/xelfi/debugger/ThreadsView.java Tue Jan 17 21:11:58 2017 +0100 +++ b/src/main/java/xelfi/debugger/ThreadsView.java Tue Jan 17 21:12:37 2017 +0100 @@ -10,10 +10,6 @@ import java.awt.*; import xelfi.top.TopDialog; import xelfi.top.TopLevel; -import xelfi.compiler.Output; - -import sun.tools.debug.*; // needs TCP/IP -//import symantec.tools.debug.*; // doesn't need TCP/IP /* * This is a view on the data given by the Debugger. @@ -184,62 +180,8 @@ return; } - RemoteThreadGroup[] rtg = document.getThreadGroups(); - - if (rtg == null) - { - list.clear(); - return; - } - - int indexOfSelected = list.getSelectedIndex(); - if (indexOfSelected != -1) - list.deselect(indexOfSelected); - - int threadGroupIndex = 1; - int lineIndex = 0; - - for(int i = 0; i < rtg.length; i++) - try - { - // without "system" thread groups (system and main groups) - if (rtg[i].getName().compareTo("system") == 0 || - rtg[i].getName().compareTo("main") == 0) - continue; - - RemoteThread rt[] = rtg[i].listThreads(true); - String string = " ["+(threadGroupIndex)+"] "+rtg[i].getName(); - - // add line for a thread group into the list - if (lineIndex > list.countItems()-1) - list.addItem(string); - else - if (!list.getItem(lineIndex).equals(string)) - list.replaceItem(string, lineIndex); - - threadGroupIndex++; - lineIndex++; - - for(int j = 0; j < rt.length; j++) - { - string = " "+rt[j].getName()+" : "+rt[j].getStatus(); - - if (lineIndex > list.countItems()-1) - list.addItem(string); - else - if (!list.getItem(lineIndex).equals(string)) - list.replaceItem(string, lineIndex); - - lineIndex++; - } - } - catch(Exception e) - { - e.printStackTrace(); - } - - if (lineIndex < list.countItems()-1) - list.delItems(lineIndex+1, list.countItems()-1); + return; + } /** @@ -248,7 +190,5 @@ public void show() { super.show(); - list.requestFocus(); - document.threadsViewShown(); } }