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:
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:
- Using Eclipse Project Importer
- 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:
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:
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:
This means that I have to rename my existing project before importing it:
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:
In the welcome screen, there is a button for 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):
This lists example projects for all the architectures supported where I can click on:
What is behind this: it opens the project importer with a predefined path:
With knowing how this works, I can easily add my stationery to the existing examples. Or simply replace the existing examples with my stationery:
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:
- Rename project if I want to re-import it again
- Click on ‘Examples’
- Click on the architecture where I have my stationeries
- Select the project(s) I want to import
- Finish!
Happy Templating 🙂