tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelvingood...@apache.org
Subject svn commit: r573214 - in /incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter: SDOGenModelGeneratorAdapter.java SDOGenModelGeneratorAdapterFactory.java
Date Thu, 06 Sep 2007 10:42:28 GMT
Author: kelvingoodson
Date: Thu Sep  6 03:42:27 2007
New Revision: 573214

URL: http://svn.apache.org/viewvc?rev=573214&view=rev
Log:
Fix for TUSCANY-1638

Added:
    incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
Modified:
    incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java

Added: incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java?rev=573214&view=auto
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
(added)
+++ incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapter.java
Thu Sep  6 03:42:27 2007
@@ -0,0 +1,38 @@
+/**
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.tuscany.sdo.generate.adapter;
+
+import org.eclipse.emf.codegen.ecore.generator.GeneratorAdapterFactory;
+import org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGeneratorAdapter;
+import org.eclipse.emf.common.util.Monitor;
+
+public class SDOGenModelGeneratorAdapter extends GenModelGeneratorAdapter {
+
+  public SDOGenModelGeneratorAdapter(
+      GeneratorAdapterFactory generatorAdapterFactory) {
+    super(generatorAdapterFactory);
+  }
+
+  protected void ensureProjectExists(String workspacePath, Object object,
+      Object projectType, boolean force, Monitor monitor) {
+    // Do nothing -- this avoids differential behaviour according to whether we
+    // are running in Eclipse or not
+  }
+}

Modified: incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java?rev=573214&r1=573213&r2=573214&view=diff
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
(original)
+++ incubator/tuscany/java/sdo/tools/src/main/java/org/apache/tuscany/sdo/generate/adapter/SDOGenModelGeneratorAdapterFactory.java
Thu Sep  6 03:42:27 2007
@@ -51,4 +51,13 @@
 	    }
 	    return genPackageGeneratorAdapter;
 	  }
+
+    public Adapter createGenModelAdapter()
+    {
+      if (genModelGeneratorAdapter == null)
+      {
+        genModelGeneratorAdapter = new SDOGenModelGeneratorAdapter(this);
+      }
+      return genModelGeneratorAdapter;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message