[xdebug-dev] xdebug-xul xdebug-xul/content/xdebul/dbgp-helper.js xdebug-xul/content/xdebul/dbgp-parser.js xdebug-xul/content/xdebul/xdebul.css xdebug-xul/content/xdebul/xdebul.xul xdebug-xul/locale/en-US/xdebul/xdebul.dtd

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 25 Nov 2009 13:43:52 +0100

Date: Wed Nov 25 13:43:52 CET 2009
User: Derick Rethans
Directory: xdebug-xul

Log Message:
- Sync

Modified files:
           xdebug-xul/content/xdebul/dbgp-helper.js (version: 1.2)
           xdebug-xul/content/xdebul/dbgp-parser.js (version: 1.2)
           xdebug-xul/content/xdebul/xdebul.css (version: 1.2)
           xdebug-xul/content/xdebul/xdebul.xul (version: 1.2)
           xdebug-xul/locale/en-US/xdebul/xdebul.dtd (version: 1.2)

[FILE: /xdebug-xul/content/xdebul/dbgp-helper.js]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xdebug-xul/content/xdebul/dbgp-helper.js:1.1.1.1 Tue Nov 30 11:51:16 2004 GMT
+++ xdebug-xul/content/xdebul/dbgp-helper.js Wed Nov 25 11:43:51 2009 GMT
@@ -1,11 +1,13 @@
-var loadedFiles = new array();
+var loadedFiles = new Array();
+var expectedFile = '';
 
 function dbgpHelperDoRetrieveFile(file)
 {
         if (typeof loadedFiles[file] == "undefined") {
- options = new array();
+ options = new Array();
                 options["f"] = file;
                 dbgpCommandRun(debuggerStream, 'source', options);
                 loadedFiles[file] = true;
+ expectedFile = file;
         }
 }

[FILE: /xdebug-xul/content/xdebul/dbgp-parser.js]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xdebug-xul/content/xdebul/dbgp-parser.js:1.1.1.1 Tue Nov 30 11:51:16 2004 GMT
+++ xdebug-xul/content/xdebul/dbgp-parser.js Wed Nov 25 11:43:51 2009 GMT
@@ -17,6 +17,10 @@
                         logAdd('init packet received');
                         dbgpHandleInitPacket(dom.documentElement);
                         break;
+ case 'response':
+ logAdd('normal response received');
+ dbgpHandleResponsePacket(dom.documentElement);
+ break;
                 case 'parsererror':
                         alert("Parse error in incoming packet, dweep!");
                         break;
@@ -44,13 +48,100 @@
         debuggerButtonsEnable();
 }
 
