Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime PORHEL2014-03-06 09:33:12 +0000
committerMaxime Porhel2014-03-06 13:48:38 +0000
commit44e6b21f8916764e87640f796f6739af34938060 (patch)
tree7bb6b4bd0ba6eb930d5076b9534a9be6129d7778
parent550f59da16c8c46f430076412c062071f4c14e4c (diff)
downloadorg.eclipse.sirius-44e6b21f8916764e87640f796f6739af34938060.tar.gz
org.eclipse.sirius-44e6b21f8916764e87640f796f6739af34938060.tar.xz
org.eclipse.sirius-44e6b21f8916764e87640f796f6739af34938060.zip
[426806] Remove not implemented setAutoRefreshXXX methods
The methods were not actually implemented, so it can safely be removed along with the code which tried to keep the setting synchronized with the corresponding preference. The only concrete class implementing the interfaces were TableCommandFactory and TreeCommandFactory, but they were not real implementation: the setAutoRefreshXXX() method just did: // TODO Feature not implemented. The corresponding method has already been removed in IDiagramCommandFactory. Change-Id: I357304bd46778882ae385f9f5bcb8d40db9673c0 Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.html22
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.textile9
-rw-r--r--plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/AbstractDTableEditor.java57
-rw-r--r--plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java51
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/api/command/ITableCommandFactory.java10
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java10
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/DTreeEditor.java59
-rw-r--r--plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java51
-rw-r--r--plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/api/command/ITreeCommandFactory.java10
-rw-r--r--plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/command/TreeCommandFactory.java7
12 files changed, 80 insertions, 208 deletions
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
index 31381dfd9b..c83c5522d5 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
@@ -149,6 +149,22 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>org.sirius.diagram.graphicalou .edit.policies.AirNoteAttachmentEditPolicyProvider</code> and declaration in plugin.xml have been removed too.
</li>
</ul>
+ <h4 id="Changesinorg.eclipse.sirius.table">Changes in
+ <code>org.eclipse.sirius.table</code>
+ </h4>
+ <ul>
+ <li>The
+ <code>org.eclipse.sirius.table.tools.api.command.ITableCommandFactory.setAutoRefreshDTable()</code> method was removed. It had no effect, any code which called it can simply be removed.
+ </li>
+ </ul>
+ <h4 id="Changesinorg.eclipse.sirius.tree">Changes in
+ <code>org.eclipse.sirius.tree</code>
+ </h4>
+ <ul>
+ <li>The
+ <code>org.eclipse.sirius.tree.business.api.command.ITreeCommandFactory.setAutoRefreshDTree()</code> method was removed. It had no effect, any code which called it can simply be removed.
+ </li>
+ </ul>
<h2 id="sirius1.0M5">Changes in Sirius 1.0.0M5 (from Sirius 1.0M4)</h2>
<h3 id="UserVisibleChanges">User-Visible Changes</h3>
<ul>
@@ -250,7 +266,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>org.eclipse.sirius.common.ui.tools.api.util.ISimpleAction</code> interface has been removed.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.table">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.table2">Changes in
<code>org.eclipse.sirius.table</code>
</h4>
<ul>
@@ -561,7 +577,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>CreateRepresentationFromRepresentationCreationDescription</code> classes (iof plug-ins sirius.diagram, sirius.table.ui, sirius.tree.ui).
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.table2">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.table3">Changes in
<code>org.eclipse.sirius.table</code>
</h4>
<ul>
@@ -569,7 +585,7 @@ if (rootPackage != null &amp;&amp; rootPackage.getNsURI().equals(DiagramPackage.
<code>TableHelper.getCell(DLine, String)</code> has been removed. Use the variant which take a DLine and a DColumn as parameters.
</li>
</ul>
- <h4 id="Changesinorg.eclipse.sirius.tree">Changes in
+ <h4 id="Changesinorg.eclipse.sirius.tree2">Changes in
<code>org.eclipse.sirius.tree</code>
</h4>
<ul>
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
index 47dd5a9a1b..8945edb3e5 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
@@ -62,6 +62,15 @@ h4. Changes in @org.eclipse.sirius.diagram@
* @org.sirius.diagram.graphical.edit.policies.AirNoteAttachmentEditPolicy@ has been removed, with the new dangling reference management, it became identical to its superclass, use @org.eclipse.gmf.runtime.diagram.ui.internal.editpolicies.ConnectionEditPolicy@ instead. Its provider @org.sirius.diagram.graphicalou .edit.policies.AirNoteAttachmentEditPolicyProvider@ and declaration in plugin.xml have been removed too.
+h4. Changes in @org.eclipse.sirius.table@
+
+* The @org.eclipse.sirius.table.tools.api.command.ITableCommandFactory.setAutoRefreshDTable()@ method was removed. It had no effect, any code which called it can simply be removed.
+
+
+h4. Changes in @org.eclipse.sirius.tree@
+
+* The @org.eclipse.sirius.tree.business.api.command.ITreeCommandFactory.setAutoRefreshDTree()@ method was removed. It had no effect, any code which called it can simply be removed.
+
h2(#sirius1.0M5). Changes in Sirius 1.0.0M5 (from Sirius 1.0M4)
h3. User-Visible Changes
diff --git a/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
index 218e25d53b..42359ffde4 100644
--- a/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.table.ui/META-INF/MANIFEST.MF
@@ -18,7 +18,6 @@ Export-Package: org.eclipse.sirius.table.metamodel.table.description.provider,
org.eclipse.sirius.table.ui.tools.internal.editor.action;x-internal:=true;version="1.0.0",
org.eclipse.sirius.table.ui.tools.internal.editor.command;x-internal:=true;version="1.0.0",
org.eclipse.sirius.table.ui.tools.internal.editor.listeners;x-internal:=true;version="1.0.0",
- org.eclipse.sirius.table.ui.tools.internal.editor.preferences;x-internal:=true;version="1.0.0",
org.eclipse.sirius.table.ui.tools.internal.editor.print;x-internal:=true;version="1.0.0",
org.eclipse.sirius.table.ui.tools.internal.editor.provider;x-internal:=true;version="1.0.0",
org.eclipse.sirius.table.ui.tools.internal.editor.utils;x-internal:=true;version="1.0.0",
diff --git a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/AbstractDTableEditor.java b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/AbstractDTableEditor.java
index 7259b221b4..e369fe86c6 100644
--- a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/AbstractDTableEditor.java
+++ b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/AbstractDTableEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 THALES GLOBAL SERVICES.
+ * Copyright (c) 2008, 2014 THALES GLOBAL SERVICES.
* 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
@@ -47,31 +47,13 @@ import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorMatchingStrategy;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.sirius.common.tools.DslCommonPlugin;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand;
import org.eclipse.sirius.business.api.session.Session;
import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.DslCommonPlugin;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
import org.eclipse.sirius.table.business.internal.refresh.DTableElementSynchronizerSpec;
import org.eclipse.sirius.table.metamodel.table.DTable;
import org.eclipse.sirius.table.metamodel.table.DTableElementSynchronizer;
@@ -80,7 +62,6 @@ import org.eclipse.sirius.table.tools.api.command.ITableCommandFactory;
import org.eclipse.sirius.table.tools.api.command.TableCommandFactoryService;
import org.eclipse.sirius.table.ui.tools.api.editor.DTableEditor;
import org.eclipse.sirius.table.ui.tools.internal.command.EMFCommandFactoryUI;
-import org.eclipse.sirius.table.ui.tools.internal.editor.preferences.SiriusPreferenceChangeListener;
import org.eclipse.sirius.table.ui.tools.internal.editor.provider.DTableEditorUtil;
import org.eclipse.sirius.tools.api.interpreter.InterpreterRegistry;
import org.eclipse.sirius.tools.api.profiler.SiriusTasksKey;
@@ -95,7 +76,25 @@ import org.eclipse.sirius.viewpoint.DRepresentation;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.sirius.viewpoint.SiriusPlugin;
import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin;
-import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorMatchingStrategy;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.part.FileEditorInput;
/**
* Provides generic support for DTable editors. <BR>
@@ -313,15 +312,9 @@ public abstract class AbstractDTableEditor extends AbstractDTreeEditor implement
private void configureCommandFactoryProviders() {
/* get IEMFCommandFactories */
emfCommandFactory = TableCommandFactoryService.getInstance().getNewProvider().getCommandFactory(getEditingDomain());
- // Set the automatic refresh according to the preference
- ((ITableCommandFactory) emfCommandFactory).setAutoRefreshDTable(isAutoRefresh());
- /*
- * We add a callback for UI stuffs
- */
- emfCommandFactory.setUserInterfaceCallBack(new EMFCommandFactoryUI());
- /* Set viewpoint preference change listener */
- viewPointPreferenceChangeListener = new SiriusPreferenceChangeListener((ITableCommandFactory) emfCommandFactory);
+ /* We add a callback for UI stuffs */
+ emfCommandFactory.setUserInterfaceCallBack(new EMFCommandFactoryUI());
}
/**
diff --git a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java b/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java
deleted file mode 100644
index 6ef3ea7820..0000000000
--- a/plugins/org.eclipse.sirius.table.ui/src/org/eclipse/sirius/table/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2012 THALES GLOBAL SERVICES.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.table.ui.tools.internal.editor.preferences;
-
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-
-import org.eclipse.sirius.business.api.preferences.SiriusPreferencesKeys;
-import org.eclipse.sirius.table.tools.api.command.ITableCommandFactory;
-
-/**
- * Listener of the
- * {@link org.eclipse.sirius.table.ui.tools.internal.editor.AbstractDTableEditor}
- * preferences.
- *
- * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a>
- *
- */
-public class SiriusPreferenceChangeListener implements IPreferenceChangeListener {
-
- ITableCommandFactory factory;
-
- /**
- * Build a new listener.
- *
- * @param factory
- * editor's command factory.
- */
- public SiriusPreferenceChangeListener(final ITableCommandFactory factory) {
- this.factory = factory;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Preferences.IPreferenceChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PreferenceChangeEvent)
- */
- public void preferenceChange(PreferenceChangeEvent event) {
- if (SiriusPreferencesKeys.PREF_AUTO_REFRESH.name().equals(event.getKey()) && event.getNewValue() instanceof String && !event.getNewValue().equals(event.getOldValue())) {
- factory.setAutoRefreshDTable(Boolean.parseBoolean((String) event.getNewValue()));
- }
- }
-}
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/api/command/ITableCommandFactory.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/api/command/ITableCommandFactory.java
index 9f530dc2f4..af2d6dbf60 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/api/command/ITableCommandFactory.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/api/command/ITableCommandFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 THALES GLOBAL SERVICES.
+ * Copyright (c) 2007, 2014 THALES GLOBAL SERVICES.
* 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
@@ -105,14 +105,6 @@ public interface ITableCommandFactory extends ICommandFactory {
Command buildSetCellValueFromTool(final DCell editedCell, final Object newValue);
/**
- * Set the autoRefresh.
- *
- * @param autoRefreshDTable
- * true to activate
- */
- void setAutoRefreshDTable(final boolean autoRefreshDTable);
-
- /**
* Set the model accessor.
*
* @param modelAccessor
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
index cea7f170f2..935ae79fc1 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/command/TableCommandFactory.java
@@ -456,16 +456,6 @@ public class TableCommandFactory extends AbstractCommandFactory implements ITabl
}
/**
- *
- * {@inheritDoc}
- *
- * @see org.eclipse.sirius.table.tools.api.command.ITableCommandFactory#setAutoRefreshDTable(boolean)
- */
- public void setAutoRefreshDTable(final boolean autoRefreshDTable) {
- // TODO Feature not implemented.
- }
-
- /**
* Appends a command that delete the specified table to the specified
* command.
*
diff --git a/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
index 4ac1e30172..bbf6ddac87 100644
--- a/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.tree.ui/META-INF/MANIFEST.MF
@@ -22,7 +22,6 @@ Export-Package: org.eclipse.sirius.tree.description.provider;version="1.0.0",
org.eclipse.sirius.tree.ui.tools.internal.editor;x-internal:=true;version="1.0.0",
org.eclipse.sirius.tree.ui.tools.internal.editor.actions;x-internal:=true;version="1.0.0",
org.eclipse.sirius.tree.ui.tools.internal.editor.listeners;x-internal:=true;version="1.0.0",
- org.eclipse.sirius.tree.ui.tools.internal.editor.preferences;x-internal:=true;version="1.0.0",
org.eclipse.sirius.tree.ui.tools.internal.editor.provider;x-internal:=true;version="1.0.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.sirius.tree;bundle-version="1.0.0";visibility:=reexport,
diff --git a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/DTreeEditor.java b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/DTreeEditor.java
index 16592b9c28..c0e5e3bb67 100644
--- a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/DTreeEditor.java
+++ b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/DTreeEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 THALES GLOBAL SERVICES.
+ * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES.
* 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
@@ -42,30 +42,12 @@ import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorMatchingStrategy;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.dialogs.SaveAsDialog;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
import org.eclipse.sirius.business.api.dialect.DialectManager;
import org.eclipse.sirius.business.api.dialect.command.RefreshRepresentationsCommand;
import org.eclipse.sirius.business.api.session.Session;
import org.eclipse.sirius.business.api.session.SessionManager;
+import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter;
+import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
import org.eclipse.sirius.tools.api.interpreter.InterpreterRegistry;
import org.eclipse.sirius.tree.DTree;
import org.eclipse.sirius.tree.DTreeElementSynchronizer;
@@ -75,7 +57,6 @@ import org.eclipse.sirius.tree.business.internal.helper.TreeHelper;
import org.eclipse.sirius.tree.business.internal.refresh.DTreeElementSynchronizerSpec;
import org.eclipse.sirius.tree.ui.provider.TreeUIPlugin;
import org.eclipse.sirius.tree.ui.tools.internal.command.EMFCommandFactoryUI;
-import org.eclipse.sirius.tree.ui.tools.internal.editor.preferences.SiriusPreferenceChangeListener;
import org.eclipse.sirius.ui.business.api.descriptor.ComposedImageDescriptor;
import org.eclipse.sirius.ui.business.api.dialect.marker.TraceabilityMarkerNavigationProvider;
import org.eclipse.sirius.ui.business.api.session.IEditingSession;
@@ -86,7 +67,25 @@ import org.eclipse.sirius.viewpoint.DRepresentation;
import org.eclipse.sirius.viewpoint.DSemanticDecorator;
import org.eclipse.sirius.viewpoint.SiriusPlugin;
import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin;
-import org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorMatchingStrategy;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.dialogs.SaveAsDialog;
+import org.eclipse.ui.part.FileEditorInput;
/**
* Editor for tree representations.
@@ -132,8 +131,7 @@ public class DTreeEditor extends AbstractDTreeEditor implements org.eclipse.siri
Image refreshImage = TreeUIPlugin.getImage(TreeUIPlugin.getBundledImageDescriptor("icons/" + DTreeViewerManager.REFRESH_IMG + ".gif"));
List<Object> images = new ArrayList<Object>(2);
images.add(refreshImage);
- Image lockByOtherOverlayImage = SiriusEditPlugin.getPlugin()
- .getImage(SiriusEditPlugin.Implementation.getBundledImageDescriptor("icons/full/decorator/permission_denied_overlay.gif"));
+ Image lockByOtherOverlayImage = SiriusEditPlugin.getPlugin().getImage(SiriusEditPlugin.Implementation.getBundledImageDescriptor("icons/full/decorator/permission_denied_overlay.gif"));
images.add(lockByOtherOverlayImage);
ImageDescriptor composedImageDescriptor = new ComposedImageDescriptor(new ComposedImage(images));
frozenRepresentationImage = SiriusEditPlugin.getPlugin().getImage(composedImageDescriptor);
@@ -315,16 +313,9 @@ public class DTreeEditor extends AbstractDTreeEditor implements org.eclipse.siri
private void initCommandFactoryProviders() {
/* get IEMFCommandFactories */
emfCommandFactory = TreeCommandFactoryService.getInstance().getNewProvider().getCommandFactory(getEditingDomain());
- // Set the automatic refresh according to the preference
- ((ITreeCommandFactory) emfCommandFactory).setAutoRefreshDTree(isAutoRefresh());
- /*
- * We add a callback for UI stuffs
- */
- emfCommandFactory.setUserInterfaceCallBack(new EMFCommandFactoryUI());
-
- /* Set viewpoint preference change listener */
- viewPointPreferenceChangeListener = new SiriusPreferenceChangeListener((ITreeCommandFactory) emfCommandFactory);
+ /* We add a callback for UI stuffs */
+ emfCommandFactory.setUserInterfaceCallBack(new EMFCommandFactoryUI());
}
private IInterpreter getInterpreter() {
diff --git a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java b/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java
deleted file mode 100644
index 8d39a054a9..0000000000
--- a/plugins/org.eclipse.sirius.tree.ui/src/org/eclipse/sirius/tree/ui/tools/internal/editor/preferences/SiriusPreferenceChangeListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 THALES GLOBAL SERVICES.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.tree.ui.tools.internal.editor.preferences;
-
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
-
-import org.eclipse.sirius.business.api.preferences.SiriusPreferencesKeys;
-import org.eclipse.sirius.tree.business.api.command.ITreeCommandFactory;
-
-/**
- * Listener of the
- * {@link org.eclipse.sirius.table.ui.tools.internal.editor.AbstractDTableEditor}
- * preferences.
- *
- * @author mporhel
- *
- */
-public class SiriusPreferenceChangeListener implements IPreferenceChangeListener {
-
- ITreeCommandFactory factory;
-
- /**
- * Build a new listener.
- *
- * @param factory
- * editor's command factory.
- */
- public SiriusPreferenceChangeListener(final ITreeCommandFactory factory) {
- this.factory = factory;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Preferences.IPreferenceChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PreferenceChangeEvent)
- */
- public void preferenceChange(PreferenceChangeEvent event) {
- if (SiriusPreferencesKeys.PREF_AUTO_REFRESH.name().equals(event.getKey()) && event.getNewValue() instanceof String && !event.getNewValue().equals(event.getOldValue())) {
- factory.setAutoRefreshDTree(Boolean.parseBoolean((String) event.getNewValue()));
- }
- }
-}
diff --git a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/api/command/ITreeCommandFactory.java b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/api/command/ITreeCommandFactory.java
index 671064a6cd..98a22aba3b 100644
--- a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/api/command/ITreeCommandFactory.java
+++ b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/business/api/command/ITreeCommandFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 THALES GLOBAL SERVICES.
+ * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES.
* 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
@@ -93,14 +93,6 @@ public interface ITreeCommandFactory extends ICommandFactory {
// newValue);
/**
- * Set the autoRefresh.
- *
- * @param autoRefreshDTree
- * true to activate
- */
- void setAutoRefreshDTree(final boolean autoRefreshDTree);
-
- /**
* Set the model accessor.
*
* @param modelAccessor
diff --git a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/command/TreeCommandFactory.java b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/command/TreeCommandFactory.java
index 4c665824df..e24d4e8ee3 100644
--- a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/command/TreeCommandFactory.java
+++ b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/command/TreeCommandFactory.java
@@ -93,13 +93,6 @@ public class TreeCommandFactory extends AbstractCommandFactory implements ITreeC
}
/**
- * {@inheritDoc}
- */
- public void setAutoRefreshDTree(boolean autoRefreshDTree) {
- // TODO Feature not implemented.
- }
-
- /**
* Return the commandTaskHelper.
*
* @return the commandTaskHelper

Back to the top