forked from Botanical/BotanJS
Migrate old externs 9/x
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
var Cycle = __import( "System.Cycle" );
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
/** @type {System.Net.ClassLoader} */
|
||||
/** @type {typeof System.Net.ClassLoader} */
|
||||
var Loader = __import( "System.Net.ClassLoader" );
|
||||
/** @type {System.utils} */
|
||||
var utils = __import( "System.utils" );
|
||||
@@ -28,6 +28,7 @@
|
||||
var service_uri = Config.get( "ServiceUri" );
|
||||
var code;
|
||||
|
||||
/** @constructor */
|
||||
var Destructor = function( target )
|
||||
{
|
||||
this.target = target;
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
Destructor.prototype.Destruct = function()
|
||||
{
|
||||
for( var i in this.destructSequence )
|
||||
for( var i = 0, l = this.destructSequence.length; i < l; i ++)
|
||||
{
|
||||
this.destructSequence[i]();
|
||||
}
|
||||
@@ -64,12 +65,13 @@
|
||||
};
|
||||
|
||||
// {{{ Candidates Class
|
||||
/** @constructor */
|
||||
var Candidates = function( title, desc, defs )
|
||||
{
|
||||
this.title = title;
|
||||
this.desc = desc;
|
||||
this.__cands = [];
|
||||
/** @type Array<Astro.Blog.AstroEdit.SmartInput.Definition> */
|
||||
/** @type Object<string,*> */
|
||||
this.__defs = defs || {};
|
||||
this.Empty = !defs;
|
||||
};
|
||||
@@ -131,13 +133,17 @@
|
||||
};
|
||||
// }}}
|
||||
|
||||
/** @param {Astro.Blog.AstroEdit.Visualizer} visualizer */
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Astro.Blog.AstroEdit.Visualizer} visualizer
|
||||
*/
|
||||
var SmartInput = function( visualizer )
|
||||
{
|
||||
this.Present = false;
|
||||
var destructor = new Destructor( this );
|
||||
|
||||
var _self = this;
|
||||
/** @type {(function(): !HTMLElement|undefined)} */
|
||||
var insert = function() { return Dand.textNode( "" ); };
|
||||
|
||||
var ModLevels = [];
|
||||
@@ -148,6 +154,7 @@
|
||||
ModLevels.Retreat = function() { return ModLevels[0][2]; };
|
||||
|
||||
var __title = null;
|
||||
/** @param {boolean=} reload */
|
||||
var title = function( reload )
|
||||
{
|
||||
if( !reload && __title ) return __title;
|
||||
@@ -173,6 +180,7 @@
|
||||
return __title;
|
||||
};
|
||||
var __stage = null;
|
||||
/** @param {Candidates=} incoming */
|
||||
var stage = function( incoming )
|
||||
{
|
||||
if( __stage )
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {typeof System.utils.IKey} */
|
||||
var IKey = __import( "System.utils.IKey" );
|
||||
/** @type {System.Net.ClassLoader} */
|
||||
/** @type {typeof System.Net.ClassLoader} */
|
||||
var Loader = __import( "System.Net.ClassLoader" );
|
||||
/** @type {typeof Components.MessageBox} */
|
||||
var MessageBox = __import( "Components.MessageBox" );
|
||||
|
||||
@@ -53,6 +53,10 @@
|
||||
var init = function()
|
||||
{
|
||||
var toggles = config.get( "ToggleButtons" );
|
||||
|
||||
if( !toggles )
|
||||
return;
|
||||
|
||||
for( var i = 0, l = toggles.length; i < l; i ++ )
|
||||
{
|
||||
new ToggleButton( toggles[ i ][0], toggles[ i ][1], toggles[ i ][2] );
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
_self.stage = null;
|
||||
};
|
||||
|
||||
if ( no )
|
||||
if ( no !== false )
|
||||
{
|
||||
var _no = Dand.wrap(
|
||||
"span", null
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
return str.replace( "\t", "^I" ).replace( "\n", "^J" );
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var BUFFERS = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -32,6 +36,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
BUFFERS.prototype.allowMovement = false;
|
||||
|
||||
BUFFERS.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
@@ -68,7 +74,7 @@
|
||||
|
||||
var lastLine = Mesg( "WAIT_FOR_INPUT" );
|
||||
|
||||
var l = this.__cursor.feeder.firstBuffer.cols;
|
||||
l = this.__cursor.feeder.firstBuffer.cols;
|
||||
for( var i = msg.length; i < l; i ++ ) msg += " ";
|
||||
|
||||
this.__msg = msg + "\n" + lastLine;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.State.Stator} */
|
||||
/** @type {typeof Components.Vim.State.Stator} */
|
||||
var Stator = __import( "Components.Vim.State.Stator" );
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
@@ -14,7 +14,11 @@
|
||||
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
* @param {Components.Vim.ControlActionEvent} e
|
||||
**/
|
||||
var DELETE = function( Cursor, e )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -180,23 +184,23 @@
|
||||
var c = feeder.content.slice( 0, -1 );
|
||||
|
||||
var s = sp;
|
||||
var e = cur.aPos;
|
||||
var endP = cur.aPos;
|
||||
|
||||
if( e < s )
|
||||
if( endP < s )
|
||||
{
|
||||
s = cur.aPos;
|
||||
e = sp;
|
||||
endP = sp;
|
||||
}
|
||||
|
||||
// For removing the very last line
|
||||
if( c[ sp ] == undefined ) s --;
|
||||
|
||||
var removed = c.substring( s, e + 1 );
|
||||
var removed = c.substring( s, endP + 1 );
|
||||
reg.change( removed, newLine );
|
||||
|
||||
this.__nline = occurence( removed, "\n" );
|
||||
|
||||
feeder.content = c.substring( 0, s ) + c.substring( e + 1 ) + "\n";
|
||||
feeder.content = c.substring( 0, s ) + c.substring( endP + 1 ) + "\n";
|
||||
|
||||
// Try to keep the original panning if possible
|
||||
feeder.pan( undefined
|
||||
|
||||
@@ -122,7 +122,11 @@
|
||||
return out;
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var EDITOR_COMMAND = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -136,6 +140,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
EDITOR_COMMAND.prototype.allowMovement = false;
|
||||
|
||||
EDITOR_COMMAND.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -44,7 +44,10 @@
|
||||
return RegEx;
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var FIND = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -58,6 +61,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
FIND.prototype.allowMovement = false;
|
||||
|
||||
FIND.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
@@ -97,7 +102,7 @@
|
||||
var content = this.__cursor.feeder.content;
|
||||
|
||||
var cur = this.__cursor;
|
||||
var p = cur.aPos;
|
||||
p = cur.aPos;
|
||||
|
||||
var r;
|
||||
var Hit;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
(function(){
|
||||
var ns = __namespace( "Components.Vim.Actions" );
|
||||
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
/** @type {Components.Vim.State.Stator} */
|
||||
/** @type {typeof Components.Vim.State.Stator} */
|
||||
var Stator = __import( "Components.Vim.State.Stator" );
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
@@ -28,7 +28,11 @@
|
||||
}
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var INSERT = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -64,6 +68,10 @@
|
||||
this.__cursor.fixTab();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} c
|
||||
* @param {boolean=} newRec
|
||||
*/
|
||||
INSERT.prototype.__rec = function( c, newRec )
|
||||
{
|
||||
if( newRec || !this.__stack )
|
||||
@@ -96,10 +104,11 @@
|
||||
this.__stack = new Stack();
|
||||
}
|
||||
|
||||
/* TODO
|
||||
if( c == "\n" )
|
||||
{
|
||||
// todo
|
||||
}
|
||||
*/
|
||||
|
||||
if( this.__punch < this.__minReach )
|
||||
{
|
||||
@@ -254,7 +263,7 @@
|
||||
}
|
||||
|
||||
// Copy the indentation
|
||||
for( i = 0; "\t ".indexOf( line[i] ) != -1; i ++ );
|
||||
for( i = 0; "\t ".indexOf( line[i] ) != -1; i ++ ){};
|
||||
|
||||
if( line )
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
/** @type {Components.Vim.State.Stator} */
|
||||
/** @type {typeof Components.Vim.State.Stator} */
|
||||
var Stator = __import( "Components.Vim.State.Stator" );
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
@@ -13,7 +13,11 @@
|
||||
|
||||
var occurance = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var JOIN_LINES = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -27,6 +31,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
JOIN_LINES.prototype.allowMovement = false;
|
||||
|
||||
JOIN_LINES.prototype.handler = function( e, range )
|
||||
{
|
||||
e.preventDefault();
|
||||
@@ -37,7 +43,6 @@
|
||||
var start;
|
||||
var end;
|
||||
|
||||
var stack;
|
||||
var stator;
|
||||
|
||||
var contentUndo;
|
||||
|
||||
@@ -6,7 +6,11 @@
|
||||
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var MARK = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -15,6 +19,7 @@
|
||||
};
|
||||
|
||||
MARK.prototype.dispose = function() { };
|
||||
MARK.prototype.allowMovement = false;
|
||||
|
||||
MARK.prototype.handler = function( e, cmd )
|
||||
{
|
||||
|
||||
@@ -7,11 +7,16 @@
|
||||
var VimError = __import( "Components.Vim.Error" );
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
|
||||
/** @type {System.Debug} */
|
||||
/** @type {typeof Components.Vim.State.Marks} */
|
||||
var Marks = __import( "Components.Vim.State.Marks" );
|
||||
|
||||
var Keys = Marks.Keys;
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var MARKS = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -25,6 +30,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
MARKS.prototype.allowMovement = false;
|
||||
|
||||
MARKS.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
@@ -62,7 +69,7 @@
|
||||
var ll = 4 - line.length;
|
||||
for( var il = 0; il < ll; il ++ ) line = " " + line;
|
||||
|
||||
var ll = 3 - col.length;
|
||||
ll = 3 - col.length;
|
||||
for( var il = 0; il < ll; il ++ ) col = " " + col;
|
||||
|
||||
msg += ( "\n " + j + " " + line + " " + col + " " + t ).substring( 0, chopLen );
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var PRINT = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -13,6 +17,8 @@
|
||||
};
|
||||
|
||||
PRINT.prototype.dispose = function() { };
|
||||
PRINT.prototype.allowMovement = false;
|
||||
|
||||
PRINT.prototype.handler = function( e, args, range )
|
||||
{
|
||||
e.preventDefault();
|
||||
@@ -30,7 +36,7 @@
|
||||
break;
|
||||
case "":
|
||||
default:
|
||||
var lineNum = parseInt( range ) - 1;
|
||||
var lineNum = parseInt( range, 10 ) - 1;
|
||||
if( lineNum )
|
||||
{
|
||||
this.__cursor.gotoLine( 0 < lineNum ? lineNum : 0 );
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var PRINT_HEX = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
this.__cursor = Cursor;
|
||||
};
|
||||
|
||||
PRINT_HEX.prototype.dispose = function()
|
||||
{
|
||||
};
|
||||
PRINT_HEX.prototype.dispose = function() { };
|
||||
PRINT_HEX.prototype.allowMovement = false;
|
||||
|
||||
PRINT_HEX.prototype.handler = function( e )
|
||||
{
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
(function(){
|
||||
var ns = __namespace( "Components.Vim.Actions" );
|
||||
|
||||
/** @type {Components.Vim.State.Stator} */
|
||||
/** @type {typeof Components.Vim.State.Stator} */
|
||||
var Stator = __import( "Components.Vim.State.Stator" );
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var PUT = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -35,7 +38,8 @@
|
||||
var cur = this.__cursor;
|
||||
var feeder = cur.feeder;
|
||||
|
||||
var newLine = cput.newLine;
|
||||
console.log("A", newLine, "B", cput.newLine);
|
||||
newLine = cput.newLine;
|
||||
|
||||
if( 1 < e.count )
|
||||
{
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
return str.replace( "\t", "^I" ).replace( "\n", "^J" );
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var QUIT = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -28,6 +32,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
QUIT.prototype.allowMovement = false;
|
||||
|
||||
QUIT.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var REDO = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -11,10 +15,8 @@
|
||||
this.__message = "REDO COMMAND";
|
||||
};
|
||||
|
||||
REDO.prototype.dispose = function()
|
||||
{
|
||||
|
||||
};
|
||||
REDO.prototype.dispose = function() { };
|
||||
REDO.prototype.allowMovement = false;
|
||||
|
||||
REDO.prototype.handler = function( e )
|
||||
{
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
return str.replace( "\t", "^I" ).replace( "\n", "^J" );
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var REGISTERS = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -27,6 +31,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
REGISTERS.prototype.allowMovement = false;
|
||||
|
||||
REGISTERS.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
|
||||
var VimError = __import( "Components.Vim.Error" );
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.Actions.FIND} */
|
||||
/** @type {typeof Components.Vim.Actions.FIND} */
|
||||
var FIND = ns[ NS_INVOKE ]( "FIND" );
|
||||
|
||||
var REPL_BEFORE = 0;
|
||||
@@ -69,7 +69,11 @@
|
||||
return rStack;
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var REPLACE = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -92,6 +96,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
REPLACE.prototype.allowMovement = false;
|
||||
|
||||
REPLACE.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
var debug = __import( "System.Debug" );
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
|
||||
/** @type {Components.Vim.State.Stator} */
|
||||
/** @type {typeof Components.Vim.State.Stator} */
|
||||
var Stator = __import( "Components.Vim.State.Stator" );
|
||||
/** @type {Components.Vim.State.Stack} */
|
||||
/** @type {typeof Components.Vim.State.Stack} */
|
||||
var Stack = __import( "Components.Vim.State.Stack" );
|
||||
|
||||
var VimError = __import( "Components.Vim.Error" );
|
||||
@@ -15,9 +15,10 @@
|
||||
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction}
|
||||
* Cursor @param {Components.Vim.Cursor}
|
||||
* e @param {Components.Vim.ActionEvent}
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
* @param {Components.Vim.ControlActionEvent} e
|
||||
**/
|
||||
var SHIFT_LINES = function( Cursor, e )
|
||||
{
|
||||
@@ -143,8 +144,14 @@
|
||||
|
||||
indentMult = e.count;
|
||||
}
|
||||
else if( 0 < dir && ( e.kMap( ">" ) || e.kMap( "l" ) ) );
|
||||
else if( dir < 0 && ( e.kMap( "<" ) || e.kMap( "h" ) ) );
|
||||
else if( 0 < dir && ( e.kMap( ">" ) || e.kMap( "l" ) ) )
|
||||
{
|
||||
// stub
|
||||
}
|
||||
else if( dir < 0 && ( e.kMap( "<" ) || e.kMap( "h" ) ) )
|
||||
{
|
||||
// stub
|
||||
}
|
||||
else
|
||||
{
|
||||
beep();
|
||||
@@ -182,9 +189,9 @@
|
||||
|
||||
if( indents )
|
||||
{
|
||||
var l = indents.length - 1;
|
||||
var nIndents = indents.length - 1;
|
||||
|
||||
if( 1 < l )
|
||||
if( 1 < nIndents )
|
||||
{
|
||||
debug.Info( "Guessing the tabstop:" );
|
||||
var lineTabs = 0;
|
||||
@@ -194,7 +201,7 @@
|
||||
var spStat = {};
|
||||
var spIndents = [];
|
||||
|
||||
for( var i = 0; i < l; i ++ )
|
||||
for( var i = 0; i < nIndents; i ++ )
|
||||
{
|
||||
var ind = indents[ i ];
|
||||
var k = 0;
|
||||
@@ -346,7 +353,7 @@
|
||||
var stack = new Stack();
|
||||
|
||||
recStart ++;
|
||||
for( ; ~"\t ".indexOf( feeder.content[ recStart ] ); recStart ++ );
|
||||
for( ; ~"\t ".indexOf( feeder.content[ recStart ] ); recStart ++ ) {};
|
||||
|
||||
var f = stator.save( nLen, rBlock );
|
||||
stack.store( function() {
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var TO = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -20,6 +23,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
TO.prototype.allowMovement = false;
|
||||
|
||||
TO.prototype.handler = function( em, et )
|
||||
{
|
||||
et.preventDefault();
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var UNDO = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -11,10 +14,8 @@
|
||||
this.__message = "UNDO COMMAND";
|
||||
};
|
||||
|
||||
UNDO.prototype.dispose = function()
|
||||
{
|
||||
|
||||
};
|
||||
UNDO.prototype.dispose = function() { };
|
||||
UNDO.prototype.allowMovement = false;
|
||||
|
||||
UNDO.prototype.handler = function( e )
|
||||
{
|
||||
|
||||
@@ -5,15 +5,18 @@
|
||||
var debug = __import( "System.Debug" );
|
||||
/** @type {typeof System.utils.EventKey} */
|
||||
var EventKey = __import( "System.utils.EventKey" );
|
||||
/** @type {Components.Vim.ActionEvent} */
|
||||
var ActionEvent = __import( "Components.Vim.ActionEvent" );
|
||||
/** @type {typeof Components.Vim.ControlActionEvent} */
|
||||
var ControlActionEvent = __import( "Components.Vim.ControlActionEvent" );
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
|
||||
// Recording Sessions
|
||||
var Sessions = [];
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var VA_REC = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -22,6 +25,8 @@
|
||||
Cursor.suppressEvent();
|
||||
};
|
||||
|
||||
VA_REC.prototype.allowMovement = false;
|
||||
|
||||
VA_REC.prototype.dispose = function()
|
||||
{
|
||||
this.__cursor.unsuppressEvent();
|
||||
@@ -84,7 +89,7 @@
|
||||
session.__event = new EventKey(
|
||||
"KeyDown", function( e2 )
|
||||
{
|
||||
var evt = new ActionEvent( sender, e2 );
|
||||
var evt = new ControlActionEvent( sender, e2 );
|
||||
if( [ "Control", "Alt", "Shift" ].indexOf( e2.key ) != -1 ) return;
|
||||
|
||||
var now = Date.now();
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
return str.replace( "\t", "^I" ).replace( "\n", "^J" );
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var VERSION = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -22,6 +25,8 @@
|
||||
Cursor.suppressEvent();
|
||||
};
|
||||
|
||||
VERSION.prototype.allowMovement = false;
|
||||
|
||||
VERSION.prototype.dispose = function()
|
||||
{
|
||||
this.__cursor.unsuppressEvent();
|
||||
|
||||
@@ -6,13 +6,29 @@
|
||||
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var YANK = ns[ NS_INVOKE ]( "YANK" );
|
||||
/** @type {Components.Vim.IAction} */
|
||||
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var DELETE = ns[ NS_INVOKE ]( "DELETE" );
|
||||
/** @type {Components.Vim.IAction} */
|
||||
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
* @param {Components.Vim.ControlActionEvent} e
|
||||
**/
|
||||
var SHIFT_LINES = ns[ NS_INVOKE ]( "SHIFT_LINES" );
|
||||
/** @type {Components.Vim.IAction} */
|
||||
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var PUT = ns[ NS_INVOKE ]( "PUT" );
|
||||
|
||||
var MODE_NULL = -1;
|
||||
@@ -56,14 +72,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
/** marker @type {Components.Vim.State.Marks} */
|
||||
/** @param {Components.Vim.State.Marks} marker */
|
||||
var MarkSelected = function( marker, s, e )
|
||||
{
|
||||
marker.set( "<", s.lineNum, s.aX );
|
||||
marker.set( ">", e.lineNum, e.aX );
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var VISUAL = function( Cursor )
|
||||
{
|
||||
this.__reset( Cursor );
|
||||
@@ -126,6 +145,7 @@
|
||||
var cur = this.__cursor;
|
||||
var feeder = cur.feeder;
|
||||
var Action = null;
|
||||
var currAp = null;
|
||||
|
||||
var dispatchUpdate = false;
|
||||
|
||||
@@ -251,7 +271,7 @@
|
||||
cur.moveTo( r.close, true, false, true );
|
||||
}
|
||||
|
||||
var currAp = cur.aPos;
|
||||
currAp = cur.aPos;
|
||||
|
||||
// Calculate the visible max min aPos of the current screen
|
||||
var line = feeder.firstBuffer;
|
||||
@@ -352,7 +372,7 @@
|
||||
|
||||
var posDiff = newPos - prevPos;
|
||||
|
||||
var currAp = cur.aPos;
|
||||
currAp = cur.aPos;
|
||||
|
||||
// Sets the visual position
|
||||
// s-->e
|
||||
|
||||
@@ -5,7 +5,10 @@
|
||||
var debug = __import( "System.Debug" );
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
*/
|
||||
var WORD = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -19,6 +22,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
WORD.prototype.allowMovement = false;
|
||||
|
||||
WORD.prototype.handler = function( e )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
|
||||
var occurance = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
var WRITE = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -22,6 +26,8 @@
|
||||
this.__cursor.unsuppressEvent();
|
||||
};
|
||||
|
||||
WRITE.prototype.allowMovement = false;
|
||||
|
||||
WRITE.prototype.handler = function( e, p )
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/** @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
**/
|
||||
var YANK = function( Cursor )
|
||||
{
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
@@ -121,17 +124,17 @@
|
||||
}
|
||||
|
||||
var s = sp;
|
||||
var e = cur.aPos;
|
||||
var endP = cur.aPos;
|
||||
|
||||
if( e < s )
|
||||
if( endP < s )
|
||||
{
|
||||
s = cur.aPos;
|
||||
e = sp;
|
||||
endP = sp;
|
||||
}
|
||||
|
||||
cur.moveTo( s );
|
||||
|
||||
var yText = cur.feeder.content.substring( s, e + 1 );
|
||||
var yText = cur.feeder.content.substring( s, endP + 1 );
|
||||
|
||||
reg.yank( yText, newLine );
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.Ex.Command} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
* @param {string} Mode
|
||||
*/
|
||||
var ExCommand = __import( "Components.Vim.Ex.Command" );
|
||||
|
||||
var beep = ns[ NS_INVOKE ]( "Beep" );
|
||||
@@ -295,13 +300,13 @@
|
||||
case SHIFT + O: // new line before insert
|
||||
ccur.lineStart();
|
||||
ccur.openAction( "INSERT", e );
|
||||
ccur.action.handler( new ActionEvent( e.sender, "Enter" ) );
|
||||
ccur.action.handler( new ControlActionEvent( e.sender, "Enter" ) );
|
||||
ccur.moveY( -1 );
|
||||
break;
|
||||
case O: // new line insert
|
||||
ccur.lineEnd( true );
|
||||
ccur.openAction( "INSERT", e );
|
||||
ccur.action.handler( new ActionEvent( e.sender, "Enter" ) );
|
||||
ccur.action.handler( new ControlActionEvent( e.sender, "Enter" ) );
|
||||
break;
|
||||
|
||||
case U: // Undo
|
||||
@@ -316,7 +321,7 @@
|
||||
ccur.openAction( "DELETE", e );
|
||||
break;
|
||||
case SHIFT + S: // Synonym to cc
|
||||
var c = new ActionEvent( this.__vimArea, "c" );
|
||||
var c = new ControlActionEvent( this.__vimArea, "c" );
|
||||
ccur.openRunAction( "DELETE", c, c );
|
||||
break;
|
||||
case Y: // Yank with motion
|
||||
@@ -346,8 +351,6 @@
|
||||
break;
|
||||
case SHIFT + U: // Undo previous changes in oneline
|
||||
break;
|
||||
case SHIFT + I: // Append before the line start, after spaces
|
||||
break;
|
||||
case SHIFT + J: // Join lines
|
||||
ccur.openRunAction( "JOIN_LINES", e );
|
||||
break;
|
||||
@@ -804,7 +807,7 @@
|
||||
var cSel = ccur.position;
|
||||
if( 1 < ( cSel.end - cSel.start ) )
|
||||
{
|
||||
ActionEvent
|
||||
ControlActionEvent
|
||||
.__createEventList( e.sender, "'<,'>" )
|
||||
.forEach( function( e2 ) { exCmd.handler( e2 ); } );
|
||||
}
|
||||
@@ -820,7 +823,7 @@
|
||||
|
||||
/**
|
||||
* sender @param {Components.Vim.VimArea}
|
||||
* e @param {Components.Vim.Controls.ActionEvent}
|
||||
* e @param {Components.Vim.ControlActionEvent}
|
||||
* */
|
||||
Controls.prototype.handler = function( sender, e )
|
||||
{
|
||||
@@ -917,7 +920,11 @@
|
||||
if( this.__actionCommand( e ) ) return;
|
||||
};
|
||||
|
||||
var ActionEvent = function( sender, e )
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Components.Vim.ControlActionEvent}
|
||||
*/
|
||||
var ControlActionEvent = function( sender, e )
|
||||
{
|
||||
this.__target = sender;
|
||||
this.__canceled = false;
|
||||
@@ -962,26 +969,26 @@
|
||||
this.__range = null;
|
||||
};
|
||||
|
||||
ActionEvent.__createEventList = function( sender, KeyDefs )
|
||||
ControlActionEvent.__createEventList = function( sender, KeyDefs )
|
||||
{
|
||||
var l = KeyDefs.length;
|
||||
var List = [];
|
||||
for( var i = 0; i < l; i ++ )
|
||||
{
|
||||
List.push( new ActionEvent( sender, KeyDefs[ i ] ) );
|
||||
List.push( new ControlActionEvent( sender, KeyDefs[ i ] ) );
|
||||
}
|
||||
|
||||
return List;
|
||||
};
|
||||
|
||||
__readOnly( ActionEvent.prototype, "target", function() { return this.__target; } );
|
||||
__readOnly( ActionEvent.prototype, "key", function() { return this.__key; } );
|
||||
__readOnly( ActionEvent.prototype, "keyCode", function() { return this.__kCode; } );
|
||||
__readOnly( ActionEvent.prototype, "ModKeys", function() { return this.__modKeys; } );
|
||||
__readOnly( ActionEvent.prototype, "Escape", function() { return this.__escape; } );
|
||||
__readOnly( ActionEvent.prototype, "canceled", function() { return this.__canceled; } );
|
||||
__readOnly( ControlActionEvent.prototype, "target", function() { return this.__target; } );
|
||||
__readOnly( ControlActionEvent.prototype, "key", function() { return this.__key; } );
|
||||
__readOnly( ControlActionEvent.prototype, "keyCode", function() { return this.__kCode; } );
|
||||
__readOnly( ControlActionEvent.prototype, "ModKeys", function() { return this.__modKeys; } );
|
||||
__readOnly( ControlActionEvent.prototype, "Escape", function() { return this.__escape; } );
|
||||
__readOnly( ControlActionEvent.prototype, "canceled", function() { return this.__canceled; } );
|
||||
|
||||
__readOnly( ActionEvent.prototype, "range", function() {
|
||||
__readOnly( ControlActionEvent.prototype, "range", function() {
|
||||
|
||||
/** @type {Components.Vim.Syntax.TokenMatch} */
|
||||
var r = this.__range;
|
||||
@@ -994,26 +1001,26 @@
|
||||
return r;
|
||||
} );
|
||||
|
||||
__readOnly( ActionEvent.prototype, "count", function() {
|
||||
__readOnly( ControlActionEvent.prototype, "count", function() {
|
||||
return this.__count;
|
||||
} );
|
||||
|
||||
ActionEvent.prototype.kMap = function( map )
|
||||
ControlActionEvent.prototype.kMap = function( map )
|
||||
{
|
||||
return this.__kCode == Map( map );
|
||||
};
|
||||
|
||||
ActionEvent.prototype.cancel = function()
|
||||
ControlActionEvent.prototype.cancel = function()
|
||||
{
|
||||
this.preventDefault();
|
||||
this.__canceled = true;
|
||||
};
|
||||
|
||||
ActionEvent.prototype.preventDefault = function()
|
||||
ControlActionEvent.prototype.preventDefault = function()
|
||||
{
|
||||
if( this.__e ) this.__e.preventDefault();
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "Controls", Controls );
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "ActionEvent", ActionEvent );
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "ControlActionEvent", ControlActionEvent );
|
||||
})();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.State.Recorder} */
|
||||
/** @type {typeof Components.Vim.State.Recorder} */
|
||||
var Recorder = __import( "Components.Vim.State.Recorder" );
|
||||
|
||||
var Actions = __import( "Components.Vim.Actions.*" );
|
||||
@@ -66,6 +66,9 @@
|
||||
|
||||
var Cursor = function( feeder )
|
||||
{
|
||||
// Set by VimArea
|
||||
this.Vim = null;
|
||||
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
this.feeder = feeder;
|
||||
|
||||
@@ -100,9 +103,6 @@
|
||||
this.__off = 0;
|
||||
};
|
||||
|
||||
// Set by VimArea
|
||||
Cursor.prototype.Vim;
|
||||
|
||||
// Move to an absolute position
|
||||
Cursor.prototype.moveTo = function( aPos, phantomSpace, skipTabs )
|
||||
{
|
||||
@@ -456,8 +456,6 @@
|
||||
// More at bottom, start panning
|
||||
else if( !feeder.EOF && feeder.moreAt < Y )
|
||||
{
|
||||
var feeder = this.feeder;
|
||||
|
||||
if( feeder.linesTotal < Y )
|
||||
{
|
||||
while( !feeder.EOF )
|
||||
@@ -495,7 +493,7 @@
|
||||
i = this.Y;
|
||||
this.Y = 0;
|
||||
// Calculate the visual line position "i"
|
||||
for( var line = this.getLine();
|
||||
for( line = this.getLine();
|
||||
line && line.lineNum != Y && !line.placeholder;
|
||||
this.Y ++, line = this.getLine() )
|
||||
{
|
||||
@@ -523,7 +521,7 @@
|
||||
}
|
||||
else if ( 0 < d )
|
||||
{
|
||||
var line = this.getLine();
|
||||
line = this.getLine();
|
||||
// If already at bottom
|
||||
if( line.nextLine.placeholder ) return;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/** @type {System.utils.Perf} */
|
||||
var Perf = __import( "System.utils.Perf" );
|
||||
|
||||
/** @type {Components.Vim.State.History} */
|
||||
/** @type {typeof Components.Vim.State.History} */
|
||||
var History = __import( "Components.Vim.State.History" );
|
||||
var Mesg = __import( "Components.Vim.Message" );
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
@@ -19,7 +19,12 @@
|
||||
, ":" : Perf.uuid
|
||||
};
|
||||
|
||||
/** @type {Components.Vim.IAction} */
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
* @param {string} Mode
|
||||
*/
|
||||
var Command = function( Cursor, Mode )
|
||||
{
|
||||
var _self = this;
|
||||
@@ -204,6 +209,9 @@
|
||||
feeder.dispatcher.dispatchEvent( new BotanEvent( "VisualUpdate" ) );
|
||||
};
|
||||
|
||||
Command.prototype.allowMovement = false;
|
||||
Command.prototype.getMessage = function() { return "" };
|
||||
|
||||
Command.prototype.__process = function( e )
|
||||
{
|
||||
this.__hist.push( this.__command );
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var line = this;
|
||||
var thisLine = this.lineNum;
|
||||
|
||||
while( ( line = line.next ) && line.lineNum == thisLine );
|
||||
while( ( line = line.next ) && line.lineNum == thisLine ){};
|
||||
|
||||
return line;
|
||||
} );
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
/** @type {typeof Components.Vim.LineBuffer} */
|
||||
var LineBuffer = ns[ NS_INVOKE ]( "LineBuffer" );
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
/** @type {typeof Components.Vim.Cursor} */
|
||||
var Cursor = ns[ NS_INVOKE ]( "Cursor" );
|
||||
|
||||
var occurence = __import( "System.utils.Perf.CountSubstr" );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @constructor */
|
||||
var Register = function( str, n )
|
||||
{
|
||||
this.__str = str + "";
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
(function(){
|
||||
var ns = __namespace( "Components.Vim.State" );
|
||||
|
||||
/** @type {Components.Vim.DateTime} */
|
||||
/**
|
||||
* @param {Date} given
|
||||
* @return {string}
|
||||
*/
|
||||
var RelativeTime = __import( "Components.Vim.DateTime.RelativeTime" );
|
||||
|
||||
var Stack = function() { };
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
(function(){
|
||||
var ns = __namespace( "Components.Vim.State" );
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Components.Vim.Cursor} cur
|
||||
* @param {number} start
|
||||
*/
|
||||
var Stator = function( cur, start )
|
||||
{
|
||||
this.__cursor = cur;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.VimArea.LineFeeder} */
|
||||
/** @type {typeof Components.Vim.LineFeeder} */
|
||||
var LineFeeder = ns[ NS_INVOKE ]( "LineFeeder" );
|
||||
|
||||
var StatusBar = function( cols )
|
||||
@@ -18,8 +18,6 @@
|
||||
this.statStamp[ pos ] = func;
|
||||
};
|
||||
|
||||
StatusBar.prototype.override;
|
||||
|
||||
__readOnly( StatusBar.prototype, "statusText", function()
|
||||
{
|
||||
if( this.override ) return this.override();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
var beep = __import( "Components.Vim.Beep" );
|
||||
|
||||
/** @type {Components.Vim.Syntax.Word} */
|
||||
/** @type {typeof Components.Vim.Syntax.Word} */
|
||||
var Word = ns[ NS_INVOKE ]( "Word" );
|
||||
|
||||
var TOK_OPEN = 0;
|
||||
@@ -19,7 +19,12 @@
|
||||
var TOK_JOIN = function( a, b ) { return a + TOK_SEP + b; };
|
||||
|
||||
/*{{{ Private Class */
|
||||
var TokenPairs = function( tok, content, esc )
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} tok
|
||||
* @param {string} content
|
||||
*/
|
||||
var TokenPairs = function( tok, content )
|
||||
{
|
||||
var l = content.length;
|
||||
var toks = tok.split( TOK_SEP );
|
||||
@@ -137,9 +142,9 @@
|
||||
return tMatch;
|
||||
};
|
||||
|
||||
/* @param {Components.Vim.LineFeeder} feeder */
|
||||
var Analyzer = function( feeder )
|
||||
{
|
||||
/* @type {Components.Vim.LineFeeder} */
|
||||
this.__feeder = feeder;
|
||||
this.__tokpairs = {};
|
||||
};
|
||||
@@ -237,7 +242,7 @@
|
||||
var highest = null;
|
||||
|
||||
// Find the range of highest level
|
||||
for( var i = 0; i < l; i ++ )
|
||||
for( i = 0; i < l; i ++ )
|
||||
{
|
||||
var pair = pairs[ i ];
|
||||
|
||||
@@ -379,8 +384,8 @@
|
||||
|
||||
var word = new Word( c[ p ] );
|
||||
|
||||
if( 0 < p ) while( word.test( c[ -- i ] ) );
|
||||
if( p < Len ) while( word.test( c[ ++ j ] ) );
|
||||
if( 0 < p ) while( word.test( c[ -- i ] ) ){};
|
||||
if( p < Len ) while( word.test( c[ ++ j ] ) ){};
|
||||
|
||||
var tMatch = new TokenMatch();
|
||||
tMatch.__open = 0 < i ? i + 1 : 0;
|
||||
@@ -389,6 +394,7 @@
|
||||
return tMatch;
|
||||
};
|
||||
|
||||
/** @constructor */
|
||||
var TokenMatch = function()
|
||||
{
|
||||
this.__open = -1;
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
/** @type {System.Debug} */
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
/** @type {Components.Vim.State.Registers} */
|
||||
/** @type {typeof Components.Vim.State.Registers} */
|
||||
var Registers = __import( "Components.Vim.State.Registers" );
|
||||
/** @type {Components.Vim.State.Marks} */
|
||||
/** @type {typeof Components.Vim.State.Marks} */
|
||||
var Marks = __import( "Components.Vim.State.Marks" );
|
||||
/** @type {Components.Vim.Syntax.Analyzer} */
|
||||
/** @type {typeof Components.Vim.Syntax.Analyzer} */
|
||||
var SyntaxAnalyzer = __import( "Components.Vim.Syntax.Analyzer" );
|
||||
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
/** @type {typeof Components.Vim.LineFeeder} */
|
||||
var LineFeeder = ns[ NS_INVOKE ]( "LineFeeder" );
|
||||
/** @type {Components.Vim.StatusBar} */
|
||||
/** @type {typeof Components.Vim.StatusBar} */
|
||||
var StatusBar = ns[ NS_INVOKE ]( "StatusBar" );
|
||||
|
||||
var VimControls = ns[ NS_INVOKE ]( "Controls" );
|
||||
var ActionEvent = ns[ NS_INVOKE ]( "ActionEvent" );
|
||||
var ControlActionEvent = ns[ NS_INVOKE ]( "ControlActionEvent" );
|
||||
var Mesg = ns[ NS_INVOKE ]( "Message" );
|
||||
|
||||
var Insts = [];
|
||||
@@ -41,7 +41,7 @@
|
||||
if ( e.keyCode ) code = e.keyCode;
|
||||
else if ( e.which ) code = e.which;
|
||||
|
||||
handler( sender, new ActionEvent( sender, e ) );
|
||||
handler( sender, new ControlActionEvent( sender, e ) );
|
||||
};
|
||||
};
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
}, 100 );
|
||||
|
||||
var ContinueEdit = new EventKey( "KeyDown", function( e ) {
|
||||
var evt = new ActionEvent( _self, e );
|
||||
var evt = new ControlActionEvent( _self, e );
|
||||
if( evt.Escape )
|
||||
{
|
||||
stage.removeEventListener( ContinueEdit );
|
||||
@@ -321,7 +321,7 @@
|
||||
var demoEnd = function()
|
||||
{
|
||||
statusBar.stamp( 1, false );
|
||||
controls.handler( _self, new ActionEvent( _self, "Escape" ) );
|
||||
controls.handler( _self, new ControlActionEvent( _self, "Escape" ) );
|
||||
setTimeout( function() {
|
||||
cursor.openRunAction( "VA_REC", false, false, true );
|
||||
_self.__demoActive = false;
|
||||
@@ -334,7 +334,7 @@
|
||||
_self.stage.element.focus();
|
||||
|
||||
var key = seq[ s + 1 ];
|
||||
controls.handler( _self, new ActionEvent( _self, key ) );
|
||||
controls.handler( _self, new ControlActionEvent( _self, key ) );
|
||||
s += 2;
|
||||
|
||||
if( s < l )
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
var debug = __import( "System.Debug" );
|
||||
|
||||
var tList = [];
|
||||
var tPending = [];
|
||||
var tStepping = false;
|
||||
|
||||
var C_CALLBACK = 0;
|
||||
var C_TIME = 1;
|
||||
@@ -22,6 +24,8 @@
|
||||
var thisTime = Date.now();
|
||||
var w = 0;
|
||||
|
||||
tStepping = true;
|
||||
|
||||
for (var i = 0, l = tList.length; i < l; i++)
|
||||
{
|
||||
var f = tList[i];
|
||||
@@ -54,7 +58,19 @@
|
||||
tList[w++] = f;
|
||||
}
|
||||
|
||||
tStepping = false;
|
||||
|
||||
// Compact old live timers.
|
||||
tList.length = w;
|
||||
|
||||
// Append timers created during callbacks.
|
||||
for (var j = 0, jl = tPending.length; j < jl; j++)
|
||||
{
|
||||
tList[w++] = tPending[j];
|
||||
}
|
||||
|
||||
tList.length = w;
|
||||
tPending.length = 0;
|
||||
};
|
||||
|
||||
// Should bind "func" before register
|
||||
@@ -68,6 +84,18 @@
|
||||
tList[ tList.length ] = a;
|
||||
};
|
||||
|
||||
var addTimer = function(f)
|
||||
{
|
||||
if (tStepping)
|
||||
{
|
||||
tPending[tPending.length] = f;
|
||||
}
|
||||
else
|
||||
{
|
||||
tList[tList.length] = f;
|
||||
}
|
||||
};
|
||||
|
||||
var registerPermanentTicker = function ( id, func, interval )
|
||||
{
|
||||
for ( var i = 0, l = tList.length; i < l; i ++ )
|
||||
@@ -83,7 +111,7 @@
|
||||
a[ C_ID ] = id;
|
||||
a[ C_INTVL ] = interval;
|
||||
|
||||
tList[ tList.length ] = a;
|
||||
addTimer(a);
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -102,14 +130,15 @@
|
||||
}
|
||||
};
|
||||
|
||||
var next = function( func )
|
||||
var next = function(func)
|
||||
{
|
||||
var a = [];
|
||||
a[ C_CALLBACK ] = func;
|
||||
a[ C_TIME ] = 0;
|
||||
a[ C_ONCE ] = true;
|
||||
a[C_CALLBACK] = func;
|
||||
a[C_TIME] = 0;
|
||||
a[C_ONCE] = true;
|
||||
a[C_REMOVED] = false;
|
||||
|
||||
tList[ tList.length ] = a;
|
||||
addTimer(a);
|
||||
};
|
||||
|
||||
var ourTick = new Tick();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/** @constructor */
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction = function(){};
|
||||
/** @type {function(function(): void): void} */
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.GetCandidates;
|
||||
/** @type {function(function(...?): void): void} */
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.GetCandidates;
|
||||
/** @type {function(string): void} */
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.Process;
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.Process;
|
||||
/** @type {function(Astro.Blog.AstroEdit.SmartInput.ICandidateAction, Event): boolean} */
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.Retreat;
|
||||
Astro.Blog.AstroEdit.SmartInput.ICandidateAction.prototype.Retreat;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @constructor
|
||||
* @extends Event
|
||||
* @param {string} name
|
||||
* @param {*} data
|
||||
* @param {*=} data
|
||||
**/
|
||||
var _BotanEvent = function (name, data){};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @param {string} title
|
||||
* @param {string|HTMLElement} content
|
||||
* @param {string} yes
|
||||
* @param {string=} no
|
||||
* @param {string|boolean=} no
|
||||
* @param {function(boolean, ...?): void=} handler
|
||||
*/
|
||||
Components.MessageBox = function(title, content, yes, no, handler) {};
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {Components.Vim.IAction}
|
||||
* @param {Components.Vim.Cursor} Cursor
|
||||
*/
|
||||
Components.Vim.Actions.FIND = function(Cursor){};
|
||||
|
||||
/**
|
||||
* @param {string} p
|
||||
* @return {RegExp}
|
||||
*/
|
||||
Components.Vim.Actions.FIND.Pattern = function(p) {};
|
||||
@@ -1,23 +1,27 @@
|
||||
/** @constructor */
|
||||
Components.Vim.Controls.ActionEvent = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Components.Vim.VimArea} sender
|
||||
* @param {Event|string} e
|
||||
*/
|
||||
Components.Vim.ControlActionEvent = function(sender, e){};
|
||||
|
||||
/** @type {Components.Vim.VimArea} */
|
||||
Components.Vim.Controls.ActionEvent.target;
|
||||
Components.Vim.ControlActionEvent.prototype.target;
|
||||
/** @type {Components.Vim.Syntax.TokenMatch} */
|
||||
Components.Vim.Controls.ActionEvent.range;
|
||||
Components.Vim.ControlActionEvent.prototype.range;
|
||||
/** @type {Number} */
|
||||
Components.Vim.Controls.ActionEvent.count;
|
||||
Components.Vim.ControlActionEvent.prototype.count;
|
||||
/** @type String */
|
||||
Components.Vim.Controls.ActionEvent.key;
|
||||
Components.Vim.ControlActionEvent.prototype.key;
|
||||
/** @type Boolean */
|
||||
Components.Vim.Controls.ActionEvent.ModKeys;
|
||||
Components.Vim.ControlActionEvent.prototype.ModKeys;
|
||||
/** @type Boolean */
|
||||
Components.Vim.Controls.ActionEvent.Escape;
|
||||
Components.Vim.ControlActionEvent.prototype.Escape;
|
||||
/** @type Boolean */
|
||||
Components.Vim.Controls.ActionEvent.canceled;
|
||||
Components.Vim.ControlActionEvent.prototype.canceled;
|
||||
/** @type Number */
|
||||
Components.Vim.Controls.ActionEvent.keyCode;
|
||||
Components.Vim.ControlActionEvent.prototype.keyCode;
|
||||
/** @type Function */
|
||||
Components.Vim.Controls.ActionEvent.kMap;
|
||||
Components.Vim.ControlActionEvent.prototype.kMap;
|
||||
/** @type Function */
|
||||
Components.Vim.Controls.ActionEvent.cancel;
|
||||
Components.Vim.ControlActionEvent.prototype.cancel;
|
||||
|
||||
@@ -1,71 +1,78 @@
|
||||
/** @constructor */
|
||||
Components.Vim.Cursor = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Components.Vim.LineFeeder} feeder
|
||||
*/
|
||||
Components.Vim.Cursor = function(feeder){};
|
||||
|
||||
/** @type {Components.Vim.VimArea} */
|
||||
Components.Vim.Cursor.Vim;
|
||||
Components.Vim.Cursor.prototype.Vim;
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
Components.Vim.Cursor.feeder;
|
||||
Components.Vim.Cursor.prototype.feeder;
|
||||
/** @type {Components.Vim.IAction} */
|
||||
Components.Vim.Cursor.action;
|
||||
Components.Vim.Cursor.prototype.action;
|
||||
/** @type {Components.Vim.State.Recorder} */
|
||||
Components.Vim.Cursor.rec;
|
||||
Components.Vim.Cursor.prototype.rec;
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.moveTo;
|
||||
Components.Vim.Cursor.prototype.moveTo;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.gotoLine;
|
||||
Components.Vim.Cursor.prototype.gotoLine;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.moveX;
|
||||
Components.Vim.Cursor.prototype.moveX;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.moveY;
|
||||
Components.Vim.Cursor.prototype.moveY;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.lineStart;
|
||||
Components.Vim.Cursor.prototype.lineStart;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.lineEnd;
|
||||
Components.Vim.Cursor.prototype.lineEnd;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.updatePosition;
|
||||
Components.Vim.Cursor.prototype.updatePosition;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.fixTab;
|
||||
Components.Vim.Cursor.prototype.fixTab;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.openAction;
|
||||
Components.Vim.Cursor.prototype.openAction;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.openRunAction;
|
||||
Components.Vim.Cursor.prototype.openRunAction;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.closeAction;
|
||||
Components.Vim.Cursor.prototype.closeAction;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.suppressEvent;
|
||||
Components.Vim.Cursor.prototype.suppressEvent;
|
||||
/** @type Function */
|
||||
Components.Vim.Cursor.unsuppressEvent;
|
||||
Components.Vim.Cursor.prototype.unsuppressEvent;
|
||||
|
||||
/** @type {Boolean} */
|
||||
Components.Vim.Cursor.blink;
|
||||
/** @type {Boolean} */
|
||||
Components.Vim.Cursor.pSpace;
|
||||
/** @type {Array} */
|
||||
Components.Vim.Cursor.lineBuffers;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.pX;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.PStart;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.PEnd;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.aX;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.X;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.Y;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.aPos;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.cols;
|
||||
/** @type {string} */
|
||||
Components.Vim.Cursor.message;
|
||||
Components.Vim.Cursor.prototype.face;
|
||||
/** @type {boolean} */
|
||||
Components.Vim.Cursor.prototype.blink;
|
||||
/** @type {boolean} */
|
||||
Components.Vim.Cursor.prototype.pSpace;
|
||||
/** @type {Array} */
|
||||
Components.Vim.Cursor.prototype.lineBuffers;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.pX;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.PStart;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.PEnd;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.aX;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.X;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.Y;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.aPos;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.cols;
|
||||
/** @type {string} */
|
||||
Components.Vim.Cursor.prototype.message;
|
||||
/** @type Object */
|
||||
Components.Vim.Cursor.position;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.position.start;
|
||||
/** @type Number */
|
||||
Components.Vim.Cursor.position.end;
|
||||
/** @type String */
|
||||
Components.Vim.Cursor.rawLine;
|
||||
Components.Vim.Cursor.prototype.position;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.position.start;
|
||||
/** @type {number} */
|
||||
Components.Vim.Cursor.prototype.position.end;
|
||||
/** @return {?Components.Vim.LineBuffer} */
|
||||
Components.Vim.Cursor.prototype.getLine;
|
||||
/** @type {string} */
|
||||
Components.Vim.Cursor.prototype.rawLine;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
/** @constructor */
|
||||
Components.Vim.DateTime = function(){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.DateTime.RelativeTime;
|
||||
/**
|
||||
* @param {Date} given
|
||||
* @return {string}
|
||||
*/
|
||||
Components.Vim.DateTime.RelativeTime = function(given){};
|
||||
/** @type Function */
|
||||
Components.Vim.DateTime.String;
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
/** @constructor */
|
||||
Components.Vim.IAction = function(){};
|
||||
/**
|
||||
* @interface
|
||||
* @param {Components.Vim.Cursor} cursor
|
||||
* @param {Components.Vim.ControlActionEvent} evt
|
||||
*/
|
||||
Components.Vim.IAction = function(cursor, evt){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.IAction.dispose;
|
||||
Components.Vim.IAction.prototype.dispose;
|
||||
/** @type Function */
|
||||
Components.Vim.IAction.handler;
|
||||
Components.Vim.IAction.prototype.handler;
|
||||
/** @type Function */
|
||||
Components.Vim.IAction.getMessage;
|
||||
Components.Vim.IAction.prototype.getMessage;
|
||||
|
||||
/** @type Boolean */
|
||||
Components.Vim.IAction.allowMovement;
|
||||
/** @type {!boolean} */
|
||||
Components.Vim.IAction.prototype.allowMovement;
|
||||
|
||||
@@ -1,42 +1,46 @@
|
||||
/** @constructor */
|
||||
Components.Vim.LineBuffer = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number} cols
|
||||
* @param {Components.Vim.LineBuffer=} next
|
||||
*/
|
||||
Components.Vim.LineBuffer = function(cols, next){};
|
||||
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
Components.Vim.LineBuffer.next;
|
||||
Components.Vim.LineBuffer.prototype.next;
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
Components.Vim.LineBuffer.prev;
|
||||
Components.Vim.LineBuffer.prototype.prev;
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
Components.Vim.LineBuffer.nextLine;
|
||||
Components.Vim.LineBuffer.prototype.nextLine;
|
||||
|
||||
/** @type {EventDispatcher} */
|
||||
Components.Vim.LineBuffer.dispatcher;
|
||||
Components.Vim.LineBuffer.prototype.dispatcher;
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.softReset;
|
||||
Components.Vim.LineBuffer.prototype.softReset;
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.pan;
|
||||
Components.Vim.LineBuffer.prototype.pan;
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.render;
|
||||
Components.Vim.LineBuffer.prototype.render;
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.setRender;
|
||||
Components.Vim.LineBuffer.prototype.setRender;
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.init;
|
||||
Components.Vim.LineBuffer.prototype.init;
|
||||
/** @type Function */
|
||||
Components.Vim.LineBuffer.setWrap;
|
||||
Components.Vim.LineBuffer.prototype.setWrap;
|
||||
|
||||
/** @type Array */
|
||||
Components.Vim.LineBuffer.visualLines;
|
||||
Components.Vim.LineBuffer.prototype.visualLines;
|
||||
/** @type Boolean */
|
||||
Components.Vim.LineBuffer.placeholder;
|
||||
Components.Vim.LineBuffer.prototype.placeholder;
|
||||
/** @type Boolean */
|
||||
Components.Vim.LineBuffer.br;
|
||||
Components.Vim.LineBuffer.prototype.br;
|
||||
/** @type Number */
|
||||
Components.Vim.LineBuffer.cols;
|
||||
Components.Vim.LineBuffer.prototype.cols;
|
||||
/** @type Number */
|
||||
Components.Vim.LineBuffer.lineNum;
|
||||
Components.Vim.LineBuffer.prototype.lineNum;
|
||||
/** @type Number */
|
||||
Components.Vim.LineBuffer.tabWidth;
|
||||
Components.Vim.LineBuffer.prototype.tabWidth;
|
||||
/** @type Number */
|
||||
Components.Vim.LineBuffer.linesOccupied;
|
||||
Components.Vim.LineBuffer.prototype.linesOccupied;
|
||||
/** @type String */
|
||||
Components.Vim.LineBuffer.content;
|
||||
Components.Vim.LineBuffer.prototype.content;
|
||||
|
||||
@@ -1,50 +1,54 @@
|
||||
/** @constructor */
|
||||
Components.Vim.LineFeeder = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number} range
|
||||
* @param {number} cols
|
||||
*/
|
||||
Components.Vim.LineFeeder = function(range, cols){};
|
||||
|
||||
/** @type {Components.Vim.Cursor} */
|
||||
Components.Vim.LineFeeder.cursor;
|
||||
Components.Vim.LineFeeder.prototype.cursor;
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
Components.Vim.LineFeeder.firstBuffer;
|
||||
Components.Vim.LineFeeder.prototype.firstBuffer;
|
||||
/** @type {Components.Vim.LineBuffer} */
|
||||
Components.Vim.LineFeeder.lastBuffer;
|
||||
Components.Vim.LineFeeder.prototype.lastBuffer;
|
||||
|
||||
/** @type EventDispatcher */
|
||||
Components.Vim.LineFeeder.dispatcher;
|
||||
Components.Vim.LineFeeder.prototype.dispatcher;
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.softReset;
|
||||
Components.Vim.LineFeeder.prototype.softReset;
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.pan;
|
||||
Components.Vim.LineFeeder.prototype.pan;
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.render;
|
||||
Components.Vim.LineFeeder.prototype.render;
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.setRender;
|
||||
Components.Vim.LineFeeder.prototype.setRender;
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.init;
|
||||
Components.Vim.LineFeeder.prototype.init;
|
||||
/** @type Function */
|
||||
Components.Vim.LineFeeder.setWrap;
|
||||
Components.Vim.LineFeeder.prototype.setWrap;
|
||||
|
||||
/** @type {Array} */
|
||||
Components.Vim.LineFeeder.lineBuffers;
|
||||
/** @type Boolean */
|
||||
Components.Vim.LineFeeder.EOF;
|
||||
/** @type Boolean */
|
||||
Components.Vim.LineFeeder.wrap;
|
||||
/** @type Number */
|
||||
Components.Vim.LineFeeder.panX;
|
||||
/** @type Number */
|
||||
Components.Vim.LineFeeder.panY;
|
||||
/** @type Number */
|
||||
Components.Vim.LineFeeder.moreAt;
|
||||
/** @type Number */
|
||||
Components.Vim.LineFeeder.linesTotal;
|
||||
/** @type Number */
|
||||
Components.Vim.LineFeeder.linesOccupied;
|
||||
/** @type String */
|
||||
Components.Vim.LineFeeder.docPos;
|
||||
/** @type String */
|
||||
Components.Vim.LineFeeder.line;
|
||||
/** @type String */
|
||||
Components.Vim.LineFeeder.lineStat;
|
||||
Components.Vim.LineFeeder.prototype.lineBuffers;
|
||||
/** @type {boolean} */
|
||||
Components.Vim.LineFeeder.prototype.EOF;
|
||||
/** @type {boolean} */
|
||||
Components.Vim.LineFeeder.prototype.wrap;
|
||||
/** @type {number} */
|
||||
Components.Vim.LineFeeder.prototype.panX;
|
||||
/** @type {number} */
|
||||
Components.Vim.LineFeeder.prototype.panY;
|
||||
/** @type {number} */
|
||||
Components.Vim.LineFeeder.prototype.moreAt;
|
||||
/** @type {number} */
|
||||
Components.Vim.LineFeeder.prototype.linesTotal;
|
||||
/** @type {number} */
|
||||
Components.Vim.LineFeeder.prototype.linesOccupied;
|
||||
/** @type {string} */
|
||||
Components.Vim.LineFeeder.content;
|
||||
Components.Vim.LineFeeder.prototype.docPos;
|
||||
/** @type {function(number): string} */
|
||||
Components.Vim.LineFeeder.prototype.line;
|
||||
/** @type {string} */
|
||||
Components.Vim.LineFeeder.prototype.lineStat;
|
||||
/** @type {string} */
|
||||
Components.Vim.LineFeeder.prototype.content;
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
/** @constructor */
|
||||
Components.Vim.State.History = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} zone
|
||||
*/
|
||||
Components.Vim.State.History = function(zone){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.History.push;
|
||||
Components.Vim.State.History.prototype.push;
|
||||
/** @type Function */
|
||||
Components.Vim.State.History.prev;
|
||||
Components.Vim.State.History.prototype.prev;
|
||||
/** @type Function */
|
||||
Components.Vim.State.History.next;
|
||||
Components.Vim.State.History.prototype.next;
|
||||
/** @type Function */
|
||||
Components.Vim.State.History.prototype.reset;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
Components.Vim.State.Marks = function(){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.Marks.set;
|
||||
Components.Vim.State.Marks.prototype.set;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Marks.get;
|
||||
Components.Vim.State.Marks.prototype.get;
|
||||
|
||||
/** @type String */
|
||||
/** @type {string} */
|
||||
Components.Vim.State.Marks.Keys;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
Components.Vim.State.Recorder = function(){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.Recorder.undo;
|
||||
Components.Vim.State.Recorder.prototype.undo;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Recorder.redo;
|
||||
Components.Vim.State.Recorder.prototype.redo;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Recorder.record;
|
||||
Components.Vim.State.Recorder.prototype.record;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Recorder.save;
|
||||
Components.Vim.State.Recorder.prototype.save;
|
||||
|
||||
/** @type Boolean */
|
||||
Components.Vim.State.Recorder.changed;
|
||||
Components.Vim.State.Recorder.prototype.changed;
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
Components.Vim.State.Registers = function(){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.Registers.change;
|
||||
Components.Vim.State.Registers.prototype.change = function() {};
|
||||
/** @type Function */
|
||||
Components.Vim.State.Registers.yank;
|
||||
Components.Vim.State.Registers.prototype.yank = function() {};
|
||||
/** @type Function */
|
||||
Components.Vim.State.Registers.prototype.get = function() {};
|
||||
/** @type Function */
|
||||
Components.Vim.State.Registers.prototype.select = function() {};
|
||||
|
||||
/** @constructor */
|
||||
Components.Vim.State.Register = function(){};
|
||||
|
||||
/** @type Boolean */
|
||||
Components.Vim.State.Register.newLine;
|
||||
Components.Vim.State.Register.prototype.newLine;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Components.Vim.State.Stack = function(){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.Stack.play;
|
||||
Components.Vim.State.Stack.prototype.play;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Stack.store;
|
||||
Components.Vim.State.Stack.prototype.store;
|
||||
/** @type Function */
|
||||
Components.Vim.State.Stack.time;
|
||||
Components.Vim.State.Stack.prototype.time;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Components.Vim.Cursor} cursor
|
||||
* @param {number=} start
|
||||
*/
|
||||
Components.Vim.State.Stator = function(cursor, start){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.State.Stator.prototype.save;
|
||||
@@ -1,9 +1,12 @@
|
||||
/** @constructor */
|
||||
Components.Vim.StatusBar = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {number} cols
|
||||
*/
|
||||
Components.Vim.StatusBar = function(cols){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.StatusBar.stamp;
|
||||
Components.Vim.StatusBar.prototype.stamp;
|
||||
/** @type Function */
|
||||
Components.Vim.StatusBar.override;
|
||||
Components.Vim.StatusBar.prototype.override;
|
||||
/** @type String */
|
||||
Components.Vim.StatusBar.statusText;
|
||||
Components.Vim.StatusBar.prototype.statusText;
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
/** @constructor */
|
||||
Components.Vim.Syntax.Analyzer = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Components.Vim.LineFeeder} feeder
|
||||
*/
|
||||
Components.Vim.Syntax.Analyzer = function(feeder){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.bracketAt;
|
||||
Components.Vim.Syntax.Analyzer.prototype.bracketAt;
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.bracketIn;
|
||||
Components.Vim.Syntax.Analyzer.prototype.bracketIn;
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.quoteIn;
|
||||
Components.Vim.Syntax.Analyzer.prototype.quoteIn;
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.wordAt;
|
||||
Components.Vim.Syntax.Analyzer.prototype.wordAt;
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.quoteAt;
|
||||
Components.Vim.Syntax.Analyzer.prototype.quoteAt;
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Analyzer.reset;
|
||||
Components.Vim.Syntax.Analyzer.prototype.reset;
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
Components.Vim.Syntax.TokenMatch = function(){};
|
||||
|
||||
/** @type {Components.Vim.Syntax.TokenMatch} */
|
||||
Components.Vim.Syntax.TokenMatch.parent;
|
||||
Components.Vim.Syntax.TokenMatch.prototype.parent;
|
||||
|
||||
/** @type Number */
|
||||
Components.Vim.Syntax.TokenMatch.open;
|
||||
Components.Vim.Syntax.TokenMatch.prototype.open;
|
||||
/** @type Number */
|
||||
Components.Vim.Syntax.TokenMatch.close;
|
||||
Components.Vim.Syntax.TokenMatch.prototype.close;
|
||||
/** @type Number */
|
||||
Components.Vim.Syntax.TokenMatch.level;
|
||||
Components.Vim.Syntax.TokenMatch.prototype.level;
|
||||
/** @type Number */
|
||||
Components.Vim.Syntax.TokenMatch.selected;
|
||||
Components.Vim.Syntax.TokenMatch.prototype.selected;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/** @constructor */
|
||||
Components.Vim.Syntax.Word = function(){};
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} c
|
||||
*/
|
||||
|
||||
Components.Vim.Syntax.Word = function(c){};
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.Syntax.Word.test;
|
||||
Components.Vim.Syntax.Word.prototype.test;
|
||||
|
||||
@@ -6,31 +6,31 @@
|
||||
Components.Vim.VimArea = function(stage, detectScreenSize){};
|
||||
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
Components.Vim.VimArea.contentFeeder;
|
||||
Components.Vim.VimArea.prototype.contentFeeder;
|
||||
/** @type {Components.Vim.Syntax.Analyzer} */
|
||||
Components.Vim.VimArea.contentAnalyzer;
|
||||
Components.Vim.VimArea.prototype.contentAnalyzer;
|
||||
/** @type {Components.Vim.LineFeeder} */
|
||||
Components.Vim.VimArea.statusFeeder;
|
||||
Components.Vim.VimArea.prototype.statusFeeder;
|
||||
/** @type {Components.Vim.StatusBar} */
|
||||
Components.Vim.VimArea.statusBar;
|
||||
Components.Vim.VimArea.prototype.statusBar;
|
||||
|
||||
/** @type {Components.Vim.State.Registers} */
|
||||
Components.Vim.VimArea.registers;
|
||||
Components.Vim.VimArea.prototype.registers;
|
||||
/** @type {Components.Vim.State.Marks} */
|
||||
Components.Vim.VimArea.marks;
|
||||
Components.Vim.VimArea.prototype.marks;
|
||||
|
||||
/** @type Function */
|
||||
Components.Vim.VimArea.demo;
|
||||
Components.Vim.VimArea.prototype.demo;
|
||||
/** @type Function */
|
||||
Components.Vim.VimArea.display;
|
||||
Components.Vim.VimArea.prototype.display;
|
||||
|
||||
/** @type Number */
|
||||
Components.Vim.VimArea.index;
|
||||
/** @type Number */
|
||||
Components.Vim.VimArea.rows;
|
||||
/** @type Number */
|
||||
Components.Vim.VimArea.cols;
|
||||
/** @type {number} */
|
||||
Components.Vim.VimArea.prototype.index;
|
||||
/** @type {number} */
|
||||
Components.Vim.VimArea.prototype.rows;
|
||||
/** @type {number} */
|
||||
Components.Vim.VimArea.prototype.cols;
|
||||
/** @type Array */
|
||||
Components.Vim.VimArea.Instances;
|
||||
Components.Vim.VimArea.prototype.Instances;
|
||||
/** @type Function */
|
||||
Components.Vim.VimArea.dispose;
|
||||
Components.Vim.VimArea.prototype.dispose;
|
||||
|
||||
@@ -25,5 +25,7 @@ Dandelion.IDOMElement.prototype.contains = function() {};
|
||||
Dandelion.IDOMElement.prototype.aKeys = function() {};
|
||||
/** @type {HTMLElement} */
|
||||
Dandelion.IDOMElement.prototype.element;
|
||||
/** @type {CSSStyleDeclaration} */
|
||||
Dandelion.IDOMElement.prototype.style;
|
||||
/** @type {function(): void} */
|
||||
Dandelion.IDOMElement.prototype.reverseChild = function() {};
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @param {string} sapi
|
||||
* @param {string} mode
|
||||
*/
|
||||
System.Net.ClassLoader = function (sapi, mode){};
|
||||
|
||||
/**
|
||||
* @param {string|Array<string>} classes
|
||||
* @param {function(string): void} handler
|
||||
*/
|
||||
System.Net.ClassLoader.prototype.load = function (classes, handler){};
|
||||
Reference in New Issue
Block a user