Codota Logo
IType.getUnderlyingResource
Code IndexAdd Codota to your IDE (free)

How to use
getUnderlyingResource
method
in
org.eclipse.jdt.core.IType

Best Java code snippets using org.eclipse.jdt.core.IType.getUnderlyingResource (Showing top 11 results out of 315)

  • Common ways to obtain IType
private void myMethod () {
IType i =
  • Codota IconIMethod method;method.getDeclaringType()
  • Codota IconIJavaProject javaProject;String fullyQualifiedName;javaProject.findType(fullyQualifiedName)
  • Codota IconIMember member;member.getDeclaringType()
  • Smart code suggestions by Codota
}
origin: org.eclipse.pde.api.tools/ui

/**
 * Collects the complete set of {@link IApiProblemFilter}s for the given collection of {@link IType}s
 * @param types
 * @return the complete collection of {@link IApiProblemFilter}s or an empty list, never <code>null</code>
 */
static IApiProblemFilter[] collectAllAffectedFilters(IApiFilterStore store, IType[] types) {
  HashSet filters = new HashSet();
  IApiProblemFilter[] fs = null;
  IResource resource = null;
  for (int i = 0; i < types.length; i++) {
    try {
      resource = types[i].getUnderlyingResource();
      if(resource == null) {
        continue;
      }
      fs = store.getFilters(resource);
      for (int j = 0; j < fs.length; j++) {
        filters.add(fs[j]);
      }
    }
    catch(JavaModelException jme) {
      //do nothing 
    }
  }
  return (IApiProblemFilter[]) filters.toArray(new IApiProblemFilter[filters.size()]);
}

origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui

/**
 * Collects the complete set of {@link IApiProblemFilter}s for the given
 * collection of {@link IType}s
 *
 * @param types
 * @return the complete collection of {@link IApiProblemFilter}s or an empty
 *         list, never <code>null</code>
 */
static IApiProblemFilter[] collectAllAffectedFilters(IApiFilterStore store, IType[] types) {
  HashSet<IApiProblemFilter> filters = new HashSet<>();
  IApiProblemFilter[] fs = null;
  IResource resource = null;
  for (IType type : types) {
    try {
      resource = type.getUnderlyingResource();
      if (resource == null) {
        continue;
      }
      fs = store.getFilters(resource);
      for (IApiProblemFilter element : fs) {
        filters.add(element);
      }
    } catch (JavaModelException jme) {
      // do nothing
    }
  }
  return filters.toArray(new IApiProblemFilter[filters.size()]);
}
origin: org.eclipse/org.eclipse.jst.ws.axis.consumption.core

try
  IResource resource = axisProxy.getUnderlyingResource();
  if (resource != null)
origin: org.eclipse/org.eclipse.jst.j2ee.ejb

private void computeJavaTypes(IType type) {
  if (type == null || visitedJavaTypes.contains(type))
    return;
  visitedJavaTypes.add(type);
  //String qualifiedName = type.getFullyQualifiedName();
  try {
    IFile file = (IFile)type.getUnderlyingResource();
    if (file != null && ejbProject.equals(file.getProject())) {
      if (!file.isDerived())
        cacheType(type, file);
      computeRequiredReferencedJavaTypes(type);
    }
  } catch (JavaModelException e) {
    Logger.getLogger().logError(e);
    return;
  } 
}

origin: org.eclipse/org.eclipse.jst.ws.consumption.ui

try
 IResource res = itype.getUnderlyingResource();
 if (res != null)
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jdt.launching

