Browse Source

Merge commit '6d28c08b73537e5edaf6f3b2c15f1fd55bac8c79' into develop

Mark Sibly 7 years ago
parent
commit
62cd262f05

+ 7 - 8
src/ted2go/MainWindow.monkey2

@@ -205,9 +205,9 @@ Class MainWindowInstance Extends Window
 		Local explorerAct:=New Action( " [*] " )
 		Local explorerAct:=New Action( " [*] " )
 		explorerAct.Triggered+=Lambda()
 		explorerAct.Triggered+=Lambda()
 			Local url:=_helpView.Url
 			Local url:=_helpView.Url
-			requesters.OpenUrl( url )
+			OpenInExplorer( url )
 		End
 		End
-		Local explorerBtn:=New ToolButtonExt( explorerAct,"Show in Explorer" )
+		Local explorerBtn:=New ToolButtonExt( explorerAct,GetShowInExplorerTitle() )
 		bar.AddView( explorerBtn )
 		bar.AddView( explorerBtn )
 		
 		
 		bar.AddSeparator()
 		bar.AddSeparator()
@@ -385,7 +385,7 @@ Class MainWindowInstance Extends Window
 		_editMenu.AddAction( _editActions.paste )
 		_editMenu.AddAction( _editActions.paste )
 		_editMenu.AddSeparator()
 		_editMenu.AddSeparator()
 		_editMenu.AddAction( _editActions.selectAll )
 		_editMenu.AddAction( _editActions.selectAll )
-		_editMenu.AddAction( _editActions.selectWord )
+		_editMenu.AddAction( _editActions.expandSelection )
 		_editMenu.AddSeparator()
 		_editMenu.AddSeparator()
 		' Edit -- Text
 		' Edit -- Text
 		Local subText:=New MenuExt( "Text" )
 		Local subText:=New MenuExt( "Text" )
@@ -1144,10 +1144,9 @@ Class MainWindowInstance Extends Window
 			Return
 			Return
 		Endif
 		Endif
 		
 		
-		Local ident:=view.IdentBeforeCursor()
+		Local ident:=view.IdentBeforeCursor( True,True )
 		
 		
 		If Not ident Return
 		If Not ident Return
-		
 		Local parser:=ParsersManager.Get( view.FileType )
 		Local parser:=ParsersManager.Get( view.FileType )
 		Local item:=parser.ItemAtScope( ident,view.FilePath,GetCursorPos( view ) )
 		Local item:=parser.ItemAtScope( ident,view.FilePath,GetCursorPos( view ) )
 		
 		
@@ -1161,9 +1160,9 @@ Class MainWindowInstance Extends Window
 			Local pathToIdent:=(item.Namespac+"."+item.Scope).Replace( ".","-" )
 			Local pathToIdent:=(item.Namespac+"."+item.Scope).Replace( ".","-" )
 			Local path:=pathTemplate.Replace( "{mod-name}",modName ).Replace( "{path-to-ident}",pathToIdent )
 			Local path:=pathTemplate.Replace( "{mod-name}",modName ).Replace( "{path-to-ident}",pathToIdent )
 			
 			
-			Global __prevPath:=""
+			Global _prevPath:=""
 			
 			
-			If path=__prevPath
+			If path=_prevPath
 				
 				
 				If modName ' show docs for modules members
 				If modName ' show docs for modules members
 					
 					
@@ -1197,7 +1196,7 @@ Class MainWindowInstance Extends Window
 			
 			
 			Endif
 			Endif
 			
 			
-			__prevPath=path
+			_prevPath=path
 			
 			
 		Elseif KeywordsManager.Get( view.FileType ).Contains( ident )
 		Elseif KeywordsManager.Get( view.FileType ).Contains( ident )
 			
 			

+ 13 - 14
src/ted2go/PathsProvider.monkey2

@@ -56,32 +56,31 @@ Class PathsProvider
 				Local modName:=path.Slice( i1,i2 )
 				Local modName:=path.Slice( i1,i2 )
 				' main file of a module
 				' main file of a module
 				'
 				'
-				path=modsDir+modName+"/"+modName+".monkey2"
+				Return modsDir+modName+"/"+modName+".monkey2"
 			Endif
 			Endif
 		Else
 		Else
