Bladeren bron

Yakindu/sctpro#986 : move shared editing domain factory to stext plugin

* avoid runtime dependency to sct.ecitor during headless execution
Johannes Dicks 8 jaren geleden
bovenliggende
commit
6f5150c835

+ 2 - 1
plugins/org.yakindu.sct.model.stext/META-INF/MANIFEST.MF

@@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport,
  org.yakindu.base.expressions;visibility:=reexport,
  org.yakindu.sct.domain,
  org.eclipse.emf.workspace,
- org.yakindu.sct.model.stext.lib
+ org.yakindu.sct.model.stext.lib,
+ org.eclipse.gmf.runtime.diagram.core
 Import-Package: org.apache.commons.logging,
  org.apache.log4j,
  org.eclipse.xtext.xbase.lib

+ 7 - 0
plugins/org.yakindu.sct.model.stext/plugin.xml

@@ -16,5 +16,12 @@
             class="org.yakindu.sct.model.stext.resource.StextResourceFactory"
             type="sct">
       </parser>
+   </extension>
+       <!-- Shared Editing Domain-->
+     <extension
+         point="org.eclipse.emf.transaction.editingDomains">
+      <editingDomain
+            factory="org.yakindu.sct.model.stext.scoping.SharedEditingDomainFactory"
+            id="org.yakindu.sct.domain"/>
    </extension>
 </plugin>

+ 0 - 37
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/HeadlessURI2ResourceDescriptionCache.java

@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2017 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     committers of YAKINDU - initial API and implementation
- */
-package org.yakindu.sct.model.stext.scoping;
-
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import com.google.inject.Singleton;
-
-/**
- * Introduced because it is currently impossible to pass the resource set instance created
- * for headless execution to the {@link URI2ResourceDescriptionCache} by
- * current injection structure. Another resource set instance leads into impossibility to load
- * {@link CHeaderResource}s representing a system include (headers outside the
- * physical workspace location).
- * 
- * @author Johannes Dicks
- *
- */
-@Singleton
-public class HeadlessURI2ResourceDescriptionCache extends URI2ResourceDescriptionCache {
-
-	// FIXME get rid of this...
-	public static ResourceSet theOneAndOnlyResourceSet;
-
-	@Override
-	protected ResourceSet getResourceSet() {
-		return theOneAndOnlyResourceSet;
-	}
-}

+ 1 - 1
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/partitioning/SharedEditingDomainFactory.java

@@ -8,7 +8,7 @@
  * committers of YAKINDU - initial API and implementation
  *
 */
-package org.yakindu.sct.ui.editor.partitioning;
+package org.yakindu.sct.model.stext.scoping;
 
 import java.io.IOException;
 

+ 0 - 10
plugins/org.yakindu.sct.ui.editor/plugin.xml

@@ -865,14 +865,4 @@
             priority="medium">
       </factory>
    </extension>
-  <!-- Added default templates -->
-  
-    <!-- Shared Editing Domain-->
-     <extension
-         point="org.eclipse.emf.transaction.editingDomains">
-      <editingDomain
-            factory="org.yakindu.sct.ui.editor.partitioning.SharedEditingDomainFactory"
-            id="org.yakindu.sct.domain"/>
-   </extension>
-   
 </plugin>