francesco perillo wrote: > > This morning I attended a visual studio 2010 presentation and the > speaker showed us the power of XNA framework (for game development). > > He had a pane on the left with a list box containing "code snippets". > Double-clicking on one item made VS insert that code (multiline code, > only the first line shown in the listbox) in the source code. He used > this to insert a group of lines in order to explain us what they were > for.... > > I believe that this feature is nice and can be easily accomplished. To > populate the code snippet repository you can make a selection in the > source code and then drag it in the list box... only the first line is > shown in the list box. >
Current implementation #0: ------------------------- To create: You open the "Snippets" dialog, You create one with <Add New> and provide it a name, A new entry is there in the list with blank snippet, You typein the code or can <Get Selection>, You need to <Update> to save it permanently. To execute: You press CTRL+K, menu appears, You select and snippet is inserted. The proposed implementatio #1: ------------------------------- To create: Keep #0 implementation as is, in addition You select a snippet, Open context menu with right-click and select "Save as Snippet" You are asked for a "Name" and that's it, does not matter dialog is open or not. To execute: Keep #0 implementation as is, in addition Provide a list on the left dock area and in between "Projects" and "Editor Tabs" containing defined snippets. You double click one and that is inserted. Dragging the selection directly without a name is, IMO, very confusing and over the time you will loose control over it. You always remember a name for longer periods. The proposed implementatio #2: ------------------------------- ??? > On Friday I attented a Spring framework course, using Eclipse.... I > have to say that Eclipse is a very nice tool and its integration with > Java language is really good. > Today I also saw VS2010 in action and it is also a really good IDE. > Both have very powerfull "intellisense", syntax checking (no coloring, > real syntax checking).... > > Now, can this feature be created in hbide ? ... actually a sort of > compiler is already present in a harbour compiled executable since you > may need to compile codeblock at runtime, so when CR button is pressed > and no ; at the EOL is present, we can pass the line to the compiler > and check for validity... you don't have to execute the code, just do > syntax checking > This is quiet easy if it is only to see if it compiles. This is what you are asking for ? If yes, then there are few facts which should be cleared beforehand: 1. How to handle IF abc == 212 DO CASE DO WHILE abc < 100 etc cases. Will these compile? Also multiline comments. I mean how to determine if a line is macro compiled properly. Above will not compile, not tested, but are valid statements. How Eclipse handles them ? ----- enjoy hbIDEing... Pritpal Bedi _a_student_of_software_analysis_&_design_ -- View this message in context: http://n2.nabble.com/hbIDE-Let-s-review-tp4717833p4729754.html Sent from the harbour-devel mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour