Eclipse TEA Revealed: Building Plug-ins and Creating Extensions for Eclipse
By Markus Duft
()
About this ebook
Additionally, Eclipse TEA Revealed explores the library of pre-built components included with TEA, mostly in the area of rich client platform (RCP)-based Java application development, for building projects, updating sites, dealing with target platforms, and more. After reading and using this book, you'll be up to speed on the fundamentals of Eclipse TEA and ready to use it for more productive Java-based application builds and developments.
What You Will Learn
- View TEA’s internal architecture
- Work with TEA’s APIs
- Write TEA components
- Use the pre-built TEA components
- Set up headless environments using TEA
Who This Book Is For
Readers should be Java developers interested in extending the Eclipse IDE and/or setting up headless environments based on Eclipse.
Related to Eclipse TEA Revealed
Related ebooks
Practical Domain-Driven Design in Enterprise Java: Using Jakarta EE, Eclipse MicroProfile, Spring Boot, and the Axon Framework Rating: 0 out of 5 stars0 ratingsWeb Applications with Elm: Functional Programming for the Web Rating: 0 out of 5 stars0 ratingsSwift Quick Syntax Reference Rating: 0 out of 5 stars0 ratingsMastering Swift Package Manager: Build and Test Modular Apps Using Xcode Rating: 0 out of 5 stars0 ratingsSpring Quick Reference Guide: A Pocket Handbook for Spring Framework, Spring Boot, and More Rating: 0 out of 5 stars0 ratingsModern Programming Made Easy: Using Java, Scala, Groovy, and JavaScript Rating: 0 out of 5 stars0 ratingsPractical Scientific Computing Rating: 0 out of 5 stars0 ratingsPractical Data Science with Python 3: Synthesizing Actionable Insights from Data Rating: 0 out of 5 stars0 ratingsGetting Started with the MSP430 Launchpad Rating: 0 out of 5 stars0 ratingsBeginning Apache Spark 2: With Resilient Distributed Datasets, Spark SQL, Structured Streaming and Spark Machine Learning library Rating: 0 out of 5 stars0 ratingsSoftware Engineering from Scratch: A Comprehensive Introduction Using Scala Rating: 0 out of 5 stars0 ratingsDevOps for SharePoint: With Packer, Terraform, Ansible, and Vagrant Rating: 0 out of 5 stars0 ratingsIntroducing Vala Programming: A Language and Techniques to Boost Productivity Rating: 0 out of 5 stars0 ratingsPractical Contiki-NG: Programming for Wireless Sensor Networks Rating: 0 out of 5 stars0 ratingsABAP in Eclipse: Install, Configure, Use, and Enhance Your ADT Rating: 0 out of 5 stars0 ratingsRapid Java Persistence and Microservices: Persistence Made Easy Using Java EE8, JPA and Spring Rating: 0 out of 5 stars0 ratingsIntroducing .NET for Apache Spark: Distributed Processing for Massive Datasets Rating: 0 out of 5 stars0 ratingsDeep Learning with Swift for TensorFlow: Differentiable Programming with Swift Rating: 0 out of 5 stars0 ratingsIntroducing Spring Framework: A Primer Rating: 0 out of 5 stars0 ratingsRegex Quick Syntax Reference: Understanding and Using Regular Expressions Rating: 0 out of 5 stars0 ratingsDevOps in Python: Infrastructure as Python Rating: 0 out of 5 stars0 ratingsHands-on Azure Pipelines: Understanding Continuous Integration and Deployment in Azure DevOps Rating: 0 out of 5 stars0 ratingsSwift 5 for Absolute Beginners: Learn to Develop Apps for iOS Rating: 0 out of 5 stars0 ratingsLearning Puppet Security Rating: 0 out of 5 stars0 ratingsInstant Play Framework Starter Rating: 0 out of 5 stars0 ratingsBeginning Ada Programming: From Novice to Professional Rating: 0 out of 5 stars0 ratingsVisual Studio Condensed: For Visual Studio 2013 Express, Professional, Premium and Ultimate Editions Rating: 0 out of 5 stars0 ratingsPractical Splunk Search Processing Language: A Guide for Mastering SPL Commands for Maximum Efficiency and Outcome Rating: 0 out of 5 stars0 ratingsPointers in C Programming: A Modern Approach to Memory Management, Recursive Data Structures, Strings, and Arrays Rating: 0 out of 5 stars0 ratingsLearn Data Analysis with Python: Lessons in Coding Rating: 0 out of 5 stars0 ratings
Programming For You
Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsWeb Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5101 Amazing Nintendo NES Facts: Includes facts about the Famicom Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratings
Reviews for Eclipse TEA Revealed
0 ratings0 reviews
Book preview
Eclipse TEA Revealed - Markus Duft
© Markus Duft 2018
Markus DuftEclipse TEA Revealedhttps://doi.org/10.1007/978-1-4842-4093-9_1
1. About TEA
Markus Duft¹
(1)
Peggau, Steiermark, Austria
../images/470772_1_En_1_Chapter/470772_1_En_1_Figa_HTML.jpgWelcome! Take a seat. Relax. Grab some coffee. (You all drink coffee, right?) I am not going to discuss too much rocket science. If you read this book’s back cover, you already know that this book is about extending the Eclipse IDE¹ with additional functionality through Eclipse TEA.² As you make your way through the book, you will see that this can be a surprisingly simple task.
In this chapter, I will introduce Eclipse TEA and shed some light on its history.
The Background of TEA
Before I delve into the nuts and bolts of extending the Eclipse IDE, let’s look at the origin of Eclipse TEA.
A few years ago, in the good old days of Apache Ant,³ we were engineering a large-scale logistics application. For various reasons, Eclipse RCP⁴ was chosen as this application’s platform. Even for server-side applications, we used the exact same setup, except without the UI parts of Eclipse RCP. This application was extremely large; it had roughly six million lines of code and was composed of approximately 650 OSGi⁵ bundles.
In order to maintain metadata, such a huge application required heavy lifting by both Eclipse and the developers’ hardware (at that time), and the developers themselves.
When taking into account the build system (Apache Ant) for headless builds (in other words, running a build without any UI and usually running on a server without a monitor attached in the first place), we understood the need for very lengthy and hard-to-maintain build XML files. Additionally, there were dozens of property files containing plug-in and feature versions to build and to include in update sites.
As a consequence, we had literally weeks where not a single nightly build succeeded even though workspaces in the IDEs of the developers were OK all along, meaning that builds and tests were successful. They just forgot to maintain the additional metadata (or did it wrong unknowingly). Developers never even had a chance to test nightly builds because they required a very special setup that was nearly impossible to reproduce on individual workplaces.
Another reason for the very complex and complicated build setup was our model driven approach. There were a few code generators, which were building upon code in the workspace; these generated code with input from some projects into other projects. This required us to do the following:
Build shared platform projects
Build the code generator projects
Run the code generator(s)
Build the projects containing the generated code
Build more code generators, requiring the projects with previously generated code
Generate even more code
Build the projects containing the additional code
Eclipse does allow adding additional builders per project, but this is not what we wanted. We required some orchestration on top of the normal build process since the generators had multiple source projects, multiple input projects, and multiple output projects.
In the IDE, the developer performed this orchestration. Usually, Eclipse performed the automatic build until the first bits were compiled. (In this state, the workspace was basically full of compile errors due to missing generated code in all other projects.) Now generators could be run manually to provide the next bits of code to compile. This process was repeated until all generators had been run—a tedious job. In the headless builds , there were Apache Ant scripts, which basically did the same. Due to frequent changes in projects setups (new, removed, renamed projects, and so on), these scripts were basically always out of sync with reality.
Things continued this way until some developers had enough. They had the idea to provide some automation to the most annoying steps in the process, along with simplifying headless setups. This was the birth of WPoB—short for WAMAS (the product’s name) Power Build. It was later rewritten and rebranded as Eclipse TEA.
TEA Is Born
The initial idea of TEA was to be able to do the following:
Build our software without additional configuration files or build scripts so developers cannot fail to maintain them
Run all code generators at the right point in time, automatically discovering projects, dependencies, and so on
Do both of the above in the Eclipse Workspace as well as headless on any machine without additional setup
Initially, TEA was basically a wrapper and tiny orchestrator around the IProject.build() method , already provided by Eclipse. Thus, anything hooked on the default Eclipse mechanism for extending the build worked out of the box, but TEA was able to provide the additional orchestration on top.
As a positive side effect, which was discovered during implementation, a remarkable performance gain occurred once the first version of TEA was able to build our workspace. As of the time of writing, developers use the TEA mechanisms to build the workspace instead of the automatic build in case there are a lot of changes to be compiled—for instance, when updating the workspace with a lot of changes from the source repository.
The reason for this performance gain (today it is not as huge as it was back then) was traced back to the fact that Eclipse does not have an orchestration on top of the individual project builds. Eclipse has a build order for the workspace that may be good—but may be just as bad. The developer can manually set up the order, or it can be left up to Eclipse to calculate it (which is the default). Eclipse accounts for multiple factors when trying to figure out a build order such as project dependencies and references. In our case, it seemed to come up with a rather bad order that resulted in Eclipse running in circles trying to compile certain projects over and over again, although their prerequisite projects were not yet compiled. Along with our generators, which interrupted the build process multiple times along the way, there was no chance to find a good ordering any way in the first place.
Eclipse TEA’s build library does not have this problem. It adds an orchestrator that calculates a graph up front, allowing for manipulating and influencing this graph. Other than Eclipse’s build order, this graph cannot be influenced by configuration of Eclipse. However, it can be extended and manipulated via code. I will provide a detailed description of this mechanism later in this book.
But there is more. Looking at the current open source Ecosystem, reading mailing lists, and so on, you will likely discover mails discussing how to prevent the fact that certain ways of working break things for others working in a different way. For example, projects where half the developers use Eclipse and the other half does not fall into this category. Headless builds are also usually performed without Eclipse (they are rather performed by tools like Apache Maven,⁶ Gradle,⁷ and so on), so the ones avoiding Eclipse all together might easily break things for the others. In this case, it can help to have an additional build performed using Eclipse, which is a simple task using Eclipse TEA.
What I have described so far is actually only an optional part of today’s Eclipse TEA (called Eclipse TEA build library
). The core of