-			' is it a project file?
+			' priority for locked file
+			'
+			Local lockedPath:=docsManager().LockedDocument?.Path
+			If lockedPath
+				If ExtractDir( path ).Contains( ExtractDir( lockedPath ) )
+					' will parse locked file coz 'path' is under 'locked' folder
+					Return lockedPath
+				Endif
+			Endif
+			' check as a part of project
 			'
 			'
 			Local proj:=ProjectView.FindProject( path )
 			Local proj:=ProjectView.FindProject( path )
 			If proj
 			If proj
 				Local showNote:=True
 				Local showNote:=True
 				If proj.MainFilePath
 				If proj.MainFilePath
-					path=proj.MainFilePath
-				Else
-					Local lockedProj:Monkey2Project
-					Local lockedPath:=docsManager().LockedDocument?.Path
-					If lockedPath And lockedPath<>path
-						lockedProj=ProjectView.FindProject( lockedPath )
-						If lockedProj And lockedProj=proj
-							' will parse locked file coz it's the same project as current file
-							path=lockedPath
-							showNote=False
-						Endif
-					Endif
+					Return proj.MainFilePath
 				Endif
 				Endif
 				If showNote Then ProjectView.CheckMainFilePath( proj,False )
 				If showNote Then ProjectView.CheckMainFilePath( proj,False )
 			Endif
 			Endif
 		Endif
 		Endif
 		
 		
+		' as is
 		Return path
 		Return path
 	End
 	End
 	
 	

+ 3 - 1
src/ted2go/Ted2.monkey2

@@ -149,7 +149,7 @@ Using sdl2..
 
 
 Const MONKEY2_DOMAIN:="http://monkeycoder.co.nz"
 Const MONKEY2_DOMAIN:="http://monkeycoder.co.nz"
 
 
-Global AppTitle:="Ted2Go v2.12"
+Global AppTitle:="Ted2Go v2.13"
 
 
 
 
 Function Main()
 Function Main()
@@ -228,6 +228,8 @@ Function Main()
 		Next
 		Next
 	End
 	End
 	
 	
+	SDL_EnableScreenSaver()
+	
 	App.Run()
 	App.Run()
 	
 	
 End
 End

+ 17 - 8
src/ted2go/action/EditActions.monkey2

@@ -10,7 +10,8 @@ Class EditActions
 	Field copy:Action
 	Field copy:Action
 	Field paste:Action
 	Field paste:Action
 	Field selectAll:Action
 	Field selectAll:Action
-	Field selectWord:Action
+	Field expandSelection:Action
+	Field shrinkSelection:Action
 	Field wordWrap:Action
 	Field wordWrap:Action
 	' Edit -- Text
 	' Edit -- Text
 	Field textDeleteWordForward:Action
 	Field textDeleteWordForward:Action
@@ -64,10 +65,15 @@ Class EditActions
 		selectAll.HotKey=Key.A
 		selectAll.HotKey=Key.A
 		selectAll.HotKeyModifiers=Modifier.Menu|Modifier.Ignore
 		selectAll.HotKeyModifiers=Modifier.Menu|Modifier.Ignore
 		
 		
-		selectWord=New Action( "Select word" )
-		selectWord.Triggered=OnSelectWord
-		selectWord.HotKey=Key.W
-		selectWord.HotKeyModifiers=Modifier.Control
+		expandSelection=New Action( "Expand selection" )
+		expandSelection.Triggered=OnExpandSelection
+		expandSelection.HotKey=Key.Up
+		expandSelection.HotKeyModifiers=Modifier.Alt
+		
+		shrinkSelection=New Action( "Shrink selection" )
+		shrinkSelection.Triggered=OnShrinkSelection
+		shrinkSelection.HotKey=Key.Down
+		shrinkSelection.HotKeyModifiers=Modifier.Alt
 		
 		
 		wordWrap=New Action( "Toggle word wrap" )
 		wordWrap=New Action( "Toggle word wrap" )
 		wordWrap.Triggered=OnWordWrap
 		wordWrap.Triggered=OnWordWrap
@@ -248,11 +254,14 @@ Class EditActions
 		If tv tv.SelectAll()
 		If tv tv.SelectAll()
 	End
 	End
 	
 	
-	Method OnSelectWord()
+	Method OnExpandSelection()
 		
 		
-		Local tv:=Cast<TextView>( App.KeyView )
+		Cast<CodeTextView>( App.KeyView )?.ExpandSelection()
+	End
+	
+	Method OnShrinkSelection()
 		
 		
-		If tv tv.SelectWord()
+		Cast<CodeTextView>( App.KeyView )?.ShrinkSelection()
 	End
 	End
 	
 	
 	Method OnWordWrap()
 	Method OnWordWrap()

