Subscribe: Planet Eclipse
http://planeteclipse.org/planet/rss20.xml
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
code  collections  eclipse collections  eclipse foundation  eclipse  java  new  open source  open  project  projects  source  swt 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Planet Eclipse

Planet Eclipse



Planet Eclipse - http://planeteclipse.org/planet/



 



PapyrusUML: Papyrus UML support in Hawk

Fri, 19 Jan 2018 15:00:40 +0000

(image) The Mondo Project‘s mondo-hawk now supports my models!

You can read more about this on their announcement page!

Note that they only index my semantic model (i.e., the “.uml” files) and not the diagrams, which makes sense in their context given that diagrams are not semantic elements.

Still, this is so cool!




PapyrusUML: Papyrus has layers (like parfait?)

Wed, 17 Jan 2018 16:17:14 +0000

The Papyrus layers functionality has been in incubation for a while, and some may be wondering what it’s all about:

The Layers mechanism allows to build different views of an underlying UML diagrams by applying selections rules as well as graphical transformation operators.

You can read the description of this function in the Papyrus Wiki, and you can also see it in action in this YouTube video:

 




Chris Aniszczyk: KubeCon CloudNativeCon 2017 Takeaways + 2018 Predictions

Tue, 16 Jan 2018 04:48:53 +0000

It was a crazy 2017 for me with 300,000 miles of business travel, but it was all worth it to experience every major cloud provider adopt Kubernetes in some fashion and grow our community to 14 projects total! Also, it was amazing to help host 4000+ people in Austin for KubeCon/CloudNativeCon, where it actually snowed! #KeepAustinWeirdToday’s surprise: snow and bumping into an old friend, @sabdfl with @rezgol #KubeCon #CloudNativeCon #austin pic.twitter.com/Fs1ykzdFdm — zahedab (@zahedab) December 8, 2017 I’d like to share some personal take aways I had from the conference (of course with accompanying tweets) that will serve as predictions for 2018: Exciting Times for Boring Container Infrastructure! One of the themes from the conference was that the Kubernetes community was working hard to make infrastructure boring. In my humble opinion, Kubernetes becomes something like “POSIX of the cloud” or “Linux of the Cloud” where Kubernetes is solidifying kernel space but the excitement should be in user space. The power of boring #kubecon pic.twitter.com/x2VuPau6zl — Barton George (@barton808) December 7, 2017 The Open Container Initiative (OCI) community also held a meeting where it celebrated its v1.0 release to make containers a bit more boring and standardized. In 2018, look for the boring infrastructure pattern to continue, the OCI community is planning to make distribution a bit more boring via a proposed distribution API specification. I also predict that some of the specialized/boutique cloud providers who haven’t offered Kubernetes integration will do so finally in 2018. CNCF + KubeCon and CloudNativeCon: Home of Open Infrastructure CNCF has a community of independently governed projects, as of today which there are 14 of covering all parts of cloud native. There’s Prometheus which integrates beautifully with Kubernetes but also brings modern monitoring practices to environments outside of cloud native land too! There’s Envoy which is a cloud native edge and proxy, that integrates with Kubernetes through projects like Contour or Istio, however, Envoy can be used in any environment where a reverse proxy is used. gRPC is a universal RPC framework that can help you build services that run on Kubernetes or any environment for that matter! There are many other CNCF projects that have use cases outside of just purely a cloud native environment and we will see more of that usage grow over time to help companies in transition to a cloud native world. In 2018, look for CNCF conferences continue to grow, expand locations (hello China) and truly become the main event for open source infrastructure. In Austin it was incredible to have talks and people from the Ansible to Eclipse to JVM to Openstack to Zephyr communities (and more). I can’t think of any other event that brings together open source infrastructure across all layers of the cloud native landscape. Moving up the Stack: 2018 is Year of Service Meshes Service meshes are fairly a new concept (I highly recommend this blog post by Matt Klein if you’re new to the concept) and will become the middleware of the cloud native world. In CNCF, we currently host Envoy and linkerd which helped poineer this space. In 2018, I expect more service mesh related projects to be open sourced along with more participation from traditional networking vendors. We will also see some of the projects in this space to mature with real production usage. Cloud Native AI + Machine Learning: Kubeflow In 2018, ML focused workloads and projects will find ways to integrate with Kubernetes to help scale and encourage portability of infrastructure. Just take a look at the kubeflow project which aims to make ML with Kubernetes easy, portable and scalable. Note, this doesn’t mean that AI/ML folks will have to become Kubernetes experts, all this means is that Kubernetes will be powering more AI/ML workloads (and potentially even sharing their existing cloud native infrastructure). I expect more startups to form in this spa[...]



