Package org.eclipse.gmf.runtime.emf.type.core

Examples of org.eclipse.gmf.runtime.emf.type.core.IElementType


            if (understandsRequest(request)) {
              if (request instanceof CreateViewAndElementRequest) {
                CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request)
                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3037) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.RoleMixinAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here


            if (understandsRequest(request)) {
              if (request instanceof CreateViewAndElementRequest) {
                CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request)
                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3036) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.RoleAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

            if (understandsRequest(request)) {
              if (request instanceof CreateViewAndElementRequest) {
                CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request)
                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3038) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.SimpleDatatypeAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

            if (understandsRequest(request)) {
              if (request instanceof CreateViewAndElementRequest) {
                CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest) request)
                    .getViewAndElementDescriptor()
                    .getCreateElementRequestAdapter();
                IElementType type = (IElementType) adapter
                    .getAdapter(IElementType.class);
                if (type == OntoUML.diagram.providers.OntoUMLElementTypes.Property_3030) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.KindAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

  /**
   * @generated
   */
  protected void doConfigure(Package newElement, IProgressMonitor monitor,
      IAdaptable info) throws ExecutionException {
    IElementType elementType = ((CreateElementRequest) getRequest())
        .getElementType();
    ConfigureRequest configureRequest = new ConfigureRequest(
        getEditingDomain(), newElement, elementType);
    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }
View Full Code Here

   */
  protected boolean provides(CreateNodeViewOperation op) {
    if (op.getContainerView() == null) {
      return false;
    }
    IElementType elementType = getSemanticElementType(op
        .getSemanticAdapter());
    EObject domainElement = getSemanticElement(op.getSemanticAdapter());
    int visualID;
    if (op.getSemanticHint() == null) {
      // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
View Full Code Here

  /**
   * @generated
   */
  protected boolean provides(CreateEdgeViewOperation op) {
    IElementType elementType = getSemanticElementType(op
        .getSemanticAdapter());
    if (!DispelElementTypes.isKnownElementType(elementType)
        || (!(elementType instanceof IHintedType))) {
      return false; // foreign element type
    }
View Full Code Here

   * @generated
   */
  public Edge createEdge(IAdaptable semanticAdapter, View containerView,
      String semanticHint, int index, boolean persisted,
      PreferencesHint preferencesHint) {
    IElementType elementType = getSemanticElementType(semanticAdapter);
    String elementTypeHint = ((IHintedType) elementType).getSemanticHint();
    switch (DispelVisualIDRegistry.getVisualID(elementTypeHint)) {
    case ConnectionExpressionEditPart.VISUAL_ID:
      return createConnectionExpression_4001(
          getSemanticElement(semanticAdapter), containerView, index,
View Full Code Here

      request
          .setParameter(
              eu.admire.visual.pmml.treemodel._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
              command);
    }
    IElementType requestContextElementType = getContextElementType(request);
    request
        .setParameter(
            eu.admire.visual.pmml.treemodel._40.diagram.edit.helpers.PMMLBaseEditHelper.CONTEXT_ELEMENT_TYPE,
            requestContextElementType);
    ICommand command = requestContextElementType.getEditCommand(request);
    request
        .setParameter(
            eu.admire.visual.pmml.treemodel._40.diagram.edit.helpers.PMMLBaseEditHelper.EDIT_POLICY_COMMAND,
            null);
    request
View Full Code Here

  /**
   * @generated
   */
  private IElementType getContextElementType(IEditCommandRequest request) {
    IElementType requestContextElementType = eu.admire.visual.pmml.treemodel._40.diagram.providers.PMMLElementTypes
        .getElementType(getVisualID(request));
    return requestContextElementType != null ? requestContextElementType
        : myElementType;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.emf.type.core.IElementType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.