+ 3 - 2
src/ted2go/action/FileActions.monkey2

@@ -37,7 +37,8 @@ Class FileActions
 		
 		
 		close=New Action( "Close tab" )
 		close=New Action( "Close tab" )
 		close.HotKey=Key.W
 		close.HotKey=Key.W
-		close.HotKeyModifiers=Modifier.Alt
+		close.HotKeyModifiers=Modifier.Menu
+		
 		close.Triggered=OnClose
 		close.Triggered=OnClose
 		
 		
 		closeOthers=New Action( "Close other tabs" )
 		closeOthers=New Action( "Close other tabs" )
@@ -76,7 +77,7 @@ Class FileActions
 #Elseif __TARGET__="linux"
 #Elseif __TARGET__="linux"
 		quit.HotKey=Key.F4
 		quit.HotKey=Key.F4
 		quit.HotKeyModifiers=Modifier.Alt|Modifier.Ignore
 		quit.HotKeyModifiers=Modifier.Alt|Modifier.Ignore
-#endif		
+#endif
 
 
 		prefs=New Action( "Preferences..." )
 		prefs=New Action( "Preferences..." )
 		prefs.Triggered=OnPrefs
 		prefs.Triggered=OnPrefs

+ 5 - 0
src/ted2go/action/GotoActions.monkey2

@@ -32,7 +32,12 @@ Class GotoActions
 		
 		
 		gotoDeclaration=New Action( "Goto definition" )
 		gotoDeclaration=New Action( "Goto definition" )
 		gotoDeclaration.Triggered=OnGotoDeclaration
 		gotoDeclaration.Triggered=OnGotoDeclaration
+		#If __TARGET__="macos"
+		gotoDeclaration.HotKey=Key.B
+		gotoDeclaration.HotKeyModifiers=Modifier.Control
+		#Else
 		gotoDeclaration.HotKey=Key.F12
 		gotoDeclaration.HotKey=Key.F12
+		#Endif
 		
 		
 		prevScope=New Action( "Previous scope" )
 		prevScope=New Action( "Previous scope" )
 		prevScope.Triggered=OnPrevScope
 		prevScope.Triggered=OnPrevScope

+ 1 - 1
src/ted2go/assets/aboutTed2Go.html

@@ -128,7 +128,7 @@ ToolBar icons were taken from <a href="https://icons8.com/icon/new-icons/win8">i
 
 
 <h3>Special thanks</h3>
 <h3>Special thanks</h3>
 
 
-<p>Jimmy Söderman, Second Gear Games, Dominique MIS, Rajasekaran Senthil Kumaran, abakobo, Peter Rigby, Dmitry Fadeev, James Boyd, Sam Fisher, Matthew Bowen, Mark Mcvittie, Simon Armstrong, Rudy van Etten, Hezkore, Sal Gunduz, Peter Scheutz, Matthieu Chemin, David Maziarka, Leonardo Teixeira, Jesus Perez, Mark Sibly, Philipp Moeller, Lee Wade.</p>
+<p>Jean-Marc Quere, Jimmy Söderman, Second Gear Games, Dominique MIS, Rajasekaran Senthil Kumaran, abakobo, Peter Rigby, Dmitry Fadeev, James Boyd, Sam Fisher, Matthew Bowen, Mark Mcvittie, Simon Armstrong, Rudy van Etten, Hezkore, Sal Gunduz, Peter Scheutz, Matthieu Chemin, David Maziarka, Leonardo Teixeira, Jesus Perez, Mark Sibly, Philipp Moeller, Lee Wade.</p>
 
 
 </body>
 </body>
 
 

+ 9 - 1
src/ted2go/document/CodeDocument.monkey2

@@ -1053,6 +1053,8 @@ Class CodeDocument Extends Ted2Document
 		Local clickFunc:=Lambda( node:TreeView.Node )
 		Local clickFunc:=Lambda( node:TreeView.Node )
 		
 		
 			Local codeNode:=Cast<CodeTreeNode>( node )
 			Local codeNode:=Cast<CodeTreeNode>( node )
+			If Not codeNode Return
+			
 			Local item:=codeNode.CodeItem
 			Local item:=codeNode.CodeItem
 			JumpToPosition( item.FilePath,item.ScopeStartPos )
 			JumpToPosition( item.FilePath,item.ScopeStartPos )
 		End
 		End
