Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Combo Box Refresh(how can i refresh my Combo Box if i change the Data ?)
Combo Box Refresh [message #718762] Thu, 25 August 2011 09:20 Go to next message
georgsteinbacher is currently offline georgsteinbacherFriend
Messages: 2
Registered: August 2011
Junior Member
I am working on a Plugin which reads Data out of a XML File, then adds this Data to different Combo Boxes in the Eclipse Toolbar.
I have a Button which enables the user to select the Input XML File for the Combo Boxes and here is my Problem.
When i run my Plugin the first time all works fine BUT when i select a new Input File the Data inside the Combo Boxes will not get refreshed and just shows the old Data.

Would be cool if someone give me a Idea for refreshing my Combo Boxes (:

here the Code of one of my Combo Boxes:
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
import org.jdom.JDOMException;
import anewtest.actions.OpenFile;

public class Drop_down_menu1 extends WorkbenchWindowControlContribution

  protected Control createControl(Composite parent)

	  OpenFile open = new OpenFile();
	  Open Ppfad = new Open();
	  global.DerPfad = Ppfad.GetPfad(); // The Input File

		try {
			int temp = open.GetDDM1Laenge();
			open.Eintraege = open.GetDDM1(temp);
			open.laenge = open.GetDDM1Laenge();

		} catch (JDOMException e) {
		} catch (IOException e) {

	Combo combo = new Combo(parent, SWT.READ_ONLY);
    combo.setItems (open.Eintraege);
    combo.setText (open.Eintraege[0]);

    temp = combo.getSelectionIndex();

    return combo;

so one of my Problems is that i don´t know what "Composite parent" is and where i get it from, since i found the code for the ComboBox in a other forum and just changed it for my Projekt

[Updated on: Thu, 25 August 2011 13:31]

Report message to a moderator

Re: Combo Box Refresh [message #719152 is a reply to message #718762] Fri, 26 August 2011 08:32 Go to previous message
georgsteinbacher is currently offline georgsteinbacherFriend
Messages: 2
Registered: August 2011
Junior Member
solved it in the
sadly i can´t post links just look: Plattformprogrammierung->Eclipse Plug-in: wie refreshe ich eine combobox?

[Updated on: Fri, 26 August 2011 09:37]

Report message to a moderator

Previous Topic:How to use the classes of jar inside the plugin
Next Topic:How to find open WizardDialog?
Goto Forum:

Current Time: Sat Aug 13 00:44:20 GMT 2022

Powered by FUDForum. Page generated in 0.02511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top