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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:51:53+00:00 2026-06-07T12:51:53+00:00

I have created one small GEF project which contains the GEF editor. Now I

  • 0

I have created one small GEF project which contains the GEF editor. Now I want to convert all the functionality to View except the GEF pallette. Is it possible to do? Because when I tried to do the editpolicies and all not working. I am able to draw a rectangle using the GEF Rectangle part and model. it is working fine. But now I want to add the resize,delete,undo functionality to my view. In GEF editor these functionalities are working fine.
Are these functionality working only with Editor? Could anybody suggest how to do it?

  • 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-07T12:51:55+00:00Added an answer on June 7, 2026 at 12:51 pm

    You can add some GEF features to your view.For that your view has to be implemented
    in the followig way.

    // Use a standard Viewer for the Draw2d canvas
        private ScrollingGraphicalViewer viewer = new ScrollingGraphicalViewer();
        // Use standard RootEditPart as holder for all other edit parts
        // private RootEditPart rootEditPart = new ScalableFreeformRootEditPart();
    
        private ScalableRootEditPart rootEditPart = new ScalableRootEditPart();
    
    // parts for model elements
    private EditPartFactory editPartFactory = new MyEditPartFactory();
    

    For example you can add GEF edit policies to your view.

    public void createPartControl(Composite parent) {
    
            // Initialize the viewer, 'parent' is the
            // enclosing RCP windowframe
            viewer.createControl(parent);
            viewer.setRootEditPart(rootEditPart);
            viewer.setEditPartFactory(editPartFactory);
    
            viewer.setContents(ModelFactory.createRegionLayerModel());
    
                     viewer.setEditDomain(new DefaultEditDomain(new GraphicalEditor() {
    
    
    
                    @Override
                    public void doSave(IProgressMonitor monitor) {
                        // TODO Auto-generated method stub
    
                    }
    
                    @Override
                    protected void initializeGraphicalViewer() {
                        GraphicalViewer viewer = getGraphicalViewer();
    
                    }
    
                    @Override
                    protected void configureGraphicalViewer() {
                        super.configureGraphicalViewer();
                        super.configureGraphicalViewer();
                        GraphicalViewer viewer = getGraphicalViewer();
                    }
    
                }));
    }
    

    Hope this helps you!!!

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

Sidebar

Related Questions

I have created a small WP7 app which contains one page which is dynamically
I am developing one small app in which i have multiple NSURLConnection.I have created
I am using asp.net .. i have created one small application.. I have Configure
I have created one library project in iphone and my images folder is present
I have created one jTable. I want to display the data into table from
i have created one login and register view in that view after login user
Have created a small two tab app, then subclassed another view controller to create
I am developing a small visual stdio 2010 c++ project. I have created a
I have created small test web application which makes use of LINQ to SQL.
I have a xib-file with a small UIView on it, which in turn contains

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.