blob: 0cf60c7774cb32df4f34f92fe1d0c9fdb42d55b3 [file] [log] [blame]
/*
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Florian Pirchner - Initial implementation
* Loetz GmbH&Co.KG
*
*/
package org.eclipse.osbp.vaadin.emf.api;
import java.util.List;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
// TODO: Auto-generated Javadoc
/**
* A design context is a vaaclipse session singleton. It is accessible the the
* eclipse context and returns important information about the designer
* environment.
*
* @Scope(session-singleton)
* @NoImplementByClients
*/
public interface IModelingContext {
/**
* Sends events by the event admin about the state of the modeling context.
* Data is Boolean.TRUE or Boolean.FALSE.
*/
public static final String TOPIC_STATE = "osbee/vaadin/emf/modeling/state";
/**
* Returns the model element for the given UI.
*
* @param component
* the component
* @return the model for ui
*/
EObject getModelForUi(Object component);
/**
* Loads the given resource.
*
* @param uri
* the uri
*/
public abstract void loadPerspective(URI uri);
/**
* Loads the given resource.
*
* @param uri
* the new perspective
*/
public abstract void setPerspective(URI uri);
/**
* Returns the editing domain.
*
* @return the editing domain
*/
public abstract EditingDomain getEditingDomain();
/**
* Returns the adapter factory.
*
* @return the adapter factory
*/
public abstract AdapterFactory getAdapterFactory();
/**
* Returns the command stack.
*
* @return the command stack
*/
public abstract CommandStack getCommandStack();
/**
* Returns true, if the design mode is active.
*
* @return true, if is design mode
*/
public boolean isDesignMode();
/**
* Activate the design mode.
*
* @param value
* the new design mode
*/
void setDesignMode(boolean value);
/**
* The Interface CommandStack.
*/
public interface CommandStack extends
org.eclipse.emf.common.command.CommandStack {
/**
* Returns all commands contained in the command stack.
*
* @return the all commands
*/
List<Command> getAllCommands();
}
}