ekkes-corner: eclipse | osgi | mdsd | erp

September 2, 2009

eclipse update sites and more

Filed under: Eclipse, Galileo, Helios, openArchitectureWare — ekkescorner @ 9:00 am

Just reading at Eclipse Planet John Bitos experiences how to find the Update Sites for Xtext.

as a reminder for those on vacation last weeks:

UpdateSites

There’s my collection of Update Sites for Galileo, Helios, 3rdParty:

http://ekkescorner.wordpress.com/eclipse/update-sites/

P2 Update Sites are great, but its always good to know where to find them ;-)

Target Platform, Modeling (oAW)

Also perhaps interesting for someone my blog series about

…just working on two new blog-series:

  • Logging in OSGI Enterprise Application (a re-work of my old series)
  • modeled UI in Business Applications (Riena, redView and more)

July 28, 2009

[galileo] summary migration guide oaw5 (MWE, Xpand, Xtext)

Filed under: Drools, Eclipse, Galileo, openArchitectureWare — ekkescorner @ 3:06 pm

openArchitectureWare WorkingGroup at EclipseopenArchitectureWare moved to Eclipse Modeling as part of Galileo release. This blog series reports my experiences to migrate a huge oaw4 project. This is the last part  - you’ll find an overview of this blog series here.

oaw4 means openArchitectureWare 4.3.1oaw5 means MWE (EMFT) + Xpand (M2T) + Xtext (TMF) - more infos at oaw WorkingGroup.

Overview Migration Guide from oaw4 to oaw5

  1. Overview HowTo migrate from oAW4 to oAW5
  2. Preparing Migration oaw4 –> oaw5 (PLE – featureconfig)
  3. Preparing Migration oaw4 –> oaw5 (Beautifier)
  4. Preparing Migration oaw4 –> oaw5 (MagicDraw)
  5. Install oaw5 (Xpand/Xtend, MWE, Xtext)
  6. Convert Xpand/Xtend projects from oaw4
  7. Convert MWE Workflow files from oaw4
  8. Convert Xpand/Xtend Templates from oaw4
  9. Run oaw5 (MWE) workflows (problems, performance, tips)
  10. HowTo communicate (Working Group, Forum, Newsgroups)

Open Issues

If you followed my blog series, you know that there are some bugzillas open, but no show-stoppers.

Summary

While development of oaw5 I did some small tests from time to time and it works. But I never had the time to migrate a huge real-life-project with

  • 84 MWE workflow files
  • 55 Xpand templates
  • 54 Xtend templates
  • 5 Cartridges (Java, Persistence-JPA, EJB3, BPM, Services)

using

  • UML2 MetaModel
  • UML2 Profiles
  • MagicDraw Customization DSL
  • EMF MetaModel

in 5 projects of different sizes – per ex. >500 Entity

You cannot test the migration of those projects without really doing the migration ;-)

Was something like an adventure – but it works for me now and after intensive tests I recommend to migrate from oaw4 (UML + EMF) projects.

My personal summary:

Migration was a real hard work because of missing documentation, HowTo’s, BestPractices etc.

This was the motivation for me to blog about all what happened while stepping thru this process. I wasn’t really sure if all will be run under oaw5 or if I had to go back. In this worst case my own blogs would have been my survival guide for the next iteration ;-)

Fortunately all runs (with some workarounds) and I’m able to use oaw5 from Eclipse Modeling Projects in my projects for daily work now. I imagine there will be many new users of MWE, Xpand and Xtext since all is part of Eclipse. Because my migration is done, you’ll miss me at oaw4 forum – but meet me again at Eclipse Newsgroups after your migration ;-)

As told at the beginning of this blog series – I mainly report about Xpand / Xtend, not Xtext. Xtext is (at the moment) not part of my daily work, but I have some use-cases in mind where I’ll start also using Xtext.

MDSD using oaw is fun and I like the framework since some years and it’s great to see it now under Eclipse umbrella.

I’m developing OSGI (Equinox) based Enterprise Business Applications from the domain of ERP solutions for medium-sized companies. Without using a tool like oaw I would not be able to do my work:

to design and realize complex applications from scratch to releases with success in a short time-frame.

My projects rely on:

  1. oaw for MDSD using UML, EMF, DSL
  2. PDE for Runtime / Platform – Plugin – Development
  3. Eclipse Runtime Platform (Equinox-OSGI, Riena) to make the products really run

- and all is part of Eclipse universe :-)

thx to all guys working on these great projects.

BTW: Riena and oaw5 are part of eclipse release train since Galileo

Since some weeks I’m now also an Eclipse Commiter :-) – and hopefully can give some value back.

