Java Code Examples for org.eclipse.gmf.runtime.notation.Routing#get()

The following examples show how to use org.eclipse.gmf.runtime.notation.Routing#get() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProcessViewProvider.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
/**
* @generated
*/
public Edge createTextAnnotationAttachment_4003(EObject domainElement, View containerView, int index,
		boolean persisted, PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(ProcessVisualIDRegistry.getType(TextAnnotationAttachmentEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	return edge;
}
 
Example 2
Source File: CrossflowViewProvider.java    From scava with Eclipse Public License 2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createStreamType_4001(View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(CrossflowVisualIDRegistry.getType(StreamTypeEditPart.VISUAL_ID));
	edge.setElement(null);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6001 = createLabel(edge, CrossflowVisualIDRegistry.getType(WrappingLabelEditPart.VISUAL_ID));
	label6001.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
	label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6001 = (Location) label6001.getLayoutConstraint();
	location6001.setX(0);
	location6001.setY(40);
	return edge;
}
 
Example 3
Source File: CrossflowViewProvider.java    From scava with Eclipse Public License 2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createStreamInputOf_4005(View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(CrossflowVisualIDRegistry.getType(StreamInputOfEditPart.VISUAL_ID));
	edge.setElement(null);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6005 = createLabel(edge, CrossflowVisualIDRegistry.getType(WrappingLabel2EditPart.VISUAL_ID));
	label6005.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
	label6005.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6005 = (Location) label6005.getLayoutConstraint();
	location6005.setX(0);
	location6005.setY(40);
	return edge;
}
 
Example 4
Source File: CrossflowViewProvider.java    From scava with Eclipse Public License 2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createTaskOutput_4003(View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(CrossflowVisualIDRegistry.getType(TaskOutputEditPart.VISUAL_ID));
	edge.setElement(null);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6003 = createLabel(edge, CrossflowVisualIDRegistry.getType(WrappingLabel3EditPart.VISUAL_ID));
	label6003.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
	label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6003 = (Location) label6003.getLayoutConstraint();
	location6003.setX(0);
	location6003.setY(40);
	return edge;
}
 
Example 5
Source File: CrossflowViewProvider.java    From scava with Eclipse Public License 2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createTypeExtending_4004(View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(CrossflowVisualIDRegistry.getType(TypeExtendingEditPart.VISUAL_ID));
	edge.setElement(null);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6004 = createLabel(edge, CrossflowVisualIDRegistry.getType(WrappingLabel4EditPart.VISUAL_ID));
	label6004.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
	label6004.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6004 = (Location) label6004.getLayoutConstraint();
	location6004.setX(0);
	location6004.setY(40);
	return edge;
}
 
Example 6
Source File: CustomProcessViewProvider.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Edge createMessageFlow_4002(final EObject domainElement,
        final View containerView, final int index, final boolean persisted,
        final PreferencesHint preferencesHint) {
    final Connector edge = NotationFactory.eINSTANCE.createConnector();
    edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
    final RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
            .createRelativeBendpoints();
    final ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
            2);
    points.add(new RelativeBendpoint());
    points.add(new RelativeBendpoint());
    bendpoints.setPoints(points);
    edge.setBendpoints(bendpoints);
    ViewUtil.insertChildView(containerView, edge, index, persisted);
    edge.setType(ProcessVisualIDRegistry
            .getType(MessageFlowEditPart.VISUAL_ID));
    edge.setElement(domainElement);
    // initializePreferences
    final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
            .getPreferenceStore();

    final org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
            prefStore, IPreferenceConstants.PREF_LINE_COLOR);
    ViewUtil.setStructuralFeatureValue(edge,
            NotationPackage.eINSTANCE.getLineStyle_LineColor(),
            FigureUtilities.RGBToInteger(lineRGB));
    final FontStyle edgeFontStyle = (FontStyle) edge
            .getStyle(NotationPackage.Literals.FONT_STYLE);
    if (edgeFontStyle != null) {
        final FontData fontData = PreferenceConverter.getFontData(prefStore,
                IPreferenceConstants.PREF_DEFAULT_FONT);
        edgeFontStyle.setFontName(fontData.getName());
        edgeFontStyle.setFontHeight(fontData.getHeight());
        edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
        edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
        final org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
                .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
        edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
                .intValue());
    }
    final Routing routing = Routing.get(Routing.RECTILINEAR_LITERAL.getName());

    if (routing != null) {
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoutingStyle_Routing(),
                routing);
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(),
                10);
    }
    final Node label6003 = createLabel(edge,
            ProcessVisualIDRegistry
                    .getType(MessageFlowLabelEditPart.VISUAL_ID));
    label6003.setLayoutConstraint(NotationFactory.eINSTANCE
            .createLocation());
    final Location location6003 = (Location) label6003.getLayoutConstraint();
    location6003.setX(0);
    location6003.setY(-10);
    return edge;
}
 
