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 9247475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:44:15+00:00 2026-06-18T09:44:15+00:00

I am trying to get the Text from a Composite in Eclipse using the

  • 0

I am trying to get the Text from a Composite in Eclipse using the SWTbot API.
I have Composite which contains Main Group and That Main Group Contains Child Groups.
The problem i am facing is i am not able to get the Text Inside the Composite, is there a way in Eclipse to get that Text.
I have attached the Image of my Composite, in which i want to get all the text like name,Min Version etc.
Please help, Its kind of blocker for my project.
enter image description here

  • 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-18T09:44:16+00:00Added an answer on June 18, 2026 at 9:44 am

    Not directly, but you can do it in this way:

    public getContainedText(Control c) {
        return getContainedText(c, new ArrayList<String>());
    }
    
    private getContainedText(Control c, List<String> strings) {
        if (c instanceof Label) {
            strings.add(((Label) c).getText();
        } else if (c instanceof Text) {
            strings.add(((Text) c).getText();
        }
        // and so on for other control types you want to handle
        // and for text you are interested in.
        // Or as an approximation, use reflection to check if
        // c has getText method and call it, but this will miss
        // List, Combo, etc.
    
        if (c instanceof Composite) {
            for (Control child : ((Composite) c).getChildren()) {
                getContainedText(child, strings);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get the text from a div using only javascript.
I'm trying to get empty text fields from my table which I cleared manually
I'm trying to get cdata text from a node using dom4j java. My issue
I have the following code snippet I'm trying to get the text from: <span
I am trying to get text from an html file using the simplehtmldom lib
I am trying to get text data from a pdf using pdfminer . I
I'm trying to get the selected text from a dropdown using a selector. If
When trying to get text from clipboard using Clipboard.GetText method in a Windows Phone
I am trying to get the text from a page scrape using xpath, now
I am trying to get the selected Text from the dropdownlist using Jquery. <div>

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.