Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2009-02-11 17:17:22 +0000
committerdstadnik2009-02-11 17:17:22 +0000
commit056888f09e1120bfead1363cfc45ba50fdfff9a7 (patch)
tree9e8ed271ffbb110f561d03abdce33c748033a615 /examples
parentb756bb1c5c84292c4a037093f5a442cca3c60ae2 (diff)
downloadorg.eclipse.gmf-tooling-056888f09e1120bfead1363cfc45ba50fdfff9a7.tar.gz
org.eclipse.gmf-tooling-056888f09e1120bfead1363cfc45ba50fdfff9a7.tar.xz
org.eclipse.gmf-tooling-056888f09e1120bfead1363cfc45ba50fdfff9a7.zip
obsolete
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/part/TaiPanLoadResourceAction.java74
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/providers/Parser_1_1.java86
2 files changed, 0 insertions, 160 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/part/TaiPanLoadResourceAction.java b/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/part/TaiPanLoadResourceAction.java
deleted file mode 100644
index 20ab74228..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/part/TaiPanLoadResourceAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2007 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:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.port.diagram.part;
-
-import org.eclipse.emf.edit.ui.action.LoadResourceAction;
-import org.eclipse.gmf.examples.taipan.port.diagram.edit.parts.PortEditPart;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * @generated
- */
-public class TaiPanLoadResourceAction implements IObjectActionDelegate {
-
- /**
- * @generated
- */
- private PortEditPart mySelectedElement;
-
- /**
- * @generated
- */
- private Shell myShell;
-
- /**
- * @generated
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- myShell = targetPart.getSite().getShell();
- }
-
- /**
- * @generated
- */
- public void run(IAction action) {
- LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(myShell, mySelectedElement.getEditingDomain());
- loadResourceDialog.open();
- }
-
- /**
- * @generated
- */
- public void selectionChanged(IAction action, ISelection selection) {
- mySelectedElement = null;
- if (selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- if (structuredSelection.size() == 1 && structuredSelection.getFirstElement() instanceof PortEditPart) {
- mySelectedElement = (PortEditPart) structuredSelection.getFirstElement();
- }
- }
- action.setEnabled(isEnabled());
- }
-
- /**
- * @generated
- */
- private boolean isEnabled() {
- return mySelectedElement != null;
- }
-
-}
diff --git a/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/providers/Parser_1_1.java b/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/providers/Parser_1_1.java
deleted file mode 100644
index df92c4161..000000000
--- a/examples/org.eclipse.gmf.examples.taipan.port.diagram/src/org/eclipse/gmf/examples/taipan/port/diagram/providers/Parser_1_1.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2007 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:
- * Dmitry Stadnik (Borland) - initial API and implementation
- */
-package org.eclipse.gmf.examples.taipan.port.diagram.providers;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.examples.taipan.port.diagram.parsers.AbstractParser;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
-
-/**
- * @generated
- */
-public/*package-local?*/class Parser_1_1 extends AbstractParser {
-
- /**
- * @generated
- */
- public Parser_1_1(EAttribute[] features) {
- super(features);
- if (features.length != 1) {
- throw new IllegalArgumentException(Arrays.toString(features));
- }
- }
-
- /**
- * @generated
- */
- public Parser_1_1(EAttribute[] features, EAttribute[] editableFeatures) {
- super(features, editableFeatures);
- if (features.length != 1) {
- throw new IllegalArgumentException(Arrays.toString(features));
- }
- if (editableFeatures.length != 1) {
- throw new IllegalArgumentException(Arrays.toString(editableFeatures));
- }
- }
-
- /**
- * @generated
- */
- public String getEditString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- String s = EcoreUtil.convertToString(editableFeatures[0].getEAttributeType(), element.eGet(editableFeatures[0]));
- return s != null ? s : ""; //$NON-NLS-1$
- }
-
- /**
- * @generated
- */
- public IParserEditStatus isValidEditString(IAdaptable adapter, String editString) {
- return ParserEditStatus.EDITABLE_STATUS;
- }
-
- /**
- * @generated
- */
- public ICommand getParseCommand(IAdaptable adapter, String newString, int flags) {
- Object value = EcoreUtil.createFromString(editableFeatures[0].getEAttributeType(), newString);
- return getParseCommand(adapter, new Object[] { value }, flags);
- }
-
- /**
- * @generated
- */
- public String getPrintString(IAdaptable adapter, int flags) {
- EObject element = (EObject) adapter.getAdapter(EObject.class);
- String s = EcoreUtil.convertToString(features[0].getEAttributeType(), element.eGet(features[0]));
- return s != null ? s : ""; //$NON-NLS-1$
- }
-
-}

Back to the top