Example 7
Source File: CustomProcessViewProvider.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Edge createSequenceFlow_4001(final EObject domainElement,
        final View containerView, final int index, final boolean persisted,
        final PreferencesHint preferencesHint) {
    final Connector edge = NotationFactory.eINSTANCE.createConnector();
    edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
    final RelativeBendpoints bendpoints = NotationFactory.eINSTANCE
            .createRelativeBendpoints();
    final ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(
            2);
    points.add(new RelativeBendpoint());
    points.add(new RelativeBendpoint());
    bendpoints.setPoints(points);
    edge.setBendpoints(bendpoints);
    ViewUtil.insertChildView(containerView, edge, index, persisted);
    edge.setType(ProcessVisualIDRegistry
            .getType(SequenceFlowEditPart.VISUAL_ID));
    edge.setElement(domainElement);
    // initializePreferences
    final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint
            .getPreferenceStore();

    final org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(
            prefStore, IPreferenceConstants.PREF_LINE_COLOR);
    ViewUtil.setStructuralFeatureValue(edge,
            NotationPackage.eINSTANCE.getLineStyle_LineColor(),
            FigureUtilities.RGBToInteger(lineRGB));
    final FontStyle edgeFontStyle = (FontStyle) edge
            .getStyle(NotationPackage.Literals.FONT_STYLE);
    if (edgeFontStyle != null) {
        final FontData fontData = PreferenceConverter.getFontData(prefStore,
                IPreferenceConstants.PREF_DEFAULT_FONT);
        edgeFontStyle.setFontName(fontData.getName());
        edgeFontStyle.setFontHeight(fontData.getHeight());
        edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
        edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
        final org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter
                .getColor(prefStore, IPreferenceConstants.PREF_FONT_COLOR);
        edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB)
                .intValue());
    }
    final Routing routing = Routing.get(Routing.RECTILINEAR_LITERAL.getName());

    if (routing != null) {
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoutingStyle_Routing(),
                routing);
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoundedCornersStyle_RoundedBendpointsRadius(),
                10);
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoutingStyle_ClosestDistance(),
                false);
        ViewUtil.setStructuralFeatureValue(edge,
                NotationPackage.eINSTANCE.getRoutingStyle_AvoidObstructions(),
                false);
    }
    final Node label6001 = createLabel(edge,
            ProcessVisualIDRegistry
                    .getType(SequenceFlowNameEditPart.VISUAL_ID));
    label6001.setLayoutConstraint(NotationFactory.eINSTANCE
            .createLocation());
    label6001.setVisible(true);
    final Location location6001 = (Location) label6001.getLayoutConstraint();
    location6001.setX(0);
    location6001.setY(-10);
    return edge;
}
 
Example 8
Source File: ProcessViewProvider.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createSequenceFlow_4001(EObject domainElement, View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(ProcessVisualIDRegistry.getType(SequenceFlowEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6001 = createLabel(edge, ProcessVisualIDRegistry.getType(SequenceFlowNameEditPart.VISUAL_ID));
	label6001.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6001 = (Location) label6001.getLayoutConstraint();
	location6001.setX(0);
	location6001.setY(-10);
	return edge;
}
 
Example 9
Source File: ProcessViewProvider.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
/**
* @generated
*/
public Edge createMessageFlow_4002(EObject domainElement, View containerView, int index, boolean persisted,
		PreferencesHint preferencesHint) {
	Connector edge = NotationFactory.eINSTANCE.createConnector();
	edge.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
	RelativeBendpoints bendpoints = NotationFactory.eINSTANCE.createRelativeBendpoints();
	ArrayList<RelativeBendpoint> points = new ArrayList<RelativeBendpoint>(2);
	points.add(new RelativeBendpoint());
	points.add(new RelativeBendpoint());
	bendpoints.setPoints(points);
	edge.setBendpoints(bendpoints);
	ViewUtil.insertChildView(containerView, edge, index, persisted);
	edge.setType(ProcessVisualIDRegistry.getType(MessageFlowEditPart.VISUAL_ID));
	edge.setElement(domainElement);
	// initializePreferences
	final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();

	org.eclipse.swt.graphics.RGB lineRGB = PreferenceConverter.getColor(prefStore,
			IPreferenceConstants.PREF_LINE_COLOR);
	ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getLineStyle_LineColor(),
			FigureUtilities.RGBToInteger(lineRGB));
	FontStyle edgeFontStyle = (FontStyle) edge.getStyle(NotationPackage.Literals.FONT_STYLE);
	if (edgeFontStyle != null) {
		FontData fontData = PreferenceConverter.getFontData(prefStore, IPreferenceConstants.PREF_DEFAULT_FONT);
		edgeFontStyle.setFontName(fontData.getName());
		edgeFontStyle.setFontHeight(fontData.getHeight());
		edgeFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
		edgeFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
		org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(prefStore,
				IPreferenceConstants.PREF_FONT_COLOR);
		edgeFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
	}
	Routing routing = Routing.get(prefStore.getInt(IPreferenceConstants.PREF_LINE_STYLE));
	if (routing != null) {
		ViewUtil.setStructuralFeatureValue(edge, NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
	}
	Node label6003 = createLabel(edge, ProcessVisualIDRegistry.getType(MessageFlowLabelEditPart.VISUAL_ID));
	label6003.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
	Location location6003 = (Location) label6003.getLayoutConstraint();
	location6003.setX(0);
	location6003.setY(-10);
	return edge;
}