Mike Milinkovich: EE4J Code Arrives

Mon, 15 Jan 2018 16:51:40 +0000

Last week the EE4J project achieved an important milestone when the source code for the API and reference implementation of JSON-P JSR-374 project was pushed by Dmitry Kornilov into its GitHub repository in the EE4J organization. This is the first project of the initial nine proposed to reach this stage.

This may seem like a small step in a very large process, but it is a concrete demonstration of the commitment to move forward with the migration of Java EE to the Eclipse Foundation. The Oracle team and the Eclipse Foundation staff had a ton of work to do to make this possible. This is definitely one of those cases where the visible code contributions are just the visible tip of an iceberg’s worth of effort.

Here are just a few examples of the work that went on to get to this stage:

  • The names of the projects such as Glassfish represent important trademarks in the industry. Oracle transferred ownership of these project names to the Eclipse Foundation so that they can be held and protected for the community.
  • The EMO staff reviewed the projects proposals, ran the project creation review, provisioned the repositories and set up the committer lists.
  • The Oracle team packaged up the source code and updated the file headers to reflect the new EPL-2.0 licensing.
  • The EMO IP staff scanned the code and ensured that all was well before approving it for initial check-in.

Now that the collective team has run through this process with JSON-P we will be working to get the remaining eight initial projects pushed out as quickly as possible. Hopefully by the end of this month. Meanwhile, more projects will be proposed and we will be migrating a steady stream of Java EE projects into EE4J.

Exciting times!




Eclipse Announcements: Eclipse IoT Day Santa Clara 2018 | Call for Papers

Mon, 15 Jan 2018 14:15:00 +0000

We're happy to announce the Eclipse IoT Day Santa Clara, taking place May 14, in co-location with IoT World 2018.(image)



itemis: Machine Learning Formatting with Xtext: Part II

Fri, 12 Jan 2018 11:12:00 +0000

Hi folks! Some of you might have seen my earlier blogpost on Machine Learning Formatting. It was more or less meant as an advertiser for the Eclipse Democamp Munich. As promised, here comes the follow up blogpost with more details. Codebuff is a project started by Terrence Parr. The project aims the problem that writing a codeformatter is hard and will not fit all needs. Therefore people want to customize it in every way since formatting is a very individual thing. Codebuff tries to format code by taking already formatted examples and learning out of that how to format code based on the same grammar. To do that it needs the corresponding lexer and parser. The lexer is used to get the tokens and the parser to create an abstract syntax tree out of the tokens. Based on that information Codebuff tries to mimics the behavior of a developer. Sounds simple, but how does that work?  First of all code consists of tokens. Depending on tokens and the location a developer would normally make a decision to introduce or delete whitespaces. A whitespace could be a simple space, a newline along with an indentation or alignment. Another valid decision could also be to do nothing. To make a decision you need certain criteria. Codebuff works with 21criterias, so called features that are taken into account. The following figure shows the 5 most obvious features. Based on those 21 features Codebuff analyses the given examples and computes token properties. When training is done all token properties are stored as vectors in a matrix along with the whitespace information. From this point on we should start to speak about machine learning. What we want to achieve is finding a match in the computed matrix of token properties and get the whitespace to inject into the given document at a certain position. First of all we have to compute where to look at in the examples. For that reason we look at our current position in the document and compute the token property (vector) like we did it in the training without storing it to the matrix. Now that we have that vector we need an algorithm to find a match in the matrix and apply the right whitespace to the document. For doing that Codebuff uses the simplest machine learning algorithm that exists – the K-nearest neighbors algorithm. The algorithm uses a function to compare a token property to the entries of the existing training-matrix. To do that the a constant named k needs to be specified to define how many nearest neighbors should be used. Mostly k is computed once by taking the root of the number of examples in the corpus, but for Codebuff k is fixed to 11. As shown above, experiments with different languages showed that the median error rate is nearly constant from k = 11 on, so taking this as a constant makes sense for performance reasons.  As we now know the value of k, we can start to find most similar token properties to the one we just computed at the location to format.   Out of that the algorithm uses a function to weigh the best whitespace. In Codebuff it takes simply the whitespace that appears most often – very simple but efficient. Codebuff's theoretical background is explained in more depth here and you can find an entertaining talk by Terence on YouTube. Looking at the way Codebuff works you might ask yourself how many example files you need to get good results? The answer is pretty simple: after a lot of experiments the Codebuff guys found out that from 10 example files on the results will not get better nor worst. The next figure shows for some different languages that after 10 files the error rate stays around the same. So – what has Codebuff to do with Xtext? Now as we know a bit of the theoretical background around Codebuff you may wonder what all that stuff has to do with Xtext. In Xtext you can create various DSLs for very different domains. For each language you[...]