@@ -1311,7 +1313,7 @@ Class CodeDocument Extends Ted2Document
 		
 		
 		If Not _parsingEnabled Return
 		If Not _parsingEnabled Return
 		
 		
-		Local ident:=_codeView.IdentBeforeCursor()
+		Local ident:=_codeView.IdentBeforeCursor( True,True )
 		Local item:=_parser.ItemAtScope( ident,Path,CursorPos )
 		Local item:=_parser.ItemAtScope( ident,Path,CursorPos )
 		
 		
 		If item
 		If item
@@ -1723,6 +1725,7 @@ Class CodeDocument Extends Ted2Document
 	Method OnUpdateCurrentScope()
 	Method OnUpdateCurrentScope()
 		
 		
 		_treeViewInnerList.RootNode.RemoveAllChildren()
 		_treeViewInnerList.RootNode.RemoveAllChildren()
+		_treeViewInnerList.RootNodeVisible=False
 		
 		
 		Local scope:=_parser.GetNearestScope( Path,CursorPos )
 		Local scope:=_parser.GetNearestScope( Path,CursorPos )
 		'Print ""+CursorPos+", "+scope?.KindStr+", "+scope?.Text
 		'Print ""+CursorPos+", "+scope?.KindStr+", "+scope?.Text
@@ -1752,6 +1755,11 @@ Class CodeDocument Extends Ted2Document
 					_treeViewInnerList.Selected=_treeViewInnerList.FindNode( _treeViewInnerList.RootNode,storedScope )
 					_treeViewInnerList.Selected=_treeViewInnerList.FindNode( _treeViewInnerList.RootNode,storedScope )
 				Endif
 				Endif
 			Endif
 			Endif
+			
+			_treeViewInnerList.RootNodeVisible=True
+			_treeViewInnerList.RootNode.Text=scope.Text
+			_treeViewInnerList.RootNode.Icon=CodeItemIcons.GetIcon( scope )
+			_treeViewInnerList.RootNode.Expanded=True
 		Endif
 		Endif
 	End
 	End
 	
 	

+ 5 - 1
src/ted2go/utils/TextUtils.monkey2

@@ -87,6 +87,7 @@ Struct Chars
 	Const DOUBLE_QUOTE:="~q"[0] '34
 	Const DOUBLE_QUOTE:="~q"[0] '34
 	Const COMMA:=","[0] '44
 	Const COMMA:=","[0] '44
 	Const SEMICOLON:=";"[0]
 	Const SEMICOLON:=";"[0]
+	Const COLON:=":"[0]
 	Const DOT:="."[0] '46
 	Const DOT:="."[0] '46
 	Const EQUALS:="="[0] '61
 	Const EQUALS:="="[0] '61
 	Const LESS_BRACKET:="<"[0] '60
 	Const LESS_BRACKET:="<"[0] '60
@@ -102,5 +103,8 @@ Struct Chars
 	Const TAB:="~t"[0] '9
 	Const TAB:="~t"[0] '9
 	Const SPACE:=" "[0] '32
 	Const SPACE:=" "[0] '32
 	Const NEW_LINE:="~n"[0] '10
 	Const NEW_LINE:="~n"[0] '10
-	
+	Const QUESTION:="?"[0]
+	Const PLUS:="+"[0]
+	Const MINUS:="-"[0]
+	Const UNDERLINE:="_"[0]
 End
 End

+ 31 - 5
src/ted2go/utils/Utils.monkey2

@@ -2,6 +2,20 @@
 Namespace ted2go
 Namespace ted2go
 
 
 
 
+Function OpenInExplorer( path:String )
+	
+#If __HOSTOS__="macos"
+
+	libc.system( "open ~q"+path+"~q" )
+	
+#Else
+
+	OpenUrl( path )
+
+#Endif
+
+End
+
 Function SwapCase:String( s:String )
 Function SwapCase:String( s:String )
 	
 	
 	Local result:="",ss:String,lower:String
 	Local result:="",ss:String,lower:String
@@ -37,6 +51,16 @@ Function GetCaseSensitivePath:String( path:String )
 #Endif
 #Endif
 End
 End
 
 
