Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IJavaModel


 
  public synchronized Map getClassFiles() throws CoreException {
    // TODO use getClassFiles(IJavaProject)
    if (instrumentedClasses == null) {
      instrumentedClasses = new HashMap();
      IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
          .getRoot());
      IJavaProject[] projects = model.getJavaProjects();
      for (int i = 0; i < projects.length; i++) {
        {
          IPackageFragmentRoot[] roots = projects[i].getPackageFragmentRoots();
          for (int j = 0; j < roots.length; j++) {
            IPath location = getClassFileLocation(roots[j]);
View Full Code Here


  /*
   * We list all source based class files of all plugins in the workspace.
   */
  public IClassFiles[] getClassFiles(ILaunchConfiguration configuration, boolean includebinaries) throws CoreException {
    IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject[] projects = model.getJavaProjects();
    List l = new ArrayList();
    for (int i = 0; i < projects.length; i++) {
      if (projects[i].getProject().hasNature(PLUGIN_NATURE)) {
        IClassFiles[] cf = EclEmmaCorePlugin.getInstance().getClassFiles(projects[i]);
        for (int j = 0; j < cf.length; j++) {
View Full Code Here

  /*
   * We list all source based class files of all plugins in the workspace.
   */
  public IClassFiles[] getClassFiles(ILaunchConfiguration configuration, boolean includebinaries) throws CoreException {
    IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject[] projects = model.getJavaProjects();
    List l = new ArrayList();
    for (int i = 0; i < projects.length; i++) {
      if (projects[i].getProject().hasNature(PLUGIN_NATURE)) {
        IClassFiles[] cf = EclEmmaCorePlugin.getInstance().getClassFiles(projects[i]);
        for (int j = 0; j < cf.length; j++) {
View Full Code Here

  }

  public synchronized Map getClassFiles() throws CoreException {
    if (instrumentedClasses == null) {
      instrumentedClasses = new HashMap();
      IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
          .getRoot());
      IJavaProject[] projects = model.getJavaProjects();
      for (int i = 0; i < projects.length; i++) {
        {
          IPackageFragmentRoot[] roots = projects[i].getPackageFragmentRoots();
          for (int j = 0; j < roots.length; j++) {
            IPath location = getClassFileLocation(roots[j]);
View Full Code Here

  }

  public synchronized Map getClassFiles() throws CoreException {
    if (instrumentedClasses == null) {
      instrumentedClasses = new HashMap();
      IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
          .getRoot());
      IJavaProject[] projects = model.getJavaProjects();
      for (int i = 0; i < projects.length; i++) {
        {
          IPackageFragmentRoot[] roots = projects[i].getPackageFragmentRoots();
          for (int j = 0; j < roots.length; j++) {
            IPath location = getClassFileLocation(roots[j]);
View Full Code Here

  /*
   * We list all source based class files of all plugins in the workspace.
   */
  public IClassFiles[] getClassFiles(ILaunchConfiguration configuration, boolean includebinaries) throws CoreException {
    IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject[] projects = model.getJavaProjects();
    List l = new ArrayList();
    for (int i = 0; i < projects.length; i++) {
      if (projects[i].getProject().hasNature(PLUGIN_NATURE)) {
        IClassFiles[] cf = EclEmmaCorePlugin.getInstance().getClassFiles(projects[i]);
        for (int j = 0; j < cf.length; j++) {
View Full Code Here

   * @return all package fragment roots
   */
  public static Set<IPackageFragmentRoot> getWorkspaceScope()
      throws JavaModelException {
    final Set<IPackageFragmentRoot> scope = new HashSet<IPackageFragmentRoot>();
    final IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
        .getRoot());
    for (IJavaProject p : model.getJavaProjects()) {
      scope.addAll(Arrays.asList(p.getPackageFragmentRoots()));
    }
    return filterJREEntries(scope);
  }
View Full Code Here

  /*
   * The overall scope are all plug-in projects in the workspace.
   */
  public Set<IPackageFragmentRoot> getOverallScope(
      ILaunchConfiguration configuration) throws CoreException {
    final IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace()
        .getRoot());
    final Set<IPackageFragmentRoot> result = new HashSet<IPackageFragmentRoot>();
    for (final IJavaProject project : model.getJavaProjects()) {
      if (project.getProject().hasNature(PLUGIN_NATURE)) {
        result.addAll(Arrays.asList(project.getPackageFragmentRoots()));
      }
    }
    return ScopeUtils.filterJREEntries(result);
View Full Code Here

  /*
   * We list all source based class files of all plugins in the workspace.
   */
  public IClassFiles[] getClassFiles(ILaunchConfiguration configuration, boolean includebinaries) throws CoreException {
    IJavaModel model = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
    IJavaProject[] projects = model.getJavaProjects();
    List l = new ArrayList();
    for (int i = 0; i < projects.length; i++) {
      if (projects[i].getProject().hasNature(PLUGIN_NATURE)) {
        IClassFiles[] cf = EclEmmaCorePlugin.getInstance().getClassFiles(projects[i]);
        for (int j = 0; j < cf.length; j++) {
View Full Code Here

  }

  private IRuntimeClasspathEntry[] filterWebInfLibs(
      IRuntimeClasspathEntry[] defaults, ILaunchConfiguration configuration) {

    IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace()
        .getRoot());
    String projectName = null;
    String webAppDirName = null;
    try {
      projectName = configuration.getAttribute(
          IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
      webAppDirName = configuration.getAttribute(Plugin.ATTR_WEBAPPDIR, "");
    } catch (CoreException e) {
      Plugin.logError(e);
    }

    if (projectName == null || projectName.trim().equals("")
        || webAppDirName == null || webAppDirName.trim().equals("")) {
      return defaults;
    }

    IJavaProject project = javaModel.getJavaProject(projectName);
    if (project == null) {
      return defaults;
    }

    // this should be fine since the plugin checks whether WEB-INF exists
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.IJavaModel

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.