1 /*******************************************************************************
2 * Copyright (c) 2018 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.modeling.ui.diagramEditor.dnd;
14 import org.simantics.db.WriteGraph;
15 import org.simantics.db.exception.DatabaseException;
18 * Represents a suggestion of a fix/change that must be made to the target model
19 * before actually performing the element to diagram drop database changes.
21 * The {@link #toString()} method should return a clear description of the
22 * suggested fix/change.
24 * @author Tuukka Lehtonen
27 public interface DropSuggestion {
30 * Perform the suggested database fix/change encapsulated by this instance.
33 * @throws DatabaseException
35 void fix(WriteGraph graph) throws DatabaseException;
38 * @return a clear end-user readable description of the suggested fix/change