mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
removed calls to log4j. Logging sth. does not work yet
This commit is contained in:
@@ -3,8 +3,7 @@ package de.uka.ilkd.key.ocl.gf;
|
|||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.logging.*;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that offers a basic readGfEdit method with a lot of
|
* A class that offers a basic readGfEdit method with a lot of
|
||||||
@@ -38,8 +37,8 @@ abstract class AbstractProber {
|
|||||||
skipChild("<hmsg>");
|
skipChild("<hmsg>");
|
||||||
try {
|
try {
|
||||||
String next = fromProc.readLine();
|
String next = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("2 " + next);
|
logger.finer("2 " + next);
|
||||||
}
|
}
|
||||||
return next;
|
return next;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -84,13 +83,13 @@ abstract class AbstractProber {
|
|||||||
String next = "";
|
String next = "";
|
||||||
//read <gfedit>
|
//read <gfedit>
|
||||||
String readresult = fromProc.readLine();
|
String readresult = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("1 " + next);
|
logger.finer("1 " + next);
|
||||||
}
|
}
|
||||||
//read either <hsmg> or <lineatization>
|
//read either <hsmg> or <lineatization>
|
||||||
readresult = fromProc.readLine();
|
readresult = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("1 " + next);
|
logger.finer("1 " + next);
|
||||||
}
|
}
|
||||||
|
|
||||||
next = readHmsg(readresult);
|
next = readHmsg(readresult);
|
||||||
@@ -101,8 +100,8 @@ abstract class AbstractProber {
|
|||||||
while ((next!=null)&&((next.length()==0)||(!next.trim().equals("<linearizations>")))) {
|
while ((next!=null)&&((next.length()==0)||(!next.trim().equals("<linearizations>")))) {
|
||||||
next = fromProc.readLine();
|
next = fromProc.readLine();
|
||||||
if (next!=null){
|
if (next!=null){
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("1 " + next);
|
logger.finer("1 " + next);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
@@ -115,8 +114,8 @@ abstract class AbstractProber {
|
|||||||
|
|
||||||
for (int i=0; i<3 && !next.equals(""); i++){
|
for (int i=0; i<3 && !next.equals(""); i++){
|
||||||
next = fromProc.readLine();
|
next = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("1 " + next);
|
logger.finer("1 " + next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,13 +134,13 @@ abstract class AbstractProber {
|
|||||||
String closing = (new StringBuffer(opening)).insert(1, '/').toString();
|
String closing = (new StringBuffer(opening)).insert(1, '/').toString();
|
||||||
try {
|
try {
|
||||||
String nextRead = fromProc.readLine();
|
String nextRead = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("3 " + nextRead);
|
logger.finer("3 " + nextRead);
|
||||||
}
|
}
|
||||||
while (!nextRead.trim().equals(closing)) {
|
while (!nextRead.trim().equals(closing)) {
|
||||||
nextRead = fromProc.readLine();
|
nextRead = fromProc.readLine();
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("3 " + nextRead);
|
logger.finer("3 " + nextRead);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -156,8 +155,8 @@ abstract class AbstractProber {
|
|||||||
* @param text the command, exactly the string that is going to be sent
|
* @param text the command, exactly the string that is going to be sent
|
||||||
*/
|
*/
|
||||||
protected void send(String text) {
|
protected void send(String text) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("## send: '" + text + "'");
|
logger.finer("## send: '" + text + "'");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
toProc.write(text, 0, text.length());
|
toProc.write(text, 0, text.length());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import javax.swing.*;
|
|||||||
import javax.swing.tree.*;
|
import javax.swing.tree.*;
|
||||||
import javax.swing.event.*;
|
import javax.swing.event.*;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
//import de.uka.ilkd.key.util.KeYResourceManager;
|
//import de.uka.ilkd.key.util.KeYResourceManager;
|
||||||
|
|
||||||
@@ -61,21 +61,21 @@ ActionListener{
|
|||||||
public void valueChanged(TreeSelectionEvent e) {
|
public void valueChanged(TreeSelectionEvent e) {
|
||||||
if (tree.getSelectionRows() != null) {
|
if (tree.getSelectionRows() != null) {
|
||||||
if (gfeditor.nodeTable == null) {
|
if (gfeditor.nodeTable == null) {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("null node table");
|
GFEditor2.treeLogger.finer("null node table");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("node table: " + gfeditor.nodeTable.contains(new Integer(0)) + " " + gfeditor.nodeTable.keys().nextElement());
|
GFEditor2.treeLogger.finer("node table: " + gfeditor.nodeTable.contains(new Integer(0)) + " " + gfeditor.nodeTable.keys().nextElement());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tree.getSelectionPath() == null) {
|
if (tree.getSelectionPath() == null) {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("null root path");
|
GFEditor2.treeLogger.finer("null root path");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("selected path" + tree.getSelectionPath());
|
GFEditor2.treeLogger.finer("selected path" + tree.getSelectionPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i = ((Integer) gfeditor.nodeTable.get(tree.getSelectionPath())).intValue();
|
int i = ((Integer) gfeditor.nodeTable.get(tree.getSelectionPath())).intValue();
|
||||||
@@ -166,8 +166,8 @@ ActionListener{
|
|||||||
* as the parent
|
* as the parent
|
||||||
*/
|
*/
|
||||||
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child, boolean shouldBeVisible) {
|
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child, boolean shouldBeVisible) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("node added: '" + child + "', parent: '" + parent + "'");
|
logger.finer("node added: '" + child + "', parent: '" + parent + "'");
|
||||||
}
|
}
|
||||||
DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
|
DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
|
||||||
|
|
||||||
@@ -205,9 +205,9 @@ ActionListener{
|
|||||||
exc.printStackTrace();
|
exc.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("The user has finished editing the node.");
|
GFEditor2.treeLogger.finer("The user has finished editing the node.");
|
||||||
GFEditor2.treeLogger.debug("New value: " + node.getUserObject());
|
GFEditor2.treeLogger.finer("New value: " + node.getUserObject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void treeNodesInserted(TreeModelEvent e) {
|
public void treeNodesInserted(TreeModelEvent e) {
|
||||||
@@ -298,8 +298,8 @@ ActionListener{
|
|||||||
public void mousePressed(MouseEvent e) {
|
public void mousePressed(MouseEvent e) {
|
||||||
int selRow = tree.getRowForLocation(e.getX(), e.getY());
|
int selRow = tree.getRowForLocation(e.getX(), e.getY());
|
||||||
tree.setSelectionRow(selRow);
|
tree.setSelectionRow(selRow);
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("selection changed!");
|
GFEditor2.treeLogger.finer("selection changed!");
|
||||||
}
|
}
|
||||||
maybeShowPopup(e);
|
maybeShowPopup(e);
|
||||||
}
|
}
|
||||||
@@ -308,12 +308,12 @@ ActionListener{
|
|||||||
//nothing to be done here
|
//nothing to be done here
|
||||||
}
|
}
|
||||||
void maybeShowPopup(MouseEvent e) {
|
void maybeShowPopup(MouseEvent e) {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("may be show Popup!");
|
GFEditor2.treeLogger.finer("may be show Popup!");
|
||||||
}
|
}
|
||||||
if (e.isPopupTrigger()) {
|
if (e.isPopupTrigger()) {
|
||||||
if (GFEditor2.treeLogger.isDebugEnabled()) {
|
if (GFEditor2.treeLogger.isLoggable(Level.FINER)) {
|
||||||
GFEditor2.treeLogger.debug("changing menu!");
|
GFEditor2.treeLogger.finer("changing menu!");
|
||||||
}
|
}
|
||||||
popup = gfeditor.producePopup();
|
popup = gfeditor.producePopup();
|
||||||
popup.show(e.getComponent(), e.getX(), e.getY());
|
popup.show(e.getComponent(), e.getX(), e.getY());
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
/*
|
|
||||||
* Created on 20.04.2005
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
* A class that represents a GF command together with its printname.
|
* A class that represents a GF command together with its printname.
|
||||||
@@ -21,8 +14,6 @@ import org.apache.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
abstract class GFCommand implements Comparable{
|
abstract class GFCommand implements Comparable{
|
||||||
|
|
||||||
protected static Logger subcatLogger = Logger.getLogger(GFEditor2.class.getName() + "_subcat");
|
|
||||||
|
|
||||||
/** the subcategory of this command */
|
/** the subcategory of this command */
|
||||||
public abstract String getSubcat();
|
public abstract String getSubcat();
|
||||||
/** the type of the command, r,w,ch,d,ac,... */
|
/** the type of the command, r,w,ch,d,ac,... */
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* Created on 06.05.2005
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
*
|
*
|
||||||
@@ -11,7 +9,6 @@ import org.apache.log4j.Logger;
|
|||||||
* Reason: No GUI stuff in the command.
|
* Reason: No GUI stuff in the command.
|
||||||
*/
|
*/
|
||||||
class InputCommand extends GFCommand {
|
class InputCommand extends GFCommand {
|
||||||
protected final static Logger logger = Logger.getLogger(Printname.class.getName());
|
|
||||||
public static InputCommand intInputCommand = new InputCommand("read in Integer",
|
public static InputCommand intInputCommand = new InputCommand("read in Integer",
|
||||||
"opens a dialog window in which an Integer can be entered",
|
"opens a dialog window in which an Integer can be entered",
|
||||||
int.class,
|
int.class,
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ package de.uka.ilkd.key.ocl.gf;
|
|||||||
|
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
import java.util.logging.*;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
@@ -114,7 +113,7 @@ class Printname {
|
|||||||
try {
|
try {
|
||||||
name = (String)this.paramNames.get(n);
|
name = (String)this.paramNames.get(n);
|
||||||
} catch (ArrayIndexOutOfBoundsException e) {
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||||||
subcatLogger.warn(e.getLocalizedMessage());
|
subcatLogger.warning(e.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@@ -204,8 +203,8 @@ class Printname {
|
|||||||
String fullName = subcatPart.substring(indFull + 1, indFullEnd);
|
String fullName = subcatPart.substring(indFull + 1, indFullEnd);
|
||||||
this.subcat = subcatPart.substring(0, indFull).trim();
|
this.subcat = subcatPart.substring(0, indFull).trim();
|
||||||
this.subcatNameHashtable.put(this.subcat, fullName);
|
this.subcatNameHashtable.put(this.subcat, fullName);
|
||||||
if (subcatLogger.isDebugEnabled()) {
|
if (subcatLogger.isLoggable(Level.FINER)) {
|
||||||
subcatLogger.debug("new fullname '" + fullName + "' for category (shortname) '" + this.subcat + "'");
|
subcatLogger.finer("new fullname '" + fullName + "' for category (shortname) '" + this.subcat + "'");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
subcat = subcatPart.trim();
|
subcat = subcatPart.trim();
|
||||||
@@ -394,7 +393,7 @@ class Printname {
|
|||||||
+ "<dd>" + this.paramTexts.get(which) + "</dd>";
|
+ "<dd>" + this.paramTexts.get(which) + "</dd>";
|
||||||
return result;
|
return result;
|
||||||
} catch (ArrayIndexOutOfBoundsException e) {
|
} catch (ArrayIndexOutOfBoundsException e) {
|
||||||
subcatLogger.warn(e.getLocalizedMessage());
|
subcatLogger.warning(e.getLocalizedMessage());
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import java.io.BufferedReader;
|
|||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
* asks GF to print all available printnames, parses that list and generates
|
* asks GF to print all available printnames, parses that list and generates
|
||||||
@@ -37,8 +36,8 @@ public class PrintnameLoader extends AbstractProber {
|
|||||||
protected void readMessage() {
|
protected void readMessage() {
|
||||||
try {
|
try {
|
||||||
String result = this.fromProc.readLine();
|
String result = this.fromProc.readLine();
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("1 " + result);
|
nogger.finer("1 " + result);
|
||||||
}
|
}
|
||||||
//first read line is <message>, but this one gets filtered out in the next line
|
//first read line is <message>, but this one gets filtered out in the next line
|
||||||
while (result.indexOf("/message")==-1){
|
while (result.indexOf("/message")==-1){
|
||||||
@@ -50,12 +49,12 @@ public class PrintnameLoader extends AbstractProber {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = this.fromProc.readLine();
|
result = this.fromProc.readLine();
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("1 " + result);
|
nogger.finer("1 " + result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("finished loading printnames");
|
nogger.finer("finished loading printnames");
|
||||||
}
|
}
|
||||||
} catch(IOException e){
|
} catch(IOException e){
|
||||||
System.err.println(e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
@@ -73,12 +73,12 @@ class PrintnameManager {
|
|||||||
* @param myPrintname the printname given by GF
|
* @param myPrintname the printname given by GF
|
||||||
*/
|
*/
|
||||||
protected void addNewPrintname(String myFun, String myPrintname, String type) {
|
protected void addNewPrintname(String myFun, String myPrintname, String type) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("addNewPrintname, myFun = '" + myFun + "' , myPrintname = '" + myPrintname + "'");
|
logger.finer("addNewPrintname, myFun = '" + myFun + "' , myPrintname = '" + myPrintname + "'");
|
||||||
}
|
}
|
||||||
Printname printname = new Printname(myFun, myPrintname, this.subcatNames, type);
|
Printname printname = new Printname(myFun, myPrintname, this.subcatNames, type);
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINER)) {
|
||||||
logger.debug("printname = '" + printname + "'");
|
logger.finer("printname = '" + printname + "'");
|
||||||
}
|
}
|
||||||
this.printnames.put(myFun, printname);
|
this.printnames.put(myFun, printname);
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ class PrintnameManager {
|
|||||||
// which does not occur in the refinement menu.
|
// which does not occur in the refinement menu.
|
||||||
// if that is not wanted, don't call this method!
|
// if that is not wanted, don't call this method!
|
||||||
if (!myFun.startsWith("?")) {
|
if (!myFun.startsWith("?")) {
|
||||||
logger.info("no printname for '" + myFun + "', pretend that it is a bound variable");
|
logger.fine("no printname for '" + myFun + "', pretend that it is a bound variable");
|
||||||
return new Printname(myFun);
|
return new Printname(myFun);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
/*
|
|
||||||
* Created on 13.05.2005
|
|
||||||
*
|
|
||||||
* TODO To change the template for this generated file go to
|
|
||||||
* Window - Preferences - Java - Code Style - Code Templates
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
@@ -23,7 +17,7 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.JRadioButton;
|
import javax.swing.JRadioButton;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes care of reading in Strings that are to be parsed and terms.
|
* Takes care of reading in Strings that are to be parsed and terms.
|
||||||
@@ -166,23 +160,23 @@ class ReadDialog implements ActionListener{
|
|||||||
termInput = inputField.getText();
|
termInput = inputField.getText();
|
||||||
if (termInput.indexOf(File.separatorChar)==-1){
|
if (termInput.indexOf(File.separatorChar)==-1){
|
||||||
owner.send("g "+termInput);
|
owner.send("g "+termInput);
|
||||||
if (xmlLogger.isDebugEnabled()) xmlLogger.debug("sending term string");
|
if (xmlLogger.isLoggable(Level.FINER)) xmlLogger.finer("sending term string");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
owner.send("tfile "+termInput);
|
owner.send("tfile "+termInput);
|
||||||
if (xmlLogger.isDebugEnabled()) {
|
if (xmlLogger.isLoggable(Level.FINER)) {
|
||||||
xmlLogger.debug("sending file term: "+termInput);
|
xmlLogger.finer("sending file term: "+termInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { //String selected
|
} else { //String selected
|
||||||
parseInput = inputField.getText();
|
parseInput = inputField.getText();
|
||||||
if (parseInput.indexOf(File.separatorChar)==-1){
|
if (parseInput.indexOf(File.separatorChar)==-1){
|
||||||
owner.send("p "+parseInput);
|
owner.send("p "+parseInput);
|
||||||
if (xmlLogger.isDebugEnabled()) xmlLogger.debug("sending parse string: "+parseInput);
|
if (xmlLogger.isLoggable(Level.FINER)) xmlLogger.finer("sending parse string: "+parseInput);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
owner.send("pfile "+parseInput);
|
owner.send("pfile "+parseInput);
|
||||||
if (xmlLogger.isDebugEnabled()) xmlLogger.debug("sending file parse string: "+parseInput);
|
if (xmlLogger.isLoggable(Level.FINER)) xmlLogger.finer("sending file parse string: "+parseInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
readDialog.setVisible(false);
|
readDialog.setVisible(false);
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
/*
|
|
||||||
* Created on 21.04.2005
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import org.apache.log4j.Logger;
|
import java.util.logging.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
@@ -36,8 +32,8 @@ class RealCommand extends GFCommand {
|
|||||||
fullnames.put("ch", "change head");
|
fullnames.put("ch", "change head");
|
||||||
fullnames.put("rc", "refine from history:");
|
fullnames.put("rc", "refine from history:");
|
||||||
}
|
}
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isLoggable(Level.FINEST)) {
|
||||||
logger.debug("new RealCommand: " + myCommand);
|
logger.finest("new RealCommand: " + myCommand);
|
||||||
}
|
}
|
||||||
this.command = myCommand.trim();
|
this.command = myCommand.trim();
|
||||||
this.showText = myShowText;
|
this.showText = myShowText;
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
/*
|
|
||||||
* Created on 27.04.2005
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
/*
|
|
||||||
* Created on 13.04.2005
|
|
||||||
*
|
|
||||||
* TODO To change the template for this generated file go to
|
|
||||||
* Window - Preferences - Java - Code Style - Code Templates
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JList;
|
import javax.swing.JList;
|
||||||
import javax.swing.ListCellRenderer;
|
import javax.swing.ListCellRenderer;
|
||||||
@@ -19,8 +12,6 @@ import javax.swing.ListCellRenderer;
|
|||||||
*/
|
*/
|
||||||
public class ToolTipCellRenderer extends JLabel implements ListCellRenderer {
|
public class ToolTipCellRenderer extends JLabel implements ListCellRenderer {
|
||||||
|
|
||||||
protected static Logger logger = Logger.getLogger(ToolTipCellRenderer.class.getName());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a JLabel with a tooltip, which is given by the GFCommand
|
* Returns a JLabel with a tooltip, which is given by the GFCommand
|
||||||
* @param list Well, the list this cell belongs to
|
* @param list Well, the list this cell belongs to
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import java.io.BufferedReader;
|
|||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
|
import java.util.logging.*;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author daniels
|
* @author daniels
|
||||||
@@ -14,7 +13,7 @@ import org.apache.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public class TypesLoader extends AbstractProber {
|
public class TypesLoader extends AbstractProber {
|
||||||
protected final Hashtable hashtable;
|
protected final Hashtable hashtable;
|
||||||
protected static Logger nogger = Logger.getLogger(Printname.class.getName());
|
protected static Logger nogger = Logger.getLogger(TypesLoader.class.getName());
|
||||||
/**
|
/**
|
||||||
* @param fromGf The GF process
|
* @param fromGf The GF process
|
||||||
* @param toGf The GF process
|
* @param toGf The GF process
|
||||||
@@ -33,8 +32,8 @@ public class TypesLoader extends AbstractProber {
|
|||||||
protected void readMessage() {
|
protected void readMessage() {
|
||||||
try {
|
try {
|
||||||
String result = this.fromProc.readLine();
|
String result = this.fromProc.readLine();
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("7 " + result);
|
nogger.finer("7 " + result);
|
||||||
}
|
}
|
||||||
//first read line is <message>, but this one gets filtered out in the next line
|
//first read line is <message>, but this one gets filtered out in the next line
|
||||||
while (result.indexOf("/message")==-1){
|
while (result.indexOf("/message")==-1){
|
||||||
@@ -45,12 +44,12 @@ public class TypesLoader extends AbstractProber {
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = this.fromProc.readLine();
|
result = this.fromProc.readLine();
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("7 " + result);
|
nogger.finer("7 " + result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nogger.isDebugEnabled()) {
|
if (nogger.isLoggable(Level.FINER)) {
|
||||||
nogger.debug("finished loading printnames");
|
nogger.finer("finished loading printnames");
|
||||||
}
|
}
|
||||||
} catch(IOException e){
|
} catch(IOException e){
|
||||||
System.err.println(e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
@@ -66,7 +65,9 @@ public class TypesLoader extends AbstractProber {
|
|||||||
public void readTypes() {
|
public void readTypes() {
|
||||||
//prints the last loaded grammar,
|
//prints the last loaded grammar,
|
||||||
String sendString = "gf pg";
|
String sendString = "gf pg";
|
||||||
nogger.info("collecting types :" + sendString);
|
if (nogger.isLoggable(Level.FINE)) {
|
||||||
|
nogger.fine("collecting types :" + sendString);
|
||||||
|
}
|
||||||
send(sendString);
|
send(sendString);
|
||||||
readGfedit();
|
readGfedit();
|
||||||
}
|
}
|
||||||
@@ -82,8 +83,8 @@ public class TypesLoader extends AbstractProber {
|
|||||||
final int typeStartIndex = line.indexOf(" : ") + 3;
|
final int typeStartIndex = line.indexOf(" : ") + 3;
|
||||||
final int typeEndIndex = line.lastIndexOf(" = ");
|
final int typeEndIndex = line.lastIndexOf(" = ");
|
||||||
try {
|
try {
|
||||||
final String type = line.substring(typeStartIndex, typeEndIndex);
|
final String type = line.substring(typeStartIndex, typeEndIndex);
|
||||||
this.hashtable.put(fun, type);
|
this.hashtable.put(fun, type);
|
||||||
} catch (StringIndexOutOfBoundsException e) {
|
} catch (StringIndexOutOfBoundsException e) {
|
||||||
System.err.println("line: '" + line + "'");
|
System.err.println("line: '" + line + "'");
|
||||||
System.err.println("fun: '" + fun + "'");
|
System.err.println("fun: '" + fun + "'");
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
/*
|
|
||||||
* Created on 27.04.2005
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package de.uka.ilkd.key.ocl.gf;
|
package de.uka.ilkd.key.ocl.gf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,14 +11,13 @@ package de.uka.ilkd.key.ocl.gf;
|
|||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.logging.*;
|
||||||
import javax.swing.ProgressMonitor;
|
import javax.swing.ProgressMonitor;
|
||||||
|
//import org.apache.log4j.Logger;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
protected static Logger timeLogger = Logger.getLogger("de.uka.ilkd.key.ocl.gf.utils.timer");
|
protected static Logger timeLogger = Logger.getLogger(Utils.class.getName() + ".timer");
|
||||||
protected static Logger deleteLogger = Logger.getLogger("de.uka.ilkd.key.ocl.gf.utils.delete");
|
protected static Logger deleteLogger = Logger.getLogger(Utils.class.getName() + ".delete");
|
||||||
|
|
||||||
private Utils() {
|
private Utils() {
|
||||||
//non-instantiability enforced
|
//non-instantiability enforced
|
||||||
@@ -48,8 +47,8 @@ public class Utils {
|
|||||||
*/
|
*/
|
||||||
public static void tickProgress(ProgressMonitor pm, int progress, String note) {
|
public static void tickProgress(ProgressMonitor pm, int progress, String note) {
|
||||||
if (note != null) {
|
if (note != null) {
|
||||||
if (timeLogger.isDebugEnabled()) {
|
if (timeLogger.isLoggable(Level.FINER)) {
|
||||||
timeLogger.debug(System.currentTimeMillis() + " : " + note);
|
timeLogger.finer(System.currentTimeMillis() + " : " + note);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pm == null) {
|
if (pm == null) {
|
||||||
@@ -71,8 +70,8 @@ public class Utils {
|
|||||||
String filename = grammarsDir + File.separator + GFEditor2.modelModulName + endings[i];
|
String filename = grammarsDir + File.separator + GFEditor2.modelModulName + endings[i];
|
||||||
File file = new File(filename);
|
File file = new File(filename);
|
||||||
file.deleteOnExit();
|
file.deleteOnExit();
|
||||||
if (deleteLogger.isDebugEnabled()) {
|
if (deleteLogger.isLoggable(Level.FINER)) {
|
||||||
deleteLogger.debug("scheduled for deletion: " + filename);
|
deleteLogger.fine("scheduled for deletion: " + filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File file = new File(grammarsDir);
|
File file = new File(grammarsDir);
|
||||||
@@ -95,13 +94,13 @@ public class Utils {
|
|||||||
* Only gets called in stand-alone mode, not when run with KeY.
|
* Only gets called in stand-alone mode, not when run with KeY.
|
||||||
*/
|
*/
|
||||||
public static void configureLogger() {
|
public static void configureLogger() {
|
||||||
if ((new File(LOGGER_CONFIGURATION)).exists())
|
// if ((new File(LOGGER_CONFIGURATION)).exists())
|
||||||
org.apache.log4j.PropertyConfigurator.configureAndWatch(
|
// org.apache.log4j.PropertyConfigurator.configureAndWatch(
|
||||||
LOGGER_CONFIGURATION, 1500);
|
// LOGGER_CONFIGURATION, 1500);
|
||||||
else {
|
// else {
|
||||||
org.apache.log4j.BasicConfigurator.configure();
|
// org.apache.log4j.BasicConfigurator.configure();
|
||||||
Logger.getRootLogger().setLevel(org.apache.log4j.Level.ERROR);
|
// Logger.getRootLogger().setLevel(org.apache.log4j.Level.ERROR);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user