Tabnine Logo
IType.getUnderlyingResource
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now