Skip to content

Commit

Permalink
New ERFirebug Framework
Browse files Browse the repository at this point in the history
This Framework use Firebug Lite.

* It work's Offline
* It work's on iOS & IE

Usage : only write in the Component HTML Part : <wo:ERFirebug />
  • Loading branch information
ishimoto authored and Pascal Robert committed Jul 23, 2012
1 parent c1d9b3d commit 0253e03
Show file tree
Hide file tree
Showing 284 changed files with 82,193 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Frameworks/Misc/ERFirebug/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="con" path="WOFramework/ERJars"/>
<classpathentry kind="con" path="WOFramework/ERExtensions"/>
<classpathentry kind="con" path="WOFramework/JavaWOExtensions"/>
<classpathentry kind="con" path="WOFramework/JavaEOAccess"/>
<classpathentry kind="con" path="WOFramework/JavaEOControl"/>
<classpathentry kind="con" path="WOFramework/JavaFoundation"/>
<classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/>
<classpathentry kind="con" path="WOFramework/JavaWebObjects"/>
<classpathentry kind="con" path="WOFramework/JavaXML"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 23 additions & 0 deletions Frameworks/Misc/ERFirebug/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ERFirebug</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.objectstyle.wolips.incrementalbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.objectstyle.wolips.incrementalframeworknature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding//Components=UTF-8
6 changes: 6 additions & 0 deletions Frameworks/Misc/ERFirebug/Components/ERFirebug.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wodefinitions>
<wo class="ERFirebug" wocomponentcontent="false">
<binding defaults="Boolean" name="useFirebug"/>
</wo>
</wodefinitions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<webobject name="UseFirebug">
<webobject name="JS" /><webobject name="JS2" />
<script type="text/javascript">console.log('Loading Firebug');</script>
</webobject>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
UseFirebug : WOConditional {
condition = useFirebug;
}

JS : ERXJavaScript { //FIXME : It works only if this get called. Little Strange but for now it works
framework = "ERFirebug";
filename = "content/firebug-lite-dev.js";
}

JS2 : ERXJavaScript {
framework = "ERFirebug";
filename = "content/firebug-lite.js";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"WebObjects Release" = "WebObjects 5.0";
encoding = "UTF-8";
}
3 changes: 3 additions & 0 deletions Frameworks/Misc/ERFirebug/Resources/Properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Properies Info
er.extensions.load.Properties.framework.ERFirebug=load
er.extensions.ERFirebug.hasLocalization=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package er.firebug.components;

import com.webobjects.appserver.WOContext;

import er.extensions.components.ERXStatelessComponent;

/**
* Firebug lite WebObjects Framework
*
* http://getfirebug.com/lite.html
*
* @author ishimoto
*/
@SuppressWarnings("serial")
public class ERFirebug extends ERXStatelessComponent {

public static String VERSION = "1.4";

//********************************************************************
// Constructor
//********************************************************************

public ERFirebug(WOContext context) {
super(context);
}

@Override
public boolean synchronizesVariablesWithBindings() {
return false;
}

//********************************************************************
// Bindings
//********************************************************************

public boolean useFirebug() {
return booleanValueForBinding("useFirebug", true);
}

}
92 changes: 92 additions & 0 deletions Frameworks/Misc/ERFirebug/Sources/er/firebug/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Firebug adds a global variable named "console" to all web pages loaded in Firefox. This object contains many methods that allow you to write to the Firebug console to expose information that is flowing through your scripts.

console.log(object[, object, ...])

Writes a message to the console. You may pass as many arguments as you'd like, and they will be joined together in a space-delimited line.
The first argument to log may be a string containing printf-like string substitution patterns. For example:

console.log("The %s jumped over %d tall buildings", animal, count);

The example above can be re-written without string substitution to achieve the same result:

console.log("The", animal, "jumped over", count, "tall buildings");

These two techniques can be combined. If you use string substitution but provide more arguments than there are substitution patterns, the remaining arguments will be appended in a space-delimited line, like so:

console.log("I am %s and I have:", myName, thing1, thing2, thing3);

If objects are logged, they will be written not as static text, but as interactive hyperlinks that can be clicked to inspect the object in Firebug's HTML, CSS, Script, or DOM tabs. You may also use the %o pattern to substitute a hyperlink in a string.
Here is the complete set of patterns that you may use for string substitution:


String Substitution Patterns
%s String
%d, %i Integer (numeric formatting is not yet supported)
%f Floating point number (numeric formatting is not yet supported)
%o Object hyperlink


console.debug(object[, object, ...])

Writes a message to the console, including a hyperlink to the line where it was called.

console.info(object[, object, ...])

Writes a message to the console with the visual "info" icon and color coding and a hyperlink to the line where it was called.

console.warn(object[, object, ...])

Writes a message to the console with the visual "warning" icon and color coding and a hyperlink to the line where it was called.

console.error(object[, object, ...])

Writes a message to the console with the visual "error" icon and color coding and a hyperlink to the line where it was called.

console.assert(expression[, object, ...])

Tests that an expression is true. If not, it will write a message to the console and throw an exception.

console.dir(object)

Prints an interactive listing of all properties of the object. This looks identical to the view that you would see in the DOM tab.

console.dirxml(node)

Prints the XML source tree of an HTML or XML element. This looks identical to the view that you would see in the HTML tab. You can click on any node to inspect it in the HTML tab.

console.trace()

Prints an interactive stack trace of JavaScript execution at the point where it is called.
The stack trace details the functions on the stack, as well as the values that were passed as arguments to each function. You can click each function to take you to its source in the Script tab, and click each argument value to inspect it in the DOM or HTML tabs.

console.group(object[, object, ...])

Writes a message to the console and opens a nested block to indent all future messages sent to the console. Call console.groupEnd() to close the block.

console.groupCollapsed(object[, object, ...])

Like console.group(), but the block is initially collapsed.

console.groupEnd()

Closes the most recently opened block created by a call to console.group() or console.groupEnd()

console.time(name)

Creates a new timer under the given name. Call console.timeEnd(name) with the same name to stop the timer and print the time elapsed..

console.timeEnd(name)

Stops a timer created by a call to console.time(name) and writes the time elapsed.

console.profile([title])

Turns on the JavaScript profiler. The optional argument title would contain the text to be printed in the header of the profile report.

console.profileEnd()

Turns off the JavaScript profiler and prints its report.

console.count([title])

Writes the number of times that the line of code where count was called was executed. The optional argument title will print a message in addition to the number of the count.
Loading

0 comments on commit 0253e03

Please sign in to comment.