Wednesday, September 16, 2009

MXUnit

I started a research towards including MXUnit support into my plugin. So keep up with blog posts ;)

Thursday, June 11, 2009

Java Loader Completion

If you are using java loader (from http://javaloader.riaforge.org/) and want to have its completion and resolving in idea than this post is for you =)

Example of using:

paths = [];
paths[1] = '/home/user/webapps/app/lib/MyJar.jar';
loader = createObject('component','javaloader.JavaLoader').init(paths);
myJavaObject = loader.create('com.foo.Bar');

The main goal is to have completion in create method and to have completion on methods of created object (myJavaObject).

So you need to declare your java loader in comment in such way:


You may specify as many jar files, as you wish


Than you need to add all your jar files to class path. Go to ProjectStructure/JDKs/Classpath and add them.


And at last you need to add coldfusion facet to your module and specify the Web root directory. So all jar which are mentioned in comments will be prefixed with web root path.



Enjoy! =)

Thursday, May 7, 2009

Java completion and resolve

Create object


Completion and resolving on second argument is working if first argument if "java".

Java methods completion



Expressions types


Binary/unary/etc. expression types are calculated if operands are appropriate java classes or literal expressions. The result parameters are always java classes (in case of literal operands - boxed types).

If resolve crashes


Sometimes you may get wrong result of the resolve - for example in long complex expressions. Yet it not work for standard functions - except createObject.

Then you may specify variable type in comments for completion to work for its methods. The pattern is (if you are familiar with regular expressions)
<!---[^@]*@cfmlvariable name=\"([^\"]+)\" type=\"([^\"]*)\"([^-]*|-[^-]|--[^-]|---[^>])*--->>
Well... it is easier to give an example =) Here is it: <!--- @cfmlvariable name="yourVariableName" type="javaClassName" --->

And your completion would be working from this comment down to next such comment for this variable. Of course resolve works on "type" parameter.
Enjoy! =)

Thursday, April 16, 2009

Preview

If you have coldfusion local server installed on your machine you may in a few steps configure idea to put cfml pages to the web root directory and open browser on specefied page to view the result. (As it is the first version, I suppose it will be modified a lot).

Here they are:

1 Step: Add ColdFusion Facet



2 Step: Specify ColdFusion web root directory on your file system


By default on windows it is C:\ColdFusion8\wwwroot

3 Step: Specify relative folder


You may use nested directories. If it does not exists it will be created under web root and all files under project will be copied there on compilation stage.

4 Step: Manage run configurations


Add ColdFusion Run Configuration

5 Step: Specify any page from your project as a start one


You may change server URL also (by default it is localhost:8500)

And you are done!

Thursday, March 5, 2009

Attributes completion

If attribute has some predefined values, you'll have them in completion list.
For example cfqueryparam has cfsqltype which is always one of a set of possible values.

Working with variables

All functionality, which helps you to work with functions now available for variables inside the file. Auto completion, go to definition, usage highlighting

Go to definition on Ctrl+B



Usage highlighting Ctrl + Shift + F7



Auto completion Ctrl + Space


Friday, February 20, 2009

Live templates

Live template invoked after typing appropriate char sequence and pressing Tab button. They are used for faster writing mostly typical code fragments. For example if you type cfo and press Tab, then you'll have such code instead of cfo: <cfoutput>component</cfoutput>. Your cursor will be staying at the begining of component word. Typing anything will replace the word. Press enter and cursor will jump at the end of the construction.


You may see available templates in Settings/Live templates/cfml


Improving structure view

New feature will be available with a new version. Under the root of structure view there are two subtrees. One of them presents the cfml structure of the file and another - html. I suppose it should be useful.


Thursday, February 19, 2009

Version 1.20

Structure view


Structure view on Alt + 7 for cfml file is shown. Functions definitions have special icons.


Tuesday, February 17, 2009

Version 1.19

For using all new features you need to create java module and put all your cfml files under source root. Functions resolving works within the file.

User defined functions completion on Alt + Enter (yet works only withing current file!)



Go to declaration on Ctrl + MouseClick



Usage search on Ctrl + Shift + F7



Errors and warnings are shown on function already defined and function name can't be resolved




Function rename


Tuesday, January 20, 2009

Version 1.14 HTML highlighting

Quick navigation through HTML tags



Provide quick navigation to parent tags when clicking on the bread crumb with its name in the top of the editor

Code completion



On 'Ctrl + Space' completion of HTML tags attributes, some attributes values.

Quick documentation


On Ctrl + Q or Shift + F1 for tags, attributes, etc.

HTML code formatting


Code formatting according to HTML-specific Code Style (defined via a dedicated Code Style settings panel).

Structure view



The convenient structure view, fully synchronized with the editor, allows you to analyze the structure of HTML part of the file and quickly navigate to the desired place in code.

Code inspections



Go to declaration



The Go to declaration feature (Ctrl + B) works even for references to images (opens the image in editor tab, via bundled plugin).

Show Applied Styles for Tag


This command, available from the context menu when called on a tag, opens a tree-view of all styles that are applied to the tag by CSS, so that you can immediately see all defined style attributes, with possible overridings.

CSS



For CSS code highlighting, completion, quick documentation and some more extra features provided too.