+function dbgpHandleResponsePacket(p)
+{
+ // Retrieve command attribute
+ var command = p.getAttribute('command');
+
+ // Add the message to the log screen
+ logAdd("Command = " + command);
+
+ switch (command) {
+ case 'source':
+ dbgpHandleSourcePacket(p);
+ break;
+ }
+}
+
+function dbgpHandleSourcePacket(p)
+{
+ var source = p.firstChild.nodeValue;
+ var filetabbox = document.getElementById("files");
+ var filetabs = document.getElementById("filetabs");
+ var filetabpanels = document.getElementById("filetabpanels");
+
+ var tabchild = document.createElement('tab');
+ var fileNameParts = expectedFile.split('/');
+ tabchild.setAttribute('label', fileNameParts[fileNameParts.length - 1]);
+ filetabs.appendChild(tabchild);
+ filetabbox.selectedTab = tabchild;
+
+ var tabpanelchild = document.createElement('tabpanel');
+ tabpanelchild.setAttribute('flex', 1);
+ filetabpanels.appendChild(tabpanelchild);
+ filetabbox.selectedPanel = tabpanelchild;
+
+ var listbox = document.createElement('listbox');
+ listbox.setAttribute('flex', 1);
+ listbox.setAttribute('id', btoa(expectedFile));
+
+ var listhead = document.createElement('listhead');
+ listbox.appendChild(listhead);
+
+ var listheader = document.createElement('listheader');
+ listheader.setAttribute('class', 'head_listheader');
+ listheader.setAttribute('label', '#');
+ listhead.appendChild(listheader);
+
+ listheader = document.createElement('listheader');
+ listheader.setAttribute('class', 'head_listheader');
+ listheader.setAttribute('label', 'Code');
+ listhead.appendChild(listheader);
+
+ var listcols = document.createElement('listcols');
+ listbox.appendChild(listcols);
+
+ var listcol = document.createElement('listcol');
+ listcols.appendChild(listcol);
+
+ listcol = document.createElement('listcol');
+ listcol.setAttribute('flex', '3');
+ listcols.appendChild(listcol);
+
+ source = atob(source);
+ sourceArray = source.split("\n");
+
+ var lines = sourceArray.length;
+
+ var sourceLineNr;
+ var sourceLine;
+ var item;
+ for (i = 0; i < lines; i++)
+ {
+ sourceLineNr = document.createElement('listcell');
+ sourceLineNr.setAttribute('label', i + 1);
+ sourceLineNr.setAttribute('style', 'text-align: right;');
+ sourceLine = document.createElement('listcell');
+ sourceLine.setAttribute('label', sourceArray[i]);
+ sourceLine.setAttribute('style', 'font-family: courier;');
+ item = document.createElement('listitem');
+ item.appendChild(sourceLineNr);
+ item.appendChild(sourceLine);
+ listbox.appendChild(item);
+ }
+
+ listbox.seltype = 'multiple';
+ listbox.selectedIndex = 4;
+ tabpanelchild.appendChild(listbox);
+}
+
 function dbgpCommandRun(stream, cmd, options)
 {
         var packet = '';
 
         packet = packet + cmd + ' -i ' + dbgpTransactionID
         for (option in options) {
- packet = packet + " -" + options[option];
+ packet = packet + " -" + option + " " + options[option];
         }
         packet = packet + "\0";
 

[FILE: /xdebug-xul/content/xdebul/xdebul.css]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xdebug-xul/content/xdebul/xdebul.css:1.1.1.1 Tue Nov 30 11:51:16 2004 GMT
+++ xdebug-xul/content/xdebul/xdebul.css Wed Nov 25 11:43:51 2009 GMT
@@ -7,4 +7,10 @@
 
 listcell.head_listheader {
         font-weight: bold;
+ font-family: sans-serif;
+ font-size: 80px;
+}
+
+listitem.sourceCode {
+ font-family: sans-serif;
 }

[FILE: /xdebug-xul/content/xdebul/xdebul.xul]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xdebug-xul/content/xdebul/xdebul.xul:1.1.1.1 Tue Nov 30 11:51:16 2004 GMT
+++ xdebug-xul/content/xdebul/xdebul.xul Wed Nov 25 11:43:51 2009 GMT
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<?xml-stylesheet href="xdebul.css" type="text/css"?>
+<?xml-stylesheet href="chrome://xdebul/content/xdebul.css" type="text/css"?>
 
 <!DOCTYPE window [
 <!ENTITY % xdebulDTD SYSTEM "chrome://xdebul/locale/xdebul.dtd">
@@ -14,30 +14,31 @@
    orient = "vertical"
    persist = "screenX screenY width height sizemode">
 
+<script type="application/x-javascript" src="dbgp-helper.js"/>
 <script type="application/x-javascript" src="dbgp-parser.js"/>
 <script type="application/x-javascript" src="xdebul.js"/>
 
 <commandset id="maincommands">
- <command id="menu-file-close:command" oncommand="closeWindow();"/>
+ <command id="menu-file-close.command" oncommand="closeWindow();"/>
 </commandset>
 
 <keyset id="mainkeys">
         <key
- id = "menu-file-close:key"
- key = "&menu-file-close:key;"
- observes = "menu-file-close:command"
+ id = "menu-file-close.key"
+ key = "&menu-file-close.key;"
+ observes = "menu-file-close.command"
                 modifiers = "accel" />
 </keyset>
 
 <menubar id="menu">
- <menu id="menu-file" label="&menu-file:label;" accesskey="&menu-file:accesskey;">
+ <menu id="menu-file" label="&menu-file.label;" accesskey="&menu-file.accesskey;">
                 <menupopup id="menu-file-popup">
                         <menuitem
                                 id = "menu-file-close"
- key = "menu-file-close:key"
- label = "&menu-file-close:label;"
- command = "menu-file-close:command"
- accesskey = "&menu-file-close:accesskey;"/>
+ key = "menu-file-close.key"
+ label = "&menu-file-close.label;"
+ command = "menu-file-close.command"
+ accesskey = "&menu-file-close.accesskey;"/>
                         </menupopup>
         </menu>
 </menubar>
@@ -56,7 +57,23 @@
         </box>
         <vbox align="stretch" flex="1">
                 <hbox flex="1">
- <browser flex="1" src="http://xdebug"/>
+ <tabbox id="files" style="color: #f00;" flex="1">
+ <tabs id="filetabs">
+ <tab label="Project"/>
+ </tabs>
+ <tabpanels id="filetabpanels" flex="1">
+ <tabpanel id="project" flex="1">
+ <listbox id="project-lines" flex="1">
+ <listhead>
+ <listheader class="head_listheader" label="Message"/>
+ </listhead>
+ <listcols>
+ <listcol flex="1"/>
+ </listcols>
+ </listbox>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
                 </hbox>
                 <hbox id="debugpanel" class="groove-top" height="0">
                         <tabbox style="color: #f00;" flex="1">

[FILE: /xdebug-xul/locale/en-US/xdebul/xdebul.dtd]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- xdebug-xul/locale/en-US/xdebul/xdebul.dtd:1.1.1.1 Tue Nov 30 11:51:16 2004 GMT
+++ xdebug-xul/locale/en-US/xdebul/xdebul.dtd Wed Nov 25 11:43:52 2009 GMT
@@ -1,7 +1,7 @@
 <!ENTITY window.title "Xdebug Debugging Client in XUL (XDCX)">
 
-<!ENTITY menu-file:label "File">
-<!ENTITY menu-file:accesskey "F">
-<!ENTITY menu-file-close:key "W">
-<!ENTITY menu-file-close:label "Close">
-<!ENTITY menu-file-close:accesskey "C">
+<!ENTITY menu-file.label "File">
+<!ENTITY menu-file.accesskey "F">
+<!ENTITY menu-file-close.key "W">
+<!ENTITY menu-file-close.label "Close">
+<!ENTITY menu-file-close.accesskey "C">
Received on Wed Nov 25 2009 - 13:44:17 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST