openArchitectureWare.org

oAW has moved to Eclipse.

At this site you will find information about the outdated version openArchitectureWare 4, only.
Please read our letter of intent for further information.

 

 Forum Index > openArchitectureWare > openArchitectureWare 4.x Support New Topic Post Reply
 problem editing template files in eclipse (under Mac OS X)
 |  Printable Version
Michael Schifferdecker
 Wednesday, April 12 2006 @ 03:18 PM CEST (Read 3239 times)  
Forum Advanced User
Advanced User

Status: offline

Registered: 02/19/06
Posts: 89

Hi,...

I just started to edit a few xpt template in eclipse running under mac os x...

as soon as I use any guillemot (i.e. << or >>) [for example when I start a new DEFINE using content completion...] I get an error in the eclipse editor for xpt template files / when I try to run oAW4:

Severity Description Resource In Folder Location Creation Time Id
2 unexpected char: 0xC7 Root.xpt oaw4.demo.emf.datamodel.generator/src/templates April 12, 2006 2:18:38 PM 4

...and: the first guillemot << gets marked --> reason for error (unexpected char).

So,... under Mac OS X there seems to be some problem with the <</>> with the default configuaration of Eclipse!?

What do I have to do in the Eclipse configuation to resolve this problem?

Thanks for some advice on how to get this running on my Mac :-)

Cheers,

Michael


 
Profile Email
Quote
Philipp Schmidt
 Wednesday, April 12 2006 @ 11:43 PM CEST  


Status: offline

Registered: 03/05/06
Posts: 12

Hi,

you have to change the file encoding for the editor in the eclipse options. On a apple it's normally mac-roman but oAW expects it to be iso 8859-1 like on windows.

This should solve your problem ...


 
Profile Email
Quote
Sven Efftinge
 Thursday, April 13 2006 @ 11:36 AM CEST  
Forum Moderator
Moderator

Status: online

Registered: 08/21/05
Posts: 760

Unfortunately I don't have a Mac OS X box to test it.
But the UTF-8 encoding should work, too.

regards,
Sven


 
Profile Email Website
Quote
Michael Schifferdecker
 Thursday, April 13 2006 @ 01:45 PM CEST  
Forum Advanced User
Advanced User

Status: offline

Registered: 02/19/06
Posts: 89

Thanks for your advice,... works now in the editor (no errors reported any more).

BTW: every should have one (a Mac) ;-)

But: there seems to be a problem now when antlr reads the XPAND templates due to this resetted encoding in eclipse [unexpected char: 0xB4 in line 1:1 (which is a guillemot in the XPAND template!)] - pls see exception below (I used the EMF example project again in order not to have any strange side effect -- the stuff works on a windows box (tested)):

I will dig deeper on this (just saw it now),... but in the meantime: any idea on this?

Exception:

