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

  • Home
  • SEARCH
  • 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 7901499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:14:06+00:00 2026-06-03T09:14:06+00:00

I have a graphical editor which extends GraphicalEditorWithFlyoutPalette . There could be appear different

  • 0

I have a graphical editor which extends GraphicalEditorWithFlyoutPalette.

There could be appear different markers, so it would be nice, if there is any possibility to connect the marker with the EditPart.

I think one possibility is to extend the TableViewer and the corresponding cell classes. But perhaps there is a better and more easier way.

I create my test markers like following:

IResource resource = (IResource) input.getAdapter(IResource.class);

try 
{
    IMarker marker = resource.createMarker(IMarker.PROBLEM);
    marker.setAttribute(IMarker.TEXT, "text");
    marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
    marker.setAttribute(IMarker.MESSAGE, "message");
}
catch (CoreException e) 
{
    e.printStackTrace();
}

input is my IEditorInput.

  • 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-03T09:14:07+00:00Added an answer on June 3, 2026 at 9:14 am

    In my first attempt, I was trying to extends the ExtendedMarkersView, which fails because it is an internal class.
    Another way was to write the view and all corresponding stuff new, but it seems to be senseless.

    So I found a work around based on https://stackoverflow.com/a/10501971/390177.
    While creating the IMarker, I set additional attributes to link the corresponding data object. With the help of the object I can search for the AbstractGraphicalEditPart with the EditPartRegistry.
    After that it is possible to create a selection on the EditPart and reveal to it.

    @Override
    public void selectionChanged(IWorkbenchPart part, ISelection selection) {
        IStructuredSelection s = (IStructuredSelection) selection;
    
        if (s.getFirstElement() instanceof MarkerItem) {
            MarkerItem marker = (MarkerItem) s.getFirstElement();
            if (marker != null && marker.getMarker() != null) {
                IMarker iMarker = marker.getMarker();
                AbstractGraphicalEditPart editPart = null;
    
                DataObject object ...
                editPart = (AbstractGraphicalEditPart) getGraphicalViewer().getEditPartRegistry().get(object);
    
                if (editPart != null) {
                    StructuredSelection eSelection = new StructuredSelection(editPart);
                    getGraphicalViewer().setSelection(eSelection);
                    // once selected if you want to get it so the
                    // graphicalviewer scrolls to reveal the part on the
                    // screen
                    getGraphicalViewer().reveal(editPart);
                }
            }
        } else {
            super.selectionChanged(part, selection);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developping a DSL with its own graphical editor. Such files have a
I have a class which simply extends JPanel and overrides the paintComponent method as
I'm developing a canvas graphical editor. I have already coded an undo-redo system that
I have graphical project of three-column Drupal front page which has first column for
I have three text blocks and an image which I would like to to
I'm developing a kind of Graphical free activity diagram/circuit editor. I have to make
I have a graphical app that needs to test the resolution of the display
I have a graphical control that is multithreaded. Until now it worked fine, but
We have a fairly graphical intensive application that uses the FOX toolkit and OpenSceneGraph,
I have to make a graphical user interface application using the language of my

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.