Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.papyrus.examples.restrictedservicecreation')
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/.classpath7
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/.project28
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/META-INF/MANIFEST.MF21
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/build.properties8
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.properties12
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.xml27
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/Activator.java68
-rw-r--r--examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/FilterClassOnPackage.java73
9 files changed, 0 insertions, 252 deletions
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.classpath b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.classpath
deleted file mode 100644
index 2d1a4302f04..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.project b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.project
deleted file mode 100644
index d6cd9d20511..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.example.restrictedservicecreation</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/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 828157292c3..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Aug 24 16:14:29 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/META-INF/MANIFEST.MF b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/META-INF/MANIFEST.MF
deleted file mode 100644
index 46e3e6004d7..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.papyrus.example.restrictedservicecreation;singleton:=true
-Bundle-Version: 0.7.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.restrictedservicecreation.Activator
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.umlutils;bundle-version="0.7.0",
- org.eclipse.papyrus.core;bundle-version="0.7.0",
- org.eclipse.papyrus.diagram.common;bundle-version="0.7.0",
- org.eclipse.gmt.modisco.infra.browser;bundle-version="0.8.0",
- org.eclipse.gmt.modisco.infra.browser.uicore;bundle-version="0.8.0",
- org.eclipse.papyrus.service.creation;bundle-version="0.7.1",
- org.eclipse.papyrus.uml.service.creation;bundle-version="0.7.1",
- org.eclipse.gmf.runtime.emf.type.ui;bundle-version="1.2.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.papyrus.restrictedservicecreation
-Bundle-Vendor: %providerName
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/build.properties b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/build.properties
deleted file mode 100644
index c0d503fd9e3..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-src.includes = src/,\
- plugin.xml,\
- build.properties
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.properties b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.properties
deleted file mode 100644
index f5b4a67e73b..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-#################################################################################
-# Copyright (c) 2008 CEA LIST.
-# 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:
-# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
-##################################################################################
-pluginName=restrictedservicecreation
-providerName=Eclipse.org
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.xml b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.xml
deleted file mode 100644
index 5591c133f4c..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <metamodel nsURI="http://www.eclipse.org/uml2/3.0.0/UML">
-
- <adviceBinding
- class="org.eclipse.papyrus.restrictedservicecreation.FilterClassOnPackage"
- id="org.eclipse.papyrus.restrictedservicecreation.FilterClassOnPackage"
- inheritance="all"
- typeId="org.eclipse.papyrus.uml.Element">
- </adviceBinding>
- </metamodel>
- </extension>
-
- <!-- Creating a default binding -->
- <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
-
- <!-- Bindings declaration -->
- <binding context="org.eclipse.papyrus.uml.service.creation.TypeContext">
- <elementType pattern="org.eclipse.papyrus.uml.*" />
- <advice ref="org.eclipse.papyrus.restrictedservicecreation.FilterClassOnPackage" />
- </binding>
- </extension>
-
-
-</plugin>
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/Activator.java b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/Activator.java
deleted file mode 100644
index 0ea5d65b1a6..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/Activator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.restrictedservicecreation;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin implements org.eclipse.ui.IStartup{
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.example.restrictedservicecreation"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public void earlyStartup() {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/FilterClassOnPackage.java b/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/FilterClassOnPackage.java
deleted file mode 100644
index afba04aae08..00000000000
--- a/examples/org.eclipse.papyrus.examples.restrictedservicecreation/src/org/eclipse/papyrus/restrictedservicecreation/FilterClassOnPackage.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * 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:
- * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.restrictedservicecreation;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.papyrus.service.creation.PapyrusEditHelperFilter;
-import org.eclipse.papyrus.uml.service.creation.element.UMLElementTypes;
-
-/**
- * this is a filter used to allow the creation of a class or package in the context on a package,
- * or to allow only the creation of a property in the context of a class
- *
- */
-public class FilterClassOnPackage extends PapyrusEditHelperFilter {
-
- /**
- * {@inheritDoc}
- */
- protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
- return new ConfigureElementCommand(request) {
-
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- return CommandResult.newOKCommandResult();
- }
- };
- }
- /**
- * {@inheritDoc}
- */
- public boolean validateRequest(IEditCommandRequest request) {
- if(request instanceof GetEditContextRequest){
- IEditCommandRequest subrequest= ((GetEditContextRequest)request).getEditCommandRequest();
- if( subrequest instanceof CreateElementRequest){
-
- //allow only creation of class or package into a package
- if(((CreateElementRequest) subrequest).getContainer() instanceof org.eclipse.uml2.uml.Package){
- if(((CreateElementRequest) subrequest).getElementType().equals(UMLElementTypes.CLASS)||
- ((CreateElementRequest) subrequest).getElementType().equals(UMLElementTypes.PACKAGE)){
- return true;
- }
- }
- //allow only creation of property into a class
- if(((CreateElementRequest) subrequest).getContainer() instanceof org.eclipse.uml2.uml.Class){
- if(((CreateElementRequest) subrequest).getElementType().equals(UMLElementTypes.PROPERTY)){
- return true;
- }
- }
- }
- }
- return false;
- }
-
-}

Back to the top