0 INFO - ----------------------------------------------------------------------------------
10 INFO - openArchitectureWare v4 -- (c) 2005, 2006 openarchitectureware.org and contributors
15 INFO - ----------------------------------------------------------------------------------
20 INFO - running workflow: /Users/mschiffe/XXX_INSTALL_ECLIPSE_31_OAW/zzz_the_eclipse_31_folder/runtime-workspace/oaw4.demo.emf.datamodel.generator/src/workflow.oaw
25 INFO -
2779 WARN - 'genPath' and 'srcPath' properties are ignored since you have specified outlets! - workflow: org.openarchitectureware.xpand2.Generator
2786 INFO - Starting: org.openarchitectureware.emf.XmiReader
3289 INFO - Starting: org.openarchitectureware.workflow.common.DirectoryCleaner
3294 INFO - Starting: org.openarchitectureware.xpand2.Generator
3536 ERROR - line 1:1: unexpected char: 0xB4
java.lang.RuntimeException: line 1:1: unexpected char: 0xB4
at org.openarchitectureware.xpand2.parser.Xpand2ResourceParser.parse(Xpand2ResourceParser.java:35)
at org.openarchitectureware.expression.ResourceManagerDefaultImpl.loadResource(ResourceManagerDefaultImpl.java:64)
at org.openarchitectureware.xpand2.XpandExecutionContextImpl.findTemplate(XpandExecutionContextImpl.java:137)
at org.openarchitectureware.xpand2.XpandExecutionContextImpl.findDefinition(XpandExecutionContextImpl.java:83)
at org.openarchitectureware.xpand2.ast.ExpandStatement.invokeDefinition(ExpandStatement.java:162)
at org.openarchitectureware.xpand2.ast.ExpandStatement.evaluateInternal(ExpandStatement.java:156)
at org.openarchitectureware.xpand2.ast.Statement.evaluate(Statement.java:27)
at org.openarchitectureware.xpand2.Generator.invokeInternal(Generator.java:177)
at org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2.invoke(AbstractWorkflowComponent2.java:28)
at org.openarchitectureware.workflow.container.CompositeComponent.internalInvoke(CompositeComponent.java:62)
at org.openarchitectureware.workflow.container.CompositeComponent.invoke(CompositeComponent.java:55)
at org.openarchitectureware.workflow.WorkflowRunner.executeWorkflow(WorkflowRunner.java:229)
at org.openarchitectureware.workflow.WorkflowRunner.run(WorkflowRunner.java:165)
at org.openarchitectureware.workflow.WorkflowRunner.main(WorkflowRunner.java:118)
Caused by: line 1:1: unexpected char: 0xB4
at org.openarchitectureware.xpand2.parser.Scanner.nextToken(Scanner.java:329)
at antlr.TokenBuffer.fill(TokenBuffer.java:69)
at antlr.TokenBuffer.LA(TokenBuffer.java:80)
at antlr.LLkParser.LA(LLkParser.java:52)
at org.openarchitectureware.xpand2.parser.XpandParser.template(XpandParser.java:64)
at org.openarchitectureware.xpand2.parser.Xpand2ResourceParser.parse(Xpand2ResourceParser.java:31)
... 13 more


 
Profile Email
Quote
Michael Schifferdecker
 Thursday, April 13 2006 @ 02:01 PM CEST  
Forum Advanced User
Advanced User

Status: offline

Registered: 02/19/06
Posts: 89

BTW: _only_ iso 8859-1 encoding works in editor
with utf-8 encoding I also get "unexpected char" errors in the eclipse editor


 
Profile Email
Quote
Sven Efftinge
 Thursday, April 13 2006 @ 03:39 PM CEST  
Forum Moderator
Moderator

Status: online

Registered: 08/21/05
Posts: 760

You also need to specify the encoding in the workflow file.
something like
<encoding value="iso-8859-1"/>
see the Xpand reference documentation it's explained there.


 
Profile Email Website
Quote
Michael Schifferdecker
 Thursday, April 13 2006 @ 03:52 PM CEST  
Forum Advanced User
Advanced User

Status: offline

Registered: 02/19/06
Posts: 89

cool,... that was the reason for my problem.

Just checked the XPAND2 reference,... indeed: I should have read that :-)

THANKS for your help.


 
Profile Email
Quote
doublemalam
 Thursday, April 13 2006 @ 04:21 PM CEST  


Status: offline

Registered: 03/28/06
Posts: 3

me too


 
Profile Email
Quote
steven
 Monday, May 29 2006 @ 03:03 PM CEST  
Forum User
User

Status: online

Registered: 05/29/06
Posts: 28

hi,

having the same problem, I did the proposed steps and changed the default editor encoding to ISO-8859-1.
but I still have the problem that the guillemots are marked as unexpected tokens and there's no syntax highlighting.

checking the properties of the .xpt file file, i get that its encoding is ISO-8859-1.

where is the problem .. do I forget something?

regards,
steven


 
Profile Email
Quote
Arno Haase
 Thursday, June 01 2006 @ 08:55 AM CEST  
