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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:38:59+00:00 2026-05-11T22:38:59+00:00

Does anyone have a hello world sample or tutorial for creating an Eclipse plugin

  • 0

Does anyone have a “hello world” sample or tutorial for creating an Eclipse plugin fragment?

I have a working host plugin that, for the sake of simplicity, is just this…

public void start(BundleContext context) throws Exception {
    System.out.println("Hello....");
    super.start(context);
    plugin = this;
}

public void stop(BundleContext context) throws Exception {
    System.out.println("Goodbye...");
    plugin = null;
    super.stop(context);
}

Simple enough and works. Now I want to add a fragment to that host, which seems not as simple as creating a plugin host. I just don’t see how to create a fragment project and add logic to it. Let’s say I just want to do something simple and have the fragment to print a “Hello2” at start() and “Goodbye2” at stop(). Can someone give me a working example?

  • 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-11T22:39:00+00:00Added an answer on May 11, 2026 at 10:39 pm
    1. Eclipse -> File -> New… -> Fragment project -> set the host plugin (which is either in your workspace or in plugins in target platform).

    2. Open Plugin manifest editor (you can do it by clicking on build.properties, manifest.mf or fragment.xml – if there is no such a file, create it by hand)

    3. In tab Extentions click Add.. and add org.eclipse.ui.startup and browse class which implements org.eclipse.ui.IStartup class.

    4. Create this class and implement it. You need to implement method earlyStartup() which is entry point to the fragment.

    Note: The lines below are just example. I didn’t test it so there might be errors…

    All you need is this (this is project structure / directory structure):

    • Fragment-Project – root dir
      • /META-INF
        • MANIFEST.MF
      • /src (which is source directory)
        • FragmentStartClass.java (which implement org.eclipse.ui.IStartup interface and earlyStartup method)
      • build.properties
      • fragment.xml

    META-INF/MANIFEST.MF content:

    Manifest-Version: 1.0 
    Bundle-ManifestVersion: 2 
    Bundle-Name: FragmentProject 
    Bundle-SymbolicName: FragmentProject;singleton:=true 
    Bundle-Version: 1.0.0 
    Bundle-ClassPath: src/,. 
    Fragment-Host: *HostPluginProjectSymbolicName*;bundle-version="1.0.0" 
    Bundle-RequiredExecutionEnvironment: J2SE-1.5 
    Require-Bundle:  
    

    build.properties content:

    source.. = src,\
    output.. = bin/
    bin.includes = META-INF/,
                  .,
                      fragment.xml
    

    fragment.xml content:

    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.2"?>
    <fragment>
       <extension
             point="org.eclipse.ui.startup">
          <startup
                class="FragmentStartClass">
          </startup>
       </extension>
    </fragment>
    

    FragmentStartClass.java content:

    import org.eclipse.ui.IStartup;
    
    
    public class FragmentStartClass implements IStartup {
    
        public void earlyStartup() {
           System.out.println("Hello World From Fragment!");
    
        }
    
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 161k
  • Answers 161k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Put it into its own function, and name the function… May 12, 2026 at 11:53 am
  • Editorial Team
    Editorial Team added an answer All that you have to do is to do the… May 12, 2026 at 11:53 am
  • Editorial Team
    Editorial Team added an answer I didn't understand "Obviously, this won't work because by copying… May 12, 2026 at 11:53 am

Related Questions

Does anyone know, or have a link to an article or a step by
Most Stackoverflow answers that I have found in regards to the Perl build process
My current preferred C++ environment is the free and largely excellent Microsoft Visual Studio
I'm really interested in speech-to-text algorithms, but I'm not sure where to start studying

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.