Templates and Stationeries with MCU10.2

Classic CodeWarrior used the concept of ‘Stationeries’ or ‘Project Templates’: If I have a project which you want to use as a starting point for ‘Create new project’, then I moved that project into the ‘Stationery’ sub-folder of my classic CodeWarrior. When I did a File > New Project…, it showed up in the project wizard:

My own stationery project in the classic new project wizard

My own stationery project in the classic new project wizard

This is very useful if I have my corporate template or using projects in a classroom environment. How can I do this in eclipse and CodeWarrior for MCU10.2?

I have found two solutions:

  1. Using Eclipse Project Importer
  2. Using Eclipse Welcome Screen

The proposed solutions are not exactly what exists in classic, but close.

Eclipse Project Importer

With this solution I have all my stationery projects in a folder. Then I use File > Import > General > Existing Projects into Workspace:

Import Existing Project

Import Existing Project

Then I browse to the stationery folder, select the project I want to use. Important is to select ‘Copy projects into workspace’ to have the project duplicated:

Import Projects

Import Projects

Clicking ‘Finish’ and I have the project(s) in my workspace. But there is one missing piece: in classic CodeWarrior you can specify a new name for the new project, while in eclipse you cannot. There is an eclipse feature request filed here.

So as long I only import the project once into my workspace, I’m fine.  But if I do it again, I get:

Cannot import project if name is the same

Cannot import project if name is the same

This means that I have to rename my existing project before importing it:

Renaming Project

Renaming Project

While this approach works, it requires several steps: rename an existing project with the same name, selecting File > Import, browse to the folder, select the file, etc. That’s a lot, but the good news is: there is another way using the same basic eclipse import, but with a short cut.

CodeWarrior Welcome Screen

This approach still using the normal project import, but using the welcome screen. The welcome screen is accessible using the Help > Welcome menu:

Help Welcome menu

Help Welcome menu

In the welcome screen, there is a button for Example Projects:

Example Projects

Example Projects

There is as well a shortcut to get access to the examples from the bottom toolbar (if I have the welcome screen minimized):

Examples Shortcut in Toolbar

Examples Shortcut in Toolbar

This lists example projects for all the architectures supported where I can click on:

Example Projects

Example Projects

What is behind this: it opens the project importer with a predefined path:

CodeWarrior Examples

CodeWarrior Examples

With knowing how this works, I can easily add my stationery to the existing examples. Or simply replace the existing examples with my stationery:

Custom Stationeries in the CodeWarrior_Examples

Custom Stationeries in the CodeWarrior_Examples

I have still the eclipse issue with the importer that I cannot specify the name of the project while importing. But using the welcome screen simplifies things greatly:

  1. Rename project if I want to re-import it again
  2. Click on ‘Examples’
  3. Click on the architecture where I have my stationeries
  4. Select the project(s) I want to import
  5. Finish!

Happy Templating 🙂

Advertisements

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s