Orion: Announcing Orion 17

Thu, 11 Jan 2018 18:52:41 +0000

We are pleased to announce the seventeenth release of Orion, “Your IDE in the Cloud”. You can run it now at OrionHub, from NPM or download the server to run your own instance locally.

Once again, thank you to all committers and contributors for your hard work this release. There were 86 bugs and enhancements fixed, across 248 commits from 13 authors!

This release was focussed entirely on making compatibility, stability and overall quality improvements to the Node server.




Eclipse Announcements: German TUV Sud Joins Eclipse openPASS Working Group

Thu, 11 Jan 2018 16:10:00 +0000

On Jan 1, 2018 the German TUV Sud has joined as a new member of the Eclipse Foundation & Eclipse openPASS Working Group.(image)



Maximilian and Jonas: SWT Spy – debugging SWT layouts

Wed, 10 Jan 2018 13:28:45 +0000

Do you have to debug an existing SWT view and you are not sure what elements are really on screen? Are you tired of manually coloring composites to find out what’s wrong in your layout? It is time to remember an oldie but goodie: The SWT spy! It is a fairly old tool, but still very useful, so let us have a quick look. Spy can augments a running tool and provide valuable information to debug any SWT application. This can be the IDE in case you are a plugin developer or any RCP or Eclipse 4 application. You can get SWT spy from this location: http://download.eclipse.org/eclipse/updates/4.7 Either add it to your target platform or directly install it into your IDE. In case you install SWT spy into the IDE, you can open it by pressing: SHIFT+CTRL+ALT+F9 If you would like to use SWT spy in a custom application, you need to include the bundle “org.eclipse.tools.layout.spy” into your product. To trigger the spy, there are two options: If you run on the compatibility layer (3.x), the key binding will also work If you are running on Eclipse 4, you can embed the following code to open the SWT spy window: final LayoutSpyDialog popupDialog = new LayoutSpyDialog(shell); popupDialog.open(); The SWT spy will open as a separate dialog, which is connected to the running application. It allows for the inspection of any SWT element with a focus on layout information. To navigate you can either browse the hierarchy or directly jump to an element. The hierarchy is shown as a list on the left side. By double clicking on an element within the current container you will walk down the SWT widget tree, the button on the top left corner will send you one level up. To jump to a specific element, click the button “Select Control” and hover over any element in the running application. A yellow border will help you with the selection. If you check the option “Show overlay”, SWT spy will draw a yellow border around the currently selected element. The text field on the right side shows the layout data of the current parent composite. If you select an element on the left, you see its layout data in the text field below. This is very helpful to debug layouts. Furthermore, you can use existing layouts as a template. The SWT spy directly shows you how to create the layout data for a selected element, e.g. GridDataFactory.fillDefaults() .grab(true, false) .align(SWT.FILL, SWT.BEGINNING) .minSize(0, 0) .hint(107, SWT.DEFAULT) During our work on EMF Forms, we often develop or adapt renderers. The goal of EMF Forms is to ease the creation of forms, especially concerning the layout. However, before this can happen, you must first create a renderer which will take care of the layout for you. EMF Forms ships with default layouts, but you might want to adapt them. When debugging the layout of a combination of renderers, it is often helpful to visualize all elements, which are on screen. Sometimes, elements are not visible (e.g. composites) or have the same background color as their parent. For this purpose, the SWT spy allows you to color controls. If you check the option “Color controls …”, the spy will assign different background colors to each level in your widgets tree. This looks ugly, but is helpful in finding hidden composites or to see how much space certain elements occupy. [...]



JBoss Tools Team: RHAMT Eclipse Plugin 4.0.0.Final has been released!

Wed, 10 Jan 2018 07:42:24 +0000