+Function GetShowInExplorerTitle:String()
+	
+#If __TARGET__="macos"
+	Return "Show in Finder"
+#Else
+	Return "Show in Explorer"
+#Endif
+End
+
+
 Class Utils Final
 Class Utils Final
 	
 	
 	Function ArrayContains<T>:Bool( arr:T[],value:T )
 	Function ArrayContains<T>:Bool( arr:T[],value:T )
@@ -372,14 +396,16 @@ End
 
 
 #Rem monkeydocs Return ident and position in line where ident starts
 #Rem monkeydocs Return ident and position in line where ident starts
 #End
 #End
-Function GetIndentBeforePos_Mx2:IdentInfo( line:String,posInLine:Int,withDots:Bool )
+Function GetIndentBeforePos_Mx2:IdentInfo( line:String,posInLine:Int,withDots:Bool,wholeWord:Bool=False )
 	
 	
 	' grab whole word under cursor
 	' grab whole word under cursor
 	'
 	'
-'	Local len:=line.Length
-'	While pos <= posInLine And IsIdent( line[pos] )
-'		pos+=1
-'	Wend
+	If wholeWord
+		Local len:=line.Length
+		While posInLine < len And IsIdent( line[posInLine] )
+			posInLine+=1
+		Wend
+	Endif
 	
 	
 	Local n:=posInLine-1
 	Local n:=posInLine-1
 	
 	

+ 142 - 4
src/ted2go/view/CodeTextView.monkey2

@@ -234,6 +234,143 @@ Class CodeTextView Extends TextView
 		Endif
 		Endif
 	End
 	End
 	
 	
+	Method ExpandSelection()
+		
+		' this method tries to intelligent expand
+		' selection under cursor
+		'
+		Local min:=Min( Cursor,Anchor )
+		Local max:=Max( Cursor,Anchor )
+		Local lineStart:=Document.StartOfLine( Document.FindLine( min ) )
+		Local lineEnd:=Document.EndOfLine( Document.FindLine( max ) )
+		
+		Local ch1:=min>lineStart ? Text[min-1] Else -1
+		Local ch2:=max<lineEnd ? Text[max] Else -1
+		
+		Local found:=False
+		
+		If IsIdent( ch1 )
+			min-=1
+			While min>lineStart And IsIdent( Text[min] )
+				min-=1
+			Wend
+			min+=1
+			found=True
+		Endif
+		
+		If IsIdent( ch2 )
+			While max<lineEnd And IsIdent( Text[max] )
+				max+=1
+			Wend
+			found=True
+		Endif
+		
+		If Not found
+			' valid ident parts: .?->[]
+			Local arr:=New Int[]( 
+						Chars.DOT,
+						Chars.QUESTION,
+						Chars.MINUS,
+						Chars.MORE_BRACKET,
+						Chars.OPENED_SQUARE_BRACKET,
+						Chars.CLOSED_SQUARE_BRACKET)
+						
+			If Utils.ArrayContains( arr,ch1 )
+				min-=1
+				Local letters:=False
+				While min>lineStart
+					Local ch:=Text[min]
+					If Utils.ArrayContains( arr,ch ) Or
+							IsIdent( ch )
+						Local let:=IsAlpha( ch ) Or ch=Chars.UNDERLINE
+						If letters And Not let Exit
+						letters=let
+						min-=1
+					Else
+						Exit
+					Endif
+				Wend
+				min+=1
+				found=True
+			Endif
+			
+			If Not found And Utils.ArrayContains( arr,ch2 )
+				Local letters:=False
+				While max<lineEnd
+					Local ch:=Text[max]
+					If Utils.ArrayContains( arr,ch ) Or
+							IsIdent( ch )
+						Local let:=IsAlpha( ch ) Or ch=Chars.UNDERLINE
+						If letters And Not let Exit
+						max+=1
+					Else
+						Exit
+					Endif
+				Wend
+				found=True
+			Endif
+			
+			If Not found And ch1=Chars.COLON
+				min-=2
+				While min>lineStart And IsIdent( Text[min] )
+					min-=1
+				Wend
+				min+=1
+				found=True
+			Endif
+			
+			If Not found And ch2=Chars.COLON
+				max+=1
+				While max<lineEnd And IsIdent( Text[max] )
+					max+=1
+				Wend
+				found=True
+			Endif
+			
+			' scope of (...)
+			If Not found
+				Local pos:=Text.Find( "(",lineStart )
+				If pos>=lineStart And pos<min
+					Local pos2:=Text.Find( ")",max )
+					If pos2>0 And pos2<=lineEnd
+						
+						If min-pos>1 Or pos2-max>1
+							min=pos+1
+							max=pos2
+							found=True
+						Endif
+					Endif
+				Endif
+			Endif
+			
+			' whole line
+			If Not found
+				min=lineStart
+				While min<lineEnd And Text[min]<=Chars.SPACE
+					min+=1
+				Wend
+				max=lineEnd
+				While max>lineStart And Text[max]<=Chars.SPACE
+					max-=1
+				Wend
+				max+=1
+				If min=max 'have no printable chars
+					min=lineStart
+					max=lineEnd
+				Endif
+				found=True
+			Endif
+			
+		Endif
+		
+		SelectText( min,max )
+		
+	End
+	
+	Method ShrinkSelection()
+		' todo
+	End
+	
 	Property SelectedText:String()
 	Property SelectedText:String()
 		
 		
 		If Not CanCopy Return ""
 		If Not CanCopy Return ""
