Monday, April 19, 2010

More robust java and cfml completion in 2.49

Now instead of stupid strings in completion dialog, where you can't even understand if it is a field or a function, we have beautiful iconized items with types and parameters shown!

That's how it looks like:



What about init method, which is cfml specific, it'll be inserted if you select appropriate constructor in completion popup. And here is an example again:





And as I finally managed to close CFML-44, java completion now differs between the class and the instance. That is to say, before init() your completion has static scope, and normal after.

And the last good piece of news, java refactoring (as function rename) works with coldfusion too (that is what this bug CFML-88 of Kevin was about).

Enjoy! And don't forget to send feedback!

Friday, March 19, 2010

MXUnit support

Hello, everybody!

Great to inform you that now we are supporting testing via MXUnit, using local server! It is available in latest, 2.48 plugin version.

More info on MXUnit you may find on their official site: http://www.mxunit.org/

Creating MXUnit run configuration in IntellijIDEA is extremely easy.

Suppose, you want to test a single component, inherited from mxunit.framework.TestCase.

Add new MXUnit configuration and fill two fields:

- Web path (an URL, by which your coldfusion component is accessible),

- and File (a local path to your component, let say to your component's file)


And here you are!

You'll receive tests results in your test console. It'll show you what tests passed and what failed.

Moreover you'll have 'Jump to source' by F4 or double click option and navigating from stack trace.

Thursday, February 11, 2010

Rework UI

A new run configuration will open selected browser on selected page when run

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!