Forum Advanced User
Advanced User

Status: offline

Registered: 01/08/06
Posts: 38

To sum this up, a combination of the following steps is sufficient to get oAW to run regardless of the system encoding (works on both Linux and Mac OSX). It has the additional benefit of storing source files in iso-8859-1 encoding so that file exchange in a team is possible.

* Set the workspace encoding to iso-8859-1 (file encoding for all oAW related files is sufficient but workspace encoding is more convenient)
* Set encoding of the generator component to iso-8859-1 to tell it which encoding the template files are in. That works like this:

    <component class="org.openarchitectureware.xpand2.Generator" skipOnErrors="true" fileEncoding="iso-8859-1">



* Set the encoding of the outlets. That is not necessary for oAW to run smoothly, but usually you want to have control over the encoding of the output files.

Did you do all these and still have the prolem? Then please post more details.


 
Profile Email
Quote
Miles T. Parker
 Friday, July 21 2006 @ 11:05 PM CEST  
Forum Senior Member
Senior Member

Status: offline

Registered: 07/21/06
Posts: 211

Thanks, I had the exact same issue and this solved.

As noone else mentioned, I will -- on Mac, the key mappings for « », e.g. Ctrl-> and Ctrl-<, don't work. But if you are one of us lucky Mac people <img align=absmiddle src='images/smilies/wink.gif' alt='Wink'> just use the standard (US) mapping Opt-\ and Opt-| (above 'return')!


 
Profile Email Website
Quote
Kai Kreuzer
 Wednesday, January 03 2007 @ 01:00 PM CET  
Forum User
User

Status: offline

Registered: 01/03/07
Posts: 33

I just received my first Mac and eagerly installed Eclipse and oAW on it :-) As I am still struggling with all kinds of special characters on my Mac keyboard, I especially miss the guillemots for oAW - as I have a German and not an US keyboard, mparkers hint didn't help me much :-(
I assume it is a stupid question as there are so many Mac owners around in this forum and nobody ever asked for this - but how can I get the guillemots on my German Mac?

Cheers,
Kai


 
Profile Email
Quote
Karsten Thoms
 Wednesday, January 03 2007 @ 01:20 PM CET  
Forum

Status: online

Registered: 07/20/05
Posts: 1849

Good question. I also received recently my new Mac

The first thing that I've done was to fix this problem, so that the guillemot brackets will appear with CTRL+< and CTRL+> like on Windows

You can get the new plugin.xml from here. You'll have to replace it in the org.openarchitectureware.xpand2.editor_*.jar.

Hope that helps,
~Karsten


 
Profile Email Website
Quote
ekkehard gentz
 Wednesday, January 03 2007 @ 03:49 PM CET  
Forum Senior Member
Senior Member

Status: offline

Registered: 12/29/05
Posts: 351

hi karsten,

great solution !

...and good to see that there are so many mac osx users here,
so I can be sure, that oaw will run smoothly under osx.

I switched in september to osx and from month to month
there are less applications running under parallels-win,
just changed my uml tool from EnterpriseArchitect to
MagicDraw. (unfortunately Topcased is not so stable at the
moment, would be better integrated into eclipse)

ciao
ekke


 
Profile Email Website
Quote
Kai Kreuzer
 Wednesday, January 03 2007 @ 04:47 PM CET  
Forum User
User

Status: offline

Registered: 01/03/07
Posts: 33

Hi Karsten,

just replacing the plugin.xml in the jar didn't work for me (I am using version 4.1.1 from the update site), so I simply added the OSX keymapping in my plugin.xml and this solved my problem. Thanks a lot!
@Ekke: Not too sure that many people develop under osx - otherwise this question would have come up much earlier...? But anyway, I am also quite sure that I will stay with the Mac as it's simply a pleasure to work with


 
Profile Email
Quote
Content generated in: 0.83 seconds
New Topic Post Reply



 All times are CEST. The time is now 09:58 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content