@@ -275,9 +412,9 @@ Class CodeTextView Extends TextView
 		Return text.Slice( start,ends )
 		Return text.Slice( start,ends )
 	End
 	End
 	
 	
-	Method IdentBeforeCursor:String( withDots:Bool=True )
+	Method IdentBeforeCursor:String( withDots:Bool=True,wholeWord:Bool=False )
 		
 		
-		Local info:=GetIndentBeforePos_Mx2( LineTextAtCursor,PosInLineAtCursor,withDots )
+		Local info:=GetIndentBeforePos_Mx2( LineTextAtCursor,PosInLineAtCursor,withDots,wholeWord )
 		Return info.ident
 		Return info.ident
 	End
 	End
 	
 	
@@ -709,8 +846,9 @@ Class CodeTextView Extends TextView
 		Select event.Type
 		Select event.Type
 			
 			
 			Case EventType.MouseWheel 'little faster scroll
 			Case EventType.MouseWheel 'little faster scroll
-		
-				Scroll-=New Vec2i( 0,RenderStyle.Font.Height*event.Wheel.Y*3 )
+				
+				Local delta:=New Vec2i( RenderStyle.Font.Height,-RenderStyle.Font.Height*2 )
+				Scroll+=delta*event.Wheel
 				Return
 				Return
 			
 			
 			Case EventType.MouseDown 'prevent selection by dragging with right-button
 			Case EventType.MouseDown 'prevent selection by dragging with right-button

+ 6 - 4
src/ted2go/view/ExamplesView.monkey2

@@ -54,7 +54,7 @@ Class ExamplesView Extends DockingView
 	
 	
 	Private
 	Private
 	
 	
-	Const VALID_FOLDERS:=New String[]( "bananas","examples","tests" )
+	Const VALID_FOLDERS:=New String[]( "bananas","examples","samples","tests" )
 	
 	
 	Field _tree:TreeViewExt
 	Field _tree:TreeViewExt
 	Field _dirIcon:Image
 	Field _dirIcon:Image
@@ -73,7 +73,7 @@ Class ExamplesView Extends DockingView
 			
 			
 			' bananas
 			' bananas
 			For Local file:=Eachin LoadDir( path )
 			For Local file:=Eachin LoadDir( path )
-				If GetFileType( path+file )=FileType.Directory
+				If file<>"ted2go-showcase" And GetFileType( path+file )=FileType.Directory
 					folders.Add( path+file )
 					folders.Add( path+file )
 				Endif
 				Endif
 			Next
 			Next
@@ -98,6 +98,7 @@ Class ExamplesView Extends DockingView
 				Next
 				Next
 			Next
 			Next
 			
 			
+			_tree.Sort()
 			_tree.RootNode.Expanded=True
 			_tree.RootNode.Expanded=True
 			_tree.RootNodeVisible=False
 			_tree.RootNodeVisible=False
 			
 			
@@ -202,10 +203,11 @@ Class ExamplesView Extends DockingView
 				target.Add( folder+name )
 				target.Add( folder+name )
 				Continue
 				Continue
 			Endif
 			Endif
-			'If lowercasedName="src"
+			
 			If lowercasedName="src" Or lowercasedName="include" Or lowercasedName="native" Or
 			If lowercasedName="src" Or lowercasedName="include" Or lowercasedName="native" Or
 				lowercasedName="bin" Or lowercasedName="docs" Or lowercasedName=PathsProvider.MX2_TMP Or
 				lowercasedName="bin" Or lowercasedName="docs" Or lowercasedName=PathsProvider.MX2_TMP Or
