LaunchingConfigurationTab doesn't show anything [message #9433] |
Sat, 28 June 2008 00:28  |
Eclipse User |
|
|
|
Hi...
I'm brand new to plugin-development for Eclipse.
I tried to create a simple LaunchConfigurationType with TabGroup and at
least one contained custom Tab. Thanks to
http://www.eclipse.org/articles/Article-Launch-Framework/lau nch.html it
wasn't too hard to manage this, but I can't get any content into my tab. In
the createControl(...)-method I'm adding two buttons with a FillLayout to
the parent, but it isn't displayed but only the empty tab. With the debugger
I assured, that the createControl-method is called at all.
Because I'm new to SWT too, I copied the createControl-method from one of
ATLs launching-tabs and from the AppletMainTab. Both results in an empty
tab.
Does anybody have a clue what's wrong with my tab?
Thanks in advance,
Stefan
|
|
|
|
Re: (Solved) LaunchingConfigurationTab doesn't show anything [message #9581 is a reply to message #9533] |
Mon, 30 June 2008 21:20  |
Eclipse User |
|
|
|
Ok... finally I solved this issue.
The problem was the missing "setControl(Composite)". The working
createControl-method:
>>>>>>>>>>
public void createControl(Composite parent) {
Composite comp=new Composite(parent, SWT.NONE);
setControl(comp);
GridLayout layout=new GridLayout();
layout.numColumns=1;
comp.setLayout(layout);
Button b = new Button(comp, SWT.NONE);
b.setText("Button No 1");
}
<<<<<<<<<<<
Stefan
|
|
|
Re: LaunchingConfigurationTab doesn't show anything [message #571007 is a reply to message #9433] |
Sat, 28 June 2008 21:12  |
Eclipse User |
|
|
|
Hi again...
I did some tests with a very small standalone SWT-app and created a basic
Composite containing only one Button without any SelectionListener. In the
standalone-add it works fine, but moving the createControl(...)-method to my
tab, nothing is shown in the launchconfiguration but the empty tab with the
title "TestLaunchTab".
Here is my very basic LaunchTab:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
public class TestLaunchTab extends AbstractLaunchConfigurationTab {
@Override
public void createControl(Composite parent) {
GridLayout layout=new GridLayout();
layout.numColumns=1;
parent.setLayout(layout);
Button b = new Button(parent, SWT.NONE);
b.setText("Button No 1");
}
@Override
public String getName() {
return "TestLaunchTab";
}
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
}
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
}
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
}
}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Can anybody tell me, what's wrong with my tab?
Stefan
|
|
|
Re: (Solved) LaunchingConfigurationTab doesn't show anything [message #571042 is a reply to message #9533] |
Mon, 30 June 2008 21:20  |
Eclipse User |
|
|
|
Ok... finally I solved this issue.
The problem was the missing "setControl(Composite)". The working
createControl-method:
>>>>>>>>>>
public void createControl(Composite parent) {
Composite comp=new Composite(parent, SWT.NONE);
setControl(comp);
GridLayout layout=new GridLayout();
layout.numColumns=1;
comp.setLayout(layout);
Button b = new Button(comp, SWT.NONE);
b.setText("Button No 1");
}
<<<<<<<<<<<
Stefan
|
|
|
Powered by
FUDForum. Page generated in 0.04889 seconds