RSSThe TSW Blog

TSW WebCoder 2010 sneak-peek part 5: Inline SQL highlighting

March 29, 2010

An area that has been much improved in WebCoder 2010, is the SQL support. In this post, I will show you the first step, which is syntax highlighting of SQL code inside your PHP files. Since SQL in PHP is really just text strings, this is a bit tricky to get right all the time, but I think that it's better to have it working 95% of the time than to miss out on a really cool feature. So without further ado, here it is:

sql_highlight1

In this color theme, the SQL colors are pretty similar to the PHP colors, but as you can see, the actual SQL keywords and function names are highlighted. Since WebCoder can now identify SQL in your code, it offers some cool possibilities, most of which we will look into in the next blog post, but here is one of them:

sql_highlight2

This function will execute the SQL statement against your currently active database connection. If you have inline PHP variables, WebCoder will try to detect them and then prompt you for their value, allowing you to test your SQL queries in various situations. In the next post, I will show you something even more awesome from the SQL world of WebCoder 2010. Stay tuned and let me know what you think :)

Kasper (TSW) @ 11:56 am in WebCoder

TSW WebCoder 2010 sneak-peek part 4: Improved PHP IntelliSense

March 19, 2010

One of the things that I find my self trying to improve all the time, is the IntelliSense in WebCoder. As you will see in future posts, WebCoder 2010 will come with a bunch of very cool IntelliSense additions, and the PHP IntelliSense is of course one of them. Here's a couple of examples on what I've done:

php_intellisense_nested

Support for nested objects, where you can access members of members of an object. The screenshot should tell it all :)

 

 

 

 

php_intellisense_built-in-classes

PHP's own classes have been added to the IntelliSense along with all the usual stuff like functions and reserved words, and of course, you can even see members of the built-in PHP classes, like on the screenshot where we use the DOMDocument class.

 

 

Now imagine a situation like on this next screenshot: You get something that you know is an object of a specific class, but since PHP is so dynamic, there is really no way for WebCoder to know which class it is. That will leave you without IntelliSense, which is always a shame. However, in WebCoder 2010, I've added some cool intelligence, allowing WebCoder to try to guess which class you're using. It looks at the members you have already used on a variable, and if it can find one single class with these members, it offers you the IntelliSense we all know and love. Have a look at the next screenshot, where I've helped WebCoder by using a member only found on ClassOne, allowing WebCoder to guess the class:

php_intellisense_class_guess_1

php_intellisense_class_guess_2

 

 

 

 

 

 

Pretty cool, right? These are all somewhat small features, but I feel that they make a big difference, and coding with them through the last couple of months has been great! I hope you like it all, and stay tuned for the next time, where I bring you yet another cool feature of WebCoder 2010. In the meantime, let me know what you think of the features presented in this post :)

Kasper (TSW) @ 12:07 pm in WebCoder

The making of WebCoder 2010 – part 3

March 5, 2010

In phpCoder 2008, the dropdown list in the top, listing classes, functions and variables, was introduced. In WebCoder 2009, the tag chain was introduced. In WebCoder 2010, the two functions have been combined and made context sensitive, so that they always show you relevant information, depending on which type of code you're editing. It works for PHP:

 doc_info_php

For JavaScript:

doc_info_js

For HTML, where you get the tag chain:

doc_info_html

And even for CSS, where selectors are divided up into elements, classes and ID's:

doc_info_css1

doc_info_css2

doc_info_css3

It only takes up ~24 pixels of your screen height, but can help you overlook and navigate your documents much faster, and if you don't agree, it can obviously be turned off.

Hope you like it :)

Kasper (TSW) @ 2:09 pm in WebCoder