Yup; I cut and paste the subject line from the earlier posting "SWT 1.2.2 does not load 1.2.1 designs"
And I read the thread, so I am just letting you know that this beta is "broken" as far as backward compatibility goes.
Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
rgallen wrote:I am just letting you know that this beta is "broken" as far as backward compatibility goes.
package displayer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.events.*;
import java.util.*;
import receiver.*;
/**
* @author rallen
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class NLV {
private Label filtered;
private Button stopStartButton;
private Combo sourceFilter;
private Combo timestampFilter;
private Combo severityFilter;
private Label collected;
private Table table;
Vector log=new Vector();
Logger logger;
public static void main(String[] args) {
NLV window = new NLV();
window.open();
}
public void open() {
final Display display = new Display();
final Shell shell = new Shell();
shell.setLayout(new FormLayout());
shell.setText("Net Log Viewer");
{
sourceFilter = new Combo(shell, SWT.NONE);
final FormData formData = new FormData();
formData.right = new FormAttachment(0, 175);
formData.left = new FormAttachment(0, 5);
formData.top = new FormAttachment(0, 10);
sourceFilter.setLayoutData(formData);
sourceFilter.add("None");
sourceFilter.select(0);
}
{
timestampFilter = new Combo(shell, SWT.NONE);
final FormData formData = new FormData();
formData.right = new FormAttachment(0, 345);
formData.top = new FormAttachment(sourceFilter, 0, SWT.TOP);
formData.left = new FormAttachment(sourceFilter, 0, SWT.RIGHT);
timestampFilter.setLayoutData(formData);
timestampFilter.add("None");
timestampFilter.select(0);
}
{
severityFilter = new Combo(shell, SWT.NONE);
final FormData formData = new FormData();
formData.right = new FormAttachment(0, 430);
formData.top = new FormAttachment(sourceFilter, 0, SWT.TOP);
formData.left = new FormAttachment(0, 345);
severityFilter.setLayoutData(formData);
severityFilter.add("None");
severityFilter.select(0);
}
{
stopStartButton = new Button(shell, SWT.NONE);
final FormData formData = new FormData();
formData.right = new FormAttachment(0, 538);
formData.top = new FormAttachment(sourceFilter, 0, SWT.TOP);
formData.left = new FormAttachment(severityFilter, 40, SWT.DEFAULT);
stopStartButton.setLayoutData(formData);
stopStartButton.setText("Stop");
stopStartButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if(logger.toggleCollect()) {
stopStartButton.setText("Stop");
} else {
stopStartButton.setText("Start");
}
}
});
}
{
collected = new Label(shell, SWT.BORDER | SWT.RIGHT);
final FormData formData = new FormData();
formData.bottom = new FormAttachment(sourceFilter, 21, SWT.TOP);
formData.right = new FormAttachment(0, 637);
formData.top = new FormAttachment(sourceFilter, 0, SWT.TOP);
formData.left = new FormAttachment(stopStartButton, 7, SWT.DEFAULT);
collected.setLayoutData(formData);
}
{
filtered = new Label(shell, SWT.BORDER | SWT.RIGHT);
final FormData formData = new FormData();
formData.bottom = new FormAttachment(sourceFilter, 0, SWT.BOTTOM);
formData.right = new FormAttachment(0, 720);
formData.top = new FormAttachment(sourceFilter, 0, SWT.TOP);
formData.left = new FormAttachment(collected, 5, SWT.RIGHT);
filtered.setLayoutData(formData);
}
{
table = new Table(shell, SWT.BORDER);
final FormData formData = new FormData();
formData.bottom = new FormAttachment(100, -5);
formData.right = new FormAttachment(100, -5);
formData.top = new FormAttachment(0, 35);
formData.left = new FormAttachment(0, 5);
table.setLayoutData(formData);
table.setLinesVisible(true);
table.setHeaderVisible(true);
{
final TableColumn tableColumn = new TableColumn(table, SWT.NONE);
tableColumn.setWidth(170);
tableColumn.setText("Source");
final Sorter sorter=new Sorter(table, 0);
tableColumn.addSelectionListener(sorter);
}
{
final TableColumn tableColumn = new TableColumn(table, SWT.NONE);
tableColumn.setWidth(170);
tableColumn.setText("Timestamp");
final Sorter sorter=new Sorter(table, 1);
tableColumn.addSelectionListener(sorter);
}
{
final TableColumn tableColumn = new TableColumn(table, SWT.NONE);
tableColumn.setWidth(106);
tableColumn.setText("Severity");
final Sorter sorter=new Sorter(table, 2);
tableColumn.addSelectionListener(sorter);
}
{
final TableColumn tableColumn = new TableColumn(table, SWT.NONE);
tableColumn.setWidth(222);
tableColumn.setText("Message");
final Sorter sorter=new Sorter(table, 3);
tableColumn.addSelectionListener(sorter);
}
Filter filter=new Filter(table, log, 0, filtered);
sourceFilter.addSelectionListener(filter);
filter=new Filter(table, log, 3, filtered);
timestampFilter.addSelectionListener(filter);
filter=new Filter(table, log, 2, filtered);
severityFilter.addSelectionListener(filter);
}
logger=new Logger(log, display, table, "226.200.100.101", 1000);
logger.start();
TableUpdate updater=new TableUpdate(log,table,sourceFilter,timestampFilter,severityFilter,collected);
updater.setMaxLogSize(logger.getMaxSize());
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.timerExec(50,updater);
display.sleep();
}
}
logger.setShouldRun(false);
}
}
rgallen wrote:As with the original poster if I simply delete Designer 1.2.3 (thereby reverting to Designer 1.2.2R then the design tab re-appears. I have flipped back and forth several times, it is 100% repeatable with the following source.
Eric Clayberg wrote:Are there any exceptions in your Eclipse .log file?
Eric Clayberg wrote:When you say the "Design" tab does not appear, what do you mean?
rgallen wrote:I deleted the log file, tried to open NLV.java and no file was produced.
rgallen wrote:The tab does not show up. I am a "double-clicker", so when I open a java source file I double click on its name, and, with 1.2.2 installed NLV.java opens, and I have 2 tabs (source and design) with 1.2.3 I get only the source tab.
rgallen wrote:Aha, I just tried doing (the very lengthy) right click->open with->SWT Designer Editor, and this works - I would never dream of doing so many mouse strokes
rgallen wrote:I think this means that Designer stores some metadata about preferences (probably with some eclipse registry), that it does not read from the old Designers metadata registry. It should do this (for settings that existed in the old Designer only of course), however, this is obviously not a serious bug, since it does update that registry as soon as it is opened once via the laborious method.
No. That is not how it works. Eclipse itself controls the information about what editor types to associate with each individual file. Eclipse also occassionally forgets, and you need to remind it by using Open With.
rgallen wrote:I have never seen Eclipse lose a file association, and I am a heavy user of the CDT (12 hours a day vs. 15 minutes a week with Designer).
Users browsing this forum: No registered users and 1 guest