Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8012809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:26:45+00:00 2026-06-04T19:26:45+00:00

I am currently developing a plugin for Eclipse that analyzes dependencies and references of

  • 0

I am currently developing a plugin for Eclipse that analyzes dependencies and references of Java and plugin projects in the Workspace.

However I cannot for the life of me find a way to get the name of a referenced project or library found in the Classpath Entries.

Here’s what I have (excerpt from a longer method):

IJavaProject j= JavaCore.create(project);          //project is an IProject
try {
    IClasspathEntry[] classpath= j.getRawClasspath();

    // Get required Libraries and Projects
    for (IClasspathEntry entry : classpath) {
        switch (entry.getEntryKind()) {
        case IClasspathEntry.CPE_LIBRARY: {
            //Retrieve name of the Library
            break;              
            }
        case IClasspathEntry.CPE_PROJECT: {
            //Retrieve name of the Project
            break;
        }
    }
} catch [...]

Does anyone have an idea how to get the names at the marked positions, or a better way to retrieve them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:26:46+00:00Added an answer on June 4, 2026 at 7:26 pm

    After consulting with someone else, I have finally found the solution:

    switch (entry.getEntryKind()) {
        case IClasspathEntry.CPE_LIBRARY: {
            String name = entry.getPath().segment(0);
            /* Further processing for a Library
            *...
            */
            break;              
            }
        case IClasspathEntry.CPE_PROJECT: {
            String name = entry.getPath().segment(0);
            /* Further processing for a Project
            *...
            */
            break;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently developing a Java RCP with Eclipse RCP which has a plugin.xml
I am developing an Eclipse plugin that monitors events in the workspace. One of
I am currently developing a maven project in eclipse. The m2eclipse plugin works beautifully.
I am currently developing a site that users the jQuery superfish plugin to construct
I'm developing a custom Eclipse plugin that makes use of Remote System Explorer (of
I'm developing a code-sharing plugin for eclipse (for a bachelor thesis project). Currently I'm
i am currently developing a wordpress image slider plugin. However i have hit a
I'm developing a an eclipse plugin that uses an SWT interface. I need to
I am currently developing a rather complex jQuery plugin. One that I am designing
I am currently developing an Android app with Eclipse Indigo (including Android plugin). Everything

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.