From 62bae350c4a81a8b2b3b2fd086d4dc2d1d71ce3e Mon Sep 17 00:00:00 2001 From: Cindy Li Date: Thu, 28 Mar 2013 16:27:37 +0800 Subject: [PATCH] IDE-881 --- .../com.liferay.ide.layouttpl.ui/.classpath | 1 - .../META-INF/MANIFEST.MF | 1 - .../build.properties | 3 +- .../ide/layouttpl/ui/gef/GraphicalEditor.java | 457 ------------------ .../gef/GraphicalEditorWithFlyoutPalette.java | 188 ------- .../layouttpl/ui/editor/LayoutTplEditor.java | 30 +- 6 files changed, 30 insertions(+), 650 deletions(-) delete mode 100644 tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditor.java delete mode 100644 tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditorWithFlyoutPalette.java diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath b/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath index 30b874e9ed..798048dd7d 100644 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath +++ b/tools/plugins/com.liferay.ide.layouttpl.ui/.classpath @@ -3,6 +3,5 @@ - diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF b/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF index 7c679eb59f..aba7e9c3b6 100644 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF +++ b/tools/plugins/com.liferay.ide.layouttpl.ui/META-INF/MANIFEST.MF @@ -32,7 +32,6 @@ Export-Package: com.liferay.ide.layouttpl.ui, com.liferay.ide.layouttpl.ui.cmd, com.liferay.ide.layouttpl.ui.draw2d, com.liferay.ide.layouttpl.ui.editor, - com.liferay.ide.layouttpl.ui.gef, com.liferay.ide.layouttpl.ui.model, com.liferay.ide.layouttpl.ui.parts, com.liferay.ide.layouttpl.ui.policies, diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/build.properties b/tools/plugins/com.liferay.ide.layouttpl.ui/build.properties index 7cac23757b..2c8be33678 100644 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/build.properties +++ b/tools/plugins/com.liferay.ide.layouttpl.ui/build.properties @@ -1,5 +1,4 @@ -source.. = src/,\ - src-gef/ +source.. = src/ output.. = target/classes/ bin.includes = META-INF/,\ .,\ diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditor.java b/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditor.java deleted file mode 100644 index 59bea19ccf..0000000000 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditor.java +++ /dev/null @@ -1,457 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - *******************************************************************************/ - -package com.liferay.ide.layouttpl.ui.gef; - -import java.util.ArrayList; -import java.util.EventObject; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.draw2d.ColorConstants; -import org.eclipse.draw2d.IFigure; -import org.eclipse.gef.ContextMenuProvider; -import org.eclipse.gef.DefaultEditDomain; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.GraphicalViewer; -import org.eclipse.gef.commands.CommandStack; -import org.eclipse.gef.commands.CommandStackListener; -import org.eclipse.gef.ui.actions.ActionBarContributor; -import org.eclipse.gef.ui.actions.ActionRegistry; -import org.eclipse.gef.ui.actions.DeleteAction; -import org.eclipse.gef.ui.actions.PrintAction; -import org.eclipse.gef.ui.actions.RedoAction; -import org.eclipse.gef.ui.actions.SaveAction; -import org.eclipse.gef.ui.actions.SelectAllAction; -import org.eclipse.gef.ui.actions.UndoAction; -import org.eclipse.gef.ui.actions.UpdateAction; -import org.eclipse.gef.ui.parts.ScrollingGraphicalViewer; -import org.eclipse.gef.ui.parts.SelectionSynchronizer; -import org.eclipse.gef.ui.properties.UndoablePropertySheetEntry; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IEditorSite; -import org.eclipse.ui.ISelectionListener; -import org.eclipse.ui.ISelectionService; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.part.EditorPart; -import org.eclipse.ui.views.properties.PropertySheetPage; - -/** - * This class serves as a quick starting point for clients who are new to GEF. - * It will create an Editor containing a single GraphicalViewer as its control. - *

IMPORTANTThis class should only be used as a reference for - * creating your own EditorPart implementation. This class will not suit - * everyone's needs, and may change in the future. Clients may copy the - * implementation. - * - * @author hudsonr - */ -@SuppressWarnings("serial") -public abstract class GraphicalEditor extends EditorPart implements CommandStackListener, ISelectionListener { - - private static class ActionIDList extends ArrayList { - - public boolean add(Object o) { - if (o instanceof IAction) { - try { - IAction action = (IAction) o; - o = action.getId(); - throw new IllegalArgumentException("Action IDs should be added to lists, not the action: " + action); //$NON-NLS-1$ - } - catch (IllegalArgumentException exc) { - exc.printStackTrace(); - } - } - return super.add(o); - } - } - - private DefaultEditDomain editDomain; - private GraphicalViewer graphicalViewer; - private ActionRegistry actionRegistry; - private SelectionSynchronizer synchronizer; - private List selectionActions = new ActionIDList(); - private List stackActions = new ActionIDList(); - private List propertyActions = new ActionIDList(); - - /** - * Constructs the editor part - */ - public GraphicalEditor() { - } - - /** - * When the command stack changes, the actions interested in the command - * stack are updated. - * - * @param event - * the change event - */ - public void commandStackChanged(EventObject event) { - updateActions(stackActions); - } - - /** - * Called to configure the graphical viewer before it receives its contents. - * This is where the root editpart should be configured. Subclasses should - * extend or override this method as needed. - */ - protected void configureGraphicalViewer() { - getGraphicalViewer().getControl().setBackground(ColorConstants.listBackground); - } - - /** - * Creates actions for this editor. Subclasses should override this method - * to create and register actions with the {@link ActionRegistry}. - */ - protected void createActions() { - ActionRegistry registry = getActionRegistry(); - IAction action; - - action = new UndoAction(this); - registry.registerAction(action); - getStackActions().add(action.getId()); - - action = new RedoAction(this); - registry.registerAction(action); - getStackActions().add(action.getId()); - - action = new SelectAllAction(this); - registry.registerAction(action); - - action = new DeleteAction((IWorkbenchPart) this); - registry.registerAction(action); - getSelectionActions().add(action.getId()); - - action = new SaveAction(this); - registry.registerAction(action); - getPropertyActions().add(action.getId()); - - registry.registerAction(new PrintAction(this)); - } - - /** - * Creates the GraphicalViewer on the specified Composite. - * - * @param parent - * the parent composite - */ - protected void createGraphicalViewer(Composite parent) { - GraphicalViewer viewer = new ScrollingGraphicalViewer(); - viewer.createControl(parent); - setGraphicalViewer(viewer); - configureGraphicalViewer(); - hookGraphicalViewer(); - initializeGraphicalViewer(); - } - - /** - * Realizes the Editor by creating it's Control.

WARNING: This method may - * or may not be called by the workbench prior to {@link #dispose()}. - * - * @param parent - * the parent composite - */ - public void createPartControl(Composite parent) { - createGraphicalViewer(parent); - } - - /** - * @see org.eclipse.ui.IWorkbenchPart#dispose() - */ - public void dispose() { - getCommandStack().removeCommandStackListener(this); - getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this); - getEditDomain().setActiveTool(null); - getActionRegistry().dispose(); - super.dispose(); - } - - /** - * Does nothing be default. This method should be overridden if - * {@link #isSaveAsAllowed()} has been overridden to return - * true. - * - * @see org.eclipse.ui.ISaveablePart#doSaveAs() - */ - public void doSaveAs() { - throw new RuntimeException("doSaveAs must be overridden"); //$NON-NLS-1$ - } - - /** - * @see org.eclipse.ui.part.WorkbenchPart#firePropertyChange(int) - */ - protected void firePropertyChange(int property) { - super.firePropertyChange(property); - updateActions(propertyActions); - } - - /** - * Lazily creates and returns the action registry. - * - * @return the action registry - */ - public ActionRegistry getActionRegistry() { - if (actionRegistry == null) - actionRegistry = new ActionRegistry(); - return actionRegistry; - } - - /** - * Returns the adapter for the specified key.

IMPORTANT certain - * requests, such as the property sheet, may be made before or after - * {@link #createPartControl(Composite)} is called. The order is unspecified - * by the Workbench. - * - * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) - */ - public Object getAdapter(Class type) { - if (type == org.eclipse.ui.views.properties.IPropertySheetPage.class) { - PropertySheetPage page = new PropertySheetPage(); - page.setRootEntry(new UndoablePropertySheetEntry(getCommandStack())); - return page; - } - if (type == GraphicalViewer.class) - return getGraphicalViewer(); - if (type == CommandStack.class) - return getCommandStack(); - if (type == ActionRegistry.class) - return getActionRegistry(); - if (type == EditPart.class && getGraphicalViewer() != null) - return getGraphicalViewer().getRootEditPart(); - if (type == IFigure.class && getGraphicalViewer() != null) - return ((GraphicalEditPart) getGraphicalViewer().getRootEditPart()).getFigure(); - return super.getAdapter(type); - } - - /** - * Returns the command stack. - * - * @return the command stack - */ - protected CommandStack getCommandStack() { - return getEditDomain().getCommandStack(); - } - - /** - * Returns the edit domain. - * - * @return the edit domain - */ - public DefaultEditDomain getEditDomain() { - return editDomain; - } - - /** - * Returns the graphical viewer. - * - * @return the graphical viewer - */ - protected GraphicalViewer getGraphicalViewer() { - return graphicalViewer; - } - - /** - * Returns the list of {@link IAction IActions} dependant on property - * changes in the Editor. These actions should implement the - * {@link UpdateAction} interface so that they can be updated in response to - * property changes. An example is the "Save" action. - * - * @return the list of property-dependant actions - */ - protected List getPropertyActions() { - return propertyActions; - } - - /** - * Returns the list of IDs of Actions that are dependant on changes - * in the workbench's {@link ISelectionService}. The associated Actions can - * be found in the action registry. Such actions should implement the - * {@link UpdateAction} interface so that they can be updated in response to - * selection changes. - * - * @see #updateActions(List) - * @return the list of selection-dependant action IDs - */ - protected List getSelectionActions() { - return selectionActions; - } - - /** - * Returns the selection syncronizer object. The synchronizer can be used to - * sync the selection of 2 or more EditPartViewers. - * - * @return the syncrhonizer - */ - public SelectionSynchronizer getSelectionSynchronizer() { - if (synchronizer == null) - synchronizer = new SelectionSynchronizer(); - return synchronizer; - } - - /** - * Returns the list of IDs of Actions that are dependant on the - * CommmandStack's state. The associated Actions can be found in the action - * registry. These actions should implement the {@link UpdateAction} - * interface so that they can be updated in response to command stack - * changes. An example is the "undo" action. - * - * @return the list of stack-dependant action IDs - */ - protected List getStackActions() { - return stackActions; - } - - /** - * Hooks the GraphicalViewer to the rest of the Editor. By default, the - * viewer is added to the SelectionSynchronizer, which can be used to keep 2 - * or more EditPartViewers in sync. The viewer is also registered as the - * ISelectionProvider for the Editor's PartSite. - */ - protected void hookGraphicalViewer() { - getSelectionSynchronizer().addViewer(getGraphicalViewer()); - getSite().setSelectionProvider(getGraphicalViewer()); - } - - /** - * Sets the site and input for this editor then creates and initializes the - * actions. Subclasses may extend this method, but should always call - * super.init(site, input) . - * - * @see org.eclipse.ui.IEditorPart#init(IEditorSite, IEditorInput) - */ - public void init(IEditorSite site, IEditorInput input) - throws PartInitException { - setSite(site); - setInput(input); - getCommandStack().addCommandStackListener(this); - getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this); - initializeActionRegistry(); - } - - /** - * Initializes the ActionRegistry. This registry may be used by - * {@link ActionBarContributor ActionBarContributors} and/or - * {@link ContextMenuProvider ContextMenuProviders}.

This method may be - * called on Editor creation, or lazily the first time - * {@link #getActionRegistry()} is called. - */ - protected void initializeActionRegistry() { - createActions(); - updateActions(propertyActions); - updateActions(stackActions); - } - - /** - * Override to set the contents of the GraphicalViewer after it has been - * created. - * - * @see #createGraphicalViewer(Composite) - */ - protected abstract void initializeGraphicalViewer(); - - /** - * Returns true if the command stack is dirty - * - * @see org.eclipse.ui.ISaveablePart#isDirty() - */ - public boolean isDirty() { - return getCommandStack().isDirty(); - } - - /** - * Returns false by default. Subclasses must return - * true to allow {@link #doSaveAs()} to be called. - * - * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed() - */ - public boolean isSaveAsAllowed() { - return false; - } - - /** - * @see org.eclipse.ui.ISelectionListener#selectionChanged(IWorkbenchPart, - * ISelection) - */ - public void selectionChanged(IWorkbenchPart part, ISelection selection) { - // If not the active editor, ignore selection changed. - if (this.equals(getSite().getPage().getActiveEditor())) - updateActions(selectionActions); - } - - /** - * Sets the ActionRegistry for this EditorPart. - * - * @param registry - * the registry - */ - protected void setActionRegistry(ActionRegistry registry) { - actionRegistry = registry; - } - - /** - * Sets the EditDomain for this EditorPart. - * - * @param ed - * the domain - */ - protected void setEditDomain(DefaultEditDomain ed) { - this.editDomain = ed; - } - - /** - * @see org.eclipse.ui.IWorkbenchPart#setFocus() - */ - public void setFocus() { - getGraphicalViewer().getControl().setFocus(); - } - - /** - * Sets the graphicalViewer for this EditorPart. - * - * @param viewer - * the graphical viewer - */ - protected void setGraphicalViewer(GraphicalViewer viewer) { - getEditDomain().addViewer(viewer); - this.graphicalViewer = viewer; - } - - /** - * A convenience method for updating a set of actions defined by the given - * List of action IDs. The actions are found by looking up the ID in the - * {@link #getActionRegistry() action registry}. If the corresponding action - * is an {@link UpdateAction}, it will have its update() method - * called. - * - * @param actionIds - * the list of IDs to update - */ - protected void updateActions(List actionIds) { - ActionRegistry registry = getActionRegistry(); - Iterator iter = actionIds.iterator(); - while (iter.hasNext()) { - IAction action = registry.getAction(iter.next()); - if (action instanceof UpdateAction) - ((UpdateAction) action).update(); - } - } - -} diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditorWithFlyoutPalette.java b/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditorWithFlyoutPalette.java deleted file mode 100644 index ca7cc942dc..0000000000 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/src-gef/com/liferay/ide/layouttpl/ui/gef/GraphicalEditorWithFlyoutPalette.java +++ /dev/null @@ -1,188 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - *******************************************************************************/ - -package com.liferay.ide.layouttpl.ui.gef; - -import com.liferay.ide.layouttpl.ui.LayoutTplUI; - -import org.eclipse.gef.DefaultEditDomain; -import org.eclipse.gef.palette.PaletteRoot; -import org.eclipse.gef.ui.palette.FlyoutPaletteComposite; -import org.eclipse.gef.ui.palette.PaletteViewer; -import org.eclipse.gef.ui.palette.PaletteViewerProvider; -import org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences; -import org.eclipse.gef.ui.views.palette.PalettePage; -import org.eclipse.gef.ui.views.palette.PaletteViewerPage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; - -public abstract class GraphicalEditorWithFlyoutPalette extends GraphicalEditor { - - private PaletteViewerProvider provider; - private FlyoutPaletteComposite splitter; - private CustomPalettePage page; - - /** - * @see GraphicalEditor#initializeGraphicalViewer() - */ - protected void initializeGraphicalViewer() { - splitter.hookDropTargetListener(getGraphicalViewer()); - } - - /** - * Creates a PaletteViewerProvider that will be used to create palettes for - * the view and the flyout. - * - * @return the palette provider - */ - protected PaletteViewerProvider createPaletteViewerProvider() { - return new PaletteViewerProvider(getEditDomain()); - } - - /** - * @return a newly-created {@link CustomPalettePage} - */ - protected CustomPalettePage createPalettePage() { - return new CustomPalettePage(getPaletteViewerProvider()); - } - - /** - * @see GraphicalEditor#createPartControl(Composite) - */ - public void createPartControl(Composite parent) { - splitter = - new FlyoutPaletteComposite( - parent, SWT.NONE, getSite().getPage(), getPaletteViewerProvider(), getPalettePreferences()); - super.createPartControl(splitter); - splitter.setGraphicalControl(getGraphicalControl()); - if (page != null) { - splitter.setExternalViewer(page.getPaletteViewer()); - page = null; - } - } - - /** - * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class) - */ - public Object getAdapter(Class type) { - if (type == PalettePage.class) { - if (splitter == null) { - page = createPalettePage(); - return page; - } - return createPalettePage(); - } - return super.getAdapter(type); - } - - /** - * @return the graphical viewer's control - */ - protected Control getGraphicalControl() { - return getGraphicalViewer().getControl(); - } - - /** - * By default, this method returns a FlyoutPreferences object that stores - * the flyout settings in the GEF plugin. Sub-classes may override. - * - * @return the FlyoutPreferences object used to save the flyout palette's - * preferences - */ - protected FlyoutPreferences getPalettePreferences() { - return FlyoutPaletteComposite.createFlyoutPreferences(LayoutTplUI.getDefault().getPluginPreferences()); - } - - /** - * Returns the PaletteRoot for the palette viewer. - * - * @return the palette root - */ - protected abstract PaletteRoot getPaletteRoot(); - - /** - * Returns the palette viewer provider that is used to create palettes for - * the view and the flyout. Creates one if it doesn't already exist. - * - * @return the PaletteViewerProvider that can be used to create - * PaletteViewers for this editor - * @see #createPaletteViewerProvider() - */ - protected final PaletteViewerProvider getPaletteViewerProvider() { - if (provider == null) - provider = createPaletteViewerProvider(); - return provider; - } - - /** - * Sets the edit domain for this editor. - * - * @param ed - * The new EditDomain - */ - protected void setEditDomain(DefaultEditDomain ed) { - super.setEditDomain(ed); - getEditDomain().setPaletteRoot(getPaletteRoot()); - } - - /** - * A custom PalettePage that helps GraphicalEditorWithFlyoutPalette keep the - * two PaletteViewers (one displayed in the editor and the other displayed - * in the PaletteView) in sync when switching from one to the other (i.e., - * it helps maintain state across the two viewers). - * - * @author Pratik Shah - * @since 3.0 - */ - protected class CustomPalettePage extends PaletteViewerPage { - - /** - * Constructor - * - * @param provider - * the provider used to create a PaletteViewer - */ - public CustomPalettePage(PaletteViewerProvider provider) { - super(provider); - } - - /** - * @see org.eclipse.ui.part.IPage#createControl(org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { - super.createControl(parent); - if (splitter != null) - splitter.setExternalViewer(viewer); - } - - /** - * @see org.eclipse.ui.part.IPage#dispose() - */ - public void dispose() { - if (splitter != null) - splitter.setExternalViewer(null); - super.dispose(); - } - - /** - * @return the PaletteViewer created and displayed by this page - */ - public PaletteViewer getPaletteViewer() { - return viewer; - } - } - -} diff --git a/tools/plugins/com.liferay.ide.layouttpl.ui/src/com/liferay/ide/layouttpl/ui/editor/LayoutTplEditor.java b/tools/plugins/com.liferay.ide.layouttpl.ui/src/com/liferay/ide/layouttpl/ui/editor/LayoutTplEditor.java index 5b50cd83e2..d9a5877ff2 100644 --- a/tools/plugins/com.liferay.ide.layouttpl.ui/src/com/liferay/ide/layouttpl/ui/editor/LayoutTplEditor.java +++ b/tools/plugins/com.liferay.ide.layouttpl.ui/src/com/liferay/ide/layouttpl/ui/editor/LayoutTplEditor.java @@ -19,7 +19,6 @@ import com.liferay.ide.layouttpl.ui.LayoutTplUI; import com.liferay.ide.layouttpl.ui.action.LayoutTplEditorSelectAllAction; -import com.liferay.ide.layouttpl.ui.gef.GraphicalEditorWithFlyoutPalette; import com.liferay.ide.layouttpl.ui.model.LayoutTplDiagram; import com.liferay.ide.layouttpl.ui.parts.LayoutTplEditPartFactory; import com.liferay.ide.layouttpl.ui.parts.LayoutTplRootEditPart; @@ -37,11 +36,16 @@ import org.eclipse.gef.palette.PaletteRoot; import org.eclipse.gef.requests.CreationFactory; import org.eclipse.gef.requests.SimpleFactory; +import org.eclipse.gef.ui.actions.ActionRegistry; import org.eclipse.gef.ui.actions.SelectAllAction; +import org.eclipse.gef.ui.palette.FlyoutPaletteComposite; +import org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences; import org.eclipse.gef.ui.palette.PaletteViewer; import org.eclipse.gef.ui.palette.PaletteViewerProvider; +import org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette; import org.eclipse.gef.ui.parts.GraphicalViewerImpl; import org.eclipse.gef.ui.parts.GraphicalViewerKeyHandler; +import org.eclipse.gef.ui.parts.SelectionSynchronizer; import org.eclipse.gef.ui.parts.TreeViewer; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.util.TransferDropTargetListener; @@ -133,6 +137,12 @@ public void doSaveAs() { } + @Override + public ActionRegistry getActionRegistry() + { + return super.getActionRegistry(); + } + @SuppressWarnings( "rawtypes" ) public Object getAdapter( Class type ) { @@ -149,6 +159,24 @@ public LayoutTplDiagram getDiagram() return diagram; } + @Override + public DefaultEditDomain getEditDomain() + { + return super.getEditDomain(); + } + + @Override + protected FlyoutPreferences getPalettePreferences() + { + return FlyoutPaletteComposite.createFlyoutPreferences( LayoutTplUI.getDefault().getPluginPreferences() ); + } + + @Override + public SelectionSynchronizer getSelectionSynchronizer() + { + return super.getSelectionSynchronizer(); + } + public boolean isSaveAsAllowed() { return false;