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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:02:19+00:00 2026-05-14T06:02:19+00:00

I am currently working on an application that uses a TableViewer in several places

  • 0

I am currently working on an application that uses a TableViewer in several places to display formatted tabular data. Each table must have an export feature where all its content is exported in an Excel file.

In order to avoid unnecessery code duplication, I thought it would be nice to rely upon the viewer framework of SWT and use it to get the formatted tabular data using the registered label providers.

This approach works well with standard read-only tables, either with table-level and column-level label providers. However, I am stuck when an EditingSupport or TableEditors have been set on the table.

In such cases, we often had label providers to return blank values and let the TableViewer deal with the EditingSupport or the TableEditor to get the representation of the cell data.

Is there any way for me to access a TableEditor or an EditingSupport that has been attached to a TableViewer (without keeping a separate reference to said objects) so I can use them to retrieve a proper representation of the cell data ?

If not, we will probably rewrite our label providers so that they handle columns with EditingSupport as well, but it would be nice if we did not have to.

  • 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-05-14T06:02:19+00:00Added an answer on May 14, 2026 at 6:02 am

    There is no way, that I can find, to retrieve the EditingSupport or TableEditor objects from a TableViewer. We Store the EditingSupport objects separately for our uses but it sounds like this is not an option for you so you could store the EditingSupport object for a given column in the data map of the column itself. Something like:

    TableColumn column = new TableColumn(table, SWT.RIGHT);
    EditingSupport editingSupport = new TableEditingSupport();
    column.setData("editing_support", editingSupport);
    

    This gives you access to the EditingSupport objects through a single reference to the TableViewer and when you wanted to retrieve them you could do something like:

    final Table table = tableViewer.getTable();
    for(TableColumn column : table.getColumns())
    {
        EditingSupport editingSupport = (EditingSupport)column.getData("editing_support");
    }
    

    Its fairly ugly and hacky and, depending on your circumstances, I would probably suggest rewriting the LabelProviders as you said but if you choose not to do that, this is an option. Obviously if you have access to either the table or the list of columns you can bypass some of the mess in retrieval but the core idea remains unchanged.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on an web application that uses ASP.NET 2.0 framework. I
I am currently working on a web application that uses PHP and MySQL, but
I am currently working on a VB.NET desktop application that uses .mdb (Access) database
I'm currently working with a part of my application that uses Dynamic Web User
I'm currently working on a PHP application that uses a MySQL database for its
I am currently working on an application that parses huge XML files. For each
I am currently working on rails3 application that uses jQuery. I have a javascript
I am working on an application that uses a private web service. We currently
I'm currently working on an application that uses php's simplexml to interpret rss feeds
I'm currently working on an application that uses a view controller and a tabBar

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.