Error Log filling up [message #486215] |
Wed, 16 September 2009 14:56  |
Eclipse User |
|
|
|
Hi,
I've been using visual editor for a while now and it's been working fine. However , starting today I noticed that I am getting errors in the error log with vague descriptions that I'm not sure how to fix. My visual component is a simple window with a text area and a few buttons. The errors happen when I'm editing the code. Here are two of them and I'm hoping someone can help.
1. Exception Thrown
Plugin - org.eclipse.ve. java.core
java.lang.NullPointerException
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:103)
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:116)
at org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:809)
2. Exception Thrown
plugin - org.eclipse.ve. java.core
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 14)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectF orURIFragmentRootSegment(ResourceImpl.java:642)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:692)
Thanks in advance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Error Log filling up [message #486641 is a reply to message #486633] |
Fri, 18 September 2009 09:40  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If the VE is working otherwise, I guess it is ok.
cjob68@shaw.ca wrote:
> Are there any issues with just leaving my code as is and let VE generate
> those errors ?
> My concern with adding the code as described is it will make the code
> harder to read and also what happens if in a future release the issue is
> fixed ?
--
Thanks,
Rich Kulp
|
|
|
Re: Error Log filling up [message #617423 is a reply to message #486245] |
Wed, 16 September 2009 17:20  |
Eclipse User |
|
|
|
I thought that might be the issue because Eclipse opened with an error today so I did run a -clean on it when I opened it again but that didn't fix this error. I'm not sure what the issue could be.
|
|
|
Re: Error Log filling up [message #617425 is a reply to message #486247] |
Thu, 17 September 2009 09:17  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Hi,
Not -clean. That clears only the plugin configurations. It doesn't clear
cached metadata. You need to use the procedure I outlined to clear the
cached metadata.
Actually -clean should rarely be needed except if you are just putting
plugins directly into the eclipse configuration without using the
install manager or the dropins folder.
cjob68@shaw.ca wrote:
> I thought that might be the issue because Eclipse opened with an error
> today so I did run a -clean on it when I opened it again but that didn't
> fix this error. I'm not sure what the issue could be.
--
Thanks,
Rich Kulp
|
|
|
Re: Error Log filling up [message #617426 is a reply to message #486371] |
Thu, 17 September 2009 11:44  |
Eclipse User |
|
|
|
Thanks , I tried that but it didn't seem to fix it. I think I may know what the problem is. I have modified the section where the visual editor creates the jTable and the visual editor doesn't like this.
Visual Editor likes this:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV);
My modified code which it doesn't like:
String[] columnNames = {"Column1", "Column2"};
Vector<String> columnNamesV = new Vector<String>(Arrays.asList(columnNames));
jTable = new JTable(getRowData(),columnNamesV){
...custom table code here including creating a rendered to modify the color of the rows
};
Any ideas ?
|
|
|
Re: Error Log filling up [message #617427 is a reply to message #486432] |
Thu, 17 September 2009 11:58  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Yeah, I could see that being a problem. The VE needs to be able to
instantiate a visual component. A non-static inner class can't be
instantiated.
cjob68@shaw.ca wrote:
> Thanks , I tried that but it didn't seem to fix it. I think I may know
> what the problem is. I have modified the section where the visual editor
> creates the jTable and the visual editor doesn't like this.
> Visual Editor likes this:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV);
>
>
> My modified code which it doesn't like:
> String[] columnNames = {"Column1", "Column2"};
> Vector<String> columnNamesV = new
> Vector<String>(Arrays.asList(columnNames));
> jTable = new JTable(getRowData(),columnNamesV){
> ...custom table code here including creating a rendered to modify the
> color of the rows
> };
>
> Any ideas ?
--
Thanks,
Rich Kulp
|
|
|
Re: Error Log filling up [message #617428 is a reply to message #486441] |
Thu, 17 September 2009 12:57  |
Eclipse User |
|
|
|
I'm also getting errors in another class that doesn't have any tables and for the most part it's got the same code that VE inserted.
The error is :
java.lang.NullPointerException
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:103)
at org.eclipse.ve.internal.java.codegen.util.CodeGenUtil.create Instance(CodeGenUtil.java:116)
at org.eclipse.ve.internal.java.codegen.model.BeanPart.createEO bject(BeanPart.java:809)
Is this something I should be worried about ? Could my install of VE be corrupted ?
Any suggestions ?
|
|
|
Re: Error Log filling up [message #617429 is a reply to message #486452] |
Thu, 17 September 2009 15:24  |
Eclipse User |
|
|
|
I think I may have found the issue. I removed GUI components one by one from the frame to see when I could add a space in the source and watch the GUI sync and generate an error. When I removed the jTextArea I no longer get the error when the GUI syncs. I'm not sure why this is happening but at least I am getting somewhere.
|
|
|
Re: Error Log filling up [message #617431 is a reply to message #486482] |
Thu, 17 September 2009 16:50  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I'm not sure why either but there is a workaround you can use to have VE
ignore the line. It's kind of kludgy. We never got to put in an
annotation that would tell VE to ignore something when I was working on
VE. :-(
if(false)
;
else
jTextArea.getDocument().addDocumentListener(new MyDocumentListener());
This will work because VE is designed to ignore the else block of an if
statement.
cjob68@shaw.ca wrote:
> I found the line that is causing the problem.
> jTextArea.getDocument().addDocumentListener(new MyDocumentListener());
>
> I'm not sure why VE doesn't like this line. The code compiles fine and
> it also runs fine but when syncing the GUI it generates an error in the
> Error Log.
--
Thanks,
Rich Kulp
|
|
|
Re: Error Log filling up [message #617432 is a reply to message #486495] |
Thu, 17 September 2009 16:58  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Rich Kulp wrote:
> We never got to put in an
> annotation that would tell VE to ignore something when I was working on
> VE. :-(
A little bit of grammar problem there. It is not that we never put in
code to have something ignored only when I was working on VE! And so by
corollary when I'm not working on the VE it wouldn't ignore something. :-)
--
Thanks,
Rich Kulp
|
|
|
Re: Error Log filling up [message #617433 is a reply to message #486495] |
Fri, 18 September 2009 09:35  |
Eclipse User |
|
|
|
Are there any issues with just leaving my code as is and let VE generate those errors ?
My concern with adding the code as described is it will make the code harder to read and also what happens if in a future release the issue is fixed ?
|
|
|
Re: Error Log filling up [message #617434 is a reply to message #617433] |
Fri, 18 September 2009 09:40  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
If the VE is working otherwise, I guess it is ok.
cjob68@shaw.ca wrote:
> Are there any issues with just leaving my code as is and let VE generate
> those errors ?
> My concern with adding the code as described is it will make the code
> harder to read and also what happens if in a future release the issue is
> fixed ?
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.06179 seconds