We are happy to announce the latest release of the Red Hat Application Migration Toolkit (RHAMT) Eclipse Plugin. Getting Started It is now available through JBoss Central, and from the update site here. What is RHAMT? RHAMT is an automated application migration and assessment tool. Example ways to RHAMT up your code: Moving your application from WebLogic to EAP, or WebSphere to EAP Version upgrade from Hibernate 3 to Hibernate 4, or EAP 6 to EAP 7 Change UI technologies from Seam 2 to pure JSF 2. An example of how to run the RHAMT CLI: $ ./rhamt-cli --input /path/to/jee-example-app-1.0.0.ear --output /path/to/output --source weblogic --target eap:7 The output is a report used to assess and prioritize migration and modernization efforts. The RHAMT Eclipse Plugin - What does it do? Consider an application migration comprised of thousands of files, with a myriad of small changes, not to mention the tediousness of switching between the report and your IDE. Who wants to be the engineer assigned to that task? :) Instead, this tooling marks the source files containing issues, making it easy to organize, search, and in many cases automatically fix issues using quick fixes. Let me give you a quick walkthrough. Ruleset Wizard We now have quickstart template code generators. Rule Creation From Code We have also added rule generators for selected snippets of code. Ruleset Graphical Editor Ruleset navigation and editing is faster and more intuitive thanks to the new graphical editor. Ruleset View We have created a view dedicated to the management of rulesets. Default rulesets shipped with RHAMT can now be opened, edited, and referenced while authoring your own custom rulesets. Run Configuration The Eclipse plugin interacts with the RHAMT CLI process, thereby making it possible to specify command line options and custom rulesets. Ruleset Submission Lastly, contribute your custom rulesets back to the community from within the IDE. You can find more detailed information here. Our goal is to make the RHAMT tooling easy to use. We look forward to your feedback and comments! Have fun! John Steele github/johnsteele [...]



InfoQ Eclipse feed: Hazelcast Joins the Eclipse Foundation

Tue, 09 Jan 2018 14:00:00 +0000

(image)

Hazelcast, a provider in open source In-Memory Data Grid (IMDG), recently joined the Eclipse Foundation to work with the other members of the Eclipse community to mainly focus on JCache, Eclipse MicroProfile, and EE4J. Greg Luck, CEO at Hazelcast, spoke to InfoQ about Hazelcast joining the Eclipse Foundation.

By Michael Redlich



Donald Raab: Eclipse Collections 9.1 Released

Fri, 05 Jan 2018 19:39:34 +0000

New Features, more languages, better symmetry and other improvementsEclipse Collections is a collections framework for Java. It has optimized List, Set and Map implementations with a rich and fluent API. The library provides additional data structures not found in the JDK like Bags, Multimaps and BiMaps. The framework also provides primitive versions of Lists, Sets, Bags, Stacks and Maps with a rich and fluent API. There is support for both Mutable and Immutable versions of all containers in the library.The Eclipse Collections community continues to grow. There were ten developers who contributed to the Eclipse Collections 9.1.0 release. I want to thank everyone who made a contribution. If this was your first contribution to an open source project, congratulations and welcome!The release notes for Eclipse Collections 9.1.0 are here:eclipse/eclipse-collectionsMulti-language WebsiteIn addition to code contributions, several developers worked on translating our Eclipse Collections Website to other spoken languages. This is an amazing example of how you can use more than just your coding skills to help open source projects. Thank you to both the contributors and reviewers!Here are our website links:EnglishJapaneseRussianBrazilian PortugueseA Chinese translation is in the works, and we will be looking to add other languages in the future. Please feel to submit an issue or pull request if you’d like to work on a translation to a spoken language you are fluent in.The Eclipse Collections KatasBoth of the Eclipse Collections katas are now available in Reveal as of this release.Company Kata (markdown file)Pet Kata (markdown file)We also had our first ever contribution of a live video demonstration of the Eclipse Collections Pet Kata using Eclipse Oxygen presented in Brazilian Portuguese. Great work and thank you Leo!https://www.youtube.com/watch?v=1TH0tdU_esQIt would be great to have multi-language translations of our katas as well. Our katas are hosted now as simple markdown files which get translated to web based slides using Reveal. Feel free to submit a pull request if you’d like to translate the katas to another spoken language.New CollectorsSeveral new Collector implementations were added to the Collectors2 utility class in this release. We continue to look to provide good integration between the Streams library and Eclipse Collections. Here’s an example of using the new countBy Collector with a Stream of String.@Testpublic void countBy(){ Stream stream = Stream.of( "One", "Two", "two", "Three", "three", "tHrEe"); Bag counts = stream.collect( Collectors2.countBy(String::toLowerCase)); Assert.assertEquals(1, counts.occurrencesOf("one")); Assert.assertEquals(2, counts.occurrencesOf("two")); Assert.assertEquals(3, counts.occurrencesOf("three"));}You can now consider using the countBy Collector as an alternative to using the groupingBy and counting alternative from the JDK shown below.@Testpublic void groupingByCounting(){ Stream stream = Stream.of( "One", "Two", "two", "Three", "three", "tHrEe"); Map counts = stream.collect( Collectors.groupingBy(String::toLowerCase, Collectors.counting())); Assert.assertEquals(Long.valueOf(1), counts.get("one")); Assert.assertEquals(Long.valueOf(2), counts.get("two")); Assert.assertEquals(Long.valueOf(3), counts.get("three"));}There were also Collectors added for groupByEach and groupByUniqueKey on the Collectors2 class in this release.Symmetric Sympathy ContinuesYou can now use zip with primitive Lists. There are two varieties of zip for primitive Lists.Zipping a primitive and an obje[...]



