Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2005-08-03 18:28:59 -0400
committeratikhomirov2005-08-03 18:28:59 -0400
commitd07505d8b2eb10a131b58b655d77c8899b729e42 (patch)
tree3cdd213729e5c5c898cd71406983cf0fcc2fff6d /archive/org.eclipse.gmf.edit
parenta6c85dc2721e973e223da405442cba0928af4256 (diff)
downloadorg.eclipse.gmf-tooling-d07505d8b2eb10a131b58b655d77c8899b729e42.tar.gz
org.eclipse.gmf-tooling-d07505d8b2eb10a131b58b655d77c8899b729e42.tar.xz
org.eclipse.gmf-tooling-d07505d8b2eb10a131b58b655d77c8899b729e42.zip
*** empty log message ***
Diffstat (limited to 'archive/org.eclipse.gmf.edit')
-rw-r--r--archive/org.eclipse.gmf.edit/.classpath7
-rw-r--r--archive/org.eclipse.gmf.edit/.cvsignore1
-rw-r--r--archive/org.eclipse.gmf.edit/.project28
-rw-r--r--archive/org.eclipse.gmf.edit/META-INF/MANIFEST.MF9
-rw-r--r--archive/org.eclipse.gmf.edit/build.properties5
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/AdapterFactoryMetaInfoSource.java57
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/CanvasMetaInfoProvider.java20
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/ChildMetaInfoProvider.java28
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/LinkMetaInfoProvider.java26
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoProviderAdapter.java27
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoSource.java27
-rw-r--r--archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/NodeMetaInfoProvider.java28
12 files changed, 263 insertions, 0 deletions
diff --git a/archive/org.eclipse.gmf.edit/.classpath b/archive/org.eclipse.gmf.edit/.classpath
new file mode 100644
index 000000000..065ac06e1
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/archive/org.eclipse.gmf.edit/.cvsignore b/archive/org.eclipse.gmf.edit/.cvsignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/archive/org.eclipse.gmf.edit/.project b/archive/org.eclipse.gmf.edit/.project
new file mode 100644
index 000000000..aedd9584d
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.edit</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>
diff --git a/archive/org.eclipse.gmf.edit/META-INF/MANIFEST.MF b/archive/org.eclipse.gmf.edit/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..3334b0d9c
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: GMF.Edit Plug-in
+Bundle-SymbolicName: org.eclipse.gmf.edit
+Bundle-Version: 1.0.0
+Bundle-Vendor: Eclipse.org
+Require-Bundle: org.eclipse.emf.edit,
+ org.eclipse.gmf.runtime
+Export-Package: org.eclipse.gmf.edit.provider.metainfo
diff --git a/archive/org.eclipse.gmf.edit/build.properties b/archive/org.eclipse.gmf.edit/build.properties
new file mode 100644
index 000000000..30d8c0866
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/build.properties
@@ -0,0 +1,5 @@
+bin.includes = META-INF/,\
+ .
+jars.compile.order = .
+source.. = src/
+output.. = bin/
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/AdapterFactoryMetaInfoSource.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/AdapterFactoryMetaInfoSource.java
new file mode 100644
index 000000000..0e0cc6a15
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/AdapterFactoryMetaInfoSource.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.diagramrt.DiagramCanvas;
+import org.eclipse.gmf.diagramrt.DiagramLink;
+import org.eclipse.gmf.diagramrt.DiagramNode;
+
+/**
+ * Implementation of {@link org.eclipse.gmf.edit.provider.metainfo.MetaInfoSource}
+ * that uses EMF Adapters mechanism.
+ * @author artem
+ */
+public class AdapterFactoryMetaInfoSource extends AdapterImpl implements MetaInfoSource {
+ private final AdapterFactory myMetaInfoFactory;
+
+ public AdapterFactoryMetaInfoSource(AdapterFactory metaInfoFactory) {
+ assert metaInfoFactory != null;
+ assert metaInfoFactory.isFactoryForType(NodeMetaInfoProvider.class) && metaInfoFactory.isFactoryForType(LinkMetaInfoProvider.class);
+ myMetaInfoFactory = metaInfoFactory;
+ }
+
+ public boolean isAdapterForType(Object type) {
+ return MetaInfoSource.class == type;
+ }
+
+ public NodeMetaInfoProvider getNodeInfo(DiagramNode diagramNode) {
+ return (NodeMetaInfoProvider) myMetaInfoFactory.adapt(diagramNode, NodeMetaInfoProvider.class);
+ }
+
+ public LinkMetaInfoProvider getLinkInfo(DiagramLink diagramLink) {
+ return (LinkMetaInfoProvider) myMetaInfoFactory.adapt(diagramLink, LinkMetaInfoProvider.class);
+ }
+
+ public CanvasMetaInfoProvider getCanvasInfo(DiagramCanvas diagramCanvas) {
+ return (CanvasMetaInfoProvider) myMetaInfoFactory.adapt(diagramCanvas, CanvasMetaInfoProvider.class);
+ }
+
+ /**
+ * inspired by {@link org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain#getEditingDomainFor(org.eclipse.emf.ecore.EObject)}
+ */
+ public static MetaInfoSource getMetaInfoSource(DiagramCanvas canvas) {
+ return (MetaInfoSource) EcoreUtil.getExistingAdapter(canvas, MetaInfoSource.class);
+ }
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/CanvasMetaInfoProvider.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/CanvasMetaInfoProvider.java
new file mode 100644
index 000000000..78adb8790
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/CanvasMetaInfoProvider.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+/**
+ * Placeholder for meta features of diagram surface.
+ * @author artem
+ */
+public interface CanvasMetaInfoProvider {
+
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/ChildMetaInfoProvider.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/ChildMetaInfoProvider.java
new file mode 100644
index 000000000..f234a4dd4
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/ChildMetaInfoProvider.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gmf.diagramrt.ChildNode;
+import org.eclipse.gmf.diagramrt.DiagramNode;
+
+/**
+ * Meta features of domain elements represented as child nodes.
+ * Still placeholder
+ * @author artem
+ */
+public interface ChildMetaInfoProvider {
+
+ EReference getContainmentFeature(DiagramNode parentNode, ChildNode childNode);
+ EReference getListingFeature(DiagramNode parentNode, ChildNode childNode);
+ String getCompartmentID(DiagramNode parentNode, ChildNode childNode);
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/LinkMetaInfoProvider.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/LinkMetaInfoProvider.java
new file mode 100644
index 000000000..5403db161
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/LinkMetaInfoProvider.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.diagramrt.DiagramLink;
+
+/**
+ * Meta features of domain elements represented as diagram links
+ * @author artem
+ */
+public interface LinkMetaInfoProvider {
+
+ EStructuralFeature getTargetFeature(DiagramLink diagramLink);
+ EReference getContainmentFeature(DiagramLink diagramLink);
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoProviderAdapter.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoProviderAdapter.java
new file mode 100644
index 000000000..7201a49a8
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoProviderAdapter.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.emf.common.notify.impl.AdapterImpl;
+import org.eclipse.emf.edit.provider.IDisposable;
+
+/**
+ * Basic provider implementation that uses EMF Adapter mechanism to
+ * keep track of provider instances
+ * @author artem
+ */
+public class MetaInfoProviderAdapter extends AdapterImpl implements IDisposable {
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+ }
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoSource.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoSource.java
new file mode 100644
index 000000000..2328f1f91
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/MetaInfoSource.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.gmf.diagramrt.DiagramCanvas;
+import org.eclipse.gmf.diagramrt.DiagramLink;
+import org.eclipse.gmf.diagramrt.DiagramNode;
+
+/**
+ * Access to domain metainfo from diagram elements
+ * @author artem
+ */
+public interface MetaInfoSource {
+
+ NodeMetaInfoProvider getNodeInfo(DiagramNode diagramNode);
+ LinkMetaInfoProvider getLinkInfo(DiagramLink diagramLink);
+ CanvasMetaInfoProvider getCanvasInfo(DiagramCanvas diagramCanvas);
+}
diff --git a/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/NodeMetaInfoProvider.java b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/NodeMetaInfoProvider.java
new file mode 100644
index 000000000..bdf372943
--- /dev/null
+++ b/archive/org.eclipse.gmf.edit/src/org/eclipse/gmf/edit/provider/metainfo/NodeMetaInfoProvider.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2005 Borland Software Corporation
+ *
+ * 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+package org.eclipse.gmf.edit.provider.metainfo;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.diagramrt.ChildNode;
+import org.eclipse.gmf.diagramrt.DiagramNode;
+
+/**
+ * Domain meta data for diagram nodes
+ * @author artem
+ */
+public interface NodeMetaInfoProvider {
+
+ //EObject getContainer(DiagramNode node);
+ EStructuralFeature getContainmentFeature(DiagramNode node);
+ EStructuralFeature getContainmentFeature(DiagramNode node, ChildNode childNode);
+}

Back to the top