Home » Archived » Visual Editor (VE) » Parsing Stopped working for simple visual class
Parsing Stopped working for simple visual class [message #126899] |
Fri, 23 June 2006 10:02  |
Eclipse User |
|
|
|
Originally posted by: harel.ben-attia.comverse.com
Hi,
I'm trying to create a visual class for a connect dialog. Everything was
fine until a few days ago. At some point, the visual representation of the
window stopped being displayed correctly. It sometimes only shows a "this"
icon. On other occasions it shows the shell window itself, but it's empty,
and the buttons are to the side of the window (not on the window itself)
etc. I've tried cleaning the caches and stuff, but it doesn't seem to work.
At runtime, everything runs correctly.
Does anyone have any idea how to fix this ?
Thanks
RL
here is the source code for the class (a very simple one):
import java.net.InetAddress;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import sun.net.util.IPAddressUtil;
public class ConnectDialogForm {
private Display display;
private Results results;
private Shell sShell = null; //
@jve:decl-index=0:visual-constraint="14,10"
private Label label = null;
private Label label1 = null;
private Text txtIPAddress = null;
private Text txtPort = null;
private Button btnOK = null;
private Button btnCancel = null;
private Label txtMessage = null;
/**
* This method initializes sShell
*/
private void createSShell() {
sShell = new Shell(SWT.APPLICATION_MODAL | SWT.SHELL_TRIM);
sShell.setText("Shell");
sShell.setSize(new org.eclipse.swt.graphics.Point(336,133));
sShell.addShellListener(new org.eclipse.swt.events.ShellAdapter() {
public void shellClosed(org.eclipse.swt.events.ShellEvent e) {
onCancel();
}
});
label = new Label(sShell, SWT.NONE);
label.setBounds(new org.eclipse.swt.graphics.Rectangle(11,14,69,17));
label.setText("IP Address");
label1 = new Label(sShell, SWT.NONE);
label1.setBounds(new org.eclipse.swt.graphics.Rectangle(11,42,71,19));
label1.setText("Port");
txtIPAddress = new Text(sShell, SWT.BORDER);
txtIPAddress.setBounds(new
org.eclipse.swt.graphics.Rectangle(101,14,123,17));
txtPort = new Text(sShell, SWT.BORDER);
txtPort.setBounds(new org.eclipse.swt.graphics.Rectangle(100,45,126,17));
txtMessage = new Label(sShell, SWT.CENTER);
txtMessage.setBounds(new
org.eclipse.swt.graphics.Rectangle(11,74,302,18));
txtMessage.setText("Enter the IP address and port of the UniLoader
server");
btnOK = new Button(sShell, SWT.NONE | SWT.DEFAULT);
btnOK.setBounds(new org.eclipse.swt.graphics.Rectangle(238,7,81,25));
btnOK.setText("&OK");
btnOK.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
onOK();
}
});
btnCancel = new Button(sShell, SWT.NONE);
btnCancel.setBounds(new org.eclipse.swt.graphics.Rectangle(236,38,85,27));
btnCancel.setText("&Cancel");
btnCancel.addSelectionListener(new
org.eclipse.swt.events.SelectionAdapter() {
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
onCancel();
}
});
}
public void init() {
display = Display.getDefault();
createSShell();
}
public void display() {
sShell.open();
while (!sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
public Results getResults() {
return this.results;
}
public void onOK() {
// verify ip address
byte[] bytes =
IPAddressUtil.textToNumericFormatV4(txtIPAddress.getText());
// get port number
int port = Integer.parseInt(txtPort.getText());
// if values are legal,
if ((bytes != null) && (port > 0) && (port < 65535)) {
// save them and dispose of the window
results = new Results(txtIPAddress.getText(),txtPort.getText());
sShell.dispose();
}
else {
txtMessage.setText("IP address is illegal or port is not in the range
1-65535.");
}
}
public void onCancel() {
results = null;
sShell.dispose();
}
public class Results {
String ipAddress;
String port;
public Results(String ipAddress,String port) {
this.ipAddress = ipAddress;
this.port = port;
}
}
}
|
|
| |
Re: Parsing Stopped working for simple visual class [message #126988 is a reply to message #126936] |
Fri, 23 June 2006 19:59  |
Eclipse User |
|
|
|
Originally posted by: harel.ben-attia.comverse.com
Hi Rich,
I'm using 1.1.0.1, and i don't see any special errors in the log (i have
VE-related exceptions in the log file, but they're old and i'm but i'm not
sure that they relate to that specific problem). Anyway, currently it
started to work again (happened to me a few times before already...) and i
suspect that it relates to the fact that i've turned off "Build
Automatically" several days ago.
Thanks a lot for the quick reply and the will to help
RL
btw, the exceptions from the log file are as follows, if u're interested:
!ENTRY org.eclipse.ve.swt 2 0 2006-06-23 17:05:16.390
!MESSAGE Exception thrown.
!STACK 0
IWAV0073I *** RemoteVM Exception - Trace from Remote VM:
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:2942)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.widgets.Widget.error(Widget.java:395)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:297)
at org.eclipse.swt.widgets.Widget.getStyle(Widget.java:561)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.jem.internal.proxy.vm.remote.ConnectionHandler.r un(ConnectionHandler.java:317)
at
org.eclipse.jem.internal.proxy.vm.remote.CallbackHandler.cal lbackWithParms(CallbackHandler.java:150)
at
org.eclipse.ve.internal.swt.targetvm.DisplayExec$1.run(Displ ayExec.java:109)
at
org.eclipse.jem.internal.proxy.vm.remote.RemoteVMServerThrea d.doCallback(RemoteVMServerThread.java:541)
at
org.eclipse.ve.internal.swt.targetvm.DisplayExec$ExecRunnabl e.run(DisplayExec.java:107)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3102)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2761)
at
org.eclipse.ve.internal.swt.targetvm.Environment$3.run(Envir onment.java:68)
IWAV0074I *** Local StackTrace:
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanProxyP roxy:
org.eclipse.swt.SWTException: Widget is disposed
at
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanTypePr oxy.createThrowableBeanProxy(REMThrowableBeanTypeProxy.java: 34)
at
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanTypePr oxy.newBeanProxy(REMThrowableBeanTypeProxy.java:65)
at
org.eclipse.jem.internal.proxy.remote.REMStandardBeanProxyFa ctory.getBeanProxy(REMStandardBeanProxyFactory.java:459)
at
org.eclipse.jem.internal.proxy.remote.REMStandardBeanProxyFa ctory.processErrorReturn(REMStandardBeanProxyFactory.java:51 0)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:221)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invokeW ithParms(REMMethodProxy.java:178)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:102)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:98)
at
org.eclipse.ve.internal.swt.WidgetProxyAdapter$2.run(WidgetP roxyAdapter.java:161)
at
org.eclipse.jem.internal.proxy.swt.DisplayManager$DisplayRun nable.calledBack(DisplayManager.java:141)
at
org.eclipse.jem.internal.proxy.remote.REMCallbackThread.run( REMCallbackThread.java:187)
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:33.515
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:35.500
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:37.703
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.jem.proxy 2 0 2006-06-24 01:42:29.00
!MESSAGE No Server to retrieve a connection.
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:e7h3vu$jkv$1@utils.eclipse.org...
>I don't see anything out of the ordinary. Though the errors sound like a
>cache problem.
>
> I just tried your example with VE 1.1.0.1 and it worked fine.
>
> Are there any errors in the .log file?
>
> --
> Thanks,
> Rich Kulp
|
|
| |
Re: Parsing Stopped working for simple visual class [message #613408 is a reply to message #126936] |
Fri, 23 June 2006 19:59  |
Eclipse User |
|
|
|
Hi Rich,
I'm using 1.1.0.1, and i don't see any special errors in the log (i have
VE-related exceptions in the log file, but they're old and i'm but i'm not
sure that they relate to that specific problem). Anyway, currently it
started to work again (happened to me a few times before already...) and i
suspect that it relates to the fact that i've turned off "Build
Automatically" several days ago.
Thanks a lot for the quick reply and the will to help
RL
btw, the exceptions from the log file are as follows, if u're interested:
!ENTRY org.eclipse.ve.swt 2 0 2006-06-23 17:05:16.390
!MESSAGE Exception thrown.
!STACK 0
IWAV0073I *** RemoteVM Exception - Trace from Remote VM:
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:2942)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.widgets.Widget.error(Widget.java:395)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:297)
at org.eclipse.swt.widgets.Widget.getStyle(Widget.java:561)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.eclipse.jem.internal.proxy.vm.remote.ConnectionHandler.r un(ConnectionHandler.java:317)
at
org.eclipse.jem.internal.proxy.vm.remote.CallbackHandler.cal lbackWithParms(CallbackHandler.java:150)
at
org.eclipse.ve.internal.swt.targetvm.DisplayExec$1.run(Displ ayExec.java:109)
at
org.eclipse.jem.internal.proxy.vm.remote.RemoteVMServerThrea d.doCallback(RemoteVMServerThread.java:541)
at
org.eclipse.ve.internal.swt.targetvm.DisplayExec$ExecRunnabl e.run(DisplayExec.java:107)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3102)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2761)
at
org.eclipse.ve.internal.swt.targetvm.Environment$3.run(Envir onment.java:68)
IWAV0074I *** Local StackTrace:
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanProxyP roxy:
org.eclipse.swt.SWTException: Widget is disposed
at
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanTypePr oxy.createThrowableBeanProxy(REMThrowableBeanTypeProxy.java: 34)
at
org.eclipse.jem.internal.proxy.remote.REMThrowableBeanTypePr oxy.newBeanProxy(REMThrowableBeanTypeProxy.java:65)
at
org.eclipse.jem.internal.proxy.remote.REMStandardBeanProxyFa ctory.getBeanProxy(REMStandardBeanProxyFactory.java:459)
at
org.eclipse.jem.internal.proxy.remote.REMStandardBeanProxyFa ctory.processErrorReturn(REMStandardBeanProxyFactory.java:51 0)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:221)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invokeW ithParms(REMMethodProxy.java:178)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:102)
at
org.eclipse.jem.internal.proxy.remote.REMMethodProxy.invoke( REMMethodProxy.java:98)
at
org.eclipse.ve.internal.swt.WidgetProxyAdapter$2.run(WidgetP roxyAdapter.java:161)
at
org.eclipse.jem.internal.proxy.swt.DisplayManager$DisplayRun nable.calledBack(DisplayManager.java:141)
at
org.eclipse.jem.internal.proxy.remote.REMCallbackThread.run( REMCallbackThread.java:187)
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:33.515
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:35.500
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.ve.java.core 4 0 2006-06-23 18:23:37.703
!MESSAGE Invalid PropertyDecorator
!ENTRY org.eclipse.jem.proxy 2 0 2006-06-24 01:42:29.00
!MESSAGE No Server to retrieve a connection.
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> wrote in message
news:e7h3vu$jkv$1@utils.eclipse.org...
>I don't see anything out of the ordinary. Though the errors sound like a
>cache problem.
>
> I just tried your example with VE 1.1.0.1 and it worked fine.
>
> Are there any errors in the .log file?
>
> --
> Thanks,
> Rich Kulp
|
|
|
Goto Forum:
Current Time: Sun Jun 22 19:48:06 EDT 2025
Powered by FUDForum. Page generated in 0.06007 seconds
|