Ian Skerrett: Time for a New Challenge

Thu, 04 Jan 2018 13:39:24 +0000

The new year brings a big change; I will be leaving the Eclipse Foundation at the end of January. This has been a difficult decision to make but it is time to take on a new challenge.

I am extremely proud to have been part of the Eclipse Foundation and Eclipse community since the early days. I fondly remember the chaotic and exciting early years of setting up the Foundation and the explosive growth of projects, members and users. The Eclipse Foundation was one of the first open source foundations that showed how professional staff can help bring together companies and open source developers to create innovative open source communities. In some ways, the Eclipse Foundation became the template for many of the new open source foundations started in the last 5 years.

It is great to be leaving when the Foundation is gaining tremendous momentum. In particular, EE4J, Eclipse Microprofile, DeepLearning4J, OpenJ9 and other projects are all showing Eclipse is becoming the place for open source enterprise Java. The Eclipse IoT working group continues to grow and is certainly the largest IoT open source community in the industry. The Foundation is definitely on a roll.

Of course I will miss the amazing people at the Foundation and in the Eclipse community. I am privileged to have worked with so many individuals from many different organizations. One of the best parts of my role is being able to learn from some of the world’s best.

It is time to start looking for a new challenge. I am going to take some time to look for a new position. My passion is working with smart technologists to create and implement strategies to promote the market adoption of new technologies and solutions. Today there are some fascinating new technologies being introduced, like AI/ML, Blockchain/Distributed Ledgers, Cloud Native Computing, IoT, etc. It is an exciting time to work in the technology industry and I look forward to taking on a new challenge.

My last day with the Eclipse Foundation will be January 26, 2018. The technology industry is very small so I hope and expect to keep in touch with many people from the Eclipse community. I will continue to be active on my blog, Twitter and LinkedIn.


(image) (image) (image)



Doug Schaefer: Following the Community's Lead

Wed, 03 Jan 2018 21:35:22 +0000

I posted this tweet a couple of weeks ago and thought I'd explain it a bit more.

I wrote it shortly after posting the final bits for the CDT 9.4 release and was starting to think about my plans for 2018. And certainly the current state of Eclipse tools projects including the CDT has been weighing on my mind.

When QNX started the CDT project, we embraced open source as a means of sharing in a common effort to build a great C/C++ IDE. We didn't have a huge team and we knew that many platform vendors were in a similar situation. By working together, we all benefit. And for many years it worked and we now have the embedded industry's most popular IDE that we all should be proud of.

But times they are a changing. As I blogged last year around this time, web technologies are becoming the platform of choice, not just for web, but with the help of Electron, for the desktop as well. We can not discount the popularity of Visual Studio Code and the ecosystem that has quickly developed around it. And with shared technologies like language servers, the door is being opened to choice like we've never had before.

So as I was inferring from my tweet, it's time to take stock of where we are and where we are going. I was encouraged with the discussions I had at EclipseCon around the future of CDT. I've done what I can to help keep things rolling but at the end of the day the community leads the way and I need to be honest with myself and my customers and go where they go.




Donald Raab: The 4am Jamestown-Scotland ferry and other optimization strategies

Wed, 03 Jan 2018 05:16:00 +0000