-				lowercasedName.Contains( ".product" ) Or lowercasedName.Contains( ".buildv" )
+				lowercasedName.Contains( ".product" ) Or lowercasedName.Contains( ".buildv" ) Or
+				lowercasedName="module-manager" Or lowercasedName="contrib"
 				Continue
 				Continue
 			Endif
 			Endif
 			Local path:=folder+name
 			Local path:=folder+name

+ 2 - 2
src/ted2go/view/ProjectView.monkey2

@@ -547,10 +547,10 @@ Class ProjectView Extends DockingView
 			Local isFolder:=False
 			Local isFolder:=False
 			Local fileType:=GetFileType( path )
 			Local fileType:=GetFileType( path )
 			
 			
-			menu.AddAction( "Show in Explorer" ).Triggered=Lambda()
+			menu.AddAction( GetShowInExplorerTitle() ).Triggered=Lambda()
 				
 				
 				Local p:=(fileType=FileType.File) ? ExtractDir( path ) Else path
 				Local p:=(fileType=FileType.File) ? ExtractDir( path ) Else path
-				requesters.OpenUrl( p )
+				OpenInExplorer( p )
 			End
 			End
 			menu.AddAction( "Copy path" ).Triggered=Lambda()
 			menu.AddAction( "Copy path" ).Triggered=Lambda()
 				
 				

+ 10 - 5
src/ted2go/view/TabViewExt.monkey2

@@ -13,14 +13,19 @@ Class ScrollViewTabs Extends ScrollView
 		' catch horizontal scrolling
 		' catch horizontal scrolling
 		Select event.Type
 		Select event.Type
 		Case EventType.MouseWheel
 		Case EventType.MouseWheel
-		
-			Local scroll:=Scroll
-		
-			Local delta:=New Vec2i( 4*ContentView.RenderStyle.Font.Height*event.Wheel.Y,0 )
+			
+			Local wx:=event.Wheel.x
+			Local wy:=event.Wheel.y
+			Local wheelDelta:=0
+			If Abs( wx )>Abs( wy )
+				wheelDelta=-wx
+			Else
+				wheelDelta=wy
+			Endif
+			Local delta:=New Vec2i( 4*ContentView.RenderStyle.Font.Height*wheelDelta,0 )
 		
 		
 			Scroll-=delta
 			Scroll-=delta
 		
 		
-			'If scroll<>Scroll event.Eat()
 			event.Eat()
 			event.Eat()
 			Return
 			Return
 		End
 		End

+ 0 - 39
src/ted2go/view/TextViewExt.monkey2

@@ -804,45 +804,6 @@ Class TextView Extends ScrollableView
 		SelectText( 0,_doc.TextLength )
 		SelectText( 0,_doc.TextLength )
 	End
 	End
 	
 	
-	Method SelectWord()
-		
-		' this method tries to intelligent expand
-		' selection under cursor
-		'
-		Local line:=Document.FindLine( _cursor )
-		Local i1:=Document.StartOfLine( line )
-		Local i2:=Document.EndOfLine( line )
-		Local cur:=_cursor
-		Local anc:=Max( _anchor-1,i1 )
-		Local chr:=(anc>i1) ? Text[anc] Else Text[cur]
-		If Text[cur]=Chars.SPACE And chr<>Chars.SPACE
-			i2=cur
-		Endif
-		If Text[anc]=Chars.SPACE And (IsIdent( Text[cur] ) Or Text[cur]=Chars.DOT)
-			i1=anc+1
-			chr=Text[cur]
-		Endif
-		Local isIdent:=IsIdent( chr )
-		If isIdent
-			While anc>=i1 And IsIdent( Text[anc] )
-				anc-=1
-			Wend
-			While cur<i2 And IsIdent( Text[cur] )
-				cur+=1
-			Wend
-		Else
-			While anc>=i1 And Not IsIdent( Text[anc] )
-				anc-=1
-			Wend
-			While cur<i2 And Not IsIdent( Text[cur] )
-				cur+=1
-			Wend
-		Endif
-		If anc<>_anchor Then anc+=1
-		
-		SelectText( anc,cur )
-	End
-	
 	#rem monkeydoc Performs a cut.
 	#rem monkeydoc Performs a cut.
 	#end
 	#end
 	Method Cut()
 	Method Cut()