Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/Activator.java71
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java215
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/NatTableEditor.java38
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/SynchronizedTableEditor.java26
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java213
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java205
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java249
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableEditorHandler.java99
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/modelresource/PapyrusNattableModel.java113
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/utils/TableEditorInput.java77
10 files changed, 0 insertions, 1306 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/Activator.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/Activator.java
deleted file mode 100644
index 2e178f9aa08..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-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 {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.nattable.common"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- @Override
- 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;
- }
-
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java
deleted file mode 100644
index 21792c90848..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/AbstractEMFNattableEditor.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST & LIFL
- *
- *
- * 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:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.editor;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.common.utils.TableEditorInput;
-import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
-import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-
-/**
- * Abstract class for TableEditor
- *
- *
- *
- */
-public abstract class AbstractEMFNattableEditor extends EditorPart {
-
- /** the service registry */
- protected ServicesRegistry servicesRegistry;
-
- /**
- * the table manager
- */
- protected final INattableModelManager tableManager;
-
- /**
- * the part name synchronizer
- */
- private PartNameSynchronizer synchronizer;
-
- /**
- * @param servicesRegistry
- * @param rawModel
- *
- */
- public AbstractEMFNattableEditor(final ServicesRegistry servicesRegistry, final Table rawModel) {
- this.servicesRegistry = servicesRegistry;
- this.tableManager = new NattableModelManager(rawModel);
- this.synchronizer = new PartNameSynchronizer(rawModel);
- }
-
-
- /**
- *
- * @see org.eclipse.emf.facet.widgets.nattable.workbench.editor.NatTableEditor#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
- *
- * @param site
- * @param input
- * @throws PartInitException
- */
- @Override
- public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
- final TableEditorInput tableEditorInput = new TableEditorInput(this.tableManager.getTable(), getEditingDomain());
- setSite(site);
- setInput(tableEditorInput);
- setPartName(this.tableManager.getTable().getName());
- }
-
- /**
- *
- * @see org.eclipse.emf.facet.widgets.nattable.workbench.editor.NatTableEditor#getEditingDomain()
- *
- * @return
- */
- public EditingDomain getEditingDomain() {
- try {
- return ServiceUtils.getInstance().getTransactionalEditingDomain(this.servicesRegistry);
- } catch (final ServiceException e) {
- Activator.log.error(e);
- }
- return null;
- }
-
- @Override
- public void doSave(final IProgressMonitor monitor) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void doSaveAs() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean isDirty() {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public void setFocus() {
- // TODO Auto-generated method stub
- }
-
- @Override
- public void createPartControl(final Composite parent) {
- this.tableManager.createNattable(parent, SWT.NONE, getSite());
- }
-
- @Override
- public Object getAdapter(final Class adapter) {
- if(adapter == INattableModelManager.class) {
- return this.tableManager;
- }
- return super.getAdapter(adapter);
- }
-
- @Override
- public void dispose() {
- this.tableManager.dispose();
- this.synchronizer.dispose();
- super.dispose();
- }
-
- /**
- * A class taking in charge the synchronization of the partName and the table name.
- * When table name change, the other is automatically updated.
- *
- *
- */
- public class PartNameSynchronizer {
-
- /** the papyrus table */
- private Table papyrusTable;
-
- /**
- * Listener on diagram name change.
- */
- private final Adapter tableNameListener = new AdapterImpl() {
-
- /**
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- *
- * @param notification
- */
- @Override
- public void notifyChanged(final Notification notification) {
- if(notification.getFeature() == NattableconfigurationPackage.eINSTANCE.getTableNamedElement_Name()) {
- setPartName(PartNameSynchronizer.this.papyrusTable.getName());
- }
- }
- };
-
- /**
- *
- * Constructor.
- *
- * @param diagram
- */
- public PartNameSynchronizer(final Table papyrusTable) {
- setTable(papyrusTable);
- }
-
- public void dispose() {
- this.papyrusTable.eAdapters().remove(this.tableNameListener);
- this.papyrusTable = null;
- }
-
- /**
- * Change the associated diagram.
- *
- * @param papyrusTable
- */
- public void setTable(final Table papyrusTable) {
- // Remove from old table, if any
- if(this.papyrusTable != null) {
- papyrusTable.eAdapters().remove(this.tableNameListener);
- }
- // Set new table
- this.papyrusTable = papyrusTable;
- // Set editor name
- setPartName(papyrusTable.getName());
- // Listen to name change
- papyrusTable.eAdapters().add(this.tableNameListener);
- }
- }
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/NatTableEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/NatTableEditor.java
deleted file mode 100644
index 683403ffb9e..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/NatTableEditor.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.editor;
-
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-
-/**
- * The Editor used for Papyrus NatTable model
- *
- * @author Vincent Lorenzo
- *
- */
-public class NatTableEditor extends AbstractEMFNattableEditor {
-
- /**
- *
- * Constructor.
- *
- * @param servicesRegistry
- * @param rawModel
- */
- public NatTableEditor(ServicesRegistry servicesRegistry, Table rawModel) {
- super(servicesRegistry, rawModel);
- }
-
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/SynchronizedTableEditor.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/SynchronizedTableEditor.java
deleted file mode 100644
index 12f7306de34..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/editor/SynchronizedTableEditor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 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:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.editor;
-
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.widgets.util.IRevealSemanticElement;
-
-public abstract class SynchronizedTableEditor extends AbstractEMFNattableEditor implements IRevealSemanticElement {
-
- public SynchronizedTableEditor(final ServicesRegistry servicesRegistry, final Table rawModel) {
- super(servicesRegistry, rawModel);
- }
-
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java
deleted file mode 100644
index 7295bcd5476..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/AbstractNattableEditorFactory.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 LIFL & 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:
- * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.factory;
-
-import java.lang.reflect.Constructor;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.extension.diagrameditor.AbstractEditorFactory;
-import org.eclipse.papyrus.infra.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-/**
- * Abstract factory for the NattableEditor
- *
- *
- *
- */
-public abstract class AbstractNattableEditorFactory extends AbstractEditorFactory {
-
- /**
- *
- * Constructor.
- *
- * @param editorClass
- * the editor class
- * @param editorType
- * the type of editor
- */
- public AbstractNattableEditorFactory(Class<?> editorClass, String editorType) {
- super(editorClass, editorType);
- }
-
- /**
- * Create the IPageModel that is used by the SashWindows to manage the editor.
- *
- * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object)
- *
- * @param pageIdentifier
- * The model pushed in the sashmodel by the creation command
- * @return A model implementing the IPageModel
- */
- public IPageModel createIPageModel(Object pageIdentifier) {
- return new NattableEditorModel(pageIdentifier, getServiceRegistry());
- }
-
- /**
- * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#isPageModelFactoryFor(java.lang.Object)
- *
- * @param pageIdentifier
- * @return
- */
- public boolean isPageModelFactoryFor(Object pageIdentifier) {
- if(pageIdentifier instanceof Table) {
- return getExpectedType().equals(((Table)pageIdentifier).getTableConfiguration().getType().trim());
- }
- return false;
- }
-
- /**
- * IEditorModel used internally by the SashContainer. This model know how to handle IEditor creation.
- *
- * @author cedric dumoulin
- *
- */
- class NattableEditorModel implements IEditorModel {
-
-
- /**
- * The servicesRegistry provided at creation.
- */
- private ServicesRegistry servicesRegistry;
-
- /**
- * The created editor.
- */
- private IEditorPart editor;
-
- /**
- * The raw model stored in the SashProvider.
- */
- private Table rawModel;
-
- /**
- *
- * Constructor.
- */
- public NattableEditorModel(Object pageIdentifier, ServicesRegistry servicesRegistry) {
- this.rawModel = (Table)pageIdentifier;
- this.servicesRegistry = servicesRegistry;
- }
-
- /**
- * Create the IEditor for the diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#createIEditorPart()
- * @return
- * @throws PartInitException
- *
- */
- public IEditorPart createIEditorPart() throws PartInitException {
- try {
-
- Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, Table.class);
- IEditorPart newEditor = (IEditorPart)c.newInstance(this.servicesRegistry, this.rawModel);
- // IEditorPart newEditor = new DefaultNattableEditor(getServiceRegistry(), rawModel);
- this.editor = newEditor;
- return this.editor;
-
- } catch (Exception e) {
- // Lets propagate. This is an implementation problem that should be solved by
- // programmer.
- throw new PartInitException("Can't create Nattable", e); //$NON-NLS-1$
- }
-
- }
-
- /**
- * Get the action bar requested by the Editor.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#getActionBarContributor()
- * @return
- *
- */
- public EditorActionBarContributor getActionBarContributor() {
-
- String actionBarId = AbstractNattableEditorFactory.this.editorDescriptor.getActionBarContributorId();
-
- // Do nothing if no EditorActionBarContributor is specify.
- if(actionBarId == null || actionBarId.length() == 0) {
- return null;
- }
-
- // Try to get it.
-
- // Get ServiceRegistry
- // ServicesRegistry serviceRegistry = getServicesRegistry();
- ActionBarContributorRegistry registry;
- try {
- registry = this.servicesRegistry.getService(ActionBarContributorRegistry.class);
- } catch (ServiceException e) {
- // Service not found
- Activator.log.error(e);
- return null;
- }
-
- try {
- return registry.getActionBarContributor(actionBarId);
- } catch (BackboneException e) {
- Activator.log.error(e);
- return null;
- }
- }
-
- /**
- * Get the underlying RawModel. Return the Diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getRawModel()
- * @return
- *
- */
- public Object getRawModel() {
- return this.rawModel;
- }
-
- /**
- * Get the icon to be shown by Tabs
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabIcon()
- * @return
- *
- */
- public Image getTabIcon() {
- ImageDescriptor imageDescriptor = getEditorDescriptor().getIcon();
- if(imageDescriptor == null) {
- return null;
- }
-
- return imageDescriptor.createImage();
- }
-
- /**
- * Get the title of the Diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabTitle()
- * @return
- *
- */
- public String getTabTitle() {
- return this.rawModel.getName();
- }
- }
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java
deleted file mode 100644
index a285f1e5203..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/factory/NattableEditorFactory.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 LIFL & 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:
- * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.factory;
-
-import java.lang.reflect.Constructor;
-
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.extension.diagrameditor.AbstractEditorFactory;
-import org.eclipse.papyrus.infra.core.multidiagram.actionbarcontributor.ActionBarContributorRegistry;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorActionBarContributor;
-
-/**
- * Abstract factory for the NattableEditor
- *
- *
- *
- */
-public class NattableEditorFactory extends AbstractEditorFactory {
-
- /**
- *
- * Constructor.
- *
- * @param editorClass
- * the editor class
- * @param editorType
- * the type of editor
- */
- public NattableEditorFactory() {
- super(NatTableEditor.class, "");//we don't use the type for the Nattable models
- }
-
- /**
- * Create the IPageModel that is used by the SashWindows to manage the editor.
- *
- * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#createIPageModel(java.lang.Object)
- *
- * @param pageIdentifier
- * The model pushed in the sashmodel by the creation command
- * @return A model implementing the IPageModel
- */
- public IPageModel createIPageModel(Object pageIdentifier) {
- return new NattableEditorModel(pageIdentifier, getServiceRegistry());
- }
-
- /**
- * @see org.eclipse.papyrus.infra.core.editorsfactory.IEditorFactory#isPageModelFactoryFor(java.lang.Object)
- *
- * @param pageIdentifier
- * @return
- */
- public boolean isPageModelFactoryFor(Object pageIdentifier) {
- return pageIdentifier instanceof Table;
- }
-
- /**
- * IEditorModel used internally by the SashContainer. This model know how to handle IEditor creation.
- *
- * @author cedric dumoulin
- *
- */
- class NattableEditorModel implements IEditorModel {
-
-
- /**
- * The servicesRegistry provided at creation.
- */
- private ServicesRegistry servicesRegistry;
-
- /**
- * The created editor.
- */
- private IEditorPart editor;
-
- /**
- * The raw model stored in the SashProvider.
- */
- private Table rawModel;
-
- /**
- *
- * Constructor.
- */
- public NattableEditorModel(Object pageIdentifier, ServicesRegistry servicesRegistry) {
- this.rawModel = (Table)pageIdentifier;
- this.servicesRegistry = servicesRegistry;
- }
-
- /**
- * Create the IEditor for the diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#createIEditorPart()
- * @return
- * @throws PartInitException
- *
- */
- public IEditorPart createIEditorPart() throws PartInitException {
- try {
-
- Constructor<?> c = getDiagramClass().getConstructor(ServicesRegistry.class, Table.class);
- IEditorPart newEditor = (IEditorPart)c.newInstance(this.servicesRegistry, this.rawModel);
- // IEditorPart newEditor = new DefaultNattableEditor(getServiceRegistry(), rawModel);
- this.editor = newEditor;
- return this.editor;
-
- } catch (Exception e) {
- // Lets propagate. This is an implementation problem that should be solved by
- // programmer.
- throw new PartInitException("Can't create Nattable", e); //$NON-NLS-1$
- }
-
- }
-
- /**
- * Get the action bar requested by the Editor.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel#getActionBarContributor()
- * @return
- *
- */
- public EditorActionBarContributor getActionBarContributor() {
-
- String actionBarId = NattableEditorFactory.this.editorDescriptor.getActionBarContributorId();
-
- // Do nothing if no EditorActionBarContributor is specify.
- if(actionBarId == null || actionBarId.length() == 0) {
- return null;
- }
-
- // Try to get it.
-
- // Get ServiceRegistry
- // ServicesRegistry serviceRegistry = getServicesRegistry();
- ActionBarContributorRegistry registry;
- try {
- registry = this.servicesRegistry.getService(ActionBarContributorRegistry.class);
- } catch (ServiceException e) {
- // Service not found
- Activator.log.error(e);
- return null;
- }
-
- try {
- return registry.getActionBarContributor(actionBarId);
- } catch (BackboneException e) {
- Activator.log.error(e);
- return null;
- }
- }
-
- /**
- * Get the underlying RawModel. Return the Diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getRawModel()
- * @return
- *
- */
- public Object getRawModel() {
- return this.rawModel;
- }
-
- /**
- * Get the icon to be shown by Tabs
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabIcon()
- * @return
- *
- */
- public Image getTabIcon() {
- return org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(this.rawModel.getTableConfiguration().getIconPath());
- }
-
- /**
- * Get the title of the Diagram.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel#getTabTitle()
- * @return
- *
- */
- public String getTabTitle() {
- return this.rawModel.getName();
- }
- }
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java
deleted file mode 100644
index f752dde07fa..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/AbstractCreateNattableEditorHandler.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 LIFL & 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:
- * Vincent Lorenzo (CEA-LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.nattable.common.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.EditorNameInitializer;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForHandlers;
-import org.eclipse.papyrus.infra.nattable.Activator;
-import org.eclipse.papyrus.infra.nattable.common.modelresource.PapyrusNattableModel;
-import org.eclipse.papyrus.infra.nattable.messages.Messages;
-import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.NattableconfigurationPackage;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration;
-import org.eclipse.papyrus.infra.nattable.utils.TableHelper;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- *
- *
- */
-public abstract class AbstractCreateNattableEditorHandler extends AbstractHandler {
-
-
-
-
- /**
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- *
- * @param event
- * @return
- * @throws ExecutionException
- */
- public Object execute(final ExecutionEvent event) throws ExecutionException {
- try {
- runAsTransaction(event);
- } catch (final ServiceException e) {
- throw new ExecutionException("Can't create TableEditor", e); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Run the command as a transaction. Create a Transaction and delegate the
- * command to {@link #doExecute(ServicesRegistry)}.
- *
- * @throws ServiceException
- *
- */
- public void runAsTransaction(final ExecutionEvent event) throws ServiceException {
- //we create a new resourceSet to avoid to load unused config in the resourceset in case of Cancel
- ResourceSet set = new ResourceSetImpl();
- Resource res = set.getResource(getTableEditorConfigurationURI(), true);
- TableConfiguration conf = (TableConfiguration)res.getContents().get(0);
- String defaultName = conf.getName();
- // default Value
- final String name;
- final String nameWithIncrement = EditorNameInitializer.getNameWithIncrement(NattablePackage.eINSTANCE.getTable(), NattableconfigurationPackage.eINSTANCE.getTableNamedElement_Name(), defaultName, getTableContext());
- final InputDialog dialog = new InputDialog(Display.getDefault().getActiveShell(), Messages.AbstractCreateNattableEditorHandler_PapyrusTableCreation, Messages.AbstractCreateNattableEditorHandler_EnterTheNameForTheNewTable, nameWithIncrement, null);
- if(dialog.open() == Dialog.OK) {
- name = dialog.getValue();
- final ServicesRegistry serviceRegistry = ServiceUtilsForHandlers.getInstance().getServiceRegistry(event);
- final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
- domain.getCommandStack().execute(new RecordingCommand(domain) {
-
- @Override
- protected void doExecute() {
- try {
- AbstractCreateNattableEditorHandler.this.doExecute(serviceRegistry, name, this.description);
- } catch (final NotFoundException e) {
- Activator.log.error(e);
- } catch (final ServiceException e) {
- Activator.log.error(e);
- }
-
- }
- });
- }
-
- }
-
- /**
- * Do the execution of the command.
- *
- * @param serviceRegistry
- * @throws ServiceException
- * @throws NotFoundException
- */
- public void doExecute(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
-
- final Object editorModel = createEditorModel(serviceRegistry, name, description);
- // Get the mngr allowing to add/open new editor.
- final IPageManager pageMngr = ServiceUtils.getInstance().getIPageManager(serviceRegistry);
- // add the new editor model to the sash.
- pageMngr.openPage(editorModel);
-
- }
-
- /**
- * Create a model identifying the editor. This model will be saved with the
- * sash
- *
- * @return
- * @throws ServiceException
- * @throws NotFoundException
- * The model where to save the TableInstance is not found.
- */
- protected Object createEditorModel(final ServicesRegistry serviceRegistry, String name, String description) throws ServiceException, NotFoundException {
- final TableConfiguration configuration = getDefaultTableEditorConfiguration();
- assert configuration != null;
-
- final Table table = TableHelper.createTable(configuration, getTableContext(), name, description);
- // Save the model in the associated resource
- final PapyrusNattableModel model = (PapyrusNattableModel)ServiceUtils.getInstance().getModelSet(serviceRegistry).getModelChecked(PapyrusNattableModel.MODEL_ID);
- model.addPapyrusTable(table);
- return table;
- }
-
-
- /**
- *
- * @return
- * the configuration to use for the new table
- */
- protected TableConfiguration getDefaultTableEditorConfiguration() {
- final EObject current = getSelection().get(0);
- final ResourceSet resourceSet = current.eResource().getResourceSet();
- final Resource resource = resourceSet.getResource(getTableEditorConfigurationURI(), true);
- TableConfiguration tableConfiguration = null;
- if(resource.getContents().get(0) instanceof TableConfiguration) {
- tableConfiguration = (TableConfiguration)resource.getContents().get(0);
- }
- return tableConfiguration;
- }
-
-
- protected abstract URI getTableEditorConfigurationURI();
-
- /**
- * Get the current MultiDiagramEditor.
- *
- * @return
- * @throws BackboneException
- */
- protected IMultiDiagramEditor getMultiDiagramEditor() throws BackboneException {
- return EditorUtils.getMultiDiagramEditorChecked();
- }
-
- /**
- * Returns the context used to create the table
- *
- * @return
- * the context used to create the table or <code>null</code> if not found
- * @throws ServiceException
- */
- protected EObject getTableContext() {
- final List<EObject> selection = getSelection();
-
- if(!selection.isEmpty()) {
- return selection.get(0);
- }
- return null;
- }
-
- /**
- *
- * @return
- */
- protected List<EObject> getSelection() {
- final List<EObject> selectedElements = new ArrayList<EObject>();
- final IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if(ww != null) {
- final ISelection selection = ww.getSelectionService().getSelection();
- if(selection instanceof IStructuredSelection) {
-
- final IStructuredSelection structuredSelection = (IStructuredSelection)selection;
-
- final Iterator<?> it = structuredSelection.iterator();
- while(it.hasNext()) {
- final Object object = it.next();
- if(object instanceof IAdaptable) {
- final EObject currentEObject = (EObject)((IAdaptable)object).getAdapter(EObject.class);
-
- if(currentEObject != null) {
- selectedElements.add(currentEObject);
- }
- }
-
- }
- }
- }
- return selectedElements;
- }
-
- /**
- * Get the root element associated with canvas.
- */
- protected EObject getRootElement(final Resource modelResource) {
- EObject rootElement = null;
- if(modelResource != null && modelResource.getContents() != null && modelResource.getContents().size() > 0) {
- final Object root = modelResource.getContents().get(0);
- if(root instanceof EObject) {
- rootElement = (EObject)root;
- }
- }
- return rootElement;
- }
-
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableEditorHandler.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableEditorHandler.java
deleted file mode 100644
index 2259bf243b7..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/handlers/CreateNatTableEditorHandler.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 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:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.handlers;
-
-import java.util.Hashtable;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.nattable.nattableconfiguration.NattableConfigurationRegistry;
-
-/**
- * The handler used to create a nattable editor
- *
- * @author Vincent Lorenzo
- *
- */
-public class CreateNatTableEditorHandler extends AbstractCreateNattableEditorHandler implements IExecutableExtension {
-
- /**
- * the name of the parameter of the handler
- */
- private static final String TABLE_TYPE_PARAMETER = "tableType"; //$NON-NLS-1$
-
- /**
- * the type of the table to create
- */
- private String type;
-
- /**
- *
- * Constructor.
- *
- */
- public CreateNatTableEditorHandler() {
- super();
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.nattable.common.handlers.AbstractCreateNattableEditorHandler2#getTableEditorConfigurationURI()
- *
- * @return
- */
- @Override
- protected URI getTableEditorConfigurationURI() {
- return NattableConfigurationRegistry.INSTANCE.getConfigurationURI(this.type);
- }
-
- /**
- *
- * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
- *
- * @param evaluationContext
- */
- @Override
- public void setEnabled(Object evaluationContext) {
- if(this.type != null) {
- List<EObject> selection = getSelection();
- if(selection.size() == 1) {
- IStatus status = NattableConfigurationRegistry.INSTANCE.canCreateTable(this.type, selection.get(0));
- setBaseEnabled(status.isOK());
- return;
- }
- }
- setBaseEnabled(false);
- }
-
- /**
- *
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String,
- * java.lang.Object)
- *
- * @param config
- * @param propertyName
- * @param data
- * @throws CoreException
- */
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- if(data instanceof Hashtable) {
- this.type = (String)((Hashtable<?, ?>)data).get(TABLE_TYPE_PARAMETER);
- }
- }
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/modelresource/PapyrusNattableModel.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/modelresource/PapyrusNattableModel.java
deleted file mode 100644
index cab6c20d82a..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/modelresource/PapyrusNattableModel.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2011 LIFL & 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:
- * Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.nattable.common.modelresource;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource;
-import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-
-
-
-/**
- * A model used to save data from the {@link DefaultNattableEditor}
- *
- * @author cedric dumoulin
- *
- */
-public class PapyrusNattableModel extends AbstractModelWithSharedResource<Table> implements IModel {
-
- /**
- * Model ID.
- */
- public static final String MODEL_ID = "org.eclipse.papyrus.infra.nattable.resource.NattableModel"; //$NON-NLS-1$
-
-
- /**
- *
- * Constructor.
- *
- */
- public PapyrusNattableModel() {
-
- }
-
- // Initialize stuff in the model.
- @Override
- public void init(ModelSet modelManager) {
- super.init(modelManager);
- // nothing to do now
- }
-
- /**
- * Get the file extension used for this model.
- *
- * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getModelFileExtension()
- *
- * @return
- */
- @Override
- protected String getModelFileExtension() {
- return NotationModel.NOTATION_FILE_EXTENSION;
- }
-
- /**
- * Get the identifier used to register this model.
- *
- * @see org.eclipse.papyrus.infra.core.resource.AbstractBaseModel#getIdentifier()
- *
- * @return
- */
- @Override
- public String getIdentifier() {
- return MODEL_ID;
- }
-
-
- /**
- * Add a new initialized {@link PapyrusTableInstance} to the model.
- *
- * @param tableInstance
- * The tableInstance to add.
- */
- public void addPapyrusTable(Table tableInstance) {
- getResource().getContents().add(tableInstance);
- }
-
- /**
- * Add a new initialized {@link PapyrusTableInstance} to the model.
- *
- * @param tableInstance
- * The tableInstance to add.
- */
- public void removeTable(Table tableInstance) {
- getResource().getContents().remove(tableInstance);
- }
-
- /**
- *
- * @see org.eclipse.papyrus.infra.core.resource.AbstractModelWithSharedResource#isModelRoot(org.eclipse.emf.ecore.EObject)
- *
- * @param object
- * @return
- */
- @Override
- protected boolean isModelRoot(EObject object) {
- return false;
- }
-
-}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/utils/TableEditorInput.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/utils/TableEditorInput.java
deleted file mode 100644
index 0936d3b045c..00000000000
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable.common/src/org/eclipse/papyrus/infra/nattable/common/utils/TableEditorInput.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Mia-Software.
- * 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:
- * Nicolas Bros (Mia-Software) - Bug 331203 - table model editor - initial API and implementation
- * Nicolas Guyomar (Mia-Software) - Bug 332924 - To be able to save the table
- * Nicolas Guyomar (Mia-Software) - Bug 333029 - To be able to save the size of the lines and the columns
- *******************************************************************************/
-package org.eclipse.papyrus.infra.nattable.common.utils;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-
-/**
- * Comes from org.eclipse.emf.facet.widget.nattable.workbench.
- *
- * This class should not be used by others plugins
- */
-public class TableEditorInput implements IEditorInput {
-
- /** The input for the Table widget */
- private final Table tableInstance;
-
- /** A textual description of what is shown in the editor */
- private final String description;
-
- private final EditingDomain editingDomain;
-
- public TableEditorInput(final Table papyrusTable, final EditingDomain editingDomain) {
- this.tableInstance = papyrusTable;
- this.description = papyrusTable.getDescription();
- this.editingDomain = editingDomain;
- }
-
- public Table getPapyrusTableInstance() {
- return this.tableInstance;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public boolean exists() {
- return false;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return "Model Table"; //$NON-NLS-1$
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return "Model Table"; //$NON-NLS-1$
- }
-
- public Object getAdapter(@SuppressWarnings("rawtypes") final Class adapter) {
- return null;
- }
-
- protected EditingDomain getEditingDomain() {
- return this.editingDomain;
- }
-}

Back to the top