use of org.osate.ge.services.QueryService in project osate2 by osate.
the class ErrorTypeExtensionHandler method getGraphicalConfiguration.
@Override
public Optional<GraphicalConfiguration> getGraphicalConfiguration(final GetGraphicalConfigurationContext ctx) {
final BusinessObjectContext boc = ctx.getBusinessObjectContext();
final QueryService queryService = ctx.getQueryService();
final BusinessObjectContext destination = getDestination(boc, queryService);
if (destination == null) {
return Optional.of(GraphicalConfigurationBuilder.create().graphic(LABEL_GRAPHIC).build());
} else {
return Optional.of(GraphicalConfigurationBuilder.create().graphic(CONNECTION_GRAPHIC).style(STYLE).source(boc.getParent()).destination(destination).build());
}
}
use of org.osate.ge.services.QueryService in project osate2 by osate.
the class TransitionBranchHandler method getGraphicalConfiguration.
@Override
public Optional<GraphicalConfiguration> getGraphicalConfiguration(final GetGraphicalConfigurationContext ctx) {
final BusinessObjectContext boc = ctx.getBusinessObjectContext();
final QueryService queryService = ctx.getQueryService();
return Optional.of(GraphicalConfigurationBuilder.create().graphic(ErrorModelGeUtil.TRANSITION_CONNECTION_GRAPHIC).source(getSource(boc, queryService)).destination(getDestination(boc, queryService)).build());
}
use of org.osate.ge.services.QueryService in project osate2 by osate.
the class ErrorBehaviorTransitionHandler method getGraphicalConfiguration.
@Override
public Optional<GraphicalConfiguration> getGraphicalConfiguration(final GetGraphicalConfigurationContext ctx) {
final BusinessObjectContext boc = ctx.getBusinessObjectContext();
final ErrorBehaviorTransition transition = boc.getBusinessObject(ErrorBehaviorTransition.class).get();
final QueryService queryService = ctx.getQueryService();
if (transition.getDestinationBranches().isEmpty()) {
return Optional.of(GraphicalConfigurationBuilder.create().graphic(ErrorModelGeUtil.TRANSITION_CONNECTION_GRAPHIC).source(getSource(boc, queryService)).destination(getDestination(boc, queryService)).build());
} else {
return Optional.of(GraphicalConfigurationBuilder.create().graphic(BRANCH_POINT_GRAPHIC).style(BRANCH_POINT_STYLE).build());
}
}
use of org.osate.ge.services.QueryService in project osate2 by osate.
the class SubprogramCallOrderHandler method getGraphicalConfiguration.
@Override
public Optional<GraphicalConfiguration> getGraphicalConfiguration(final GetGraphicalConfigurationContext ctx) {
final BusinessObjectContext boc = ctx.getBusinessObjectContext();
final QueryService queryService = ctx.getQueryService();
return Optional.of(GraphicalConfigurationBuilder.create().graphic(getGraphicalRepresentation()).style(STYLE).source(getSource(boc, queryService)).destination(getDestination(boc, queryService)).build());
}
use of org.osate.ge.services.QueryService in project osate2 by osate.
the class BehaviorTransitionHandler method getGraphicalConfiguration.
@Override
public Optional<GraphicalConfiguration> getGraphicalConfiguration(final GetGraphicalConfigurationContext ctx) {
final BusinessObjectContext boc = ctx.getBusinessObjectContext();
final QueryService queryService = ctx.getQueryService();
return Optional.of(GraphicalConfigurationBuilder.create().graphic(TRANSITION_CONNECTION_GRAPHIC).style(Style.EMPTY).source(getSource(boc, queryService)).destination(getDestination(boc, queryService)).build());
}
Aggregations