When performance is important, so is understanding your available options.Shortcuts sometimes aren’t.Happy New Year!I thought I would start out 2018 with a performance optimization story from 2017.Takeaways from this blogJava Iteration Pattern Optimization StrategiesA few Eclipse Collections and Java Stream Iteration Pattern options.Recommendations at the endA shortcut with a twistOn January 2nd 2017, I sat with my family in our Honda Pilot on a pier at 3:30am for a half hour waiting for the 4am Jamestown-Scotland ferry to arrive. I had come to the literal end of the road on a shortcut that wasn’t exactly as I had expected. I decided to take the shorter distance route on my car’s Nav System to avoid having to go north on Interstate 95 only then to have to go south to get to Williamsburg, Virginia. I’ve gotten stuck in bumper to bumper traffic in Virginia on Route 95 on late night rides coming back from Florida a few times before. When we got to the end of the road on our shorter route, the Nav System indicated the next turn was to get on the ferry (see picture above).I was willing to take slower local roads, especially since it was early in the morning and there would be no traffic on them. We discovered too late that the path that our chosen path included a ferry ride. At this point, we only had two options. We could wait for the ferry and hope it was running, or turn around and add another 3 to 4 hours to our trip. A classic Hobson’s Choice. We waited for the ferry. It turned out to be a fun experience once we parked our car on the ferry, but I would have preferred an alternative at 4am after driving 14 hours.“Two roads diverged in a wood…” — Robert FrostI certainly took the one less traveled by. I did learn a new route that I didn’t know before for getting to Williamsburg from Orlando, as well as the planning required to optimize that route with the ferry schedule.What does this trip have to do with Eclipse Collections, you may ask? Well, the path I took was the Serial (one lane Colonial era roads), Lazy (ferry does the work until you get to the dock), and Boxed (your car is literally boxed in on the ferry by other cars) — just one of many options you can choose with Eclipse Collections and Java Streams.“Premature optimization is the root of all evil” — Donald KnuthReadability should be prioritized above performance when writing code. However, it helps to know what your available performance optimization options are, before you discover last minute your only option is stopping and waiting for the next ferry. You may actually be able to achieve better performance without sacrificing readability. In fact, there may be options you were unaware of previously that improve both readability and performance.There is a set of Iteration Pattern Optimization Strategies that I believe all developers should become aware of so they can appropriately tune their code for the best performance.Don’t guess when optimizing code. First prove you have a problem that needs to be fixed. Then benchmark any solutions you think may help to prove that they actually do.Travelers Beware: You can lose many hours of your life measuring performance optimization benefits. The tests I have run below take 45–50 minutes to run each time. I had to run them several times along with unit tests to validate that the results were the same across all similar tests. When you see the charts, you may be at first compelled by the graphs in terms of wanting to change your code to be more “optimal”. Optimal may not equate to noticeably faster in terms of your application’s overall performance. Each of these tests take at most hund[...]



Lorenzo Bettini: Analyzing Eclipse plug-in projects with Sonarqube

Tue, 02 Jan 2018 10:16:33 +0000

In this tutorial I’m going to show how to analyze multiple Eclipse plug-in projects with Sonarqube. In particular, I’m going to focus on peculiarities that have to be taken care of due to the standard way Sonarqube analyzes sources and to the structure of typical Eclipse plug-in projects (concerning tests and code coverage). The code of this example is available on Github: https://github.com/LorenzoBettini/tycho-sonarqube-example This can be seen as a follow-up of my previous post on “Jacoco code coverage and report of multiple Eclipse plug-in projects. I’ll basically reuse almost the same structure of that example and a few things. The part of Jacoco report is not related to Sonarqube but I’ll leave it there. The structure of the projects is as follows: Each project’s code is tested in a specific .tests project. The code consists of simple Java classes doing nothing interesting, and tests just call that code. The project example.tests.parent contains all the common configurations for test projects (and test report, please refer to my previous post on “Jacoco code coverage and report of multiple Eclipse plug-in projects for the details of this report project, which is not strictly required for Sonarqube). This is its pom 4.0.0 example example.parent 0.0.1-SNAPSHOT example.tests.parent pom 0.7.9 jacoco false ${tycho.testArgLine} org.jacoco jacoco-maven-plugin ${jacoco-version} **/plugin1/Main.class prepare-agent Note that this also shows a possible way of dealing with custom argLine for tycho-surefire configuration: tycho.testArgLine will be automatically set the jacoco:prepare-agent goal, with the path o[...]



