exmmt-commit Mailing List for Eclipse XML Meta-Modeling Tools (Page 5)
Status: Inactive
Brought to you by:
lgrammel
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(28) |
Jun
(81) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
|
Dec
|
---|
From: <lgr...@us...> - 2006-05-17 15:20:28
|
Revision: 24 Author: lgrammel Date: 2006-05-17 08:20:11 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=24&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Added Paths: ----------- net.sourceforge.exmmt.test/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 15:19:54
|
Revision: 23 Author: lgrammel Date: 2006-05-17 08:19:37 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=23&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Added Paths: ----------- net.sourceforge.exmmt.test/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 15:18:44
|
Revision: 22 Author: lgrammel Date: 2006-05-17 08:18:31 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=22&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Added Paths: ----------- temp/ Removed Paths: ------------- net.sourceforge.exmmt.test/ Copied: temp (from rev 21, net.sourceforge.exmmt.test) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 14:15:52
|
Revision: 21 Author: lgrammel Date: 2006-05-17 07:15:42 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=21&view=rev Log Message: ----------- #1490212 release net.sourceforge.exmmt 0.0.1 Property Changed: ---------------- net.sourceforge.exmmt/trunk/ Property changes on: net.sourceforge.exmmt/trunk ___________________________________________________________________ Name: subclipse:tags + 20,0.0.1,/net.sourceforge.exmmt/tags/0.0.1,tag This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 14:12:59
|
Revision: 20 Author: lgrammel Date: 2006-05-17 07:12:38 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=20&view=rev Log Message: ----------- #1490212 release net.sourceforge.exmmt 0.0.1 Added Paths: ----------- net.sourceforge.exmmt/tags/0.0.1/ Copied: net.sourceforge.exmmt/tags/0.0.1 (from rev 19, net.sourceforge.exmmt/trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 14:02:33
|
Revision: 19 Author: lgrammel Date: 2006-05-17 07:02:16 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=19&view=rev Log Message: ----------- Added Paths: ----------- net.sourceforge.exmmt/tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 14:01:50
|
Revision: 18 Author: lgrammel Date: 2006-05-17 07:01:36 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=18&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Modified Paths: -------------- net.sourceforge.exmmt/trunk/.project Added Paths: ----------- net.sourceforge.exmmt/trunk/.classpath Property Changed: ---------------- net.sourceforge.exmmt/trunk/ Property changes on: net.sourceforge.exmmt/trunk ___________________________________________________________________ Name: svn:ignore + bin Added: net.sourceforge.exmmt/trunk/.classpath =================================================================== --- net.sourceforge.exmmt/trunk/.classpath (rev 0) +++ net.sourceforge.exmmt/trunk/.classpath 2006-05-17 14:01:36 UTC (rev 18) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="lib" path="lib/jaxen-core.jar"/> + <classpathentry kind="lib" path="lib/jaxen-jdom.jar"/> + <classpathentry kind="lib" path="lib/org.jdom.jar"/> + <classpathentry kind="lib" path="lib/saxpath.jar"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Modified: net.sourceforge.exmmt/trunk/.project =================================================================== --- net.sourceforge.exmmt/trunk/.project 2006-05-17 13:52:33 UTC (rev 17) +++ net.sourceforge.exmmt/trunk/.project 2006-05-17 14:01:36 UTC (rev 18) @@ -5,7 +5,24 @@ <projects> </projects> <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 13:53:12
|
Revision: 17 Author: lgrammel Date: 2006-05-17 06:52:33 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=17&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Added Paths: ----------- net.sourceforge.exmmt/trunk/.project net.sourceforge.exmmt/trunk/META-INF/ net.sourceforge.exmmt/trunk/about.html net.sourceforge.exmmt/trunk/build.properties net.sourceforge.exmmt/trunk/lib/ net.sourceforge.exmmt/trunk/license/ net.sourceforge.exmmt/trunk/plugin.xml net.sourceforge.exmmt/trunk/resources/ net.sourceforge.exmmt/trunk/src/ Removed Paths: ------------- net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/ Added: net.sourceforge.exmmt/trunk/.project =================================================================== --- net.sourceforge.exmmt/trunk/.project (rev 0) +++ net.sourceforge.exmmt/trunk/.project 2006-05-17 13:52:33 UTC (rev 17) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>net.sourceforge.exmmt</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + </natures> +</projectDescription> Copied: net.sourceforge.exmmt/trunk/META-INF (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/META-INF) Copied: net.sourceforge.exmmt/trunk/about.html (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/about.html) =================================================================== --- net.sourceforge.exmmt/trunk/about.html (rev 0) +++ net.sourceforge.exmmt/trunk/about.html 2006-05-17 13:52:33 UTC (rev 17) @@ -0,0 +1,17 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<html> +<head> +<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> +<title>Plugin License Information</title> +</head> + +<body lang="EN-US" link=blue vlink=purple> +<h2>Plugin License Information</h2> + +This plugin is available under the terms of <a href="license/net.sourceforge.exmmt.html">CPL</a>. + +The JDOM library contained in this plugin is available under the terms +of the <a href="license/jdom.txt">JDOM license</a>. + +</body> +</html> \ No newline at end of file Copied: net.sourceforge.exmmt/trunk/build.properties (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/build.properties) =================================================================== --- net.sourceforge.exmmt/trunk/build.properties (rev 0) +++ net.sourceforge.exmmt/trunk/build.properties 2006-05-17 13:52:33 UTC (rev 17) @@ -0,0 +1,19 @@ +bin.includes = META-INF/,\ + plugin.xml,\ + resources/,\ + net.sourceforge.exmmt.jar,\ + lib/,\ + about.html,\ + license/,\ + src/mappings/ +jars.compile.order = net.sourceforge.exmmt.jar +src.includes = plugin.xml,\ + src/,\ + resources/,\ + lib/,\ + META-INF/,\ + about.html,\ + license/ +source.net.sourceforge.exmmt.jar = src/java/ +output.net.sourceforge.exmmt.jar = bin/ +src.excludes = src/java/ Copied: net.sourceforge.exmmt/trunk/lib (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/lib) Copied: net.sourceforge.exmmt/trunk/license (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/license) Copied: net.sourceforge.exmmt/trunk/plugin.xml (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/plugin.xml) =================================================================== --- net.sourceforge.exmmt/trunk/plugin.xml (rev 0) +++ net.sourceforge.exmmt/trunk/plugin.xml 2006-05-17 13:52:33 UTC (rev 17) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + + <extension point="org.eclipse.ui.editors"> + <editor + class="net.sourceforge.exmmt.ModelEditor" + extensions="xml" + icon="resources/icons/editor.gif" + id="net.sourceforge.exmmt.ModelEditor" + name="Model Editor"/> + </extension> + +</plugin> Copied: net.sourceforge.exmmt/trunk/resources (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/resources) Copied: net.sourceforge.exmmt/trunk/src (from rev 16, net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/src) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 13:44:08
|
Revision: 16 Author: lgrammel Date: 2006-05-17 06:43:53 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=16&view=rev Log Message: ----------- #1490257 change subversion directory infrastructure to support tags Added Paths: ----------- net.sourceforge.exmmt/trunk/net.sourceforge.exmmt/ Removed Paths: ------------- net.sourceforge.exmmt/.classpath net.sourceforge.exmmt/.project net.sourceforge.exmmt/META-INF/ net.sourceforge.exmmt/about.html net.sourceforge.exmmt/build.properties net.sourceforge.exmmt/lib/ net.sourceforge.exmmt/license/ net.sourceforge.exmmt/net.sourceforge.exmmt/ net.sourceforge.exmmt/plugin.xml net.sourceforge.exmmt/resources/ net.sourceforge.exmmt/src/ Deleted: net.sourceforge.exmmt/.classpath =================================================================== --- net.sourceforge.exmmt/.classpath 2006-05-17 13:41:37 UTC (rev 15) +++ net.sourceforge.exmmt/.classpath 2006-05-17 13:43:53 UTC (rev 16) @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/java"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="lib" path="lib/jaxen-core.jar"/> - <classpathentry kind="lib" path="lib/jaxen-jdom.jar"/> - <classpathentry kind="lib" path="lib/org.jdom.jar"/> - <classpathentry kind="lib" path="lib/saxpath.jar"/> - <classpathentry kind="output" path="bin"/> -</classpath> Deleted: net.sourceforge.exmmt/.project =================================================================== --- net.sourceforge.exmmt/.project 2006-05-17 13:41:37 UTC (rev 15) +++ net.sourceforge.exmmt/.project 2006-05-17 13:43:53 UTC (rev 16) @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>net.sourceforge.exmmt</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> Deleted: net.sourceforge.exmmt/about.html =================================================================== --- net.sourceforge.exmmt/about.html 2006-05-17 13:41:37 UTC (rev 15) +++ net.sourceforge.exmmt/about.html 2006-05-17 13:43:53 UTC (rev 16) @@ -1,17 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> -<html> -<head> -<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> -<title>Plugin License Information</title> -</head> - -<body lang="EN-US" link=blue vlink=purple> -<h2>Plugin License Information</h2> - -This plugin is available under the terms of <a href="license/net.sourceforge.exmmt.html">CPL</a>. - -The JDOM library contained in this plugin is available under the terms -of the <a href="license/jdom.txt">JDOM license</a>. - -</body> -</html> \ No newline at end of file Deleted: net.sourceforge.exmmt/build.properties =================================================================== --- net.sourceforge.exmmt/build.properties 2006-05-17 13:41:37 UTC (rev 15) +++ net.sourceforge.exmmt/build.properties 2006-05-17 13:43:53 UTC (rev 16) @@ -1,19 +0,0 @@ -bin.includes = META-INF/,\ - plugin.xml,\ - resources/,\ - net.sourceforge.exmmt.jar,\ - lib/,\ - about.html,\ - license/,\ - src/mappings/ -jars.compile.order = net.sourceforge.exmmt.jar -src.includes = plugin.xml,\ - src/,\ - resources/,\ - lib/,\ - META-INF/,\ - about.html,\ - license/ -source.net.sourceforge.exmmt.jar = src/java/ -output.net.sourceforge.exmmt.jar = bin/ -src.excludes = src/java/ Deleted: net.sourceforge.exmmt/plugin.xml =================================================================== --- net.sourceforge.exmmt/plugin.xml 2006-05-17 13:41:37 UTC (rev 15) +++ net.sourceforge.exmmt/plugin.xml 2006-05-17 13:43:53 UTC (rev 16) @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.0"?> -<plugin> - - <extension point="org.eclipse.ui.editors"> - <editor - class="net.sourceforge.exmmt.ModelEditor" - extensions="xml" - icon="resources/icons/editor.gif" - id="net.sourceforge.exmmt.ModelEditor" - name="Model Editor"/> - </extension> - -</plugin> Copied: net.sourceforge.exmmt/trunk/net.sourceforge.exmmt (from rev 15, net.sourceforge.exmmt/net.sourceforge.exmmt) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 13:41:43
|
Revision: 15 Author: lgrammel Date: 2006-05-17 06:41:37 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=15&view=rev Log Message: ----------- Added Paths: ----------- net.sourceforge.exmmt/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 13:26:38
|
Revision: 14 Author: lgrammel Date: 2006-05-17 06:26:08 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=14&view=rev Log Message: ----------- 0.0.1 Added Paths: ----------- net.sourceforge.exmmt/net.sourceforge.exmmt/ net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF net.sourceforge.exmmt/net.sourceforge.exmmt/about.html net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties net.sourceforge.exmmt/net.sourceforge.exmmt/lib/ net.sourceforge.exmmt/net.sourceforge.exmmt/license/ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java Removed Paths: ------------- net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java Copied: net.sourceforge.exmmt/net.sourceforge.exmmt (from rev 6, net.sourceforge.exmmt) Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath =================================================================== --- net.sourceforge.exmmt/.classpath 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath 2006-05-17 13:26:08 UTC (rev 14) @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src/java"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath (from rev 10, net.sourceforge.exmmt/.classpath) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/.classpath 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="lib" path="lib/jaxen-core.jar"/> + <classpathentry kind="lib" path="lib/jaxen-jdom.jar"/> + <classpathentry kind="lib" path="lib/org.jdom.jar"/> + <classpathentry kind="lib" path="lib/saxpath.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF =================================================================== --- net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-17 13:26:08 UTC (rev 14) @@ -1,17 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Eclipse XML Meta-Modeling Tools -Bundle-SymbolicName: net.sourceforge.exmmt;singleton:=true -Bundle-Version: 0.0.1 -Bundle-Vendor: exmmt.sourceforge.net project -Bundle-Localization: plugin -Bundle-ClassPath: org.nomadpim.ide.jar -Eclipse-LazyStart: true -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.views, - org.eclipse.ui.editors, - org.eclipse.ui.ide, - org.eclipse.core.resources, - org.jdom -Export-Package: net.sourceforge.exmmt Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF (from rev 10, net.sourceforge.exmmt/META-INF/MANIFEST.MF) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Eclipse XML Meta-Modeling Tools +Bundle-SymbolicName: net.sourceforge.exmmt;singleton:=true +Bundle-Version: 0.0.1 +Bundle-Vendor: exmmt.sourceforge.net project +Bundle-Localization: plugin +Bundle-ClassPath: net.sourceforge.exmmt.jar, + lib/jaxen-core.jar, + lib/jaxen-jdom.jar, + lib/org.jdom.jar, + lib/saxpath.jar +Eclipse-LazyStart: true +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui.views, + org.eclipse.ui.editors, + org.eclipse.ui.ide, + org.eclipse.core.resources +Export-Package: net.sourceforge.exmmt Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/about.html (from rev 12, net.sourceforge.exmmt/about.html) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/about.html (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/about.html 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,17 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<html> +<head> +<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> +<title>Plugin License Information</title> +</head> + +<body lang="EN-US" link=blue vlink=purple> +<h2>Plugin License Information</h2> + +This plugin is available under the terms of <a href="license/net.sourceforge.exmmt.html">CPL</a>. + +The JDOM library contained in this plugin is available under the terms +of the <a href="license/jdom.txt">JDOM license</a>. + +</body> +</html> \ No newline at end of file Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties =================================================================== --- net.sourceforge.exmmt/build.properties 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties 2006-05-17 13:26:08 UTC (rev 14) @@ -1,10 +0,0 @@ -bin.includes = META-INF/,\ - org.nomadpim.ide.jar,\ - plugin.xml,\ - resources/ -jars.compile.order = org.nomadpim.ide.jar -source.org.nomadpim.ide.jar = src/java/ -output.org.nomadpim.ide.jar = bin/ -src.includes = plugin.xml,\ - src/,\ - resources/ Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties (from rev 13, net.sourceforge.exmmt/build.properties) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/build.properties 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,19 @@ +bin.includes = META-INF/,\ + plugin.xml,\ + resources/,\ + net.sourceforge.exmmt.jar,\ + lib/,\ + about.html,\ + license/,\ + src/mappings/ +jars.compile.order = net.sourceforge.exmmt.jar +src.includes = plugin.xml,\ + src/,\ + resources/,\ + lib/,\ + META-INF/,\ + about.html,\ + license/ +source.net.sourceforge.exmmt.jar = src/java/ +output.net.sourceforge.exmmt.jar = bin/ +src.excludes = src/java/ Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/lib (from rev 10, net.sourceforge.exmmt/lib) Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/license (from rev 12, net.sourceforge.exmmt/license) Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,56 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import java.util.ArrayList; -import java.util.List; - -public class Area implements IModelElement { - - private List<IModelElement> children = new ArrayList<IModelElement>(); - - private final int indent; - - public Area(int indent, IModelElement... children) { - assert indent >= 0; - - this.indent = indent; - - for (IModelElement element : children) { - add(element); - } - } - - public void add(IModelElement element) { - this.children.add(element); - } - - public void accept(IModelElementVisitor visitor) { - visitor.areaStart(this); - - for (IModelElement child : children) { - child.accept(visitor); - } - - visitor.areaEnd(this); - } - - public void insertBefore(AdditionPoint point, IModelElement element) { - children.add(children.indexOf(point), element); - } - - public int getIndent() { - return indent; - } - -} Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java (from rev 11, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,56 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +public class Area implements IModelElement { + + private List<IModelElement> children = new ArrayList<IModelElement>(); + + private final int indent; + + public Area(int indent, IModelElement... children) { + assert indent >= 0; + + this.indent = indent; + + for (IModelElement element : children) { + add(element); + } + } + + public void add(IModelElement element) { + this.children.add(element); + } + + public void accept(IModelElementVisitor visitor) { + visitor.areaStart(this); + + for (IModelElement child : children) { + child.accept(visitor); + } + + visitor.areaEnd(this); + } + + public void insertBefore(AdditionPoint point, IModelElement element) { + children.add(children.indexOf(point), element); + } + + public int getIndent() { + return indent; + } + +} Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,149 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.graphics.TextLayout; -import org.eclipse.swt.widgets.Caret; - -public final class DisplayVisitor implements IModelElementVisitor { - - private final TextLayout layout; - - private final GC gc; - - private int xPosition = 0; - - private int yPosition = 0; - - private Color color; - - private Color color2; - - private Color color3; - - private IFocusChecker focusChecker; - - private Caret caret; - - private List<Area> areaStack = new ArrayList<Area>(); - - public DisplayVisitor(GC gc, Color color, Color color2, Color color3, - IFocusChecker focusChecker, Caret caret) { - assert gc != null; - - this.caret = caret; - this.focusChecker = focusChecker; - this.color = color; - this.color2 = color2; - this.color3 = color3; - this.gc = gc; - this.layout = new TextLayout(gc.getDevice()); - - layout.setFont(gc.getFont()); - } - - public void areaEnd(Area area) { - areaStack.remove(0); - } - - public void areaStart(Area area) { - areaStack.add(0, area); - } - - public void dispose() { - layout.dispose(); - } - - public void lineEnd(Line line) { - yPosition += layout.getBounds().height; - } - - public void lineStart(Line line) { - int sum = 0; - for (Area area : areaStack) { - sum += area.getIndent(); - } - - xPosition = sum; - } - - public void visit(AdditionPoint point) { - boolean hasFocus = focusChecker.hasFocus(point); - if (hasFocus) { - gc.setBackground(color3); - } else { - gc.setBackground(color2); - } - - gc.drawText("+", xPosition, yPosition); - layout.setText("+"); - Rectangle bounds = layout.getBounds(); - - xPosition = 0; - yPosition += layout.getBounds().height; - - if (hasFocus) { - caret.setVisible(false); - } - - gc.setBackground(color); - } - - public void visit(FixedLiteral literal) { - visit((Literal) literal); - } - - public void visit(Literal literal) { - gc.drawText(literal.getValue(), xPosition, yPosition); - layout.setText(literal.getValue()); - Rectangle bounds = layout.getBounds(); - - bounds.x = xPosition; - bounds.y = yPosition; - - literal.setBounds(bounds); - - xPosition += bounds.width; - } - - public void visit(VariableLiteral literal) { - boolean hasFocus = focusChecker.hasFocus(literal); - if (hasFocus) { - gc.setBackground(color3); - } else { - gc.setBackground(color2); - } - - visit((Literal) literal); - - if (hasFocus) { - caret.setSize(2, literal.getBounds().height); - caret.setVisible(true); - - String part = literal.getValue().substring(0, literal.getCaretPosition()); - layout.setText(part); - Rectangle bounds = layout.getBounds(); - - caret.setLocation(literal.getBounds().x + bounds.width, literal.getBounds().y); - } - - gc.setBackground(color); - } - -} \ No newline at end of file Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java (from rev 11, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,149 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.TextLayout; +import org.eclipse.swt.widgets.Caret; + +public final class DisplayVisitor implements IModelElementVisitor { + + private final TextLayout layout; + + private final GC gc; + + private int xPosition = 0; + + private int yPosition = 0; + + private Color color; + + private Color color2; + + private Color color3; + + private IFocusChecker focusChecker; + + private Caret caret; + + private List<Area> areaStack = new ArrayList<Area>(); + + public DisplayVisitor(GC gc, Color color, Color color2, Color color3, + IFocusChecker focusChecker, Caret caret) { + assert gc != null; + + this.caret = caret; + this.focusChecker = focusChecker; + this.color = color; + this.color2 = color2; + this.color3 = color3; + this.gc = gc; + this.layout = new TextLayout(gc.getDevice()); + + layout.setFont(gc.getFont()); + } + + public void areaEnd(Area area) { + areaStack.remove(0); + } + + public void areaStart(Area area) { + areaStack.add(0, area); + } + + public void dispose() { + layout.dispose(); + } + + public void lineEnd(Line line) { + yPosition += layout.getBounds().height; + } + + public void lineStart(Line line) { + int sum = 0; + for (Area area : areaStack) { + sum += area.getIndent(); + } + + xPosition = sum; + } + + public void visit(AdditionPoint point) { + boolean hasFocus = focusChecker.hasFocus(point); + if (hasFocus) { + gc.setBackground(color3); + } else { + gc.setBackground(color2); + } + + gc.drawText("+", xPosition, yPosition); + layout.setText("+"); + Rectangle bounds = layout.getBounds(); + + xPosition = 0; + yPosition += layout.getBounds().height; + + if (hasFocus) { + caret.setVisible(false); + } + + gc.setBackground(color); + } + + public void visit(FixedLiteral literal) { + visit((Literal) literal); + } + + public void visit(Literal literal) { + gc.drawText(literal.getValue(), xPosition, yPosition); + layout.setText(literal.getValue()); + Rectangle bounds = layout.getBounds(); + + bounds.x = xPosition; + bounds.y = yPosition; + + literal.setBounds(bounds); + + xPosition += bounds.width; + } + + public void visit(VariableLiteral literal) { + boolean hasFocus = focusChecker.hasFocus(literal); + if (hasFocus) { + gc.setBackground(color3); + } else { + gc.setBackground(color2); + } + + visit((Literal) literal); + + if (hasFocus) { + caret.setSize(2, literal.getBounds().height); + caret.setVisible(true); + + String part = literal.getValue().substring(0, literal.getCaretPosition()); + layout.setText(part); + Rectangle bounds = layout.getBounds(); + + caret.setLocation(literal.getBounds().x + bounds.width, literal.getBounds().y); + } + + gc.setBackground(color); + } + +} \ No newline at end of file Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,21 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import org.jdom.Element; - -public interface IMetaModelElement { - - IModelElement create(Element element, IModelElement parent); - -} Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java (from rev 11, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,21 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.jdom.Element; + +public interface IMetaModelElement { + + IModelElement create(Element element, IModelElement parent); + +} Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,331 +0,0 @@ -/* $HeadURL$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.EditorPart; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; - -public class ModelEditor extends EditorPart { - - final static boolean IS_CARBON, IS_GTK, IS_MOTIF; - - // TODO move / change - static { - String platform = SWT.getPlatform(); - IS_CARBON = "carbon".equals(platform); - IS_GTK = "gtk".equals(platform); - IS_MOTIF = "motif".equals(platform); - } - - IModelElement selectedLiteral; - - IModelElement rootArea; - - private Canvas control; - - private Document document; - - private boolean dirty = false; - - private IFile file; - - private Map<String, IMetaModelElement> metaModelMap; - - @Override - public void createPartControl(Composite parent) { - control = new ModelText(this, parent, SWT.NONE); - } - - @Override - public void dispose() { - if (control != null) { - control.dispose(); - } - - super.dispose(); - } - - @Override - public void doSave(IProgressMonitor monitor) { - try { - // write the document back - XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - - outputter.output(document, out); - - out.flush(); - out.close(); - - ByteArrayInputStream in = new ByteArrayInputStream(out - .toByteArray()); - - file.setContents(in, true, true, null); - - dirty = false; - firePropertyChange(PROP_DIRTY); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - @Override - public void doSaveAs() { - } - - public Document getMappingFile() throws JDOMException, IOException { - String mappingFile = document.getRootElement().getAttributeValue( - "file", document.getRootElement().getNamespace("mapping")); - - System.out.println(mappingFile); - - IPath projectLocation = file.getProject().getLocation(); - IPath path2 = projectLocation.append(file.getProjectRelativePath() - .removeLastSegments(1)); - IPath path = path2.append(mappingFile); - - SAXBuilder builder = new SAXBuilder(); - return builder.build(path.toFile()); - } - - @Override - public void init(IEditorSite site, IEditorInput input) - throws PartInitException { - setSite(site); - setInput(input); - - file = (IFile) input.getAdapter(IFile.class); - try { - document = new SAXBuilder().build(file.getContents()); - System.out.println(document); - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - createMetaModelMap(); - rootArea = metaModelMap.get(document.getRootElement().getName()) - .create(document.getRootElement(), null); - selectedLiteral = getNavigationElements().get(0); - } - - @Override - public boolean isDirty() { - return dirty; - } - - @Override - public boolean isSaveAsAllowed() { - return false; - } - - @Override - public void setFocus() { - } - - void handleKeyDown(Event event) { - System.out.println(event); - - // TODO refactor - if (((event.keyCode == SWT.TAB) && ((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) - || event.keyCode == SWT.ARROW_UP) { - int index = getNavigationElements().indexOf(selectedLiteral) - 1; - if (index < 0) { - index = getNavigationElements().size() - 1; - } - selectedLiteral = getNavigationElements().get(index); - control.redraw(); - } else if (((event.keyCode == SWT.TAB) && !((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) - || event.keyCode == SWT.ARROW_DOWN) { - int index = getNavigationElements().indexOf(selectedLiteral) + 1; - if (index >= getNavigationElements().size()) { - index = 0; - } - selectedLiteral = getNavigationElements().get(index); - control.redraw(); - } else if (event.keyCode == SWT.ARROW_RIGHT - && selectedLiteral instanceof VariableLiteral) { - - VariableLiteral literal = (VariableLiteral) selectedLiteral; - - literal.setCaretPosition(literal.getCaretPosition() + 1); - control.redraw(); - } else if (event.keyCode == SWT.ARROW_LEFT - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - literal.setCaretPosition(literal.getCaretPosition() - 1); - control.redraw(); - } else if (event.keyCode == SWT.CR - && selectedLiteral instanceof AdditionPoint) { - AdditionPoint literal = (AdditionPoint) selectedLiteral; - literal.execute(); - control.redraw(); - } else if (event.keyCode == SWT.DEL - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() < literal.getValue().length()) { - StringBuffer value = new StringBuffer(literal.getValue()); - value.deleteCharAt(literal.getCaretPosition()); - literal.setValue(value.toString()); - changed(); - control.redraw(); - } - } else if (event.keyCode == SWT.BS - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() > 0) { - StringBuffer value = new StringBuffer(literal.getValue()); - value.deleteCharAt(literal.getCaretPosition() - 1); - literal.setValue(value.toString()); - literal.setCaretPosition(literal.getCaretPosition() - 1); - changed(); - control.redraw(); - } - } else if (isValidCharacter(event.stateMask, event.character) - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - StringBuffer value = new StringBuffer(literal.getValue()); - value.insert(literal.getCaretPosition(), event.character); - literal.setValue(value.toString()); - literal.setCaretPosition(literal.getCaretPosition() + 1); - changed(); - control.redraw(); - } - } - - private void changed() { - dirty = true; - firePropertyChange(PROP_DIRTY); - } - - private void createMetaModelMap() { - metaModelMap = new HashMap<String, IMetaModelElement>(); - Map<String, IMetaMetaModelElement> metaMetaModelMap = createMetaMetaModelMap(); - - try { - Document mappingFile = getMappingFile(); - - Element rootElement = mappingFile.getRootElement(); - List<Element> mappings = rootElement.getChildren("mapping"); - - for (Element mappingElement : mappings) { - Element configuration = (Element) mappingElement.getChildren() - .get(0); - - IMetaMetaModelElement metaMetaModelElement = metaMetaModelMap - .get(configuration.getName()); - IMetaModelElement metaModelElement = metaMetaModelElement - .create(configuration, metaMetaModelMap, metaModelMap); - - metaModelMap.put(mappingElement.getAttributeValue("select"), - metaModelElement); - } - - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - private Map<String, IMetaMetaModelElement> createMetaMetaModelMap() { - Map<String, IMetaMetaModelElement> metaMappingMap = new HashMap<String, IMetaMetaModelElement>(); - - metaMappingMap.put("area", new AreaFactoryFactory()); - metaMappingMap.put("line", new LineFactoryFactory()); - metaMappingMap.put("edit", new VariableFactoryFactory()); - metaMappingMap.put("literal", new FixedLiteralFactoryFactory()); - metaMappingMap.put("apply-mappings", new ApplyMappingsFactoryFactory()); - metaMappingMap.put("addition-point", new AdditionPointFactoryFactory()); - - return metaMappingMap; - } - - // TODO performance: use caching instead of recalculation - private List<IModelElement> getNavigationElements() { - NavigationElementSearcher visitor = new NavigationElementSearcher(); - - rootArea.accept(visitor); - - return visitor.getNavigationElements(); - } - - private boolean isValidCharacter(int stateMask, char character) { - boolean ignore = false; - - if (IS_CARBON) { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Do not - // ignore COMMAND+ALT combinations since that key sequence - // produces characters on the mac. - ignore = (stateMask ^ SWT.COMMAND) == 0 - || (stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0; - } else if (IS_MOTIF) { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Do not - // ignore ALT combinations since this key sequence - // produces characters on motif. - ignore = (stateMask ^ SWT.CTRL) == 0 - || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; - } else { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Don't - // ignore CTRL+ALT combinations since that is the Alt Gr - // key on some keyboards. See bug 20953. - ignore = (stateMask ^ SWT.ALT) == 0 || (stateMask ^ SWT.CTRL) == 0 - || (stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 - || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; - } - boolean isCharacter = !ignore && character > 31 && character != SWT.DEL; - // -ignore anything below SPACE except for line delimiter keys and tab. - // -ignore DEL - return isCharacter; - } -} Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java (from rev 9, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,317 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.EditorPart; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.JDOMException; +import org.jdom.input.SAXBuilder; +import org.jdom.output.Format; +import org.jdom.output.XMLOutputter; + +public class ModelEditor extends EditorPart { + + final static boolean IS_CARBON, IS_GTK, IS_MOTIF; + + // TODO move / change + static { + String platform = SWT.getPlatform(); + IS_CARBON = "carbon".equals(platform); + IS_GTK = "gtk".equals(platform); + IS_MOTIF = "motif".equals(platform); + } + + IModelElement selectedLiteral; + + IModelElement rootArea; + + private Canvas control; + + private Document document; + + private boolean dirty = false; + + private IFile file; + + private Map<String, IMetaModelElement> metaModelMap; + + @Override + public void createPartControl(Composite parent) { + control = new ModelText(this, parent, SWT.NONE); + } + + @Override + public void dispose() { + if (control != null) { + control.dispose(); + } + + super.dispose(); + } + + @Override + public void doSave(IProgressMonitor monitor) { + try { + // write the document back + XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + outputter.output(document, out); + + out.flush(); + out.close(); + + ByteArrayInputStream in = new ByteArrayInputStream(out + .toByteArray()); + + file.setContents(in, true, true, null); + + dirty = false; + firePropertyChange(PROP_DIRTY); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Override + public void doSaveAs() { + } + + public Document getMappingFile() throws JDOMException, IOException { + String mappingFile = document.getRootElement().getAttributeValue( + "file", document.getRootElement().getNamespace("mapping")); + + System.out.println(mappingFile); + + IPath projectLocation = file.getProject().getLocation(); + IPath path2 = projectLocation.append(file.getProjectRelativePath() + .removeLastSegments(1)); + IPath path = path2.append(mappingFile); + + SAXBuilder builder = new SAXBuilder(); + return builder.build(path.toFile()); + } + + @Override + public void init(IEditorSite site, IEditorInput input) + throws PartInitException { + setSite(site); + setInput(input); + + file = (IFile) input.getAdapter(IFile.class); + try { + document = new SAXBuilder().build(file.getContents()); + System.out.println(document); + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + createMetaModelMap(); + rootArea = metaModelMap.get(document.getRootElement().getName()) + .create(document.getRootElement(), null); + selectedLiteral = getNavigationElements().get(0); + } + + @Override + public boolean isDirty() { + return dirty; + } + + @Override + public boolean isSaveAsAllowed() { + return false; + } + + @Override + public void setFocus() { + } + + void handleKeyDown(Event event) { + System.out.println(event); + + // TODO refactor + if (((event.keyCode == SWT.TAB) && ((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_UP) { + int index = getNavigationElements().indexOf(selectedLiteral) - 1; + if (index < 0) { + index = getNavigationElements().size() - 1; + } + selectedLiteral = getNavigationElements().get(index); + control.redraw(); + } else if (((event.keyCode == SWT.TAB) && !((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_DOWN) { + int index = getNavigationElements().indexOf(selectedLiteral) + 1; + if (index >= getNavigationElements().size()) { + index = 0; + } + selectedLiteral = getNavigationElements().get(index); + control.redraw(); + } else if (selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + if (event.keyCode == SWT.ARROW_RIGHT) { + literal.setCaretPosition(literal.getCaretPosition() + 1); + } else if (event.keyCode == SWT.ARROW_LEFT) { + literal.setCaretPosition(literal.getCaretPosition() - 1); + } else if (event.keyCode == SWT.DEL + && (literal.getCaretPosition() < literal.getValue() + .length())) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition()); + literal.setValue(value.toString()); + changed(); + } else if (event.keyCode == SWT.BS + && (literal.getCaretPosition() > 0)) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition() - 1); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() - 1); + changed(); + } else if (isValidCharacter(event.stateMask, event.character)) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.insert(literal.getCaretPosition(), event.character); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() + 1); + changed(); + } + control.redraw(); + } else if (event.keyCode == SWT.CR + && selectedLiteral instanceof AdditionPoint) { + AdditionPoint literal = (AdditionPoint) selectedLiteral; + literal.execute(); + control.redraw(); + } + } + + private void changed() { + dirty = true; + firePropertyChange(PROP_DIRTY); + } + + private void createMetaModelMap() { + metaModelMap = new HashMap<String, IMetaModelElement>(); + Map<String, IMetaMetaModelElement> metaMetaModelMap = createMetaMetaModelMap(); + + try { + Document mappingFile = getMappingFile(); + + Element rootElement = mappingFile.getRootElement(); + List<Element> mappings = rootElement.getChildren("mapping"); + + for (Element mappingElement : mappings) { + Element configuration = (Element) mappingElement.getChildren() + .get(0); + + IMetaMetaModelElement metaMetaModelElement = metaMetaModelMap + .get(configuration.getName()); + IMetaModelElement metaModelElement = metaMetaModelElement + .create(configuration, metaMetaModelMap, metaModelMap); + + metaModelMap.put(mappingElement.getAttributeValue("select"), + metaModelElement); + } + + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + private Map<String, IMetaMetaModelElement> createMetaMetaModelMap() { + Map<String, IMetaMetaModelElement> metaMappingMap = new HashMap<String, IMetaMetaModelElement>(); + + metaMappingMap.put("area", new AreaFactoryFactory()); + metaMappingMap.put("line", new LineFactoryFactory()); + metaMappingMap.put("edit", new VariableFactoryFactory()); + metaMappingMap.put("literal", new FixedLiteralFactoryFactory()); + metaMappingMap.put("apply-mappings", new ApplyMappingsFactoryFactory()); + metaMappingMap.put("addition-point", new AdditionPointFactoryFactory()); + + return metaMappingMap; + } + + // TODO performance: use caching instead of recalculation + private List<IModelElement> getNavigationElements() { + NavigationElementSearcher visitor = new NavigationElementSearcher(); + + rootArea.accept(visitor); + + return visitor.getNavigationElements(); + } + + private boolean isValidCharacter(int stateMask, char character) { + boolean ignore = false; + + if (IS_CARBON) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore COMMAND+ALT combinations since that key sequence + // produces characters on the mac. + ignore = (stateMask ^ SWT.COMMAND) == 0 + || (stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0; + } else if (IS_MOTIF) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore ALT combinations since this key sequence + // produces characters on motif. + ignore = (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } else { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Don't + // ignore CTRL+ALT combinations since that is the Alt Gr + // key on some keyboards. See bug 20953. + ignore = (stateMask ^ SWT.ALT) == 0 || (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } + boolean isCharacter = !ignore && character > 31 && character != SWT.DEL; + // -ignore anything below SPACE except for line delimiter keys and tab. + // -ignore DEL + return isCharacter; + } +} Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,93 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.RGB; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Caret; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public class ModelText extends Canvas { - - /** - * - */ - private final ModelEditor editor; - - private Listener listener; - - private Caret caret; - - public ModelText(ModelEditor editor, Composite parent, int style) { - super(parent, style); - this.editor = editor; - - listener = new Listener() { - public void handleEvent(Event event) { - switch (event.type) { - case SWT.Paint: - handlePaint(event); - break; - case SWT.KeyDown: - ModelText.this.editor.handleKeyDown(event); - break; - } - } - - }; - addListener(SWT.Paint, listener); - addListener(SWT.KeyDown, listener); - - caret = new Caret(this, SWT.NULL); - setCaret(caret); - } - - public void dispose() { - caret.dispose(); - super.dispose(); - } - - void handlePaint(Event event) { - System.out.println("handlePaint"); - GC gc = event.gc; - - Color color = new Color(gc.getDevice(), new RGB(255, 255, 255)); - Color color2 = new Color(gc.getDevice(), new RGB(200, 255, 255)); - Color color3 = new Color(gc.getDevice(), new RGB(255, 200, 200)); - gc.setBackground(color); - drawBackground(gc, getClientArea().x, getClientArea().y, - getClientArea().width, getClientArea().height); - - DisplayVisitor visitor = new DisplayVisitor(gc, color, color2, - color3, new IFocusChecker() { - - public boolean hasFocus(IModelElement l) { - return l == ModelText.this.editor.selectedLiteral; - } - - }, caret); - - this.editor.rootArea.accept(visitor); - - color.dispose(); - color2.dispose(); - color3.dispose(); - visitor.dispose(); - } - -} \ No newline at end of file Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java (from rev 11, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,93 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Caret; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; + +public class ModelText extends Canvas { + + /** + * + */ + private final ModelEditor editor; + + private Listener listener; + + private Caret caret; + + public ModelText(ModelEditor editor, Composite parent, int style) { + super(parent, style); + this.editor = editor; + + listener = new Listener() { + public void handleEvent(Event event) { + switch (event.type) { + case SWT.Paint: + handlePaint(event); + break; + case SWT.KeyDown: + ModelText.this.editor.handleKeyDown(event); + break; + } + } + + }; + addListener(SWT.Paint, listener); + addListener(SWT.KeyDown, listener); + + caret = new Caret(this, SWT.NULL); + setCaret(caret); + } + + public void dispose() { + caret.dispose(); + super.dispose(); + } + + void handlePaint(Event event) { + System.out.println("handlePaint"); + GC gc = event.gc; + + Color color = new Color(gc.getDevice(), new RGB(255, 255, 255)); + Color color2 = new Color(gc.getDevice(), new RGB(200, 255, 255)); + Color color3 = new Color(gc.getDevice(), new RGB(255, 200, 200)); + gc.setBackground(color); + drawBackground(gc, getClientArea().x, getClientArea().y, + getClientArea().width, getClientArea().height); + + DisplayVisitor visitor = new DisplayVisitor(gc, color, color2, + color3, new IFocusChecker() { + + public boolean hasFocus(IModelElement l) { + return l == ModelText.this.editor.selectedLiteral; + } + + }, caret); + + this.editor.rootArea.accept(visitor); + + color.dispose(); + color2.dispose(); + color3.dispose(); + visitor.dispose(); + } + +} \ No newline at end of file Deleted: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-17 13:26:08 UTC (rev 14) @@ -1,54 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import java.util.ArrayList; -import java.util.List; - -/** - * Collects the display model elements that can be reached by the navigation model. This - * may be a problem in the future as the navigation model elements are not necessarily a - * subset of the display model elements (TODO is this true?). - */ -public final class NavigationElementSearcher implements - IModelElementVisitor { - - private List<IModelElement> navigationElements = new ArrayList<IModelElement>(); - - public void visit(AdditionPoint point) { - navigationElements.add(point); - } - - public void visit(VariableLiteral literal) { - navigationElements.add(literal); - } - - public void visit(FixedLiteral literal) { - } - - public void lineStart(Line line) { - } - - public void lineEnd(Line line) { - } - - public void areaStart(Area area) { - } - - public void areaEnd(Area area) { - } - - public List<IModelElement> getNavigationElements() { - return navigationElements; - } -} \ No newline at end of file Copied: net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java (from rev 7, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java) =================================================================== --- net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java (rev 0) +++ net.sourceforge.exmmt/net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-17 13:26:08 UTC (rev 14) @@ -0,0 +1,54 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +/** + * Collects the display model elements that can be reached by the navigation model. This + * may be a problem in the future as the navigation model elements are not necessarily a + * subset of the display model elements (TODO is this true?). + */ +public final class NavigationElementSearcher implements + IModelElementVisitor { + + private List<IModelElement> navigationElements = new ArrayList<IModelElement>(); + + public void visit(AdditionPoint point) { + navigationElements.add(point); + } + + public void visit(VariableLiteral literal) { + navigationElements.add(literal); + } + + public void visit(FixedLiteral literal) { + } + + public void lineStart(Line line) { + } + + public void lineEnd(Line line) { + } + + public void areaStart(Area area) { + } + + public void areaEnd(Area area) { + } + + public List<IModelElement> getNavigationElements() { + return navigationElements; + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 12:58:27
|
Revision: 13 Author: lgrammel Date: 2006-05-17 05:58:21 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=13&view=rev Log Message: ----------- #1490212 release net.sourceforge.exmmt 0.0.1 Modified Paths: -------------- net.sourceforge.exmmt/build.properties Modified: net.sourceforge.exmmt/build.properties =================================================================== --- net.sourceforge.exmmt/build.properties 2006-05-17 12:53:43 UTC (rev 12) +++ net.sourceforge.exmmt/build.properties 2006-05-17 12:58:21 UTC (rev 13) @@ -2,12 +2,18 @@ plugin.xml,\ resources/,\ net.sourceforge.exmmt.jar,\ - lib/ + lib/,\ + about.html,\ + license/,\ + src/mappings/ jars.compile.order = net.sourceforge.exmmt.jar src.includes = plugin.xml,\ src/,\ resources/,\ lib/,\ - META-INF/ + META-INF/,\ + about.html,\ + license/ source.net.sourceforge.exmmt.jar = src/java/ output.net.sourceforge.exmmt.jar = bin/ +src.excludes = src/java/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 12:53:58
|
Revision: 12 Author: lgrammel Date: 2006-05-17 05:53:43 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=12&view=rev Log Message: ----------- #1490215 license stuff Added Paths: ----------- net.sourceforge.exmmt/about.html net.sourceforge.exmmt/license/ net.sourceforge.exmmt/license/jdom.txt net.sourceforge.exmmt/license/net.sourceforge.exmmt.html Added: net.sourceforge.exmmt/about.html =================================================================== --- net.sourceforge.exmmt/about.html (rev 0) +++ net.sourceforge.exmmt/about.html 2006-05-17 12:53:43 UTC (rev 12) @@ -0,0 +1,17 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<html> +<head> +<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> +<title>Plugin License Information</title> +</head> + +<body lang="EN-US" link=blue vlink=purple> +<h2>Plugin License Information</h2> + +This plugin is available under the terms of <a href="license/net.sourceforge.exmmt.html">CPL</a>. + +The JDOM library contained in this plugin is available under the terms +of the <a href="license/jdom.txt">JDOM license</a>. + +</body> +</html> \ No newline at end of file Property changes on: net.sourceforge.exmmt/about.html ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/license/jdom.txt =================================================================== --- net.sourceforge.exmmt/license/jdom.txt (rev 0) +++ net.sourceforge.exmmt/license/jdom.txt 2006-05-17 12:53:43 UTC (rev 12) @@ -0,0 +1,56 @@ +/*-- + + $Id$ + + Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact <request_AT_jdom_DOT_org>. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management <request_AT_jdom_DOT_org>. + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Jason Hunter <jhunter_AT_jdom_DOT_org> and + Brett McLaughlin <brett_AT_jdom_DOT_org>. For more information + on the JDOM Project, please see <http://www.jdom.org/>. + + */ + Property changes on: net.sourceforge.exmmt/license/jdom.txt ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/license/net.sourceforge.exmmt.html =================================================================== --- net.sourceforge.exmmt/license/net.sourceforge.exmmt.html (rev 0) +++ net.sourceforge.exmmt/license/net.sourceforge.exmmt.html 2006-05-17 12:53:43 UTC (rev 12) @@ -0,0 +1,125 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> +<HTML> +<HEAD> +<TITLE>Common Public License - v 1.0</TITLE> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</HEAD> + +<BODY BGCOLOR="#FFFFFF" VLINK="#800000"> + + +<P ALIGN="CENTER"><B>Common Public License - v 1.0</B> +<P><B></B><FONT SIZE="3"></FONT> +<P><FONT SIZE="3"></FONT><FONT SIZE="2">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>1. DEFINITIONS</B></FONT> +<P><FONT SIZE="2">"Contribution" means:</FONT> + +<UL><FONT SIZE="2">a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and<BR CLEAR="LEFT"> +b) in the case of each subsequent Contributor:</FONT></UL> + + +<UL><FONT SIZE="2">i) changes to the Program, and</FONT></UL> + + +<UL><FONT SIZE="2">ii) additions to the Program;</FONT></UL> + + +<UL><FONT SIZE="2">where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. </FONT><FONT SIZE="2">A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. </FONT><FONT SIZE="2">Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. </FONT></UL> + +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Contributor" means any person or entity that distributes the Program.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. </FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">"Program" means the Contributions distributed in accordance with this Agreement.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.</FONT> +<P><FONT SIZE="2"><B></B></FONT> +<P><FONT SIZE="2"><B>2. GRANT OF RIGHTS</B></FONT> + +<UL><FONT SIZE="2"></FONT><FONT SIZE="2">a) </FONT><FONT SIZE="2">Subject to the terms of this Agreement, each Contributor hereby grants</FONT><FONT SIZE="2"> Recipient a non-exclusive, worldwide, royalty-free copyright license to</FONT><FONT SIZE="2" COLOR="#FF0000"> </FONT><FONT SIZE="2">reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.</FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2"></FONT><FONT SIZE="2">b) Subject to the terms of this Agreement, each Contributor hereby grants </FONT><FONT SIZE="2">Recipient a non-exclusive, worldwide,</FONT><FONT SIZE="2" COLOR="#008000"> </FONT><FONT SIZE="2">royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. </FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2">c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.</FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + + +<UL><FONT SIZE="2">d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. </FONT></UL> + + +<UL><FONT SIZE="2"></FONT></UL> + +<P><FONT SIZE="2"><B>3. REQUIREMENTS</B></FONT> +<P><FONT SIZE="2"><B></B>A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:</FONT> + +<UL><FONT SIZE="2">a) it complies with the terms and conditions of this Agreement; and</FONT></UL> + + +<UL><FONT SIZE="2">b) its license agreement:</FONT></UL> + + +<UL><FONT SIZE="2">i) effectively disclaims</FONT><FONT SIZE="2"> on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; </FONT></UL> + + +<UL><FONT SIZE="2">ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; </FONT></UL> + + +<UL><FONT SIZE="2">iii)</FONT><FONT SIZE="2"> states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and</FONT></UL> + + +<UL><FONT SIZE="2">iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.</FONT><FONT SIZE="2" COLOR="#0000FF"> </FONT><FONT SIZE="2" COLOR="#FF0000"></FONT></UL> + + +<UL><FONT SIZE="2" COLOR="#FF0000"></FONT><FONT SIZE="2"></FONT></UL> + +<P><FONT SIZE="2">When the Program is made available in source code form:</FONT> + +<UL><FONT SIZE="2">a) it must be made available under this Agreement; and </FONT></UL> + + +<UL><FONT SIZE="2">b) a copy of this Agreement must be included with each copy of the Program. </FONT></UL> + +<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT> +<P><FONT SIZE="2" COLOR="#0000FF"><STRIKE></STRIKE></FONT><FONT SIZE="2">Contributors may not remove or alter any copyright notices contained within the Program. </FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. </FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>4. COMMERCIAL DISTRIBUTION</B></FONT> +<P><FONT SIZE="2">Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2" COLOR="#0000FF"></FONT> +<P><FONT SIZE="2" COLOR="#0000FF"></FONT><FONT SIZE="2"><B>5. NO WARRANTY</B></FONT> +<P><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is</FONT><FONT SIZE="2"> solely responsible for determining the appropriateness of using and distributing </FONT><FONT SIZE="2">the Program</FONT><FONT SIZE="2"> and assumes all risks associated with its exercise of rights under this Agreement</FONT><FONT SIZE="2">, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, </FONT><FONT SIZE="2">programs or equipment, and unavailability or interruption of operations</FONT><FONT SIZE="2">. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"><B>6. DISCLAIMER OF LIABILITY</B></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES </FONT><FONT SIZE="2">(INCLUDING WITHOUT LIMITATION LOST PROFITS),</FONT><FONT SIZE="2"> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"><B>7. GENERAL</B></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. </FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2">Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to </FONT><FONT SIZE="2">publish new versions (including revisions) of this Agreement from time to </FONT><FONT SIZE="2">time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. </FONT><FONT SIZE="2">Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new </FONT><FONT SIZE="2">version. </FONT><FONT SIZE="2">Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, </FONT><FONT SIZE="2">by implication, estoppel or otherwise</FONT><FONT SIZE="2">.</FONT><FONT SIZE="2"> All rights in the Program not expressly granted under this Agreement are reserved.</FONT> +<P><FONT SIZE="2"></FONT> +<P><FONT SIZE="2">This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.</FONT> +<P><FONT SIZE="2"></FONT><FONT SIZE="2"></FONT> +<P><FONT SIZE="2"></FONT> + +</BODY> + +</HTML> \ No newline at end of file Property changes on: net.sourceforge.exmmt/license/net.sourceforge.exmmt.html ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 12:44:50
|
Revision: 11 Author: lgrammel Date: 2006-05-17 05:44:38 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=11&view=rev Log Message: ----------- #1490215 license stuff Modified Paths: -------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-17 12:38:56 UTC (rev 10) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-17 12:44:38 UTC (rev 11) @@ -1,4 +1,4 @@ -/* $RCSfile$ +/* $HeadURL$ * ----------------------------------------------------------------------------- * * Copyright (C) Lars Grammel and others. Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-17 12:38:56 UTC (rev 10) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-17 12:44:38 UTC (rev 11) @@ -1,4 +1,4 @@ -/* $RCSfile$ +/* $HeadURL$ * ----------------------------------------------------------------------------- * * Copyright (C) Lars Grammel and others. Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-17 12:38:56 UTC (rev 10) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-17 12:44:38 UTC (rev 11) @@ -1,4 +1,4 @@ -/* $RCSfile$ +/* $HeadURL$ * ----------------------------------------------------------------------------- * * Copyright (C) Lars Grammel and others. Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-17 12:38:56 UTC (rev 10) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-17 12:44:38 UTC (rev 11) @@ -1,4 +1,4 @@ -/* $RCSfile$ +/* $HeadURL$ * ----------------------------------------------------------------------------- * * Copyright (C) Lars Grammel and others. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-17 12:39:20
|
Revision: 10 Author: lgrammel Date: 2006-05-17 05:38:56 -0700 (Wed, 17 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=10&view=rev Log Message: ----------- #1490211 integrate jdom into net.sourceforge.exmmt plugin Modified Paths: -------------- net.sourceforge.exmmt/.classpath net.sourceforge.exmmt/META-INF/MANIFEST.MF net.sourceforge.exmmt/build.properties Added Paths: ----------- net.sourceforge.exmmt/lib/ net.sourceforge.exmmt/lib/jaxen-core.jar net.sourceforge.exmmt/lib/jaxen-jdom.jar net.sourceforge.exmmt/lib/org.jdom.jar net.sourceforge.exmmt/lib/saxpath.jar Modified: net.sourceforge.exmmt/.classpath =================================================================== --- net.sourceforge.exmmt/.classpath 2006-05-16 22:18:56 UTC (rev 9) +++ net.sourceforge.exmmt/.classpath 2006-05-17 12:38:56 UTC (rev 10) @@ -3,5 +3,9 @@ <classpathentry kind="src" path="src/java"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="lib" path="lib/jaxen-core.jar"/> + <classpathentry kind="lib" path="lib/jaxen-jdom.jar"/> + <classpathentry kind="lib" path="lib/org.jdom.jar"/> + <classpathentry kind="lib" path="lib/saxpath.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: net.sourceforge.exmmt/META-INF/MANIFEST.MF =================================================================== --- net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-16 22:18:56 UTC (rev 9) +++ net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-17 12:38:56 UTC (rev 10) @@ -5,13 +5,16 @@ Bundle-Version: 0.0.1 Bundle-Vendor: exmmt.sourceforge.net project Bundle-Localization: plugin -Bundle-ClassPath: org.nomadpim.ide.jar +Bundle-ClassPath: net.sourceforge.exmmt.jar, + lib/jaxen-core.jar, + lib/jaxen-jdom.jar, + lib/org.jdom.jar, + lib/saxpath.jar Eclipse-LazyStart: true Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ui.views, org.eclipse.ui.editors, org.eclipse.ui.ide, - org.eclipse.core.resources, - org.jdom + org.eclipse.core.resources Export-Package: net.sourceforge.exmmt Modified: net.sourceforge.exmmt/build.properties =================================================================== --- net.sourceforge.exmmt/build.properties 2006-05-16 22:18:56 UTC (rev 9) +++ net.sourceforge.exmmt/build.properties 2006-05-17 12:38:56 UTC (rev 10) @@ -1,10 +1,13 @@ bin.includes = META-INF/,\ - org.nomadpim.ide.jar,\ plugin.xml,\ - resources/ -jars.compile.order = org.nomadpim.ide.jar -source.org.nomadpim.ide.jar = src/java/ -output.org.nomadpim.ide.jar = bin/ + resources/,\ + net.sourceforge.exmmt.jar,\ + lib/ +jars.compile.order = net.sourceforge.exmmt.jar src.includes = plugin.xml,\ src/,\ - resources/ + resources/,\ + lib/,\ + META-INF/ +source.net.sourceforge.exmmt.jar = src/java/ +output.net.sourceforge.exmmt.jar = bin/ Added: net.sourceforge.exmmt/lib/jaxen-core.jar =================================================================== (Binary files differ) Property changes on: net.sourceforge.exmmt/lib/jaxen-core.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: net.sourceforge.exmmt/lib/jaxen-jdom.jar =================================================================== (Binary files differ) Property changes on: net.sourceforge.exmmt/lib/jaxen-jdom.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: net.sourceforge.exmmt/lib/org.jdom.jar =================================================================== (Binary files differ) Property changes on: net.sourceforge.exmmt/lib/org.jdom.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: net.sourceforge.exmmt/lib/saxpath.jar =================================================================== (Binary files differ) Property changes on: net.sourceforge.exmmt/lib/saxpath.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-16 22:19:02
|
Revision: 9 Author: lgrammel Date: 2006-05-16 15:18:56 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=9&view=rev Log Message: ----------- #1489785 refactor model editor Modified Paths: -------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 22:16:39 UTC (rev 8) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 22:18:56 UTC (rev 9) @@ -191,10 +191,8 @@ VariableLiteral literal = (VariableLiteral) selectedLiteral; if (event.keyCode == SWT.ARROW_RIGHT) { literal.setCaretPosition(literal.getCaretPosition() + 1); - control.redraw(); } else if (event.keyCode == SWT.ARROW_LEFT) { literal.setCaretPosition(literal.getCaretPosition() - 1); - control.redraw(); } else if (event.keyCode == SWT.DEL && (literal.getCaretPosition() < literal.getValue() .length())) { @@ -202,7 +200,6 @@ value.deleteCharAt(literal.getCaretPosition()); literal.setValue(value.toString()); changed(); - control.redraw(); } else if (event.keyCode == SWT.BS && (literal.getCaretPosition() > 0)) { StringBuffer value = new StringBuffer(literal.getValue()); @@ -210,15 +207,14 @@ literal.setValue(value.toString()); literal.setCaretPosition(literal.getCaretPosition() - 1); changed(); - control.redraw(); } else if (isValidCharacter(event.stateMask, event.character)) { StringBuffer value = new StringBuffer(literal.getValue()); value.insert(literal.getCaretPosition(), event.character); literal.setValue(value.toString()); literal.setCaretPosition(literal.getCaretPosition() + 1); changed(); - control.redraw(); } + control.redraw(); } else if (event.keyCode == SWT.CR && selectedLiteral instanceof AdditionPoint) { AdditionPoint literal = (AdditionPoint) selectedLiteral; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-16 22:16:45
|
Revision: 8 Author: lgrammel Date: 2006-05-16 15:16:39 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=8&view=rev Log Message: ----------- #1489785 refactor model editor Modified Paths: -------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 21:29:10 UTC (rev 7) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 22:16:39 UTC (rev 8) @@ -187,52 +187,42 @@ } selectedLiteral = getNavigationElements().get(index); control.redraw(); - } else if (event.keyCode == SWT.ARROW_RIGHT - && selectedLiteral instanceof VariableLiteral) { - + } else if (selectedLiteral instanceof VariableLiteral) { VariableLiteral literal = (VariableLiteral) selectedLiteral; - - literal.setCaretPosition(literal.getCaretPosition() + 1); - control.redraw(); - } else if (event.keyCode == SWT.ARROW_LEFT - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - literal.setCaretPosition(literal.getCaretPosition() - 1); - control.redraw(); - } else if (event.keyCode == SWT.CR - && selectedLiteral instanceof AdditionPoint) { - AdditionPoint literal = (AdditionPoint) selectedLiteral; - literal.execute(); - control.redraw(); - } else if (event.keyCode == SWT.DEL - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() < literal.getValue().length()) { + if (event.keyCode == SWT.ARROW_RIGHT) { + literal.setCaretPosition(literal.getCaretPosition() + 1); + control.redraw(); + } else if (event.keyCode == SWT.ARROW_LEFT) { + literal.setCaretPosition(literal.getCaretPosition() - 1); + control.redraw(); + } else if (event.keyCode == SWT.DEL + && (literal.getCaretPosition() < literal.getValue() + .length())) { StringBuffer value = new StringBuffer(literal.getValue()); value.deleteCharAt(literal.getCaretPosition()); literal.setValue(value.toString()); changed(); control.redraw(); - } - } else if (event.keyCode == SWT.BS - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() > 0) { + } else if (event.keyCode == SWT.BS + && (literal.getCaretPosition() > 0)) { StringBuffer value = new StringBuffer(literal.getValue()); value.deleteCharAt(literal.getCaretPosition() - 1); literal.setValue(value.toString()); literal.setCaretPosition(literal.getCaretPosition() - 1); changed(); control.redraw(); + } else if (isValidCharacter(event.stateMask, event.character)) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.insert(literal.getCaretPosition(), event.character); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() + 1); + changed(); + control.redraw(); } - } else if (isValidCharacter(event.stateMask, event.character) - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - StringBuffer value = new StringBuffer(literal.getValue()); - value.insert(literal.getCaretPosition(), event.character); - literal.setValue(value.toString()); - literal.setCaretPosition(literal.getCaretPosition() + 1); - changed(); + } else if (event.keyCode == SWT.CR + && selectedLiteral instanceof AdditionPoint) { + AdditionPoint literal = (AdditionPoint) selectedLiteral; + literal.execute(); control.redraw(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-16 21:29:15
|
Revision: 7 Author: lgrammel Date: 2006-05-16 14:29:10 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=7&view=rev Log Message: ----------- #1489785 refactor model editor Modified Paths: -------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-16 20:28:40 UTC (rev 6) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-16 21:29:10 UTC (rev 7) @@ -1,4 +1,4 @@ -/* $RCSfile$ +/* $HeadURL$ * ----------------------------------------------------------------------------- * * Copyright (C) Lars Grammel and others. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-16 20:29:15
|
Revision: 6 Author: lgrammel Date: 2006-05-16 13:28:40 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=6&view=rev Log Message: ----------- #1489785 refactor model editor Modified Paths: -------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableLiteral.java Added Paths: ----------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaMetaModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElementVisitor.java Removed Paths: ------------- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,11 +17,11 @@ import org.jdom.Element; -public class AdditionPoint implements IDisplayModelElement { +public class AdditionPoint implements IModelElement { private Element parent; - private Map<String, IDisplayMapping> mappingMap; + private Map<String, IMetaModelElement> mappingMap; private Area parentArea; @@ -30,7 +30,7 @@ private Map<String, String> defaultValueMap; public AdditionPoint(Element parent, - Map<String, IDisplayMapping> mappingMap, Area parentArea, + Map<String, IMetaModelElement> mappingMap, Area parentArea, Map<String, String> defaultValueMap, String childElementName) { assert parent != null; @@ -42,7 +42,7 @@ this.parentArea = parentArea; } - public void accept(IDisplayModelElementVisitor visitor) { + public void accept(IModelElementVisitor visitor) { visitor.visit(this); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -16,15 +16,15 @@ import org.jdom.Element; -public class AdditionPointFactory implements IDisplayMapping { +public class AdditionPointFactory implements IMetaModelElement { - private Map<String, IDisplayMapping> mappingMap; + private Map<String, IMetaModelElement> mappingMap; private String childElementName; private Map<String, String> defaultValueMap; - public AdditionPointFactory(Map<String, IDisplayMapping> mappingMap, + public AdditionPointFactory(Map<String, IMetaModelElement> mappingMap, Map<String, String> defaultValueMap, String childElementName) { this.defaultValueMap = defaultValueMap; @@ -32,7 +32,7 @@ this.mappingMap = mappingMap; } - public AdditionPoint create(Element element, IDisplayModelElement parent) { + public AdditionPoint create(Element element, IModelElement parent) { return new AdditionPoint(element, mappingMap, (Area) parent, defaultValueMap, childElementName); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -19,11 +19,11 @@ import org.jdom.Element; public class AdditionPointFactoryFactory implements - IDisplayElementFactoryFactory { + IMetaMetaModelElement { public AdditionPointFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { Map<String, String> defaultValueMap = new HashMap<String, String>(); Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -19,19 +19,19 @@ import org.jdom.JDOMException; import org.jdom.xpath.XPath; -public class ApplyMappingsFactory implements IDisplayMapping { +public class ApplyMappingsFactory implements IMetaModelElement { - private final Map<String, IDisplayMapping> mappingMap; + private final Map<String, IMetaModelElement> mappingMap; private final String selection; public ApplyMappingsFactory(String selection, - Map<String, IDisplayMapping> mappingMap) { + Map<String, IMetaModelElement> mappingMap) { this.selection = selection; this.mappingMap = mappingMap; } - public Area create(Element element, IDisplayModelElement parent) { + public Area create(Element element, IModelElement parent) { Area area = new Area(0); // use xpath Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,11 +17,11 @@ import org.jdom.Element; public class ApplyMappingsFactoryFactory implements - IDisplayElementFactoryFactory { + IMetaMetaModelElement { public ApplyMappingsFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { return new ApplyMappingsFactory( configuration.getAttributeValue("select"), mappings); Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-16 20:28:40 UTC (rev 6) @@ -15,37 +15,37 @@ import java.util.ArrayList; import java.util.List; -public class Area implements IDisplayModelElement { +public class Area implements IModelElement { - private List<IDisplayModelElement> children = new ArrayList<IDisplayModelElement>(); + private List<IModelElement> children = new ArrayList<IModelElement>(); private final int indent; - public Area(int indent, IDisplayModelElement... children) { + public Area(int indent, IModelElement... children) { assert indent >= 0; this.indent = indent; - for (IDisplayModelElement element : children) { + for (IModelElement element : children) { add(element); } } - public void add(IDisplayModelElement element) { + public void add(IModelElement element) { this.children.add(element); } - public void accept(IDisplayModelElementVisitor visitor) { + public void accept(IModelElementVisitor visitor) { visitor.areaStart(this); - for (IDisplayModelElement child : children) { + for (IModelElement child : children) { child.accept(visitor); } visitor.areaEnd(this); } - public void insertBefore(AdditionPoint point, IDisplayModelElement element) { + public void insertBefore(AdditionPoint point, IModelElement element) { children.add(children.indexOf(point), element); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,9 +17,9 @@ import org.jdom.Element; -public class AreaFactory implements IDisplayMapping { +public class AreaFactory implements IMetaModelElement { - private final List<IDisplayMapping> childFactories = new ArrayList<IDisplayMapping>(); + private final List<IMetaModelElement> childFactories = new ArrayList<IMetaModelElement>(); private int indent; @@ -27,14 +27,14 @@ this.indent = indent; } - public void addChildFactory(IDisplayMapping mapping) { + public void addChildFactory(IMetaModelElement mapping) { childFactories.add(mapping); } - public Area create(Element element, IDisplayModelElement parent) { + public Area create(Element element, IModelElement parent) { Area result = new Area(indent); - for (IDisplayMapping mapping : childFactories) { + for (IMetaModelElement mapping : childFactories) { result.add(mapping.create(element, result)); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,11 +17,11 @@ import org.jdom.Element; -public class AreaFactoryFactory implements IDisplayElementFactoryFactory { +public class AreaFactoryFactory implements IMetaMetaModelElement { public AreaFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { AreaFactory areaFactory = new AreaFactory(Integer .parseInt(configuration.getAttributeValue("indent"))); Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-16 20:28:40 UTC (rev 6) @@ -21,7 +21,7 @@ import org.eclipse.swt.graphics.TextLayout; import org.eclipse.swt.widgets.Caret; -public final class DisplayVisitor implements IDisplayModelElementVisitor { +public final class DisplayVisitor implements IModelElementVisitor { private final TextLayout layout; Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java 2006-05-16 20:28:40 UTC (rev 6) @@ -22,7 +22,7 @@ this.value = value; } - public void accept(IDisplayModelElementVisitor visitor) { + public void accept(IModelElementVisitor visitor) { visitor.visit(this); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -14,7 +14,7 @@ import org.jdom.Element; -public class FixedLiteralFactory implements IDisplayMapping { +public class FixedLiteralFactory implements IMetaModelElement { private final String literal; @@ -24,7 +24,7 @@ this.literal = literal; } - public IDisplayModelElement create(Element element, IDisplayModelElement parent) { + public IModelElement create(Element element, IModelElement parent) { return new FixedLiteral(literal); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -16,11 +16,11 @@ import org.jdom.Element; -public class FixedLiteralFactoryFactory implements IDisplayElementFactoryFactory { +public class FixedLiteralFactoryFactory implements IMetaMetaModelElement { public FixedLiteralFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { return new FixedLiteralFactory(configuration.getText()); } Deleted: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -1,25 +0,0 @@ -/* $HeadURL$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import java.util.Map; - -import org.jdom.Element; - -public interface IDisplayElementFactoryFactory { - - IDisplayMapping create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings); - -} Deleted: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java 2006-05-16 20:28:40 UTC (rev 6) @@ -1,21 +0,0 @@ -/* $RCSfile$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -import org.jdom.Element; - -public interface IDisplayMapping { - - IDisplayModelElement create(Element element, IDisplayModelElement parent); - -} Deleted: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java 2006-05-16 20:28:40 UTC (rev 6) @@ -1,19 +0,0 @@ -/* $HeadURL$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -public interface IDisplayModelElement { - - void accept(IDisplayModelElementVisitor visitor); - -} Deleted: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java 2006-05-16 20:28:40 UTC (rev 6) @@ -1,31 +0,0 @@ -/* $HeadURL$ - * ----------------------------------------------------------------------------- - * - * Copyright (C) Lars Grammel and others. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies - * this distribution, and is available at - * - * http://www.eclipse.org/legal/cpl-v10.html - * - */ -package net.sourceforge.exmmt; - -public interface IDisplayModelElementVisitor { - - void visit(FixedLiteral literal); - - void visit(VariableLiteral literal); - - void lineStart(Line line); - - void lineEnd(Line line); - - void areaStart(Area area); - - void areaEnd(Area area); - - void visit(AdditionPoint point); - -} Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java 2006-05-16 20:28:40 UTC (rev 6) @@ -14,6 +14,6 @@ public interface IFocusChecker { - boolean hasFocus(IDisplayModelElement point); + boolean hasFocus(IModelElement point); } Copied: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaMetaModelElement.java (from rev 5, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java) =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaMetaModelElement.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaMetaModelElement.java 2006-05-16 20:28:40 UTC (rev 6) @@ -0,0 +1,25 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.Map; + +import org.jdom.Element; + +public interface IMetaMetaModelElement { + + IMetaModelElement create(Element configuration, + Map<String, IMetaMetaModelElement> metaMetaModelMap, + Map<String, IMetaModelElement> metaModelMap); + +} Copied: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java (from rev 5, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java) =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IMetaModelElement.java 2006-05-16 20:28:40 UTC (rev 6) @@ -0,0 +1,21 @@ +/* $RCSfile$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.jdom.Element; + +public interface IMetaModelElement { + + IModelElement create(Element element, IModelElement parent); + +} Copied: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElement.java (from rev 5, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java) =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElement.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElement.java 2006-05-16 20:28:40 UTC (rev 6) @@ -0,0 +1,19 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public interface IModelElement { + + void accept(IModelElementVisitor visitor); + +} Copied: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElementVisitor.java (from rev 5, net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java) =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElementVisitor.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IModelElementVisitor.java 2006-05-16 20:28:40 UTC (rev 6) @@ -0,0 +1,31 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public interface IModelElementVisitor { + + void visit(FixedLiteral literal); + + void visit(VariableLiteral literal); + + void lineStart(Line line); + + void lineEnd(Line line); + + void areaStart(Area area); + + void areaEnd(Area area); + + void visit(AdditionPoint point); + +} Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java 2006-05-16 20:28:40 UTC (rev 6) @@ -15,26 +15,26 @@ import java.util.ArrayList; import java.util.List; -public class Line implements IDisplayModelElement { +public class Line implements IModelElement { - private List<IDisplayModelElement> children = new ArrayList<IDisplayModelElement>(); + private List<IModelElement> children = new ArrayList<IModelElement>(); - public Line(IDisplayModelElement... children) { + public Line(IModelElement... children) { assert children != null; - for (IDisplayModelElement element : children) { + for (IModelElement element : children) { add(element); } } - public void add(IDisplayModelElement element) { + public void add(IModelElement element) { this.children.add(element); } - public void accept(IDisplayModelElementVisitor visitor) { + public void accept(IModelElementVisitor visitor) { visitor.lineStart(this); - for (IDisplayModelElement child : children) { + for (IModelElement child : children) { child.accept(visitor); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,18 +17,18 @@ import org.jdom.Element; -public class LineFactory implements IDisplayMapping { +public class LineFactory implements IMetaModelElement { - private final List<IDisplayMapping> childFactories = new ArrayList<IDisplayMapping>(); + private final List<IMetaModelElement> childFactories = new ArrayList<IMetaModelElement>(); - public void addChildFactory(IDisplayMapping mapping) { + public void addChildFactory(IMetaModelElement mapping) { childFactories.add(mapping); } - public Line create(Element element, IDisplayModelElement parent) { + public Line create(Element element, IModelElement parent) { Line line = new Line(); - for (IDisplayMapping mapping : childFactories) { + for (IMetaModelElement mapping : childFactories) { line.add(mapping.create(element, line)); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -17,11 +17,11 @@ import org.jdom.Element; -public class LineFactoryFactory implements IDisplayElementFactoryFactory { +public class LineFactoryFactory implements IMetaMetaModelElement { public LineFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { LineFactory lineFactory = new LineFactory(); Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java 2006-05-16 20:28:40 UTC (rev 6) @@ -14,7 +14,7 @@ import org.eclipse.swt.graphics.Rectangle; -public abstract class Literal implements IDisplayModelElement { +public abstract class Literal implements IModelElement { public abstract String getValue(); Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-16 20:28:40 UTC (rev 6) @@ -40,292 +40,292 @@ public class ModelEditor extends EditorPart { - final static boolean IS_CARBON, IS_GTK, IS_MOTIF; + final static boolean IS_CARBON, IS_GTK, IS_MOTIF; - private static final String SPACE = " "; + // TODO move / change + static { + String platform = SWT.getPlatform(); + IS_CARBON = "carbon".equals(platform); + IS_GTK = "gtk".equals(platform); + IS_MOTIF = "motif".equals(platform); + } - // TODO move / change - static { - String platform = SWT.getPlatform(); - IS_CARBON = "carbon".equals(platform); - IS_GTK = "gtk".equals(platform); - IS_MOTIF = "motif".equals(platform); - } + IModelElement selectedLiteral; - IDisplayModelElement selectedLiteral; + IModelElement rootArea; - IDisplayModelElement rootArea; + private Canvas control; - private Canvas control; + private Document document; - private Document document; + private boolean dirty = false; - private boolean dirty = false; + private IFile file; - private IFile file; + private Map<String, IMetaModelElement> metaModelMap; - private Map<String, IDisplayMapping> mappingMap; + @Override + public void createPartControl(Composite parent) { + control = new ModelText(this, parent, SWT.NONE); + } - @Override - public void createPartControl(Composite parent) { - control = new ModelText(this, parent, SWT.NONE); - } + @Override + public void dispose() { + if (control != null) { + control.dispose(); + } - @Override - public void dispose() { - if (control != null) { - control.dispose(); - } + super.dispose(); + } - super.dispose(); - } + @Override + public void doSave(IProgressMonitor monitor) { + try { + // write the document back + XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); - @Override - public void doSave(IProgressMonitor monitor) { - try { - // write the document back - XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); - ByteArrayOutputStream out = new ByteArrayOutputStream(); + outputter.output(document, out); - outputter.output(document, out); + out.flush(); + out.close(); - out.flush(); - out.close(); + ByteArrayInputStream in = new ByteArrayInputStream(out + .toByteArray()); - ByteArrayInputStream in = new ByteArrayInputStream(out - .toByteArray()); + file.setContents(in, true, true, null); - file.setContents(in, true, true, null); + dirty = false; + firePropertyChange(PROP_DIRTY); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } - dirty = false; - firePropertyChange(PROP_DIRTY); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } + @Override + public void doSaveAs() { + } - @Override - public void doSaveAs() { - } + public Document getMappingFile() throws JDOMException, IOException { + String mappingFile = document.getRootElement().getAttributeValue( + "file", document.getRootElement().getNamespace("mapping")); - public Document getMappingFile() throws JDOMException, IOException { - String mappingFile = document.getRootElement().getAttributeValue( - "file", document.getRootElement().getNamespace("mapping")); + System.out.println(mappingFile); - System.out.println(mappingFile); + IPath projectLocation = file.getProject().getLocation(); + IPath path2 = projectLocation.append(file.getProjectRelativePath() + .removeLastSegments(1)); + IPath path = path2.append(mappingFile); - IPath projectLocation = file.getProject().getLocation(); - IPath path2 = projectLocation.append(file.getProjectRelativePath() - .removeLastSegments(1)); - IPath path = path2.append(mappingFile); + SAXBuilder builder = new SAXBuilder(); + return builder.build(path.toFile()); + } - SAXBuilder builder = new SAXBuilder(); - return builder.build(path.toFile()); - } + @Override + public void init(IEditorSite site, IEditorInput input) + throws PartInitException { + setSite(site); + setInput(input); - @Override - public void init(IEditorSite site, IEditorInput input) - throws PartInitException { - setSite(site); - setInput(input); + file = (IFile) input.getAdapter(IFile.class); + try { + document = new SAXBuilder().build(file.getContents()); + System.out.println(document); + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } - file = (IFile) input.getAdapter(IFile.class); - try { - document = new SAXBuilder().build(file.getContents()); - System.out.println(document); - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + createMetaModelMap(); + rootArea = metaModelMap.get(document.getRootElement().getName()) + .create(document.getRootElement(), null); + selectedLiteral = getNavigationElements().get(0); + } - createMappings(); - rootArea = mappingMap.get(document.getRootElement().getName()).create( - document.getRootElement(), null); - selectedLiteral = getVariableLiterals().get(0); - } + @Override + public boolean isDirty() { + return dirty; + } - @Override - public boolean isDirty() { - return dirty; - } + @Override + public boolean isSaveAsAllowed() { + return false; + } - @Override - public boolean isSaveAsAllowed() { - return false; - } + @Override + public void setFocus() { + } - @Override - public void setFocus() { - } + void handleKeyDown(Event event) { + System.out.println(event); - void handleKeyDown(Event event) { - System.out.println(event); + // TODO refactor + if (((event.keyCode == SWT.TAB) && ((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_UP) { + int index = getNavigationElements().indexOf(selectedLiteral) - 1; + if (index < 0) { + index = getNavigationElements().size() - 1; + } + selectedLiteral = getNavigationElements().get(index); + control.redraw(); + } else if (((event.keyCode == SWT.TAB) && !((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_DOWN) { + int index = getNavigationElements().indexOf(selectedLiteral) + 1; + if (index >= getNavigationElements().size()) { + index = 0; + } + selectedLiteral = getNavigationElements().get(index); + control.redraw(); + } else if (event.keyCode == SWT.ARROW_RIGHT + && selectedLiteral instanceof VariableLiteral) { - // TODO refactor - if (((event.keyCode == SWT.TAB) && ((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) - || event.keyCode == SWT.ARROW_UP) { - int index = getVariableLiterals().indexOf(selectedLiteral) - 1; - if (index < 0) { - index = getVariableLiterals().size() - 1; - } - selectedLiteral = getVariableLiterals().get(index); - control.redraw(); - } else if (((event.keyCode == SWT.TAB) && !((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) - || event.keyCode == SWT.ARROW_DOWN) { - int index = getVariableLiterals().indexOf(selectedLiteral) + 1; - if (index >= getVariableLiterals().size()) { - index = 0; - } - selectedLiteral = getVariableLiterals().get(index); - control.redraw(); - } else if (event.keyCode == SWT.ARROW_RIGHT - && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; - VariableLiteral literal = (VariableLiteral) selectedLiteral; + literal.setCaretPosition(literal.getCaretPosition() + 1); + control.redraw(); + } else if (event.keyCode == SWT.ARROW_LEFT + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + literal.setCaretPosition(literal.getCaretPosition() - 1); + control.redraw(); + } else if (event.keyCode == SWT.CR + && selectedLiteral instanceof AdditionPoint) { + AdditionPoint literal = (AdditionPoint) selectedLiteral; + literal.execute(); + control.redraw(); + } else if (event.keyCode == SWT.DEL + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + if (literal.getCaretPosition() < literal.getValue().length()) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition()); + literal.setValue(value.toString()); + changed(); + control.redraw(); + } + } else if (event.keyCode == SWT.BS + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + if (literal.getCaretPosition() > 0) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition() - 1); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() - 1); + changed(); + control.redraw(); + } + } else if (isValidCharacter(event.stateMask, event.character) + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + StringBuffer value = new StringBuffer(literal.getValue()); + value.insert(literal.getCaretPosition(), event.character); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() + 1); + changed(); + control.redraw(); + } + } - literal.setCaretPosition(literal.getCaretPosition() + 1); - control.redraw(); - } else if (event.keyCode == SWT.ARROW_LEFT - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - literal.setCaretPosition(literal.getCaretPosition() - 1); - control.redraw(); - } else if (event.keyCode == SWT.CR - && selectedLiteral instanceof AdditionPoint) { - AdditionPoint literal = (AdditionPoint) selectedLiteral; - literal.execute(); - control.redraw(); - } else if (event.keyCode == SWT.DEL - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() < literal.getValue().length()) { - StringBuffer value = new StringBuffer(literal.getValue()); - value.deleteCharAt(literal.getCaretPosition()); - literal.setValue(value.toString()); - changed(); - control.redraw(); - } - } else if (event.keyCode == SWT.BS - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - if (literal.getCaretPosition() > 0) { - StringBuffer value = new StringBuffer(literal.getValue()); - value.deleteCharAt(literal.getCaretPosition() - 1); - literal.setValue(value.toString()); - literal.setCaretPosition(literal.getCaretPosition() - 1); - changed(); - control.redraw(); - } - } else if (isValidCharacter(event.stateMask, event.character) - && selectedLiteral instanceof VariableLiteral) { - VariableLiteral literal = (VariableLiteral) selectedLiteral; - StringBuffer value = new StringBuffer(literal.getValue()); - value.insert(literal.getCaretPosition(), event.character); - literal.setValue(value.toString()); - literal.setCaretPosition(literal.getCaretPosition() + 1); - changed(); - control.redraw(); - } - } + private void changed() { + dirty = true; + firePropertyChange(PROP_DIRTY); + } - private void changed() { - dirty = true; - firePropertyChange(PROP_DIRTY); - } + private void createMetaModelMap() { + metaModelMap = new HashMap<String, IMetaModelElement>(); + Map<String, IMetaMetaModelElement> metaMetaModelMap = createMetaMetaModelMap(); - private void createMappings() { - mappingMap = new HashMap<String, IDisplayMapping>(); - Map<String, IDisplayElementFactoryFactory> metaMappingMap = createMetaMappingMap(); + try { + Document mappingFile = getMappingFile(); - try { - Document mappingFile = getMappingFile(); + Element rootElement = mappingFile.getRootElement(); + List<Element> mappings = rootElement.getChildren("mapping"); - Element rootElement = mappingFile.getRootElement(); - List<Element> mappings = rootElement.getChildren("mapping"); + for (Element mappingElement : mappings) { + Element configuration = (Element) mappingElement.getChildren() + .get(0); - for (Element mappingElement : mappings) { - Element configuration = (Element) mappingElement.getChildren() - .get(0); + IMetaMetaModelElement metaMetaModelElement = metaMetaModelMap + .get(configuration.getName()); + IMetaModelElement metaModelElement = metaMetaModelElement + .create(configuration, metaMetaModelMap, metaModelMap); - IDisplayMapping mappingX = metaMappingMap.get( - configuration.getName()).create(configuration, - metaMappingMap, mappingMap); + metaModelMap.put(mappingElement.getAttributeValue("select"), + metaModelElement); + } - mappingMap.put(mappingElement.getAttributeValue("select"), - mappingX); - } + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } - } catch (JDOMException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + } - } + private Map<String, IMetaMetaModelElement> createMetaMetaModelMap() { + Map<String, IMetaMetaModelElement> metaMappingMap = new HashMap<String, IMetaMetaModelElement>(); - private Map<String, IDisplayElementFactoryFactory> createMetaMappingMap() { - Map<String, IDisplayElementFactoryFactory> metaMappingMap = new HashMap<String, IDisplayElementFactoryFactory>(); + metaMappingMap.put("area", new AreaFactoryFactory()); + metaMappingMap.put("line", new LineFactoryFactory()); + metaMappingMap.put("edit", new VariableFactoryFactory()); + metaMappingMap.put("literal", new FixedLiteralFactoryFactory()); + metaMappingMap.put("apply-mappings", new ApplyMappingsFactoryFactory()); + metaMappingMap.put("addition-point", new AdditionPointFactoryFactory()); - metaMappingMap.put("area", new AreaFactoryFactory()); - metaMappingMap.put("line", new LineFactoryFactory()); - metaMappingMap.put("edit", new VariableFactoryFactory()); - metaMappingMap.put("literal", new FixedLiteralFactoryFactory()); - metaMappingMap.put("apply-mappings", new ApplyMappingsFactoryFactory()); - metaMappingMap.put("addition-point", new AdditionPointFactoryFactory()); + return metaMappingMap; + } - return metaMappingMap; - } + // TODO performance: use caching instead of recalculation + private List<IModelElement> getNavigationElements() { + NavigationElementSearcher visitor = new NavigationElementSearcher(); - private List<IDisplayModelElement> getVariableLiterals() { - NavigationElementSearcher visitor = new NavigationElementSearcher(); + rootArea.accept(visitor); - rootArea.accept(visitor); + return visitor.getNavigationElements(); + } - return visitor.getNavigationElements(); - } + private boolean isValidCharacter(int stateMask, char character) { + boolean ignore = false; - private boolean isValidCharacter(int stateMask, char character) { - boolean ignore = false; - - if (IS_CARBON) { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Do not - // ignore COMMAND+ALT combinations since that key sequence - // produces characters on the mac. - ignore = (stateMask ^ SWT.COMMAND) == 0 - || (stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0; - } else if (IS_MOTIF) { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Do not - // ignore ALT combinations since this key sequence - // produces characters on motif. - ignore = (stateMask ^ SWT.CTRL) == 0 - || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; - } else { - // Ignore accelerator key combinations (we do not want to - // insert a character in the text in this instance). Don't - // ignore CTRL+ALT combinations since that is the Alt Gr - // key on some keyboards. See bug 20953. - ignore = (stateMask ^ SWT.ALT) == 0 || (stateMask ^ SWT.CTRL) == 0 - || (stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 - || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; - } - boolean isCharacter = !ignore && character > 31 && character != SWT.DEL; - // -ignore anything below SPACE except for line delimiter keys and tab. - // -ignore DEL - return isCharacter; - } + if (IS_CARBON) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore COMMAND+ALT combinations since that key sequence + // produces characters on the mac. + ignore = (stateMask ^ SWT.COMMAND) == 0 + || (stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0; + } else if (IS_MOTIF) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore ALT combinations since this key sequence + // produces characters on motif. + ignore = (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } else { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Don't + // ignore CTRL+ALT combinations since that is the Alt Gr + // key on some keyboards. See bug 20953. + ignore = (stateMask ^ SWT.ALT) == 0 || (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } + boolean isCharacter = !ignore && character > 31 && character != SWT.DEL; + // -ignore anything below SPACE except for line delimiter keys and tab. + // -ignore DEL + return isCharacter; + } } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java 2006-05-16 20:28:40 UTC (rev 6) @@ -76,7 +76,7 @@ DisplayVisitor visitor = new DisplayVisitor(gc, color, color2, color3, new IFocusChecker() { - public boolean hasFocus(IDisplayModelElement l) { + public boolean hasFocus(IModelElement l) { return l == ModelText.this.editor.selectedLiteral; } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java 2006-05-16 20:28:40 UTC (rev 6) @@ -15,10 +15,15 @@ import java.util.ArrayList; import java.util.List; +/** + * Collects the display model elements that can be reached by the navigation model. This + * may be a problem in the future as the navigation model elements are not necessarily a + * subset of the display model elements (TODO is this true?). + */ public final class NavigationElementSearcher implements - IDisplayModelElementVisitor { + IModelElementVisitor { - private List<IDisplayModelElement> navigationElements = new ArrayList<IDisplayModelElement>(); + private List<IModelElement> navigationElements = new ArrayList<IModelElement>(); public void visit(AdditionPoint point) { navigationElements.add(point); @@ -43,7 +48,7 @@ public void areaEnd(Area area) { } - public List<IDisplayModelElement> getNavigationElements() { + public List<IModelElement> getNavigationElements() { return navigationElements; } } \ No newline at end of file Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -14,7 +14,7 @@ import org.jdom.Element; -public class VariableFactory implements IDisplayMapping { +public class VariableFactory implements IMetaModelElement { private final String attribute; @@ -24,7 +24,7 @@ this.attribute = attribute; } - public VariableLiteral create(Element element, IDisplayModelElement parent) { + public VariableLiteral create(Element element, IModelElement parent) { return new VariableLiteral(element, attribute); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactoryFactory.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactoryFactory.java 2006-05-16 20:28:40 UTC (rev 6) @@ -16,11 +16,11 @@ import org.jdom.Element; -public class VariableFactoryFactory implements IDisplayElementFactoryFactory { +public class VariableFactoryFactory implements IMetaMetaModelElement { public VariableFactory create(Element configuration, - Map<String, IDisplayElementFactoryFactory> factoryMap, - Map<String, IDisplayMapping> mappings) { + Map<String, IMetaMetaModelElement> factoryMap, + Map<String, IMetaModelElement> mappings) { return new VariableFactory(configuration.getAttributeValue("attribute")); } Modified: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableLiteral.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableLiteral.java 2006-05-15 12:52:54 UTC (rev 5) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableLiteral.java 2006-05-16 20:28:40 UTC (rev 6) @@ -30,7 +30,7 @@ this.attributeName = attributeName; } - public void accept(IDisplayModelElementVisitor visitor) { + public void accept(IModelElementVisitor visitor) { visitor.visit(this); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-15 12:53:06
|
Revision: 5 Author: lgrammel Date: 2006-05-15 05:52:54 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=5&view=rev Log Message: ----------- #1488473 migrate model editor from nomad pim to exmmt Added Paths: ----------- net.sourceforge.exmmt.test/.classpath net.sourceforge.exmmt.test/.project net.sourceforge.exmmt.test/META-INF/ net.sourceforge.exmmt.test/META-INF/MANIFEST.MF net.sourceforge.exmmt.test/build.properties net.sourceforge.exmmt.test/src/ Property Changed: ---------------- net.sourceforge.exmmt.test/ Property changes on: net.sourceforge.exmmt.test ___________________________________________________________________ Name: svn:ignore + bin Added: net.sourceforge.exmmt.test/.classpath =================================================================== --- net.sourceforge.exmmt.test/.classpath (rev 0) +++ net.sourceforge.exmmt.test/.classpath 2006-05-15 12:52:54 UTC (rev 5) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Property changes on: net.sourceforge.exmmt.test/.classpath ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt.test/.project =================================================================== --- net.sourceforge.exmmt.test/.project (rev 0) +++ net.sourceforge.exmmt.test/.project 2006-05-15 12:52:54 UTC (rev 5) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>net.sourceforge.exmmt.test</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Property changes on: net.sourceforge.exmmt.test/.project ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt.test/META-INF/MANIFEST.MF =================================================================== --- net.sourceforge.exmmt.test/META-INF/MANIFEST.MF (rev 0) +++ net.sourceforge.exmmt.test/META-INF/MANIFEST.MF 2006-05-15 12:52:54 UTC (rev 5) @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Eclipse XML Meta-Modeling Tools Tests +Bundle-SymbolicName: net.sourceforge.exmmt.test +Bundle-Version: 0.0.1 +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime +Eclipse-LazyStart: true +Bundle-Vendor: exmmt.sourceforge.net project Property changes on: net.sourceforge.exmmt.test/META-INF/MANIFEST.MF ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt.test/build.properties =================================================================== --- net.sourceforge.exmmt.test/build.properties (rev 0) +++ net.sourceforge.exmmt.test/build.properties 2006-05-15 12:52:54 UTC (rev 5) @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . Property changes on: net.sourceforge.exmmt.test/build.properties ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-15 12:52:51
|
Revision: 4 Author: lgrammel Date: 2006-05-15 05:52:47 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=4&view=rev Log Message: ----------- #1488473 migrate model editor from nomad pim to exmmt Modified Paths: -------------- net.sourceforge.exmmt/META-INF/MANIFEST.MF Modified: net.sourceforge.exmmt/META-INF/MANIFEST.MF =================================================================== --- net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-15 12:51:41 UTC (rev 3) +++ net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-15 12:52:47 UTC (rev 4) @@ -6,7 +6,7 @@ Bundle-Vendor: exmmt.sourceforge.net project Bundle-Localization: plugin Bundle-ClassPath: org.nomadpim.ide.jar -Eclipse-LazyStart: false +Eclipse-LazyStart: true Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ui.views, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-15 12:51:46
|
Revision: 3 Author: lgrammel Date: 2006-05-15 05:51:41 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=3&view=rev Log Message: ----------- Initial import. Added Paths: ----------- net.sourceforge.exmmt.test/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lgr...@us...> - 2006-05-15 12:48:57
|
Revision: 2 Author: lgrammel Date: 2006-05-15 05:48:08 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=2&view=rev Log Message: ----------- #1488473 migrate model editor from nomad pim to exmmt Added Paths: ----------- net.sourceforge.exmmt/.classpath net.sourceforge.exmmt/.project net.sourceforge.exmmt/META-INF/ net.sourceforge.exmmt/META-INF/MANIFEST.MF net.sourceforge.exmmt/build.properties net.sourceforge.exmmt/plugin.xml net.sourceforge.exmmt/resources/ net.sourceforge.exmmt/resources/icons/ net.sourceforge.exmmt/resources/icons/editor.gif net.sourceforge.exmmt/src/ net.sourceforge.exmmt/src/java/ net.sourceforge.exmmt/src/java/net/ net.sourceforge.exmmt/src/java/net/sourceforge/ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/NavigationElementSearcher.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableFactoryFactory.java net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/VariableLiteral.java net.sourceforge.exmmt/src/mappings/ net.sourceforge.exmmt/src/mappings/JavaModelFiles.mapping.xml net.sourceforge.exmmt/src/mappings/Mapping.mapping.xml net.sourceforge.exmmt/src/mappings/mapping.xml Property Changed: ---------------- net.sourceforge.exmmt/ Property changes on: net.sourceforge.exmmt ___________________________________________________________________ Name: svn:ignore + bin Added: net.sourceforge.exmmt/.classpath =================================================================== --- net.sourceforge.exmmt/.classpath (rev 0) +++ net.sourceforge.exmmt/.classpath 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/java"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Property changes on: net.sourceforge.exmmt/.classpath ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/.project =================================================================== --- net.sourceforge.exmmt/.project (rev 0) +++ net.sourceforge.exmmt/.project 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>net.sourceforge.exmmt</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Property changes on: net.sourceforge.exmmt/.project ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/META-INF/MANIFEST.MF =================================================================== --- net.sourceforge.exmmt/META-INF/MANIFEST.MF (rev 0) +++ net.sourceforge.exmmt/META-INF/MANIFEST.MF 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Eclipse XML Meta-Modeling Tools +Bundle-SymbolicName: net.sourceforge.exmmt;singleton:=true +Bundle-Version: 0.0.1 +Bundle-Vendor: exmmt.sourceforge.net project +Bundle-Localization: plugin +Bundle-ClassPath: org.nomadpim.ide.jar +Eclipse-LazyStart: false +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui.views, + org.eclipse.ui.editors, + org.eclipse.ui.ide, + org.eclipse.core.resources, + org.jdom +Export-Package: net.sourceforge.exmmt Property changes on: net.sourceforge.exmmt/META-INF/MANIFEST.MF ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/build.properties =================================================================== --- net.sourceforge.exmmt/build.properties (rev 0) +++ net.sourceforge.exmmt/build.properties 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,10 @@ +bin.includes = META-INF/,\ + org.nomadpim.ide.jar,\ + plugin.xml,\ + resources/ +jars.compile.order = org.nomadpim.ide.jar +source.org.nomadpim.ide.jar = src/java/ +output.org.nomadpim.ide.jar = bin/ +src.includes = plugin.xml,\ + src/,\ + resources/ Property changes on: net.sourceforge.exmmt/build.properties ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/plugin.xml =================================================================== --- net.sourceforge.exmmt/plugin.xml (rev 0) +++ net.sourceforge.exmmt/plugin.xml 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + + <extension point="org.eclipse.ui.editors"> + <editor + class="net.sourceforge.exmmt.ModelEditor" + extensions="xml" + icon="resources/icons/editor.gif" + id="net.sourceforge.exmmt.ModelEditor" + name="Model Editor"/> + </extension> + +</plugin> Property changes on: net.sourceforge.exmmt/plugin.xml ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/resources/icons/editor.gif =================================================================== (Binary files differ) Property changes on: net.sourceforge.exmmt/resources/icons/editor.gif ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,67 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.List; +import java.util.Map; + +import org.jdom.Element; + +public class AdditionPoint implements IDisplayModelElement { + + private Element parent; + + private Map<String, IDisplayMapping> mappingMap; + + private Area parentArea; + + private String childElementName; + + private Map<String, String> defaultValueMap; + + public AdditionPoint(Element parent, + Map<String, IDisplayMapping> mappingMap, Area parentArea, + Map<String, String> defaultValueMap, String childElementName) { + + assert parent != null; + + this.defaultValueMap = defaultValueMap; + this.childElementName = childElementName; + this.mappingMap = mappingMap; + this.parent = parent; + this.parentArea = parentArea; + } + + public void accept(IDisplayModelElementVisitor visitor) { + visitor.visit(this); + } + + public void execute() { + System.out.println("execute"); + + Element element2 = new Element(childElementName); + for (Map.Entry<String,String> entry : defaultValueMap.entrySet()) { + element2.setAttribute(entry.getKey(), entry.getValue()); + } + + List<Element> attributes = parent.getChildren(childElementName); + Element last = attributes.get(attributes.size() - 1); + int index = parent.indexOf(last); + + parent.addContent(index + 1, element2); + + parentArea.insertBefore(this, mappingMap.get(childElementName).create( + element2, parentArea)); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPoint.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,40 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.Map; + +import org.jdom.Element; + +public class AdditionPointFactory implements IDisplayMapping { + + private Map<String, IDisplayMapping> mappingMap; + + private String childElementName; + + private Map<String, String> defaultValueMap; + + public AdditionPointFactory(Map<String, IDisplayMapping> mappingMap, + Map<String, String> defaultValueMap, String childElementName) { + + this.defaultValueMap = defaultValueMap; + this.childElementName = childElementName; + this.mappingMap = mappingMap; + } + + public AdditionPoint create(Element element, IDisplayModelElement parent) { + return new AdditionPoint(element, mappingMap, (Area) parent, + defaultValueMap, childElementName); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,41 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.jdom.Element; + +public class AdditionPointFactoryFactory implements + IDisplayElementFactoryFactory { + + public AdditionPointFactory create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings) { + + Map<String, String> defaultValueMap = new HashMap<String, String>(); + + List<Element> defaultValueElements = configuration + .getChildren("default-value"); + for (Element defaultValue : defaultValueElements) { + defaultValueMap.put(defaultValue.getAttributeValue("attribute"), + defaultValue.getAttributeValue("value")); + } + + return new AdditionPointFactory(mappings, defaultValueMap, + configuration.getAttributeValue("element")); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AdditionPointFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,57 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.List; +import java.util.Map; + +import org.jdom.Element; +import org.jdom.JDOMException; +import org.jdom.xpath.XPath; + +public class ApplyMappingsFactory implements IDisplayMapping { + + private final Map<String, IDisplayMapping> mappingMap; + + private final String selection; + + public ApplyMappingsFactory(String selection, + Map<String, IDisplayMapping> mappingMap) { + this.selection = selection; + this.mappingMap = mappingMap; + } + + public Area create(Element element, IDisplayModelElement parent) { + Area area = new Area(0); + + // use xpath + try { + List childElements = XPath.selectNodes(element, selection); + + // List<Element> childElements = element.getChildren(selection); + for (Object child : childElements) { + if (child instanceof Element) { + Element childElement = (Element) child; + area.add(mappingMap.get(childElement.getName()).create( + childElement, area)); + } + } + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + return area; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,30 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.Map; + +import org.jdom.Element; + +public class ApplyMappingsFactoryFactory implements + IDisplayElementFactoryFactory { + + public ApplyMappingsFactory create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings) { + + return new ApplyMappingsFactory( + configuration.getAttributeValue("select"), mappings); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ApplyMappingsFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,56 @@ +/* $RCSfile$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +public class Area implements IDisplayModelElement { + + private List<IDisplayModelElement> children = new ArrayList<IDisplayModelElement>(); + + private final int indent; + + public Area(int indent, IDisplayModelElement... children) { + assert indent >= 0; + + this.indent = indent; + + for (IDisplayModelElement element : children) { + add(element); + } + } + + public void add(IDisplayModelElement element) { + this.children.add(element); + } + + public void accept(IDisplayModelElementVisitor visitor) { + visitor.areaStart(this); + + for (IDisplayModelElement child : children) { + child.accept(visitor); + } + + visitor.areaEnd(this); + } + + public void insertBefore(AdditionPoint point, IDisplayModelElement element) { + children.add(children.indexOf(point), element); + } + + public int getIndent() { + return indent; + } + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Area.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,44 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +import org.jdom.Element; + +public class AreaFactory implements IDisplayMapping { + + private final List<IDisplayMapping> childFactories = new ArrayList<IDisplayMapping>(); + + private int indent; + + public AreaFactory(int indent) { + this.indent = indent; + } + + public void addChildFactory(IDisplayMapping mapping) { + childFactories.add(mapping); + } + + public Area create(Element element, IDisplayModelElement parent) { + Area result = new Area(indent); + + for (IDisplayMapping mapping : childFactories) { + result.add(mapping.create(element, result)); + } + + return result; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,38 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.List; +import java.util.Map; + +import org.jdom.Element; + +public class AreaFactoryFactory implements IDisplayElementFactoryFactory { + + public AreaFactory create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings) { + + AreaFactory areaFactory = new AreaFactory(Integer + .parseInt(configuration.getAttributeValue("indent"))); + + List<Element> children = configuration.getChildren(); + for (Element child : children) { + areaFactory.addChildFactory(factoryMap.get(child.getName()).create( + child, factoryMap, mappings)); + } + + return areaFactory; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/AreaFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,149 @@ +/* $RCSfile$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.TextLayout; +import org.eclipse.swt.widgets.Caret; + +public final class DisplayVisitor implements IDisplayModelElementVisitor { + + private final TextLayout layout; + + private final GC gc; + + private int xPosition = 0; + + private int yPosition = 0; + + private Color color; + + private Color color2; + + private Color color3; + + private IFocusChecker focusChecker; + + private Caret caret; + + private List<Area> areaStack = new ArrayList<Area>(); + + public DisplayVisitor(GC gc, Color color, Color color2, Color color3, + IFocusChecker focusChecker, Caret caret) { + assert gc != null; + + this.caret = caret; + this.focusChecker = focusChecker; + this.color = color; + this.color2 = color2; + this.color3 = color3; + this.gc = gc; + this.layout = new TextLayout(gc.getDevice()); + + layout.setFont(gc.getFont()); + } + + public void areaEnd(Area area) { + areaStack.remove(0); + } + + public void areaStart(Area area) { + areaStack.add(0, area); + } + + public void dispose() { + layout.dispose(); + } + + public void lineEnd(Line line) { + yPosition += layout.getBounds().height; + } + + public void lineStart(Line line) { + int sum = 0; + for (Area area : areaStack) { + sum += area.getIndent(); + } + + xPosition = sum; + } + + public void visit(AdditionPoint point) { + boolean hasFocus = focusChecker.hasFocus(point); + if (hasFocus) { + gc.setBackground(color3); + } else { + gc.setBackground(color2); + } + + gc.drawText("+", xPosition, yPosition); + layout.setText("+"); + Rectangle bounds = layout.getBounds(); + + xPosition = 0; + yPosition += layout.getBounds().height; + + if (hasFocus) { + caret.setVisible(false); + } + + gc.setBackground(color); + } + + public void visit(FixedLiteral literal) { + visit((Literal) literal); + } + + public void visit(Literal literal) { + gc.drawText(literal.getValue(), xPosition, yPosition); + layout.setText(literal.getValue()); + Rectangle bounds = layout.getBounds(); + + bounds.x = xPosition; + bounds.y = yPosition; + + literal.setBounds(bounds); + + xPosition += bounds.width; + } + + public void visit(VariableLiteral literal) { + boolean hasFocus = focusChecker.hasFocus(literal); + if (hasFocus) { + gc.setBackground(color3); + } else { + gc.setBackground(color2); + } + + visit((Literal) literal); + + if (hasFocus) { + caret.setSize(2, literal.getBounds().height); + caret.setVisible(true); + + String part = literal.getValue().substring(0, literal.getCaretPosition()); + layout.setText(part); + Rectangle bounds = layout.getBounds(); + + caret.setLocation(literal.getBounds().x + bounds.width, literal.getBounds().y); + } + + gc.setBackground(color); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/DisplayVisitor.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,33 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public class FixedLiteral extends Literal { + + private final String value; + + public FixedLiteral(String value) { + assert value != null; + + this.value = value; + } + + public void accept(IDisplayModelElementVisitor visitor) { + visitor.visit(this); + } + + public final String getValue() { + return value; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteral.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,31 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.jdom.Element; + +public class FixedLiteralFactory implements IDisplayMapping { + + private final String literal; + + public FixedLiteralFactory(String literal) { + assert literal != null; + + this.literal = literal; + } + + public IDisplayModelElement create(Element element, IDisplayModelElement parent) { + return new FixedLiteral(literal); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,28 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.Map; + +import org.jdom.Element; + +public class FixedLiteralFactoryFactory implements IDisplayElementFactoryFactory { + + public FixedLiteralFactory create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings) { + + return new FixedLiteralFactory(configuration.getText()); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/FixedLiteralFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,25 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.Map; + +import org.jdom.Element; + +public interface IDisplayElementFactoryFactory { + + IDisplayMapping create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings); + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayElementFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,21 @@ +/* $RCSfile$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.jdom.Element; + +public interface IDisplayMapping { + + IDisplayModelElement create(Element element, IDisplayModelElement parent); + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayMapping.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,19 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public interface IDisplayModelElement { + + void accept(IDisplayModelElementVisitor visitor); + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElement.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,31 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public interface IDisplayModelElementVisitor { + + void visit(FixedLiteral literal); + + void visit(VariableLiteral literal); + + void lineStart(Line line); + + void lineEnd(Line line); + + void areaStart(Area area); + + void areaEnd(Area area); + + void visit(AdditionPoint point); + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IDisplayModelElementVisitor.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,19 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +public interface IFocusChecker { + + boolean hasFocus(IDisplayModelElement point); + +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/IFocusChecker.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,44 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +public class Line implements IDisplayModelElement { + + private List<IDisplayModelElement> children = new ArrayList<IDisplayModelElement>(); + + public Line(IDisplayModelElement... children) { + assert children != null; + + for (IDisplayModelElement element : children) { + add(element); + } + } + + public void add(IDisplayModelElement element) { + this.children.add(element); + } + + public void accept(IDisplayModelElementVisitor visitor) { + visitor.lineStart(this); + + for (IDisplayModelElement child : children) { + child.accept(visitor); + } + + visitor.lineEnd(this); + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Line.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,38 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.ArrayList; +import java.util.List; + +import org.jdom.Element; + +public class LineFactory implements IDisplayMapping { + + private final List<IDisplayMapping> childFactories = new ArrayList<IDisplayMapping>(); + + public void addChildFactory(IDisplayMapping mapping) { + childFactories.add(mapping); + } + + public Line create(Element element, IDisplayModelElement parent) { + Line line = new Line(); + + for (IDisplayMapping mapping : childFactories) { + line.add(mapping.create(element, line)); + } + + return line; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,36 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.util.List; +import java.util.Map; + +import org.jdom.Element; + +public class LineFactoryFactory implements IDisplayElementFactoryFactory { + + public LineFactory create(Element configuration, + Map<String, IDisplayElementFactoryFactory> factoryMap, + Map<String, IDisplayMapping> mappings) { + + LineFactory lineFactory = new LineFactory(); + + List<Element> children = configuration.getChildren(); + for (Element child : children) { + lineFactory.addChildFactory(factoryMap.get(child.getName()).create(child, factoryMap, mappings)); + } + + return lineFactory; + } + +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/LineFactoryFactory.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,30 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import org.eclipse.swt.graphics.Rectangle; + +public abstract class Literal implements IDisplayModelElement { + + public abstract String getValue(); + + private Rectangle bounds; + + public Rectangle getBounds() { + return bounds; + } + + public void setBounds(Rectangle r) { + this.bounds = r; + } +} \ No newline at end of file Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Literal.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java 2006-05-15 12:48:08 UTC (rev 2) @@ -0,0 +1,331 @@ +/* $HeadURL$ + * ----------------------------------------------------------------------------- + * + * Copyright (C) Lars Grammel and others. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Common Public License v1.0 which accompanies + * this distribution, and is available at + * + * http://www.eclipse.org/legal/cpl-v10.html + * + */ +package net.sourceforge.exmmt; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.part.EditorPart; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.JDOMException; +import org.jdom.input.SAXBuilder; +import org.jdom.output.Format; +import org.jdom.output.XMLOutputter; + +public class ModelEditor extends EditorPart { + + final static boolean IS_CARBON, IS_GTK, IS_MOTIF; + + private static final String SPACE = " "; + + // TODO move / change + static { + String platform = SWT.getPlatform(); + IS_CARBON = "carbon".equals(platform); + IS_GTK = "gtk".equals(platform); + IS_MOTIF = "motif".equals(platform); + } + + IDisplayModelElement selectedLiteral; + + IDisplayModelElement rootArea; + + private Canvas control; + + private Document document; + + private boolean dirty = false; + + private IFile file; + + private Map<String, IDisplayMapping> mappingMap; + + @Override + public void createPartControl(Composite parent) { + control = new ModelText(this, parent, SWT.NONE); + } + + @Override + public void dispose() { + if (control != null) { + control.dispose(); + } + + super.dispose(); + } + + @Override + public void doSave(IProgressMonitor monitor) { + try { + // write the document back + XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + outputter.output(document, out); + + out.flush(); + out.close(); + + ByteArrayInputStream in = new ByteArrayInputStream(out + .toByteArray()); + + file.setContents(in, true, true, null); + + dirty = false; + firePropertyChange(PROP_DIRTY); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Override + public void doSaveAs() { + } + + public Document getMappingFile() throws JDOMException, IOException { + String mappingFile = document.getRootElement().getAttributeValue( + "file", document.getRootElement().getNamespace("mapping")); + + System.out.println(mappingFile); + + IPath projectLocation = file.getProject().getLocation(); + IPath path2 = projectLocation.append(file.getProjectRelativePath() + .removeLastSegments(1)); + IPath path = path2.append(mappingFile); + + SAXBuilder builder = new SAXBuilder(); + return builder.build(path.toFile()); + } + + @Override + public void init(IEditorSite site, IEditorInput input) + throws PartInitException { + setSite(site); + setInput(input); + + file = (IFile) input.getAdapter(IFile.class); + try { + document = new SAXBuilder().build(file.getContents()); + System.out.println(document); + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (CoreException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + createMappings(); + rootArea = mappingMap.get(document.getRootElement().getName()).create( + document.getRootElement(), null); + selectedLiteral = getVariableLiterals().get(0); + } + + @Override + public boolean isDirty() { + return dirty; + } + + @Override + public boolean isSaveAsAllowed() { + return false; + } + + @Override + public void setFocus() { + } + + void handleKeyDown(Event event) { + System.out.println(event); + + // TODO refactor + if (((event.keyCode == SWT.TAB) && ((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_UP) { + int index = getVariableLiterals().indexOf(selectedLiteral) - 1; + if (index < 0) { + index = getVariableLiterals().size() - 1; + } + selectedLiteral = getVariableLiterals().get(index); + control.redraw(); + } else if (((event.keyCode == SWT.TAB) && !((event.stateMask & SWT.SHIFT) == SWT.SHIFT)) + || event.keyCode == SWT.ARROW_DOWN) { + int index = getVariableLiterals().indexOf(selectedLiteral) + 1; + if (index >= getVariableLiterals().size()) { + index = 0; + } + selectedLiteral = getVariableLiterals().get(index); + control.redraw(); + } else if (event.keyCode == SWT.ARROW_RIGHT + && selectedLiteral instanceof VariableLiteral) { + + VariableLiteral literal = (VariableLiteral) selectedLiteral; + + literal.setCaretPosition(literal.getCaretPosition() + 1); + control.redraw(); + } else if (event.keyCode == SWT.ARROW_LEFT + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + literal.setCaretPosition(literal.getCaretPosition() - 1); + control.redraw(); + } else if (event.keyCode == SWT.CR + && selectedLiteral instanceof AdditionPoint) { + AdditionPoint literal = (AdditionPoint) selectedLiteral; + literal.execute(); + control.redraw(); + } else if (event.keyCode == SWT.DEL + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + if (literal.getCaretPosition() < literal.getValue().length()) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition()); + literal.setValue(value.toString()); + changed(); + control.redraw(); + } + } else if (event.keyCode == SWT.BS + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + if (literal.getCaretPosition() > 0) { + StringBuffer value = new StringBuffer(literal.getValue()); + value.deleteCharAt(literal.getCaretPosition() - 1); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() - 1); + changed(); + control.redraw(); + } + } else if (isValidCharacter(event.stateMask, event.character) + && selectedLiteral instanceof VariableLiteral) { + VariableLiteral literal = (VariableLiteral) selectedLiteral; + StringBuffer value = new StringBuffer(literal.getValue()); + value.insert(literal.getCaretPosition(), event.character); + literal.setValue(value.toString()); + literal.setCaretPosition(literal.getCaretPosition() + 1); + changed(); + control.redraw(); + } + } + + private void changed() { + dirty = true; + firePropertyChange(PROP_DIRTY); + } + + private void createMappings() { + mappingMap = new HashMap<String, IDisplayMapping>(); + Map<String, IDisplayElementFactoryFactory> metaMappingMap = createMetaMappingMap(); + + try { + Document mappingFile = getMappingFile(); + + Element rootElement = mappingFile.getRootElement(); + List<Element> mappings = rootElement.getChildren("mapping"); + + for (Element mappingElement : mappings) { + Element configuration = (Element) mappingElement.getChildren() + .get(0); + + IDisplayMapping mappingX = metaMappingMap.get( + configuration.getName()).create(configuration, + metaMappingMap, mappingMap); + + mappingMap.put(mappingElement.getAttributeValue("select"), + mappingX); + } + + } catch (JDOMException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + private Map<String, IDisplayElementFactoryFactory> createMetaMappingMap() { + Map<String, IDisplayElementFactoryFactory> metaMappingMap = new HashMap<String, IDisplayElementFactoryFactory>(); + + metaMappingMap.put("area", new AreaFactoryFactory()); + metaMappingMap.put("line", new LineFactoryFactory()); + metaMappingMap.put("edit", new VariableFactoryFactory()); + metaMappingMap.put("literal", new FixedLiteralFactoryFactory()); + metaMappingMap.put("apply-mappings", new ApplyMappingsFactoryFactory()); + metaMappingMap.put("addition-point", new AdditionPointFactoryFactory()); + + return metaMappingMap; + } + + private List<IDisplayModelElement> getVariableLiterals() { + NavigationElementSearcher visitor = new NavigationElementSearcher(); + + rootArea.accept(visitor); + + return visitor.getNavigationElements(); + } + + private boolean isValidCharacter(int stateMask, char character) { + boolean ignore = false; + + if (IS_CARBON) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore COMMAND+ALT combinations since that key sequence + // produces characters on the mac. + ignore = (stateMask ^ SWT.COMMAND) == 0 + || (stateMask ^ (SWT.COMMAND | SWT.SHIFT)) == 0; + } else if (IS_MOTIF) { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Do not + // ignore ALT combinations since this key sequence + // produces characters on motif. + ignore = (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } else { + // Ignore accelerator key combinations (we do not want to + // insert a character in the text in this instance). Don't + // ignore CTRL+ALT combinations since that is the Alt Gr + // key on some keyboards. See bug 20953. + ignore = (stateMask ^ SWT.ALT) == 0 || (stateMask ^ SWT.CTRL) == 0 + || (stateMask ^ (SWT.ALT | SWT.SHIFT)) == 0 + || (stateMask ^ (SWT.CTRL | SWT.SHIFT)) == 0; + } + boolean isCharacter = !ignore && character > 31 && character != SWT.DEL; + // -ignore anything below SPACE except for line delimiter keys and tab. + // -ignore DEL + return isCharacter; + } +} Property changes on: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelEditor.java ___________________________________________________________________ Name: svn:keywords + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision Added: net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java =================================================================== --- net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/ModelText.java (rev 0) +++ net.sourceforge.exmmt/src/java/net/sourceforge/exmmt/Mode... [truncated message content] |
From: <lgr...@us...> - 2006-05-15 12:45:26
|
Revision: 1 Author: lgrammel Date: 2006-05-15 05:45:22 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/exmmt/?rev=1&view=rev Log Message: ----------- Initial import. Added Paths: ----------- net.sourceforge.exmmt/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |