Solved: change username in IntelliJ IDEA on Mac
Last week I’ve decided to give a try to IntelliJ IDEA. I’m a big fan of Eclipse IDE and platform and enjoy it a lot in my Java development but… But in real life I’m not only Java developer but Flex developer as well. So I had to use Flex/Flash Builder. And new version of that tool (Flash Builder 4) doesn’t fit my expectations. As far as the price for Builder and IDEA is almost the same why not to try an other option?
The first impressions about IDEA was “Why is it so ugly and unusable?". All this Swing vs good looking SWT in Eclipse with native behavior. As a Mac user I’m care about look and feel of applications which I’m using on everyday basis. And for me it is a huge weak of IntelliJ IDEA. Just take a look on screenshot from IDEA help and you can understand that point:

The pic is from IDEA manual. You’ll be surprised but that thing with “Local” is just tab
And that kind of ugly things are everywhere. When I’ve asked IDEA users about how they live with that tool windows or context menus with improper behavior they answer: we never used that panes or menus. We are using keyboard shortcuts.
As for me I’ve never remember all the shortcuts for all the software and technologies I have to use in our changing time. Just some essential set. Yesterday I’ve used technology A and IDE B and it will change tomorrow very easily. And all I need is convenience. Both with keyboard shortcuts and with context menus. And of course with my mouse/trackpad pointer ![]()
So the first impression is IDEA was designed by programmers and for programmers. In the worst sense of that. But don’t forget — it is just first impression. And maybe IDEA’s intelligence (everybody is talking about it) will compensate that look-n-feel weaks. Will see. Anyway I already had to switch off parsing JPA queries in my @NamedQueries section because this intelligent IDE can’t work well with valid JPQL statements ![]()
Nevertheless now I’ll talk about how to set the proper user name for JavaDoc/ASDoc @author section when you create a new class. If you’re Windows user the solution is over there. For Mac it is pretty simple too excepting one annoying problem…
Well first locate your IntelliJ IDEA app in Finder. You can jump there right from Doc with Show In Finder context menu item. Then in App’s context menu select Show Package Contents and locate Info.plist in package’s Contents folder. Navigate to VMOptions key and add to key’s value the following:
Code:
-Duser.name=<username> |
The problem is if your name contains space like in my case (Konstantin Kovalev). I’ve tried using quotes etc. without any success. The final solution is using unbreakable space. You can find and paste it easily in Edit>Special Characters… of your favorite text editor. Then just enter in search field “space” and select unbreakable. It works for me.
But maybe you know more proper way to do that?
Dynamically loaded BlazeDS configuration in Flex applications
For people who wants to use server configuration (I mean channels, endpoints and remoting destinations from BlazeDs/LCDS services-config.xml and remoting-config.xml) loaded in runtime instead of common practice with reading configs in compile time Cristophe Coenraets wrote a dedicated post. As for me it is very annoying to configure every single RemoteObject that way ![]()
Today I’ve discussed that problem with my college Benjamin Dobler and finally we’ve found a solution how to apply dynamically loaded config on a global level within Flex client.
The solution is pretty simple and rely on mx.messaging.config.ServerConfig class. The key part of documentation is:
This class provides access to the server messaging configuration information. This class encapsulates information from the services-config.xml file on the client and is used by the messaging system to provide configured ChannelSets and Channels to the messaging framework.
The XML source is provided during the compilation process. However, there is currently no internal restriction preventing the acquisition of this XML data by other means, such as network, local file system, or shared object at runtime.
So it is very convenient and legal way to solve our problem. But the main difficulty is the format of XML. Further investigations gave us the format:
XML:
<services> | |
<service id="remoting-service"> | |
<destination id="serviceOne"> | |
<channels> | |
<channel ref="channel-amf"/> | |
</channels> | |
</destination> | |
<destination id="serviceTwo"> | |
<channels> | |
<channel ref="channel-amf"/> | |
</channels> | |
</destination> | |
</service> | |
<channels> | |
<channel id="channel-amf" type="mx.messaging.channels.AMFChannel"> | |
<endpoint uri="http://example.com/foo/messagebroker/amf"/> | |
<properties> | |
<polling-enabled> | |
false | |
</polling-enabled> | |
</properties> | |
</channel> | |
</channels> | |
</services> |
That’s all! Finally all you need is to assign your loaded XML to the appropriate property:
- ServerConfig.xml = myXML
Now you can use your services without any problem. They will be configured on a client globally as if were injected on compile time.
Flash GAMM Ukraine
If you plan to visit Kyiv, Ukraine in December 2009 do not miss Flash GAMM event which will take place December 5-6.
One of the greatest thing about the event is a huge number of flash game developing and publishing companies from different countries will be represented there. The topics are flash game development, art and animation, monetization, social networking, advergaming, flash 3D etc. As far as it will be the third Flash GAMM event and all the past events met great success this conference became very respective among developers and publishers in Ukraine, Russia, Belarus and other countries.
Now this event will be provided by Absolutist Ltd. The venue is the Lybid Hotel with conference hall for about 200 attendees.
The registration for the conference is already opened. The list of speakers is incomplete yet so if you have an interesting topic to present you’re welcome.
In contrast to the previous conference there will be some great changes.
First of all, the respective sponsors can place their own kiosks there. Another great thing is the catalogue of the event to be published with your company description, portfolio etc. even if you’re not a participant.
The best flash game contest is also planned and the winner will be awarded with Asus Eee PC.
As you can understand you’re definitely should visit the third Flash GAMM event! ![]()
To learn more visit our official site – www.flashgamm.com.
A big mistake: Flex Builder is now Flash Builder
All the latest Flash platform related news are about Adobe’s rebranding of Flex Builder which is now Flash Builder. You can read more from Serge Jespers, Lee Brimelow, Duane Nickull, Mark Doherty, Tim Buntel or Ryan Stewart and the Lee Brimelow’s FAQ. And I’ve decided to share some thoughts about this decision.
As we know Flash was born as animation technology and then become RIA platform with its own scripting language etc. To be precise the RIA definition itself is derived from Flash MX. So we have animation platform with some interactivity (ActionScript) and very great IDE for animation (timelines, tweens etc) but EXTREMELY poor for scripting with very basic code editor and procedure code in frames across application movie.
Time by time the situation is changing. Flex technology with declarative MXML was launched earlier than MS’s WPF with XAML (and MS possibly didn’t think about WPF/E aka Silverlight that times). Flex was right targeted for developers to develop APPLICATIONS (not movies). Right, developers-developers-developers just before MS’s XAML/.NET based family with great designer/developer workflow.
But anyway who knows about Flex? Before >=2 version almost nobody knows. A lot of Flash developers can’t adopt this new technology for number of reasons. And the situation was broken after Flex 2 was released. We can call it as the victorious procession of Flash platform for developers. But who knows about this procession outside Flash community? A much less amount of people than we can expect.
The most people just things nothing if I represent myself as a Flex developer. They don’t know about the subject and even don’t care. And if I try to explain my specialization in terms of Flash platform they become excited — oh yes! It is great tool for animations, rich banners, YouTube and promo sites. But what you say? You write code? ActionScript code? How very interesting. But ActionScript is very poor programming language, you know? What? It now supports classes? And even some other cool features? Great! But what about IDE? MS has great Visual Studio for their WPF and Silverlight but Adobe has just Flash IDE with just VERY BASIC code hilighting. It is funny you know? What? You have Flex Builder which is Eclipse based and has some code editor which is not so powerful as JDT but has a couple of features? Really? That’s cool, guy! Sorry, I’m hurry now. See you!
It takes a long time to divide Flex as developer centric technology from Flash as technology for creative people. Ok. We have Flash platform as an umbrella for all this family. Flash (means timeline and poor code editor)? Platform (WTF?)?
In other side everybody knows Visual Studio. And calls it great (I can’t share it — in my opinion VS is not great as code editor but can be with ReSharper for example). And new Silverlight technology (developers, developers, developers!). Nobody can doubt Silverlight is great for developers. And it has really great designer/developer workflow (which Flex Flash will have only with Flex Flash Catalyst released). Maybe it isn’t great for animations but who cares?
Ok. What we have now? We have Flash IDE and Flash Builder IDE (looking forward for questions from customers and colleges about what is difference and why Flash Builder IDE has advanced code editor but can’t compile fla-files and Flash IDE can compile them but useless for serious coding?). And we have Flash Catalyst which can use projects imported from Flash Builder IDE but can’t share the same project and can’t edit fla-files. And have one ugly child aka Flex SDK which is what? How to explain colleges and customers why Flash Builder IDE hasn’t timeline and can’t build flas but can use something which called Flex SDK (why Flex? why Flash?). And in other hand Flex SDK can be used to develop only in Flash Builder IDE and Flash Catalyst but not in Flash IDE. And what about beginners? Why Adobe going to drive them mad?
Well, Silverlight has ONE brand (which was divided from WPF). Maybe they won’t attract a lot of creative persons aka designers and animators but they have good positioning. So now Adobe tries to do the same using Flash brand. Which become well-established for creative persons but not for software or enterprise developers (sorry for that f-word enterprise word). And never will. It is much more effective to use Flex naming for all the Flash platform parts in this situation (hope creative persons won’t bear a grudge for it and won’t become MS persons
). Yes Flash is de-facto standard for web animation and MS is very poor about creativity. So I hope Flex player can be successful.
Or maybe it is better to introduce some new generic brand for Flash, Flex and AIR (the whole platform)? Anyway Flash Builder is way to nowhere.
Anyway it is just only my opinion ![]()
The simple things why I prefer to develop Java than Flex
For a long time I spend more than 90% of my developing sessions writing Java code (yes, Spring, JPA, BlazeDS etc). As a Flex developer I felt not very comfortable for a first time but my current project (you can believe me it is a great project!) requires a kind of person who can wear two hats — both server and client developer.
But now I’m very pleased to that situation. The point is that I can surely say: I prefer to write Java code with much more pleasure than Flex. Don’t mind I still love Flex but I’m talking about IDE world. I use JDT+WTP (both Eclipse based) for my Java coding and Flex Builder 4 (prerelease program) for Flex side.
Flex Builder has a lot of cool features you can easily put in product’s feature list (yes its all about marketing). It has great design view. It now has some code generation and (can’t you believe that?) getter/setter generation+file templates. FlexUnit support also sounds good to advertise Flex Builder. And of course a couple of refactorings. That’s great for version 4! We’ll see even more in version 10 I hope.
But I’m just developer. I don’t need this design view at all. Please remove it from my Flex Builder bundle. I still can’t use FlexUnit support and (to tell the true) don’t believe I’ll use it any often. Because of it can’t compile as fast as in Java projects and (and it is annoying thing) it always launches in Flash Player as ordinary Flash application. There is no headless Flash Player and corresponding issue in Adobe JIRA is still without changes and any priority (it isn’t so cool as Design View, right?). And there is no way to intercept all the player exceptions (corresponding JIRA issue — two years old — is still low priority) so you can only rely on timeout to check if tests are failed silently. But the main principle of unit tests is to be fast. If they are very slow to compile and launching them always switches to the browser or debug view and finally take some timeout — what do you think about how often I’ll run them? You know the answer.
I’m not a graphic designer. I’m just a developer. I spend most of my working time in code editor. And can’t enjoy it. But!
The good thing is I use Java editor to develop server side. And I have almost perfect code editor for free. It is just 3.4.2 version and hasn’t build in design view (but available as separate free plug in for Swing and SWT) but I really enjoy writing code there.
I have a lot of navigation options. I have very fast code analysis. I have quick fixes. I have templates which really rules. And I have very useful and fast unit tests. I even don’t need to run server to be confident — my tests are guaranteed my code is working. Getters/setters you say? A lot of dialogs and manipulations? In JDT I can only press ⌘1 and voilà. I have getter/setters generated. A lot of features for everyday coding.
If you think this post is just unproductive complaints I can answer you’re not right. I’ve found the solution. Just divide you working day between Java and Flex. 60/40 or even 90/10. And you can enjoy both comfortable coding and cool looking result (I mean great Flex apps). At least I’m pretty happy now. And wish you the same.