Nikhil Nanivadekar: In Review — 2017

Sun, 31 Dec 2017 15:30:47 +0000

Sunset on Miyajima (Dusk of 2017)As the sun is about to set for 2017, I but can’t help reflect what an amazing year 2017 has been! For me personally 2017 was a year of many “firsts”. I have summarized few of the many awesome experiences I had in 2017.Experiencing the Land of the Rising Sun: In February I visited Japan and was awestruck by the beauty, heritage, friendliness, hospitality, cleanliness and most importantly the delicious food. I do not speak Japanese, and at first I was a bit apprehensive of how the visit will turn out. Few of my Japanese friends taught me some important phrases and I ventured ahead. I am happy to say, it was an experience of the lifetime. The people in Japan were very friendly and accommodating. I tried to converse with them in a mixture of English, Hindi, Marathi, sign-language and most importantly tried hard to learn new bits and pieces of Japanese. One of the humbling experiences was in Hiroshima when I was trying to get to Miyajima. I got on the wrong bus and ended up at a completely different train station. Patiently the bus driver explained the route to me with just numbers and sign-language and I reached the ferry to Miyajima without any further issues. This was my first visit to Japan but definitely not the last one!Devoxx US: In March I was one of the speakers at Devoxx US. The conference was filled with rich content, amazing speakers and gave numerous opportunities to network, share ideas and concepts. I co-presented Collections.compare and Robots for the Kid in Us talks. I was also one of the conductors for Devoxx4Kids workshop which took place before Devoxx. This was my first Devoxx experience and I enjoyed it a lot. I hope to have the opportunity to present at many more Devoxx-es in the future.Eclipse Collections Project Lead: In April, I was handed over the reins of Eclipse Collections and made the active project lead. I have been a contributor to the framework for more than 2 years and it was an amazing feeling to be recognized as a project lead. I worked hard to continue the legacy of successful project leads like Hiroshi, Craig and Don. This year we designed the official Eclipse Collections project logo, released 9.0.0 major version which works fine with JDK 9, presented Eclipse Collections via numerous avenues. I have highlighted my experience leading Eclipse Collections in this blog.GIDS 2017: In April, I traveled to India, my homeland and presented at the Great Indian Developer Summit (GIDS 2017). This was my first time at GIDS and I will highly recommend developers to participate in GIDS as a speaker or as an attendee. The conference organizers do a phenomenal job putting the event together. They take good care of not just the attendees but also the speakers. The 4-day event was sold out with standing room only for pretty much all presentations. Looking forward to continued participation at GIDS.JavaOne: In September, I was happy to be a part of the speaker lineup for JavaOne and JavaOne4Kids. This was my third JavaOne (second as a speaker) and like every year it was an amazing week. I was delighted to reconnect with many friends, Java Gurus, developer advocates, awesome people from the community. I learnt a lot of new things with the main theme being JDK 9, advancing Eclipse Collections and open source participation. I also planned my UK, Ireland JUG tour during the tail end of JavaOne. JavaOne was definitely one the highlights of my year.UK, Ireland JUG tour: As the year drew to an end, I visited UK, Ireland in November. I presented at various Java User Groups during my visit. In summer, I had visited Manchester and met one of [...]



Fabian Steeg: Java annotation processing in Eclipse

Sat, 30 Dec 2017 05:00:01 +0000