Next blogs will be again from my project experiences:

  • Riena – Look-and-Feel (LnF)
  • redView (Riena EMF Dynamic Views for Business Applications)
  • OSGI Services, esp. Declarative Services
  • Logging in OSGI applications
  • integrating 3rd party into Equinox OSGI applications
  • BusinessProcesses and RulesEngine (use of Drools in OSGI server – and RCP client – apps)
  • EJB3 and OSGI (Easybeans)
  • PDE and Target Platforms

… and much more.

stay tuned here or follow @ekkescorner on Twitter.

ekke

BTW: I changed my FileEncoding for oaw5 to use UTF-8 instead of using ISO-8859-1 with oaw4.

HowTo Change FileEncoding of Eclipse Projects (OSX)

Filed under: Eclipse, EclipseCon, Galileo, OSX, openArchitectureWare — ekkescorner @ 8:37 am

If you followed my blogs you know that I just finished migration from oaw4 (http://openarchitectureware.org) to oaw5 (Eclipse Modeling: EMFT – MWE, M2T – Xpand, TMF – Xtext).

In oaw4 projects I used File Encoding ISO-8859-1 as global workspace setting:

workspace encoding oaw4

All Projects inherit File Encoding from container (Workspace) – so they also are using ISO-8859-1.

oaw – workflows (.oaw in oaw4 and .mwe in oaw5) are manually set to UTF-8:

workflow encoding oaw4

uml models, emf models, xml files are automatically detected by Eclipse as UTF-8:

encoding from content

Some workflows explicitely set File Encoding, per ex. using Xpand2 Generator Component, outlets etc:

encoding xpand2generator or outlet

Some years ago this was the only solution working for me using OSX and Windows and openArchitectureWare.

Converting from ISO-8859-1 to UTF-8

As result of some discussions at oaw-workinggroup mailing list it seems that using UTF-8 for all kind of oaw – templates should work on all platforms, so I decided to switch from ISO-8859-1 to UTF-8. Then its easy to handle: all files are using UTF-8, no manual settings, no workflow-specific settings and UTF-8 can be used from all OS and more languages then ISO-8859-1.

I did my tests on OSX and Windows and all works well, I can enter oaw’s special characters inside editors like

« ... »

At first let’s change the Workspace Preferences:

workspace encoding oaw5

But it’s nott only changing a preferences – value – it means all existing templates and other files have to be converted to use the new FileEncoding.

Here’s how I solved that:

1. Detect what kind of files have to be converted

Xtend templates (*.ext)
Xpand templates (*.xpt)
Check templates (*.chk)
properties files (*.properties)
java sourcecode files (*.java)
textfiles (*.txt)
  • Xtend templates (*.ext)
  • Xpand templates (*.xpt)
  • Check templates (*.chk)
  • properties files (*.properties)
  • java sourcecode files (*.java)
  • textfiles (*.txt)

2. HowTo convert file encoding of a bunch of files recursive

I’m working on OSX and there’s a built-in utility: iconv. That’s great because for this one-time work I don’t wanted to write code.

If you type iconv -l in terminal you’ll get the list of supported encodings.

Using the following command you can change the encoding of one file:

iconv -f ISO-8859-1 -t UTF-8 myFile.xyz > myFile.utf8abc

But there are many files to convert recursive in a whole workspace. It’s not my daily work to use bash shell in terminal, so I googled but got no good solution how to solve the issue.

Then I remembered the great keynote of http://stackoverflow.com from last EclipseCon and asked my question there. Soon later I got some tips and were able to create the command :-)

find /myPath2Workspace/myWorkspace -name \*.xpt -type f | \
	    (while read file; do
	        iconv -f ISO-8859-1 -t UTF-8 "$file" > "${file%.xpt}.utf8xpt";
	    done);

copy the command to Terminal:

iconv terminal

hit OK and the conversion was done. repeat this step for all kinds of files you want to convert.

3. Test the Conversion and Rename

Now you can take a look at the converted files and test visually if all was well converted.

Last step is deleting the old files (in the example above *.xpt) and renaming (in this case *.utf8xpt to *.xpt)

You can do all of this using commands in terminal, but I did it the OSX – UI – way:

To delete the old files I’m using OSX Spotlight: search for .xpt in the workspace directory, select all from result, move to trash.

Then search for .utf8xpt using Spotlight, move selection to NameChanger, rename from .utf8xpt to .xpt and you’re done.

Hint: I blogged about NameChanger here.

Now all my existing and new oaw5 projects are using UTF-8 :-)

Next Page »

Blog at WordPress.com.