Examples of IElementType


Examples of com.intellij.psi.tree.IElementType

    private static IElementType findLiteralTokenType(PsiFile file, int selectionStart, int selectionEnd) {
        PsiElement elementAtSelection = file.findElementAt(selectionStart);
        if (elementAtSelection == null)
            return null;
        IElementType tokenType = elementAtSelection.getNode().getElementType();
        if (tokenType != HaskellTokenTypes.STRING)
            return null;
        TextRange textRange = elementAtSelection.getTextRange();
        if (selectionStart <= textRange.getStartOffset() || selectionEnd >= textRange.getEndOffset()) {
            return null;
View Full Code Here

Examples of com.intellij.psi.tree.IElementType

    @Override
    protected boolean isPrefixInfixIdent() {
        ASTNode parentNode = getParent().getNode();
        ASTNode grandParentNode = parentNode.getTreeParent();
        HaskellTokenType infixPrefixIdentType = HaskellElementTypes.INFIX_PREFIX_IDENT;
        IElementType parentType = grandParentNode.getElementType() == infixPrefixIdentType ? infixPrefixIdentType : parentNode.getElementType();
        return parentType == infixPrefixIdentType;
    }
View Full Code Here

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_3033) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.PhaseAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

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_2012) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.StructuralDatatypeAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

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_3040) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.SubKindAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

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_2009) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.RoleAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

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_2011) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.SimpleDatatypeAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here

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

  protected Class getNodeViewClass(IAdaptable semanticAdapter,
      View containerView, String semanticHint) {
    if (containerView == null) {
      return null;
    }
    IElementType elementType = getSemanticElementType(semanticAdapter);
    EObject domainElement = getSemanticElement(semanticAdapter);
    int visualID;
    if (semanticHint == null) {
      // Semantic hint is not specified. Can be a result of call from CanonicalEditPolicy.
      // In this situation there should be NO elementType, visualID will be determined
View Full Code Here

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

  /**
   * @generated
   */
  protected Class getEdgeViewClass(IAdaptable semanticAdapter,
      View containerView, String semanticHint) {
    IElementType elementType = getSemanticElementType(semanticAdapter);
    if (!OntoUML.diagram.providers.OntoUMLElementTypes
        .isKnownElementType(elementType)
        || (!(elementType instanceof IHintedType))) {
      return null; // foreign element type
    }
View Full Code Here

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_2001) {
                  EditPart compartmentEditPart = getChildBySemanticHint(OntoUML.diagram.part.OntoUMLVisualIDRegistry
                      .getType(OntoUML.diagram.edit.parts.CategoryAttributeCompartmentEditPart.VISUAL_ID));
                  return compartmentEditPart == null ? null
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.