I had completely re-written the previous edition of this book. The third (current) edition has three new chapters –
Chapter 12, Microservices, describes how to develop and deploy microservices. It also covers the deployment of microservices in Docker container.
Chapter 13, Deploying JEE Applications in the Cloud, describes how to deploy JEE applications in Amazon and Google Cloud platforms. Specifically, it describes the deployment of applications in AWS EC2, Beanstalk, Google Compute Engine, and Google App Engine. It also describes Eclipse tools that can be used for deployment to the Cloud.
Chapter 14, Securing JEE Applications, describes how to secure JEE applications using authentication and authorization features of JEE containers. It also covers some of the JEE 8 security enhancements.
My second book “Java EE Development with Eclipse – Second Edition” has been published. One of the reasons I did not post much on the blog was this book. I had been working on the book for the past few months and I am very glad that it has been published now.
One of the challenges writing this book was the diverse topics that it covered – Servlets, JSP, JSF, JDO, EJB, JSM, SOAP, REST, Spring, Unit Testing, Debugging and trouble shooting performance and memory issues in Java applications. Separate books could be written, and books have been written, on some of these topics.
This book explains how to develop applications using these technology in Eclipse IDE. The focus is not just on how to use different technologies in JEE, but also on setting up development environment, testing, debugging and deploying applications developed using these technologies.
Though ColdFusion Thunder is the next version of ColdFusion Builder (the last version was 2.0.1), it is like a new IDE because it’s a major re-write. Past versions of ColdFusion Builder were built on top of Aptana. I had noted some of the challenges in implementing ColdFusion Builder a couple of years back, when CFB 2.0.1 was released.
The task was huge and we, in the ColdFusion team, had been working very hard during the past two years to – first build all (or most) the features of CFB 2.0.1 in Thunder, and then to add some more features. If you have used ColdFusion Builder in the past, then you will see great performance improvements in all the editors in Thunder. Specifically you should see difference when editing large files. The memory footprint is also improved.
Eclipse 4.3 (Kepler) was released in June this year. There have been some changes to plugin dependencies in E4 RCP applications from version 4.2 to 4.3. I had created sample projects for my book using Eclipse 4.2. If you import those projects in Kepler, then applications would not work.
I have recreated sample projects for Kepler and have submitted them to PACKT. Hopefully they should be available for download soon.
However if you follow through code examples in the book by creating your own E4 RCP projects in Keper, then things should work fine. Eclipse RCP APIs haven’t changed, as far as code samples in the book are concerned. However some of the links mentioned in the book are different for Kepler. They are –
Application project wizard for E4 has changed a bit in Kepler. Now you have an option to create sample content (menus and views) in the wizard. Earlier you did not have this option and the wizard used to created sample content. This option is turned off by default. If you do not select this, then no menu options would be created. In which case skeleton sample application would look different from what is explained in the book.
If you select the above option, then along with menus and toolbar button, a view is also created.
To try out examples in the book, I would recommend that you select the option to create sample content and then delete the ‘Sample Part’ from Application.e4xmi (it is in Application->Windows->Trimmed Window->Controls->Perspective Stack->Perspective->Controls->PartSashContainer->Part Stack). You can also delete Java source file for this part (SamplePart.java in codesnippetapp.parts package). This will make the skeleton project same as explained in the book.
I am happy to announce that my book titled Instant Eclipse 4 RCP Development How-to has been published by PACKT Publishing. It is a mini-book that describes specific tasks and solutions to build RCP applications using Eclipse 4.
Eclipse 4 has introduced new frameworks, APIs and tools to develop Rich Client Platform (RCP) Applications. In this book I have taken a sample application and explained how to implement it from start to finish using Eclipse 4 SDK. The book is divided into a number of focused tasks. Each task builds the sample application incrementally .
Here is the list of tasks covered in the book –
Setting up a development environment
Creating a skeleton E4 application
Adding menu and toolbar items
Injecting your own objects using DI
Creating a pop-up menu
Creating custom events and handlers
Adding a keyboard shortcut
Creating custom objects using DI
Creating views dynamically
Styling an application using CSS
Customizing and exporting the application
I was contacted to write this book towards the end of last year. Initially it got delayed a bit because I was busy with other things. It was finally published yesterday.
In an Eclipse RCP application I was working on recently, I had to implement a TreeViewer with in-place editing feature. It was not easy to find all the information required to implement this, so I thought I would explain it here.
First let’s take a simple example, where hierarchical data is displayed in a tree.
When any item in the tree is double clicked, I want to edit the value in-place.
Here is the code to create this tree, without editing support. I will first create a data model using a Map. To simplify the example, I am assuming only one level of hierarchy.
I had presented a tutorial on implementing Eclipse Editor plugin a couple of years ago. Recently when I started implementing a new Eclipse editor, I was looking for that presentation, but couldn’t find it easily. I like to use my blog as reference for myself, so I thought I would post my Eclipse editor tutorial here.
For the tutorial, I created a new language called VGL (Vector Graphics Language) and built Eclipse editor plugin for it. The language is not important, and just serves the purpose for explaining how to create an editor. The tutorial starts with defining the language and then incrementally builds features of a typical Eclipse editor. I created separate projects for each step in the tutorial. There are nine Eclipse projects. Download and import project in Eclipse for each step if you want to see how it is built incrementally. The last project contains all the editor features covered in this tutorial.
JFace TreeViewer is a very useful UI control for displaying hierarchical data. It is used extensively in Eclipse, for example in Project/Package/Navigator view, Outline view, Debug Variables view etc. Eclipse .org hosts a nice article on TreeViewer – How to use the JFace Tree Viewer.
To specify data and its hierarchy in the TreeViewer, you implement ITreeContentProvider interface. This interface has methods like getElements, getChildren which you need to override to provide content and structure to the TreeViewer. You would typically return array of your model objects from getElements or getChildren methods. And since it is a tree view, you can expand or collapse the nodes. The model classes for an example in the above article could be Category (book, game etc.), Book and Game. Category can have Books or Games. You might load this information from a database and pass it to the content provider object. To refresh information in the TreeViewer, you would call one of the variants of refresh() function.
I spent quite a lot of time today trying to debug “Access restriction” error in one of my Eclipse plugins. In the last four years of Eclipse plugin development, I don’t recall ever facing this issue, but today suddenly some of the imports in one of the classes in my Eclipse plugin were flagged off as errors –
Access restriction: The type ISelection is not accessible due to restriction on required library <eclipse-path>\eclipse\plugins\org.eclipse.jface_3.6.1.M20100825-0800.jar
I had seen warnings about ‘restricted access’ for some of the imports earlier, but those were for classes that Eclipse discouraged to use e,g, for internal Eclipse classes. But today I was seeing errors.
The error does not tell much about what could have gone wrong. ISelection is exported from jface plugin and it is a public interface. And I had used this class without any error in other plugins.
I have been stuck with the problem of making UI widgets fill horizontally in a grid layout a few times. The solution is simple, but when I have to create UI using Eclipse SWT after a long gap, I tend to forget how I had made this work earlier, so I decided to blog about this.
I had to create a simple UI with one label and associated text box. I coded it like this –
GridLayout layout = new GridLayout(2, false);
tabContainer.setLayout(layout);//this is the parent composite
Label label1 = new Label(tabContainer, SWT.NONE);
GridData gd = new GridData();
gd.grabExcessHorizontalSpace = false;
Text txtBox1 = new Text(tabContainer, SWT.BORDER);
gd = new GridData();
gd.grabExcessHorizontalSpace = true;