Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 2210 → Rev 2211

/branches/v1.12-magnesium/src/org/tela_botanica/del/client/Del.java
New file
0,0 → 1,69
package org.tela_botanica.del.client;
 
import org.tela_botanica.del.client.cache.CacheClient;
import org.tela_botanica.del.client.gestionhistorique.GestionnaireHistorique;
import org.tela_botanica.del.client.config.Config;
 
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.History;
import com.google.gwt.core.client.*;
 
public class Del implements EntryPoint {
@Override
public void onModuleLoad() {
/*GWT.setUncaughtExceptionHandler(new
GWT.UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
Throwable unwrapped = unwrap(e);
Window.alert(buildStackTrace(unwrapped, ""));
}
public Throwable unwrap(Throwable e) {
if(e instanceof UmbrellaException) {
UmbrellaException ue = (UmbrellaException) e;
if(ue.getCauses().size() == 1) {
return unwrap(ue.getCauses().iterator().next());
}
}
return e;
}
});*/
 
CacheClient.getInstance().initialiserAvecParametres();
History.addValueChangeHandler(new GestionnaireHistorique());
History.fireCurrentHistoryState();
}
/*private String buildStackTrace(Throwable t, String log) {
if (t != null) {
log += t.getClass().toString();
log += t.getMessage();
StackTraceElement[] stackTrace = t.getStackTrace();
if (stackTrace != null) {
StringBuffer trace = new StringBuffer();
 
for (int i = 0; i < stackTrace.length; i++) {
trace.append(stackTrace[i].getClassName() + "." + stackTrace[i].getMethodName() + "("
+ stackTrace[i].getFileName() + ":" + stackTrace[i].getLineNumber());
}
 
log += trace.toString();
}
 
Throwable cause = t.getCause();
if (cause != null && cause != t) {
log += buildStackTrace(cause, "CausedBy:\n");
}
}
return log;
}*/
 
public static native void LogVersFirebug(Object o) /*-{
if (!!($wnd.console && $wnd.console.log)) {
console.log(o);
}
}-*/;
}