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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:30:37+00:00 2026-06-03T10:30:37+00:00

Is it possible to create custom variable viewers in Eclipse? Suppose I wish to

  • 0

Is it possible to create custom variable viewers in Eclipse? Suppose I wish to decompose bitfield or see bitmap as an image. Is it possible?

Can you give some simplest example?

UPDATE

I have tried to implement the following example: http://alvinalexander.com/java/jwarehouse/eclipse/org.eclipse.jdt.debug.tests/test-plugin/org/eclipse/jdt/debug/testplugin/detailpane/SimpleDetailPane.java.shtml

My plugin.xml is follows:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>

<plugin>
   <extension
         point="org.eclipse.debug.ui.detailPaneFactories">
      <detailFactories
            class="tests.debug.details.DetailPaneFactory"
            id="tests.debug.details.detailFactories">
      </detailFactories>
   </extension>



</plugin>

My DetailPaneFactory.java is follows:

package tests.debug.details;

import java.util.AbstractSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import org.eclipse.debug.ui.IDetailPane;
import org.eclipse.debug.ui.IDetailPaneFactory;
import org.eclipse.jface.viewers.IStructuredSelection;

public class DetailPaneFactory implements IDetailPaneFactory {

    private HashMap<String,Class<? extends IDetailPane>> classes = new HashMap<String,Class<? extends IDetailPane>>();

    private void addClass(Class<? extends IDetailPane> cls) {
        try {
            String paneID = (String) cls.getField("ID").get(null);
            classes.put(paneID, cls);
        } catch (IllegalArgumentException | IllegalAccessException
                | NoSuchFieldException | SecurityException e) {
            throw new RuntimeException(e);
        }
        finally {

        }

    }

    private Class<? extends IDetailPane> getClass(String paneID) {
        Class<? extends IDetailPane> ans = classes.get(paneID);
        return ans;
    }

    public DetailPaneFactory() {
        addClass(SimpleDetailPane.class);
    }


    @Override
    public IDetailPane createDetailPane(String paneID) {

        Class<? extends IDetailPane> cls = getClass(paneID);
        if( cls != null ) {
            try {
                return cls.newInstance();
            } catch (InstantiationException | IllegalAccessException e) {
                throw new RuntimeException();
            }
        }
        else {
            return null;
        }
    }

    @Override
    public String getDetailPaneName(String paneID) {
        Class<? extends IDetailPane> cls = getClass(paneID);
        if( cls != null ) {
            try {
                return (String)cls.getField("NAME").get(null);
            } catch (IllegalArgumentException | IllegalAccessException
                    | NoSuchFieldException | SecurityException e) {
                throw new RuntimeException(e);
            }
        }
        else {
            return null;
        }
    }

    @Override
    public String getDetailPaneDescription(String paneID) {
        Class<? extends IDetailPane> cls = getClass(paneID);
        if( cls != null ) {
            try {
                return (String)cls.getField("DESCRIPTION").get(null);
            } catch (IllegalArgumentException | IllegalAccessException
                    | NoSuchFieldException | SecurityException e) {
                throw new RuntimeException(e);
            }
        }
        else {
            return null;
        }
    }

    @Override
    public Set<String> getDetailPaneTypes(IStructuredSelection selection) {
        return new AbstractSet<String>() {

            @Override
            public Iterator<String> iterator() {
                return new Iterator<String>() {

                    private Iterator<Map.Entry<String,Class<? extends IDetailPane>>> it = classes.entrySet().iterator();

                    @Override
                    public void remove() {
                        it.remove();
                    }

                    @Override
                    public String next() {
                        return it.next().getKey();
                    }

                    @Override
                    public boolean hasNext() {
                        return it.hasNext();
                    }
                };
            }

            @Override
            public int size() {
                return classes.size();
            }

        };
    }

    @Override
    public String getDefaultDetailPane(IStructuredSelection selection) {
        return SimpleDetailPane.ID;
    }

}

and my SimpleDetailPane.java is as in example.

And it apparently works.

  • 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-03T10:30:38+00:00Added an answer on June 3, 2026 at 10:30 am

    You can use Window / Show View / Expressions and add your expression that could make some calculations and show a textual output. But in order to anything else than a text output you’ll have to contribute your own model presentation trough Eclipse platform extension points. See Detail Pane Factories Extension and source of org.eclipse.temp.JavaTableDetailPaneFactory class in Eclipse’s own JDT.

    As a quick workaround you can also write a static utility method that will open a new window with your image converted from a bitfield and call that method from a Display view using Ctrl-U shortcut.

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

Sidebar

Related Questions

Is it possible to create a custom UIPopoverController? Can you give me some suggestions
Is it possible to create a custom configuration file (other than app.config) that can
Possible Duplicate: How to create documentation for instance variable and methods in Xcode? Eclipse-based
Is is possible to create a custom menu item within eclipse that will perform
Is it possible to create a custom route for GDirections to walk around? Like
Is it possible to create a custom dictionary for an edittext? In other words,
is it possible to create my own custom keys in the asp.net web.config file
I need create custom dialog and put JPanel into it. Is it possible?
Is it possible to create a driver (windows/mac) for a custom usb hub such
I'm curious if its possible to create a custom event in jQuery that isn't

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.