Commit 3613462f authored by Simon Barner's avatar Simon Barner
Browse files

Ensure that SVN properties are set.

Please fix your SVN configurations!

See https://af3-developer.fortiss.org/projects/autofocus3/wiki/Developer_Installation, Section "Initial Workspace Content Check-out", §6.
parent 0a49515f
<!--
$Id: package.html 2692 2012-01-09 13:17:37Z doebber $
@version $Rev: 2692 $
$Id$
@version $Rev$
@ConQAT.Rating GREEN Hash: 9D00E6B4302A4481A16B26EB8D6D2E72
-->
<body>
......
<!--
$Id: package.html 2692 2012-01-09 13:17:37Z doebber $
@version $Rev: 2692 $
$Id$
@version $Rev$
@ConQAT.Rating GREEN Hash: 79120495ED42572F0F14FD80926AC3F7
-->
<body>
......
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2015 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editpart.allocation;
import org.eclipse.draw2d.PolylineConnection;
import org.fortiss.tooling.base.model.base.ConnectionSegmentBase;
import org.fortiss.tooling.base.ui.editpart.ConnectionEditPartBase;
import org.fortiss.tooling.base.ui.layout.IDiagramLayoutConfiguration;
/**
* Base class for allocation connection edit parts.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @param <T>
* @ConQAT.Rating GREEN Hash: 46E2D8D9E24BE02BEC398AD9F361C247
*/
public abstract class AllocationConnectionEditPartBase<T extends ConnectionSegmentBase> extends
ConnectionEditPartBase<T> {
/** Constructor. */
protected AllocationConnectionEditPartBase(T modelElement,
IDiagramLayoutConfiguration layoutConfiguration) {
super(modelElement, layoutConfiguration);
}
/** {@inheritDoc} */
@Override
protected void refreshVisuals() {
super.refreshVisuals();
// Prevent connections from being shown in the wrong hierarchical layers
figure.setVisible(getTarget() != null && getSource() != null);
}
/** {@inheritDoc} */
@Override
protected PolylineConnection createFigure() {
PolylineConnection createFigure = super.createFigure();
createFigure.setLineWidth(createFigure.getLineWidth() * 2);
return createFigure;
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2015 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editpart.allocation;
import org.eclipse.draw2d.PolylineConnection;
import org.fortiss.tooling.base.model.base.ConnectionSegmentBase;
import org.fortiss.tooling.base.ui.editpart.ConnectionEditPartBase;
import org.fortiss.tooling.base.ui.layout.IDiagramLayoutConfiguration;
/**
* Base class for allocation connection edit parts.
*
* @author eder
* @author $Author$
* @version $Rev$
* @param <T>
* @ConQAT.Rating GREEN Hash: 46E2D8D9E24BE02BEC398AD9F361C247
*/
public abstract class AllocationConnectionEditPartBase<T extends ConnectionSegmentBase> extends
ConnectionEditPartBase<T> {
/** Constructor. */
protected AllocationConnectionEditPartBase(T modelElement,
IDiagramLayoutConfiguration layoutConfiguration) {
super(modelElement, layoutConfiguration);
}
/** {@inheritDoc} */
@Override
protected void refreshVisuals() {
super.refreshVisuals();
// Prevent connections from being shown in the wrong hierarchical layers
figure.setVisible(getTarget() != null && getSource() != null);
}
/** {@inheritDoc} */
@Override
protected PolylineConnection createFigure() {
PolylineConnection createFigure = super.createFigure();
createFigure.setLineWidth(createFigure.getLineWidth() * 2);
return createFigure;
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2015 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editpart.allocation;
import static org.eclipse.gef.LayerConstants.CONNECTION_LAYER;
import org.eclipse.draw2d.BendpointConnectionRouter;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.ConnectionLayer;
import org.eclipse.draw2d.ConnectionRouter;
import org.eclipse.draw2d.FreeformLayer;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.NodeEditPart;
import org.eclipse.gef.Request;
import org.eclipse.swt.SWT;
import org.fortiss.tooling.base.ui.editpart.GraphicalEditPartBase;
import org.fortiss.tooling.base.ui.layout.IDiagramLayoutConfiguration;
import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguration;
/**
* The base class for allocation diagrams.
*
* @param <T>
* the type of the model element shown.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating GREEN Hash: 73346CF5CBAC03B32C7B1DFDC30AADA2
*/
public abstract class AllocationDiagramEditPartBase<T extends EObject> extends
GraphicalEditPartBase<T> implements NodeEditPart {
/** Stores the diagram layout configuration. */
protected final IDiagramLayoutConfiguration layoutConfiguration;
/** Stores the connection router. */
private final ConnectionRouter connectionRouter;
/** Constructor. */
protected AllocationDiagramEditPartBase(T modelElement) {
super(modelElement);
this.layoutConfiguration = RectangleGridLayoutDiagramConfiguration.INSTANCE;
this.connectionRouter = new BendpointConnectionRouter();
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getTargetConnectionAnchor(Request request) {
return null;
}
/** {@inheritDoc} */
@Override
protected void createEditPolicies() {
// do nothing
}
/** {@inheritDoc} */
@Override
protected void refreshVisuals() {
if(!getFigure().hasFocus()) {
return;
}
super.refreshVisuals();
refreshSourceConnections();
refreshTargetConnections();
refreshChildren();
for(Object o : getChildren()) {
((EditPart)o).refresh();
}
for(Object editPart : getSourceConnections()) {
((EditPart)editPart).refresh();
}
for(Object editPart : getTargetConnections()) {
((EditPart)editPart).refresh();
}
}
/** {@inheritDoc} */
@Override
public void setFocus(boolean value) {
super.setFocus(value);
if(value) {
refreshVisuals();
}
}
/** {@inheritDoc} */
@Override
public IDiagramLayoutConfiguration getLayoutConfiguration() {
return layoutConfiguration;
}
/** {@inheritDoc} */
@Override
protected IFigure createFigure() {
setConnectionRouter();
FreeformLayer f = new FreeformLayer();
f.setOpaque(false);
f.setLayoutManager(new XYLayout());
f.setBackgroundColor(ColorConstants.white);
return f;
}
/** Sets anti-aliasing and the connection router on connection layer. */
private void setConnectionRouter() {
ConnectionLayer cLayer = (ConnectionLayer)getLayer(CONNECTION_LAYER);
if(cLayer != null) {
cLayer.setAntialias(SWT.ON);
cLayer.setConnectionRouter(connectionRouter);
}
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2015 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editpart.allocation;
import static org.eclipse.gef.LayerConstants.CONNECTION_LAYER;
import org.eclipse.draw2d.BendpointConnectionRouter;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.ConnectionLayer;
import org.eclipse.draw2d.ConnectionRouter;
import org.eclipse.draw2d.FreeformLayer;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.NodeEditPart;
import org.eclipse.gef.Request;
import org.eclipse.swt.SWT;
import org.fortiss.tooling.base.ui.editpart.GraphicalEditPartBase;
import org.fortiss.tooling.base.ui.layout.IDiagramLayoutConfiguration;
import org.fortiss.tooling.base.ui.layout.RectangleGridLayoutDiagramConfiguration;
/**
* The base class for allocation diagrams.
*
* @param <T>
* the type of the model element shown.
*
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: 73346CF5CBAC03B32C7B1DFDC30AADA2
*/
public abstract class AllocationDiagramEditPartBase<T extends EObject> extends
GraphicalEditPartBase<T> implements NodeEditPart {
/** Stores the diagram layout configuration. */
protected final IDiagramLayoutConfiguration layoutConfiguration;
/** Stores the connection router. */
private final ConnectionRouter connectionRouter;
/** Constructor. */
protected AllocationDiagramEditPartBase(T modelElement) {
super(modelElement);
this.layoutConfiguration = RectangleGridLayoutDiagramConfiguration.INSTANCE;
this.connectionRouter = new BendpointConnectionRouter();
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
return null;
}
/** {@inheritDoc} */
@Override
public ConnectionAnchor getTargetConnectionAnchor(Request request) {
return null;
}
/** {@inheritDoc} */
@Override
protected void createEditPolicies() {
// do nothing
}
/** {@inheritDoc} */
@Override
protected void refreshVisuals() {
if(!getFigure().hasFocus()) {
return;
}
super.refreshVisuals();
refreshSourceConnections();
refreshTargetConnections();
refreshChildren();
for(Object o : getChildren()) {
((EditPart)o).refresh();
}
for(Object editPart : getSourceConnections()) {
((EditPart)editPart).refresh();
}
for(Object editPart : getTargetConnections()) {
((EditPart)editPart).refresh();
}
}
/** {@inheritDoc} */
@Override
public void setFocus(boolean value) {
super.setFocus(value);
if(value) {
refreshVisuals();
}
}
/** {@inheritDoc} */
@Override
public IDiagramLayoutConfiguration getLayoutConfiguration() {
return layoutConfiguration;
}
/** {@inheritDoc} */
@Override
protected IFigure createFigure() {
setConnectionRouter();
FreeformLayer f = new FreeformLayer();
f.setOpaque(false);
f.setLayoutManager(new XYLayout());
f.setBackgroundColor(ColorConstants.white);
return f;
}
/** Sets anti-aliasing and the connection router on connection layer. */
private void setConnectionRouter() {
ConnectionLayer cLayer = (ConnectionLayer)getLayer(CONNECTION_LAYER);
if(cLayer != null) {
cLayer.setAntialias(SWT.ON);
cLayer.setConnectionRouter(connectionRouter);
}
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2015 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.editpart.allocation;
import static org.fortiss.tooling.base.ui.utils.LayoutDataUIUtils.getNodeBounds;
import java.util.ArrayList;
import java.util.List;
import org.conqat.ide.commons.ui.swt.FontUtils;
import org.eclipse.draw2d.ChopboxAnchor;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.PositionConstants;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
import org.eclipse.gef.Request;
import org.eclipse.gef.RequestConstants;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.fortiss.tooling.base.layout.DefaultLayoutConstants;
import org.fortiss.tooling.base.model.element.IConnector;
import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
import org.fortiss.tooling.base.ui.editpart.PositionedEditPartBase;
import org.fortiss.tooling.base.ui.editpart.figure.TransparentLabel;
import org.fortiss.tooling.base.ui.editpart.policy.AllocationDirectConnectionAndReconnectionEditPolicy;
import org.fortiss.tooling.kernel.model.INamedCommentedElement;
import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
/**
* The base class for graphical edit parts which encapsulate nodes (i.e. the
* main modeling elements). All of them have a name label and an activation
* mode. This EditPart is intended to be used in allocation diagrams which
* allow the connection of elements from two different GEF based diagram editors.
*
* @param <T>
* the type of the model element wrapped.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating GREEN Hash: 97CF53A8DC797205A14E4466EB56BF92
*/
public abstract class AllocationElementEditPartBase<T extends ILayoutedModelElement & INamedCommentedElement>
extends PositionedEditPartBase<T> {
/** The default font for titles. */
public static Font DEFAULT_TITLE_FONT = FontUtils.derive(JFaceResources.getDefaultFont(), 0,
SWT.BOLD);
/** The allocation object. (e.g. a deployment) */
private EObject allocationObject;
/** Constructor. */
protected AllocationElementEditPartBase(T modelElement, EObject allocationObject) {
super(modelElement);
this.allocationObject = allocationObject;
}
/**
* If the template parameter {@code T} is the source of an allocation connection this method has
* to be implemented. Otherwise return an empty list.
*
* @return a list of all outgoing connections of this element
*/
protected abstract List<?> getModelSourceConnectionsInternal();
/**
* If the template parameter {code T} is the target of an allocation connection this method has
* to be implemented. Otherwise return an empty list.
*
* @return a list of all incoming connections of this element
*/
protected abstract List<?> getModelTargetConnectionsInternal();