Skip to content
Snippets Groups Projects
Commit ee2dccac authored by Christoph Döbber's avatar Christoph Döbber
Browse files

reviewed tooling.base.ui

refs 311
parent c039c4f6
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 28 deletions
...@@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext; ...@@ -26,7 +26,7 @@ import org.osgi.framework.BundleContext;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 2100D91404D5AB79EAEBB5E5107245D1 * @ConQAT.Rating GREEN Hash: 13207B1B51F8F60D2122999D2EDB0603
*/ */
public class ToolingBaseActivator extends Plugin { public class ToolingBaseActivator extends Plugin {
......
...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.service.IElementCompositorService; ...@@ -39,7 +39,7 @@ import org.fortiss.tooling.kernel.service.IElementCompositorService;
* @author doebber * @author doebber
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: E5DA3C13BF3E5399E425B401D62C0579 * @ConQAT.Rating GREEN Hash: 26FC35FD40E28AB8F78FC7E42569DD0B
*/ */
public abstract class HierarchicElementCompositorBase<HE extends IHierarchicElementContainer> public abstract class HierarchicElementCompositorBase<HE extends IHierarchicElementContainer>
implements IElementCompositor<HE> { implements IElementCompositor<HE> {
......
...@@ -23,7 +23,7 @@ package org.fortiss.tooling.base.layout; ...@@ -23,7 +23,7 @@ package org.fortiss.tooling.base.layout;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: C73875A2DF5C4FA193DBD6AD12A220E4 * @ConQAT.Rating GREEN Hash: 518B269F6FBF5ECE75F034373B4240A4
*/ */
public class DefaultLayoutConstants { public class DefaultLayoutConstants {
......
...@@ -29,7 +29,7 @@ import org.fortiss.tooling.base.model.layout.ILayoutedModelElement; ...@@ -29,7 +29,7 @@ import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: DE79B340A0B6E270C967987E242746CC * @ConQAT.Rating GREEN Hash: C5106CA497CBD9039D93527011B31922
*/ */
public final class AngleUtils { public final class AngleUtils {
......
...@@ -34,7 +34,7 @@ import org.fortiss.tooling.base.model.element.IModelElementSpecification; ...@@ -34,7 +34,7 @@ import org.fortiss.tooling.base.model.element.IModelElementSpecification;
* @author hoelzl * @author hoelzl
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 77C22DC9FB8BAD588272F4B738249542 * @ConQAT.Rating GREEN Hash: 66CCCA68F9162A427BB1BDF853DB0146
*/ */
public class BaseModelElementUtils { public class BaseModelElementUtils {
......
...@@ -29,7 +29,7 @@ import org.fortiss.tooling.base.model.layout.ILayoutedModelElement; ...@@ -29,7 +29,7 @@ import org.fortiss.tooling.base.model.layout.ILayoutedModelElement;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: AD7143102CB3ED7457686F16AE7E1E77 * @ConQAT.Rating GREEN Hash: 5C92A83202006734362EED9438B3A2D8
*/ */
public final class DimensionUtils { public final class DimensionUtils {
......
...@@ -17,8 +17,16 @@ $Id$ ...@@ -17,8 +17,16 @@ $Id$
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.utils; package org.fortiss.tooling.base.utils;
import org.fortiss.tooling.base.layout.DefaultLayoutConstants; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT;
import org.fortiss.tooling.base.layout.LayoutKeyConstants; import static org.fortiss.tooling.base.layout.DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH;
import static org.fortiss.tooling.base.layout.LayoutKeyConstants.CONNECTION_POINTS;
import static org.fortiss.tooling.base.layout.LayoutKeyConstants.CONNECTOR_DIMENSION;
import static org.fortiss.tooling.base.layout.LayoutKeyConstants.CONNECTOR_POSITION;
import static org.fortiss.tooling.base.layout.LayoutKeyConstants.NODE_DIMENSION;
import static org.fortiss.tooling.base.layout.LayoutKeyConstants.NODE_POSITION;
import static org.fortiss.tooling.base.utils.DimensionUtils.setDimension;
import static org.fortiss.tooling.base.utils.PointUtils.setPoint;
import org.fortiss.tooling.base.model.layout.Angle; import org.fortiss.tooling.base.model.layout.Angle;
import org.fortiss.tooling.base.model.layout.Dimension; import org.fortiss.tooling.base.model.layout.Dimension;
import org.fortiss.tooling.base.model.layout.EOrientation; import org.fortiss.tooling.base.model.layout.EOrientation;
...@@ -34,34 +42,28 @@ import org.fortiss.tooling.base.model.layout.Points; ...@@ -34,34 +42,28 @@ import org.fortiss.tooling.base.model.layout.Points;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: E84D6730B2F452D7DD81165E6C195730 * @ConQAT.Rating GREEN Hash: B56440764A42F45EA1CB2A0902098928
*/ */
public final class LayoutModelElementFactory { public final class LayoutModelElementFactory {
/** Creates a model element node layout. */ /** Creates a model element node layout. */
public static void createNodeElementLayout(ILayoutedModelElement layouted) { public static void createNodeElementLayout(ILayoutedModelElement layouted) {
PointUtils.setPoint(layouted, LayoutKeyConstants.NODE_POSITION, 0, 0); setPoint(layouted, NODE_POSITION, 0, 0);
DimensionUtils.setDimension(layouted, setDimension(layouted, NODE_DIMENSION, DEFAULT_SHAPE_MINIMUM_WIDTH,
LayoutKeyConstants.NODE_DIMENSION, DEFAULT_SHAPE_MINIMUM_HEIGHT);
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT);
} }
/** Creates a connector layout. */ /** Creates a connector layout. */
public static void createConnectorLayout(ILayoutedModelElement layouted) { public static void createConnectorLayout(ILayoutedModelElement layouted) {
PointUtils.setPoint(layouted, LayoutKeyConstants.NODE_POSITION, 0, 0); setPoint(layouted, NODE_POSITION, 0, 0);
DimensionUtils.setDimension(layouted, setDimension(layouted, NODE_DIMENSION, DEFAULT_SHAPE_MINIMUM_WIDTH,
LayoutKeyConstants.NODE_DIMENSION, DEFAULT_SHAPE_MINIMUM_HEIGHT);
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_WIDTH,
DefaultLayoutConstants.DEFAULT_SHAPE_MINIMUM_HEIGHT);
Point cpos = LayoutModelElementFactory.createPoint(0, 0, Point cpos = createPoint(0, 0, CONNECTOR_POSITION);
LayoutKeyConstants.CONNECTOR_POSITION);
Dimension cdim = LayoutModelElementFactory.createDimension(0, 0, Dimension cdim = createDimension(0, 0, CONNECTOR_DIMENSION);
LayoutKeyConstants.CONNECTOR_DIMENSION);
layouted.getLayoutDataList().add(cpos); layouted.getLayoutDataList().add(cpos);
layouted.getLayoutDataList().add(cdim); layouted.getLayoutDataList().add(cdim);
...@@ -69,8 +71,7 @@ public final class LayoutModelElementFactory { ...@@ -69,8 +71,7 @@ public final class LayoutModelElementFactory {
/** Creates a new connection layout. */ /** Creates a new connection layout. */
public static void createConnectionLayout(ILayoutedModelElement layouted) { public static void createConnectionLayout(ILayoutedModelElement layouted) {
Points points = LayoutModelElementFactory Points points = createPoints(CONNECTION_POINTS);
.createPoints(LayoutKeyConstants.CONNECTION_POINTS);
layouted.getLayoutDataList().add(points); layouted.getLayoutDataList().add(points);
} }
......
...@@ -32,7 +32,7 @@ import org.fortiss.tooling.base.model.layout.Orientation; ...@@ -32,7 +32,7 @@ import org.fortiss.tooling.base.model.layout.Orientation;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 53B0B2AFACC1B5CFC39BCF1568622294 * @ConQAT.Rating GREEN Hash: 5C22AE10DC58624221B46523BC0EF0F3
*/ */
public final class OffsetOrientationUtils { public final class OffsetOrientationUtils {
......
...@@ -32,8 +32,9 @@ import org.fortiss.tooling.base.model.layout.Point; ...@@ -32,8 +32,9 @@ import org.fortiss.tooling.base.model.layout.Point;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: 424A37CE4EA761ABD1CD4B9E82E1CF5C * @ConQAT.Rating RED Hash: F8F0E6464D6AE313BE24C2CDE47F38D5
*/ */
// TODO @review CD: merge with PointsUtils
public final class PointUtils { public final class PointUtils {
/** /**
......
...@@ -32,8 +32,9 @@ import org.fortiss.tooling.base.model.layout.Points; ...@@ -32,8 +32,9 @@ import org.fortiss.tooling.base.model.layout.Points;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: AFC510FBC49D82AE86018CF7A4D3ABF5 * @ConQAT.Rating RED Hash: DE74A89AC972DD275E820C33319FA03B
*/ */
// TODO @review CD: merge with PointUtils
public final class PointsUtils { public final class PointsUtils {
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment