The Domino Plugin for Aptana Studio
If you use a lot of JavaScript in your applications and you haven't already then you really ought to have a play with the Domino Developer Plugin for Aptana Studio. I got started with it last week and am now wondering how I managed to get by without it.
At the moment I'm working on an Ext-based template solution for a customer and this is an absolute God-send. You get all the things you'd expect of a coding IDE -- such as auto-complete, object awareness, colour-coding and line highlighting. Will I ever be able to return to editing JavaScript in Domino Developer? Not easily!
I seem to remember taking a look at the plugin some time ago and not seeing much use in it, but I think that was probably when it was first released and before all the useful stuff was being added, such as being able to edit JavaScript Libraries.
Give it a try! Everything you need to know is on the page linked to above.
I just found a feature I love. If you right click a file in the editor pane you can click "Format" and it will auto-format, arrange, indent etc all your poorly-formatted code so it looks presentable, professional and readable.
The editors in Domino Designer don't allow you to easily write well-formatted code. Here's the solution!
wow, this is really nice. thanks Jake :)
Brilliant! Finally good looking class browser for my own javascript objects.
Really cool. Thanks Jake.
I just found another nice feature. In the "Scripts" pane (bottom left by default) in the JavaScript folder is an entry called "Compact" which takes the JS file in the editor pane and shrinks it all down to one lin, while removing all comments and whitespace. Nice.
Don't forget to keep two copies though! Don't save the compacted version directly. Create a new file called library-min.js and paste it in there before undoing the compact action in the library.js file.
Hi Jake,
I use Eclipse and Aptana a lot to develop applications for Domino and Ext. I'm not quite sure what tools you're using, but I'd suggest the Spket plug-in which gives you code-completion for Ext version 2.2.
You should also consider using Ant Build, so you can concanate your Ext objects and minify/gzip your code automatically. It makes developing for Ext and Domino a breeze.
For the past two years I haven't even opened a javascript library inside Designer. There's no point in it, after you've "seen the light".
I almost forgot... You can also press "CTRL-SHIFT-F" to format your code. You'll probably do it all the time...
Jake,
This is new to me so hopefully this question is not idiotic. Firstly, this looks really cool! Now the question: Aptana seems to have an Eclipse plug-in or a stand alone version, which are you using?
Jake,
Slightly off topic, but I am considering Ext as possible solution for a client who has always used Notes clients and now needs a web based interface to an application that they need to interact with. Is there any chance you could at write about the good and bad of Ext and the issues of implementing.
Same goes with the Java editing in Notes IDE. In Eclipse it's so much more easy. Can't live without it anymore. Don't know yet how Domino 8.x improves this since the whole client is based on the Eclipse.
Michael. Not idiotic at all. Always confusing when you first want to try something out. They always seem to assume you just know. Same thing with the Notes 8 client. All that basic vs standard choice that I just don't get, still.
I am using the stand-alone version. Mainly as I don't have Eclipse installed.
Simon. I'll consider it. If ever I get the time to write such an in-depth post...
This is fantastic. Unfortunately I am weeding my way off of extjs/domino but who knows...
Thanks Jake. I will give the stand alone a try as well. I'm not sure I want to plug in to my existing install.
Agreed about the basic vs. standard for Notes! My understanding is that with standard you are running the Eclipse client. I'm also running Eclipse for seperate Java projects, the new SameTime is Eclipse and now Aptana! Soon Eclipse will BE my opperating system!
i install it but on test connection i have error: no nlsxbe in java.library.path.
can help me?
thanks
Alexander. Check point 1 in the installation guide on the page linked to above.
Do you know you're my Hero ?
I didn't sat_ourne. Thanks for saying so. Don't forget to thank Jeff Gilfelt though.
After all he did all the hard work. I just pasted a link to it ;-)
How different is this compared to the js editor in 8.5 b2 (editing js libraries)? I thought that one was nice, but if this is better....
I love EXT & EXT.ND..
Quite different Mark. The version of Notes 8.5 I have installed says it's the "standard" version, which, according to Michael above, is the Eclipse version. Editing JS in a JavaScript library in my 8.5 version of Designer is an improvement over R7 but is lacking in comparison to Aptana. There seems to be no autocomplete and none of the niceness of the adding the close brackets when you open them etc.
Mine is a very early beta though, so maybe it will improve. I can't imagine it ever being as good as Aptana though!
I should correct myself from above. The Notes client standard version is Eclipse based. I went to a LotusSphere Comes to You session in July (in Windsor, Ontario Canada) and one of the presenters was the head of the developer client (his name escapes me). I asked him if the dev. client was Eclipse based and he said it was still being worked on and that no matter which version of the client you are running, you are still running the old Notes dev client. Maybe all of that stuff gets better once the dev. client is in Eclipse? I guess that it's possible that the 8.5 version has the the Eclipse developer client.
The Aptana editors themselves are packaged as discrete Eclipse plugins, so with a little working knowledge of the Eclipse plugin architecture you can replace IBM's crap editors in Domino Designer 8.5 with the Aptana equivalents quite easily.
Thanks for the pointer Jake. Nice work Jeff!
I installed it and gave it a brief test drive yesterday. It is nice, but it still needs some refinement. For example where I am currently contracting, they want all design elements to have comments. When I saved my Page back to the template, the comments (visible in the Page view) were lost.
My page also had been used for CSS so that we could have embedded in the CSS. The plug-in grabbed the formula from the and it generated errors in Aptana. Of course it would since @Formulas are not valid CSS.
The text on the Page also was marked as Pass Through HTML, that property was lost when the plug-in saved changes back to the Template.
The Page also had some developer documentation that was hidden from the web. The Plug in pulled it in and of course didn't like it.
It shows great promise and I'll probably play with it more. I wish this client would move to R8 so I could use some of those other goodies Aptana has.
I think you're expecting too much of it Mark C. Surely you wouldn't expect it to be able to deal with all native Notes features like Computed Values etc!?
It's best used for editing JS in Script Libraries and for CSS in Pages where there are no computed areas or other items that may get lost.
Jake,
Would I need Notes 8.x plugins? I am getting the following error:
Formul8 for IBM Lotus Notes 8 (1.0.0) requires plug-in "com.ibm.rcp.jfaceex".
Hi veer. I don't have Notes 8 on the PC I installed it on, so I just deselected that install (after seeing same error as you) and it worked fine.
I deselected the option too, to get the installation complete. However, when I add the database which gets added, I don't see my js design elements. I clicked on "Test Connection" when adding the database, which came out successful.
I am poking around the Formul8 plugin, which seems pretty interesting. If I find something, I will post it here.
If you or someone else has this successfully working with 8, can you please post it here?
Thanks
Now I feel dumb. The Notes 8 plugin was written by the same guy who wrote the Aptana plugin, hence they are showing up together. Notes 8 ones are to be installed in Notes 8 and Aptana plugin in aptana.
Will poke some more on the aptana issue.
Tried out the Formul8 plugin in Notes client and love it. I have a toolbar icon to run formulas in documents. Now, I can use this instead and not create personal agents. Very Cool.
The other two plugins are interesting too: Secret Agent and Side Log.
Hey, I started out saying some nice things! I just have high expectations. :-)
i just restart my pc and all work fine.
thanks Jake ans of course big thanks to Jeff Gilfelt!
ps Jake, see email from me. :o)
After some more troubleshooting, I see the local databases working fine. The databases from the server don't.
Brilliant. Thanks Jake!
I had the same "no nlsxbe in java.library.path." error, but fixed it by changing my PATH variable in Windows -- now I'm getting "connection error: Unknown error". :P Wonderful.
Sorry if this is a silly question.. Does this plug-in require Domino 8.x? Will it work with Notes 6.5 Designer?
Ooops, sorry, looks like an RTFM question.
From Jeff's Aptana Studio page:
System Requirements:
Lotus Notes / Domino Designer version 7 or above
Version 6.5.x may also work by virtue of Java 1.3 compliance, but is untested.
Yay, It let's you create Prototype JS script libraries. It's bugged me for ages that the Notes client won't let you save these due to over strict syntax checking ...
Hi Jake,
I've just installed the stand alone version of Aptana as I read in the help pages of Jeff's site that you can drag and drop .js files directly into a notes database.. Well I am using Notes v8 BASIC version and I have tried the drag and drop, but nothing appears... Can you please see if you can do it using v8 Standard?? This will tell me whether I need Eclipse installed or not...
Thanks in advance
Darren
Hi Jake,
I was just working on an ext.nd project and found I needed a javascript editor to look at some sample files ... then i remembered seeing something in your blog ... another problem solved by Jake ... Thanks
Also I need to send a thank-you to Jeff Gilfelt
@Darren,
To clarify, the drag and drop is only supported between locations within the Aptana file view, so you will need to drag the files from within the 'My Computer' node in the file view itself. This is unfortunately a limitation with the file view. Drag and drop from the OS is currently tentatively being targeted for Studio version 1.3:
http://support.aptana.com/asap/browse/STU-1462
Thanks Jeff for the reply....
The drag and drop worked fine once I used the correct method... But I can't seem to delete it now... ;-) Is this a bug? It asks if I want to delete the file (right click - Delete) and I confirm that I do. But the .js file remains.. I even made sure that the database was closed and the file was not locked. But still the same the file remains..
Any suggestions anyone??
I can remove via Notes Designer, but wanted to know if I am doing something wrong again or if its a bug??
Thanks in advance
Darren
sorry but I can not get it to work (the plugin). Any idea where I can information how to check my setup or how to set it up from scratch?
In response to Veer about not getting it to work on the server databases, just the locals.
I think you do the same mistake as i did. Using slashes "/" instead of backslashes "\" in the filepath to the database.
If using standard slashes your "Test Connection" works fine but you dont see any scriptlibraries.
I am getting "no nlsxbe in java.library.path." while testing the connection. What setting I have to do in the Environment variables on Window level.
Quick note on the "Connection Error: Unknown Error".
I've been using this Aptana plugin for Domino for ages and it's always worked without issues. Then today I started getting the above error i.e. "Connection Error: Unknown Error".
A quick search didn't help matters so I started digging within Eclipse.
I found some useful information within the Help-->Aptana Help-->Troubleshooting-->Studio Log File. Scroll to the bottom and I saw a load of entries with today's date which said the following:
NotesException: Wrong Password. (Passwords are case sensitive - be sure to use correct upper and lower case.)
I always connect to a database directly on a server so always presumed that it needed your Internet Password from your person document in the relevant NAB - in the same way that WebDav-ing into a Domino database on a server does. My HTTP password hasn't changed in ages so was very confused.
Then I realised that I've never needed to provide a user name of any kind when using this plugin so guessed it must calculate something from the local configuration to work out which credentials to use.
Now I've got ND7 and ND8 installed on this machine and use both regularly depending on the customer/project I'm currently working on. ND7 is installed in the C:\Lotus\Notes7 directory and ND8 in the more normal C:\Lotus\Notes directory.
Then it dawned on me, I'd been logged into ND8 yesterday using a different ID file while doing some testing as a particular individual. So I re-opened ND8, switched ID to my normal ID file and closed it down again. I then went back to Eclipse and the plugin was back to behaving as normal.
Just thought I'd post it here as this blog entry came up in my search results. So hopefully this will be of some use if anyone has the same problem.
Cheers,
Lee