Package org.eclipse.jdt.internal.core

Examples of org.eclipse.jdt.internal.core.SourceType


    try {
      // TypeConverter is used instead of SourceTypeConverter because the type
      // to convert can be a binary type or a source type
      TypeDeclaration typeDeclaration = null;
      if (type instanceof SourceType) {
        SourceType sourceType = (SourceType) type;
        ISourceType info = (ISourceType) sourceType.getElementInfo();
        compilationUnit = SourceTypeConverter.buildCompilationUnit(
          new ISourceType[] {info},//sourceTypes[0] is always toplevel here
          SourceTypeConverter.FIELD_AND_METHOD // need field and methods
          | SourceTypeConverter.MEMBER_TYPE, // need member types
          // no need for field initialization
View Full Code Here


        final ICompilationUnit compUnit = JavaCore.createCompilationUnitFrom(javaFile);
        try {
          final IType[] types = compUnit.getTypes();
          if (types.length > 0) {
            final SourceType type = (SourceType) types[0];
            final boolean isWicketComponent = TypeHelper.isWicketJavaElement(type);
            if (isWicketComponent) {
              this.compilationUnit = compUnit;
              return isWicketComponent;
            }
View Full Code Here

    try {
      // TypeConverter is used instead of SourceTypeConverter because the type
      // to convert can be a binary type or a source type
      TypeDeclaration typeDeclaration = null;
      if (type instanceof SourceType) {
        SourceType sourceType = (SourceType) type;
        ISourceType info = (ISourceType) sourceType.getElementInfo();
        compilationUnit = SourceTypeConverter.buildCompilationUnit(
          new ISourceType[] {info},//sourceTypes[0] is always toplevel here
          SourceTypeConverter.FIELD_AND_METHOD // need field and methods
          | SourceTypeConverter.MEMBER_TYPE, // need member types
          // no need for field initialization
View Full Code Here

    try {
      // TypeConverter is used instead of SourceTypeConverter because the type
      // to convert can be a binary type or a source type
      TypeDeclaration typeDeclaration = null;
      if (type instanceof SourceType) {
        SourceType sourceType = (SourceType) type;
        ISourceType info = (ISourceType) sourceType.getElementInfo();
        compilationUnit = SourceTypeConverter.buildCompilationUnit(
          new ISourceType[] {info},//sourceTypes[0] is always toplevel here
          SourceTypeConverter.FIELD_AND_METHOD // need field and methods
          | SourceTypeConverter.MEMBER_TYPE, // need member types
          // no need for field initialization
View Full Code Here

    this.searchPackageDeclaration = false;
  }
  if (pattern instanceof MethodPattern) {
      IType type = ((MethodPattern) pattern).declaringType;
      if (type != null && !type.isBinary()) {
        SourceType sourceType = (SourceType) type;
        IMember local = sourceType.getOuterMostLocalContext();
        if (local instanceof IMethod) { // remember this method's range so we don't purge its statements.
          try {
            ISourceRange range = local.getSourceRange();
            this.sourceStartOfMethodToRetain  = range.getOffset();
            this.sourceEndOfMethodToRetain = this.sourceStartOfMethodToRetain + range.getLength() - 1; // offset is 0 based.
View Full Code Here

    this.searchPackageDeclaration = false;
  }
  if (pattern instanceof MethodPattern) {
      IType type = ((MethodPattern) pattern).declaringType;
      if (type != null && !type.isBinary()) {
        SourceType sourceType = (SourceType) type;
        IMember local = sourceType.getOuterMostLocalContext();
        if (local instanceof IMethod) { // remember this method's range so we don't purge its statements.
          try {
            ISourceRange range = local.getSourceRange();
            this.sourceStartOfMethodToRetain  = range.getOffset();
            this.sourceEndOfMethodToRetain = this.sourceStartOfMethodToRetain + range.getLength() - 1; // offset is 0 based.
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.core.SourceType

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.