Java annotations provide metadata for Java code. Many developers use annotations provided by standard Java APIs (like @Override) or by frameworks (like @Test). Developers can define their own annotations and process them at runtime using reflection. Additionally, Java provides APIs for writing custom annotation processors that can process these annotations at compile time.Eclipse provides support for hooking these processors into the compilation process. So when you edit code with these annotations, the processor can analyse the source files, do stuff, and report information back to you.To give you an idea about how that works, I’ll use Contracts for Java as an example, a tool that implements a contract model similar to that of Eiffel in Java, based on annotations. For our setup, we’ll need Eclipse 4.7 (Oxygen, the 2017 release) or later.To use Contracts for Java, create a Java project, and add the latest release to the build path:Then add some code that uses contract annotations (copy and paste the code below into the src folder of your project): import com.google.java.contract.Ensures; import com.google.java.contract.Requires; public class Contracts { public static void main(String[] args) { System.out.println(new Numbers().add(-10, 5)); } } class Numbers { @Requires({ "c > 0", "b > 0" }) @Ensures({ "result > a", "result > b" }) int add(int a, int b) { return a - b; } } At this point, the project should not report any issues. Normal compilation of the Java source file works just fine. Our processor is not enabled for our annotations yet. To configure the annotation processing we go to Project > Properties > Java Compiler > Annotation Processing.Select Enable project specific settings and add the following options that we want to pass to the annotation processor: set com.google.java.contract.classpath to %classpath% and com.google.java.contract.classoutput to %PROJECT.DIR%/.apt_generated (the location of your project’s generated source directory):These properties are used by the processor to compile the annotated files, and to create output files. The %classpath% placeholder is replaced with your Java project’s build path by Eclipse, so that the annotation processor can access all the libraries used in your project when compiling your code. The %PROJECT.DIR% placeholder is replaced with the path to your Java project.Finally we add the processor Jar to Project > Properties > Java Compiler > Annotation Processing > Factory Path:After confirming these changes, and running a full build, compilation issues in the annotations are now reported in the editor. Our code contains a precondition mentioning a variable called c. But the annotated method has no c parameter. This is reported as an error in the editor:After we fix the first precondition to a > 0, the code compiles, and we can run it (Run > Run as > Java application).To see the files generated by the processor in the .apt_generated directory in Eclipse, you should disable filtering of .*resources in the Package Explorer’s view menu (the little triangle > Filters…):Also make sure you have set up your workspace to refresh automatically in Preferences > General > Workspace > Refresh using native hooks or polling:Besides the annotation processing at compile time, Contracts for Java also uses bytecode instrumentation for its runtime checks. To have the contracts checked at runtime, add -javaagent:cofoja.contracts.asm-1.3-20160207.jar to the VM arguments of your run configuration (go to Run > Run Configuration[...]



Scott Lewis: Remote Services without OSGi bundles

Thu, 28 Dec 2017 01:25:45 +0000

Remote Services provides a dynamic, transport-independent, simple, modular way to expose micro services.   ECF has created a spec-compliant implementation along with a large and growing number of open and extensible distribution providers.   

Remote services are frequently useful for fog/edge use cases, where the communication transports (e.g. MQTT) may be different than those typically used in the cloud (e.g. http/https, jaxrs, enterprise messaging, etc).   

Typically, remote services are run on OSGi-based frameworks and apps such as Equinox, Felix, Karaf, Eclipse, and others, and indeed ECF's RSA implementation works very well in any of these environments.   

Perhaps less well known, however, is that remote services can be used in other inter-process environments...for example between Java and Python.  

It's also possible to use ECF remote services without an OSGi framework, i.e. running only as Java applications.   This repository has an example of using ECF remote services without an OSGi framework.   The projects are Java applications (no OSGi framework assumed), on both the remote service provider side, as well as the remote service consumer side.   The examples may be run within Eclipse by using the launch configs in the example projects.

Most of the benefits of OSGi Remote Services are still available...for example the ability to use multiple distribution providers for a service, the ability to remotely discover services and dynamically respond to network failure, and the ability to use the OSGi service registry for service dynamics, and service injection.   Also, the service definition, implementation, registration and lookup are exactly the same whether via an OSGi bundle or a Java application.   This allows services to be defined consistently across runtime environments in addition to cross-distribution mechanisms.

Please clone the ServiceRegistry github repository and give things a try!








Andrey Loskutov: De-obfuscating Eclipse workers

Sat, 23 Dec 2017 15:53:08 +0000

Imagine you are debugging Eclipse IDE, which does something long and boring, running multiple worker threads, and of course all of them have very clear and consistent names:  Worker-1, Worker-2, Worker-3, ..., Worker-101, Worker-102, ..., you got it, I hope.

What do they do, you may ask? They all work, what else:

(image)
Workers do work, what else we can see here?
Now we have Christmas time, and what happens at this time? Santa is coming to all good plug-in developers!

If you use latest 4.8 Eclipse SDK build (from the 4.8 builds download page), and enable "Preferences -> Java -> Debug -> Listen to thread name changes", you can finally see what all those busy workers above really do:
(image)
Workers de-obfuscated
Isn't this cool?

P.S.
For details see bug 223492 and bug 528808.

Right now the preference is not enabled by default, but we hope to enable it in 4.8 M5 after some more testing if there will be no performance related side effects for bigger workspaces.

Enjoy!