if(type != null) {
  try {
    resource = type.getUnderlyingResource();
    if(resource == null) {
      resource = type.getAdapter(IResource.class);
origin: org.eclipse.jdt/org.eclipse.jdt.launching

if(type != null) {
  try {
    resource = type.getUnderlyingResource();
    if(resource == null) {
      resource = type.getAdapter(IResource.class);
origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui

/**
 * Creates the {@link Change} for updating the filter store when a type is
 * deleted
 *
 * @param type the type being deleted
 * @return the change to the filter store
 */
static Change createDeleteFilterChanges(IType type) {
  try {
    IResource resource = type.getUnderlyingResource();
    if (resource != null) {
      IApiFilterStore store = resolveFilterStore(resource.getProject());
      if (store == null) {
        return null;
      }
      IApiProblemFilter[] filters = store.getFilters(resource);
      if (filters.length != 0) {
        CompositeChange cchange = new CompositeChange(RefactoringMessages.RefactoringUtils_remove_usused_filters);
        for (IApiProblemFilter filter : filters) {
          cchange.add(new TypeFilterChange(store, filter, null, null, FilterChange.DELETE));
        }
        return cchange;
      }
    }
  } catch (CoreException ce) {
  }
  return null;
}
origin: org.eclipse.pde.api.tools/ui

/**
 * Creates the {@link Change} for updating the filter store
 * when a type is deleted
 * 
 * @param type the type being deleted
 * @return the change to the filter store
 */
static Change createDeleteFilterChanges(IType type) {
  try {
    IResource resource = type.getUnderlyingResource();
    if(resource != null) {
      IApiFilterStore store = resolveFilterStore(resource.getProject());
      if(store == null) {
        return null;
      }
      IApiProblemFilter[] filters = store.getFilters(resource);
      if(filters.length != 0) {
        CompositeChange cchange = new CompositeChange(RefactoringMessages.RefactoringUtils_remove_usused_filters);
        for (int i = 0; i < filters.length; i++) {
          cchange.add(new TypeFilterChange(store, filters[i], null, null, FilterChange.DELETE));
        }
        return cchange;
      }
    }
  }
  catch(CoreException ce) {}
  return null;
}

origin: org.eclipse/org.eclipse.jdt.debug.ui

protected ILaunchConfiguration createConfiguration(IType type) {
  ILaunchConfiguration config = null;
  ILaunchConfigurationWorkingCopy wc = null;
  try {
    ILaunchConfigurationType configType = getConfigurationType();
    wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(type.getElementName()));
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
    //CONTEXTLAUNCHING
    wc.setMappedResources(new IResource[] {type.getUnderlyingResource()});
    config = wc.doSave();
  } catch (CoreException exception) {
    reportErorr(exception);        
  } 
  return config;
}

origin: org.eclipse/org.eclipse.jdt.debug.ui

protected ILaunchConfiguration createConfiguration(IType type) {
  ILaunchConfiguration config = null;
  try {
    ILaunchConfigurationType configType = getConfigurationType();
    ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(type.getElementName())); 
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_WIDTH, AppletParametersTab.DEFAULT_APPLET_WIDTH);
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_HEIGHT, AppletParametersTab.DEFAULT_APPLET_HEIGHT);
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_NAME, ""); //$NON-NLS-1$
    //CONTEXTLAUNCHING
    wc.setMappedResources(new IResource[] {type.getUnderlyingResource()});
    config = wc.doSave();        
  } catch (CoreException ce) {
    reportErorr(ce);            
  }
  return config;
}

org.eclipse.jdt.coreITypegetUnderlyingResource

Popular methods of IType

  • getFullyQualifiedName
    Returns the fully qualified name of this type, including qualification for any containing types and
  • getElementName
    Returns the simple name of this type, unqualified by package or enclosing type. This is a handle-onl
  • getMethods
    Returns the methods and constructors declared by this type. For binary types, this may include the s
  • getFlags
  • getPackageFragment
    Returns the package fragment in which this element is defined. This is a handle-only method.
  • getCompilationUnit
  • newSupertypeHierarchy
    Creates and returns a type hierarchy for this type containing this type and all of its supertypes, c
  • exists
  • getJavaProject
  • isInterface
    Returns whether this type represents an interface. Note that an interface can also be an annotation
  • getDeclaringType
  • getMethod
    Returns the method with the specified name and parameter types in this type (for example, "foo", {"I
  • getDeclaringType,
  • getMethod,
  • getParent,
  • isClass,
  • getSourceRange,
  • newTypeHierarchy,
  • isAnonymous,
  • isBinary,
  • getResource,
  • getTypeParameters

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now