From 67339d51f993e93dcf816c7feefdc16f51cede8a Mon Sep 17 00:00:00 2001 From: Mickael Istria Date: Tue, 15 Nov 2011 14:41:04 +0100 Subject: Clean repo --- devtools/org.eclipse.gmf.dev.runtime/.classpath | 7 - devtools/org.eclipse.gmf.dev.runtime/.cvsignore | 1 - devtools/org.eclipse.gmf.dev.runtime/.project | 28 --- .../META-INF/MANIFEST.MF | 9 - .../org.eclipse.gmf.dev.runtime/build.properties | 4 - devtools/org.eclipse.gmf.dev.runtime/plugin.xml | 20 --- .../runtime/ExtEditPartRequestFiltersProvider.java | 24 --- .../dev/runtime/ExtEditPartTraceContributor.java | 198 --------------------- 8 files changed, 291 deletions(-) delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/.classpath delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/.cvsignore delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/.project delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/META-INF/MANIFEST.MF delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/build.properties delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/plugin.xml delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartRequestFiltersProvider.java delete mode 100644 devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java (limited to 'devtools/org.eclipse.gmf.dev.runtime') diff --git a/devtools/org.eclipse.gmf.dev.runtime/.classpath b/devtools/org.eclipse.gmf.dev.runtime/.classpath deleted file mode 100644 index 751c8f2e5..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/devtools/org.eclipse.gmf.dev.runtime/.cvsignore b/devtools/org.eclipse.gmf.dev.runtime/.cvsignore deleted file mode 100644 index ba077a403..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -bin diff --git a/devtools/org.eclipse.gmf.dev.runtime/.project b/devtools/org.eclipse.gmf.dev.runtime/.project deleted file mode 100644 index fecbfa142..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.eclipse.gmf.dev.runtime - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/devtools/org.eclipse.gmf.dev.runtime/META-INF/MANIFEST.MF b/devtools/org.eclipse.gmf.dev.runtime/META-INF/MANIFEST.MF deleted file mode 100644 index 355610e06..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/META-INF/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: GMF Runtime Dev Extension -Bundle-SymbolicName: org.eclipse.gmf.dev.runtime;singleton:=true -Bundle-Version: 1.0.0 -Bundle-Localization: plugin -Require-Bundle: org.eclipse.gmf.dev, - org.eclipse.gmf.runtime.diagram.ui -Bundle-Vendor: eclipse.org diff --git a/devtools/org.eclipse.gmf.dev.runtime/build.properties b/devtools/org.eclipse.gmf.dev.runtime/build.properties deleted file mode 100644 index 34d2e4d2d..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - . diff --git a/devtools/org.eclipse.gmf.dev.runtime/plugin.xml b/devtools/org.eclipse.gmf.dev.runtime/plugin.xml deleted file mode 100644 index 43e84ab47..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/plugin.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartRequestFiltersProvider.java b/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartRequestFiltersProvider.java deleted file mode 100644 index 1aacc0b0c..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartRequestFiltersProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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: - * Dmitri Stadnik (Borland) - initial API and implementation - */ -package org.eclipse.gmf.dev.runtime; - -import org.eclipse.gmf.dev.EditPartRequestFiltersProvider; - -/** - * @author dstadnik - */ -public class ExtEditPartRequestFiltersProvider implements EditPartRequestFiltersProvider { - - public Class getConstants() { - return org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants.class; - } -} diff --git a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java b/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java deleted file mode 100644 index b7d57ee99..000000000 --- a/devtools/org.eclipse.gmf.dev.runtime/src/org/eclipse/gmf/dev/runtime/ExtEditPartTraceContributor.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * 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: - * Dmitri Stadnik (Borland) - initial API and implementation - */ -package org.eclipse.gmf.dev.runtime; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.Request; -import org.eclipse.gef.commands.Command; -import org.eclipse.gmf.dev.CommandCreatedEvent; -import org.eclipse.gmf.dev.DevPlugin; -import org.eclipse.gmf.dev.DevUtils; -import org.eclipse.gmf.dev.EditPartTraceConstructor; -import org.eclipse.gmf.dev.EditPartTraceContributor; -import org.eclipse.gmf.dev.EditPartTraceRecord; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand; -import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter; -import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy; -import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy; -import org.eclipse.gmf.runtime.diagram.ui.commands.SemanticCreateCommand; -import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest; -import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; - -/** - * @author dstadnik - */ -public class ExtEditPartTraceContributor implements EditPartTraceContributor { - - public void contribute(List kids, EditPart editPart) { - } - - public void contribute(List kids, Request request) { - if (request instanceof EditCommandRequestWrapper) { - IEditCommandRequest realRequest = ((EditCommandRequestWrapper) request).getEditCommandRequest(); - if (realRequest != null) { - kids.add(createRequestNode(realRequest)); - } - } - if (request instanceof CreateViewAndElementRequest) { - CreateViewAndElementRequest cveRequest = (CreateViewAndElementRequest) request; - CreateElementRequestAdapter ceAdapter = cveRequest.getViewAndElementDescriptor().getCreateElementRequestAdapter(); - if (ceAdapter != null) { - CreateElementRequest ceRequest = (CreateElementRequest) ceAdapter.getAdapter(CreateElementRequest.class); - if (ceRequest != null) { - kids.add(createRequestNode(ceRequest)); - } - } - } - } - - public static EditPartTraceRecord createRequestNode(IEditCommandRequest request) { - List kids = new ArrayList(); - // kids.add(new EditPartTraceRecord("edit helper context " + request.getEditHelperContext())); - if (request instanceof CreateElementRequest) { - kids.add(new EditPartTraceRecord("element type " + ((CreateElementRequest) request).getElementType(), DevPlugin.INFO_IMAGE)); - } - List elementsToEdit = request.getElementsToEdit(); - if (elementsToEdit != null) { - for (Object elementToEdit : elementsToEdit) { - kids.add(new EditPartTraceRecord("element to edit " + elementToEdit)); - } - } - Map parameters = request.getParameters(); - if (parameters != null) { - for (Object key : parameters.keySet()) { - kids.add(new EditPartTraceRecord(String.valueOf(key) + '=' + parameters.get(key), DevPlugin.PARAMETER_IMAGE)); - } - } - return new EditPartTraceRecord(getLabel(request), DevPlugin.REQUEST_IMAGE, kids.toArray(new EditPartTraceRecord[kids.size()])); - } - - private static String getLabel(IEditCommandRequest request) { - String label = DevUtils.getFullClassName(request); - if (request.getLabel() != null) { - label += '<' + request.getLabel() + '>'; - } - return label; - } - - public void contribute(List kids, Command command, CommandCreatedEvent event) { - if (command instanceof ICommandProxy) { - ICommand realCommand = ((ICommandProxy) command).getICommand(); - if (realCommand != null) { - kids.add(createCommandNode(realCommand, event)); - } - } - if (command instanceof IAdaptable) { - org.eclipse.emf.common.command.Command delegate = (org.eclipse.emf.common.command.Command) ((IAdaptable) command).getAdapter(org.eclipse.emf.common.command.Command.class); - if (delegate != null) { - kids.add(createCommandNode(delegate, event)); - } - } - } - - public static EditPartTraceRecord createCommandNode(ICommand command, CommandCreatedEvent event) { - List kids = new ArrayList(); - Object source = event.getSource(command); - if (source != null) { - kids.add(new EditPartTraceRecord("from " + DevUtils.getFullClassName(source))); - } - if (command instanceof ICompositeCommand) { - Iterator subCommands = ((ICompositeCommand) command).iterator(); - while (subCommands.hasNext()) { - kids.add(createCommandNode((ICommand) subCommands.next(), event)); - } - } - if (command instanceof CommandProxy) { - Command realCommand = ((CommandProxy) command).getCommand(); - if (realCommand != null) { - kids.add(EditPartTraceConstructor.createCommandNode(realCommand, event)); - } - } - if (command instanceof SemanticCreateCommand) { - ICommand realCommand = (ICommand) DevUtils.getFieldValue(command, "realSemanticCommand"); - if (realCommand != null) { - kids.add(createCommandNode(realCommand, event)); - } - } - if (command instanceof IAdaptable) { - org.eclipse.emf.common.command.Command delegate = (org.eclipse.emf.common.command.Command) ((IAdaptable) command).getAdapter(org.eclipse.emf.common.command.Command.class); - if (delegate != null) { - kids.add(createCommandNode(delegate, event)); - } - } - return new EditPartTraceRecord(getLabel(command), getImage(command), kids.toArray(new EditPartTraceRecord[kids.size()])); - } - - private static String getLabel(ICommand command) { - String label = DevUtils.getFullClassName(command); - if (command.getLabel() != null) { - label += '<' + command.getLabel() + '>'; - } - return label; - } - - private static String getImage(ICommand command) { - String id = DevPlugin.COMMANDX_IMAGE; - try { - if (command.canExecute()) { - id = DevPlugin.COMMAND_IMAGE; - } - } catch (Exception e) { - // ignore - } - return id; - } - - public static EditPartTraceRecord createCommandNode(org.eclipse.emf.common.command.Command command, CommandCreatedEvent event) { - List kids = new ArrayList(); - Object source = event.getSource(command); - if (source != null) { - kids.add(new EditPartTraceRecord("from " + DevUtils.getFullClassName(source))); - } - if (command instanceof org.eclipse.emf.common.command.CompoundCommand) { - for (org.eclipse.emf.common.command.Command subCommand : (List) ((org.eclipse.emf.common.command.CompoundCommand) command) - .getCommandList()) { - kids.add(createCommandNode(subCommand, event)); - } - } - return new EditPartTraceRecord(getLabel(command), getImage(command), kids.toArray(new EditPartTraceRecord[kids.size()])); - } - - private static String getLabel(org.eclipse.emf.common.command.Command command) { - String label = DevUtils.getFullClassName(command); - if (command.getLabel() != null) { - label += '<' + command.getLabel() + '>'; - } - return label; - } - - private static String getImage(org.eclipse.emf.common.command.Command command) { - String id = DevPlugin.COMMANDX_IMAGE; - try { - if (command.canExecute()) { - id = DevPlugin.COMMAND_IMAGE; - } - } catch (Exception e) { - // ignore - } - return id; - } -} \ No newline at end of file -- cgit v1.2.3