It is currently Thu Oct 17, 2019 9:24 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: IDE: Split-view on the same file
PostPosted: Tue Dec 15, 2009 10:45 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 489
Location: Germany / one of the fishheads
My wish for the next version of PB is a split-view like in Excel or Open Office calc.
Image

Sometimes I have to jump from top to bottom of the same source, only to check how I have solved a similar problem in another procedure.
Actually I write a network application and I often jump from the send routine to the receive routine. A multiple split-view would be a very big assistance.

_________________
PB 5.62, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Tue Dec 15, 2009 10:54 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 6068
That's what I have CodeCaddy for :-)

But yes, that may be useful... (Don't ignore the power of F2 / Ctrl+L but you probably already know...)

_________________
( PB5.xx Win10 x64 Asrock AB350 Pro4 Ryzen 1600X 32GB RAM Evo 840 GTX1060 )
( The path to enlightenment and the PureBasic Survival Guide right here... )


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Tue Dec 15, 2009 11:59 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
It's a cool feature supported by Scintilla.
but the main thing to update is the code parser. Perhaps it's complex to manage two views.

:roll: I haven't found some tutorials about this problem yet.

Here is an example. I modified the demo from Srod...
Image

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Last edited by eddy on Wed Dec 16, 2009 12:06 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Wed Dec 16, 2009 12:02 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jul 25, 2005 3:51 pm
Posts: 3585
Location: Utah, USA
eddy wrote:
Scintilla supports this feature.
but the main thing to update is the code parser. Perhaps it's complex to manage two views.


jaPBe allows a second view in the right hand panel, where lists of variables and other stuff can also be shown.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Wed Dec 16, 2009 12:10 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Quote:
jaPBe allows a second view in the right hand panel, where lists of variables and other stuff can also be shown.


It's Good to know.
Argh! Japbe source code is big and coded in PB~3.94, it will be harsh to read. :mrgreen:

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Wed Dec 16, 2009 9:03 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 6068
A dual view is nice, but to increase productivity, it should provide some things like a good search function, you don't want to scroll around looking for some code.

Also, dual screen users might appreciate a second window as opposed to a second view. A second window could then be placed opn the second monitor. If you have the screen real estate, then use it! :-)

_________________
( PB5.xx Win10 x64 Asrock AB350 Pro4 Ryzen 1600X 32GB RAM Evo 840 GTX1060 )
( The path to enlightenment and the PureBasic Survival Guide right here... )


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Wed Dec 16, 2009 10:50 am 
Offline
Addict
Addict

Joined: Tue Nov 13, 2007 12:42 pm
Posts: 1362
Location: Manchester, UK
I do, the IDE in one monitor, and the app in the other monitor, when stepping through, it's h-h-h-heaven!


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Thu Dec 17, 2009 10:16 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Aug 07, 2003 7:01 pm
Posts: 3110
Location: United Kingdom
blueznl: I think Scintilla can also do the second window stuff too.

_________________
http://www.SinisterSoft.com <- My Business website
http://www.ReportComplete.com and http://www.ReportPlus.co.uk <- School end of term reports system


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Thu Dec 03, 2015 11:00 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 489
Location: Germany / one of the fishheads
I want to re-activate my feature request, because it is IMHO a really helpful feature with a minimum of codechanges (I guess).

Scintilla is able to handle one document in multiple Editorgadgets. Scintilla handles text and the Gadget, which displays the text, separately. One can connect one Document instance to any number of scintilla gadgets. I tried to "hack" the IDE to connect the current document (sourcecode) to a own Scintilla Gadget, but unfortunately it is not possible due to memory accessvialoation. I can read the documentpointer, but the IDE and my program are separate processes, so it is not allowed for my Scintilla gadget to handle the document of the IDE.

So this will only work if you (Freak or Fred) open a second view (Scintialla Gadget) in the IDE panel and connect the current document (sourcecode) to this second view in the same process.

I have no idea if this second view interferes with existing functions of the PB-IDE, or whether there is to write additional code, but in principle it looks very very simple.

- Open second view
- Get the documentpointer of the current sourcecode
- Connect the document to the second view

For more informations see this section in the Scintilla docs please: http://www.scintilla.org/ScintillaDoc.h ... tipleViews

Here is a very simple example how it works (I exdented the Scintilla example):
Compile this code and enter some new text in one of the two Scintilla Gadgets. You will see that both Gadgets are handling the same document instance in realtime.

Code:
EnableExplicit

Procedure MakeScintillaText(text.s)
   Static sciText.s
   CompilerIf #PB_Compiler_Unicode
      sciText = Space(StringByteLength(text, #PB_UTF8))
      PokeS(@sciText, text, -1, #PB_UTF8)
   CompilerElse
      sciText = text
   CompilerEndIf
   ProcedureReturn @sciText
EndProcedure


If OpenWindow(0, 0, 0, 320, 180, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
   
   If InitScintilla()
      ScintillaGadget(0, 10, 10, 300, 70, 0)
      ScintillaGadget(1, 10, 100, 300, 70, 0)
      
      ; Ausgabe auf rote Farbe setzen
      ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
      
      ; Anfänglichen Text des ScintillaGadgets festlegen
      ScintillaSendMessage(0, #SCI_SETTEXT, 0, MakeScintillaText("Please type in some text in the top Scintilla Gadget"))
      
      ; Hinzufügen einer zweiten Zeile mit einem vorherigen Zeilenumbruch
      Define Text$
      Define *DocPointer
      
      ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), MakeScintillaText(Text$))
      
      *DocPointer = ScintillaSendMessage(0, #SCI_GETDOCPOINTER, 0, 0)
      
      Debug *DocPointer
      
      ScintillaSendMessage(1, #SCI_SETDOCPOINTER, 0, *DocPointer)
      
   EndIf
   
   Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
   
EndIf


Image

Because this feature has not been implemented for many years I would pay for it!

_________________
PB 5.62, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 5:33 am 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1548
+1

An uncomplicated way to do this (speaking from experience) is to add the secondary window to a tab in the Tools panel. Putting it there would allow any window to be duplicated, be it the one with focus or not.


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 8:27 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1897
Why can't you just open the same source twice? One for editing, one for looking?


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 10:27 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 489
Location: Germany / one of the fishheads
For several reasons:

- The IDE does not allow to open the same source twice. If you try to load an already opened fiel thi IDE will bring the existing TAB in foreground instead of loading the file into a new TAB.

- If the problem above does not exists and I have a second TAB with my code, I have to switch every time between the TABs to have a look.

- I could load the source into an external editor and place this editor on top if the PB IDE (maybe in sticky mode). But then I have no syntax highlightning, the external editor covers a part of the IDE, I cannot edit the code in the extern editor because its not always the current version of the code - so if I want to edit the line which is shown in the external editor I have to switch to the PB IDE and have to scroll at this position and then I am able to edit the source at this line. It is not much flexible like in a split view solution with only one source instance.

Of cource, I have survived the last 6 years without this feature, but in my opinion it is a valuable feature and I guess the work to implement it is not to difficult. But this can judge only Freak or Fred.

_________________
PB 5.62, OS: Windows 7 Pro x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520, User age: 51y
"Happiness is a pet." | "Never run a changing system!"


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 1:26 pm 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1897
kurzer wrote:
The IDE does not allow to open the same source twice.

I meant in two different IDE instances. I do this all the time, so I can refer to the same source with full syntax highlighting.

But I admit that doing it from one source would be nicer, yes. :) So: +1


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 3:09 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1548
Dude wrote:
Why can't you just open the same source twice? One for editing, one for looking?

One of the "problems" with doing it this way is the line numbers do not match up. If you are working on data, asm, or repetitive code, it is critical that the line numbers match between windows.


Top
 Profile  
Reply with quote  
 Post subject: Re: IDE: Split-view on the same file
PostPosted: Fri Dec 04, 2015 4:16 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jul 02, 2015 4:53 pm
Posts: 101
Location: Germany
+1

_________________
Michael Hack

Michael Hack Software :: Softwaredevelopment| Webdevelopment | IT-Services


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye