PTArrayCreation [message #87442] |
Mon, 18 April 2005 11:02  |
Eclipse User |
|
|
|
Hello,
could you please say me how to create an array statement for an
initializing.
I tried it with this statement:
<arguments
xsi:type="org.eclipse.jem.internal.instantiation:PTArrayCreation "
type ="java.lang.String" dimensions="1">
<initializer
xsi:type="org.eclipse.jem.internal.instantiation:PTArrayInitializer "
expressions = "arg1, arg2"/>
</arguments>
But it did not work :-(
Thank you in advance
Elena
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: PTArrayCreation [message #87859 is a reply to message #87732] |
Wed, 20 April 2005 10:11  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I actually just tried it with 3.1M6 of Eclipse and I don't get the msg.
Maybe something has changed.
Elena wrote:
> OK.
--
Thanks,
Rich Kulp
|
|
|
Re: PTArrayCreation [message #607165 is a reply to message #87442] |
Mon, 18 April 2005 11:26  |
Eclipse User |
|
|
|
Hi Elena,
> Hello,
> could you please say me how to create an array statement for an
> initializing.
The best way for this is to enable the VE to show the viewer with the
XML for its EMF model. In the development environment (the one you are
writing your plugin in) open the launch configuration and go to the
Tracing tab and enable tracing for org.eclipse.ve.java.core and select
debug/xmltext. Then in the workbench you lauch visit the preferences
for Java/Visual Editor and there will be a checkbox called "Show XML
viewer". Check this.
Now when you open the VE you will see a text viewer showing the parsed
XML definition of the EMF model. Sometimes it doesn't show up with
contents first time so change something like a button label or move
something on the free form to get it refreshed.
This model will let you see the allocation for everything. Go into the
code and manually write the constructor with the array you want and then
let the VE parse it and build you the parseTreeAllocation. Once you see
what the VE builds then you just have to make this the allocation you
generate.
Best regards,
Joe Winchester
|
|
|
Re: PTArrayCreation [message #607168 is a reply to message #87473] |
Mon, 18 April 2005 12:47  |
Eclipse User |
|
|
|
Hello,
sorry , but I don not see any check box "Show xml viewer". If I visit
"Preferences | Java | Visual Editor" I see three widgets:
appearance, code generation and pattern styles. And there is no check box
that you mean.
Could you please specify where I can find and activate the check box.
Thank you
Elena
|
|
|
Re: PTArrayCreation [message #607171 is a reply to message #87442] |
Mon, 18 April 2005 13:23  |
Eclipse User |
|
|
|
Elena wrote:
> Hello,
>
> could you please say me how to create an array statement for an
> initializing.
> I tried it with this statement:
>
>
> <arguments
> xsi:type="org.eclipse.jem.internal.instantiation:PTArrayCreation "
> type ="java.lang.String" dimensions="1">
>
> <initializer
>
> xsi:type="org.eclipse.jem.internal.instantiation:PTArrayInitializer "
>
> expressions = "arg1, arg2"/>
>
> </arguments>
>
>
> But it did not work :-(
>
> Thank you in advance
> Elena
>
<allocation xsi:type="org.eclipse.jem.internal.instantiation:ParseTreeAllocation ">
<expression xsi:type=" org.eclipse.jem.internal.instantiation:PTClassInstanceCreati on " type="Foo">
<arguments xsi:type="org.eclipse.jem.internal.instantiation:PTArrayCreation " type="java.lang.String[]">
<initializer>
<expressions xsi:type="org.eclipse.jem.internal.instantiation:PTStringLiteral " escapedValue=""foo""/>
<expressions xsi:type="org.eclipse.jem.internal.instantiation:PTStringLiteral " escapedValue=""bar""/>
</initializer>
</arguments>
</expression>
</allocation>
|
|
|
Re: PTArrayCreation [message #607175 is a reply to message #87517] |
Mon, 18 April 2005 17:58  |
Eclipse User |
|
|
|
Hi Elena,
> sorry , but I don not see any check box "Show xml viewer". If I visit
> "Preferences | Java | Visual Editor" I see three widgets:
> appearance, code generation and pattern styles. And there is no check
> box that you mean.
Gili gave you the parse tree so his answer was better than mine which
was sort of a "I don't know but I know how to find out" kind of reply.
You have to start eclipse in debug mode to get the check box showing.
Look at the help for the section on starting the VE in debug mode which
talks about the tracing tab. Once you've got this trace the plugin
org.eclipse.ve.java.core and select the option debug/xmltext. Only once
this is done will you see the check box.
Sometimes when you do tracing it is hard because you have to check the
plugin and the debug option and I am always forgetting to do the former
and wondering why it isn't enabled.
Best regards,
Joe Winchester
|
|
|
Re: PTArrayCreation [message #607176 is a reply to message #87559] |
Tue, 19 April 2005 08:38  |
Eclipse User |
|
|
|
Hello,
thank you for an answer. The creation of array does work :-). My component
can be initialized and the string array can be read correctly !!!
But in the .log I get an exception:
"Error Apr 19, 2005 14:25:15.866 Invalid name specified:
java.lang.String[]"
Here is a section from my .xmi:
<arguments
xsi:type="org.eclipse.jem.internal.instantiation:PTArrayCreation "
type="java.lang.String[]">
<initializer>
<expressions
xsi:type="org.eclipse.jem.internal.instantiation:PTStringLiteral "
escapedValue=""ButtonLabels""/>
<expressions
xsi:type="org.eclipse.jem.internal.instantiation:PTStringLiteral "
escapedValue=""ButtonLabels""/>
</initializer>
</arguments>
Do you know what the cause for this exception is ?
Thanks
Elena
|
|
|
Re: PTArrayCreation [message #607177 is a reply to message #87634] |
Tue, 19 April 2005 09:45  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Could we please add the rest of the exception stack trace so that we can
see where the error was produced. The message by itself is not sufficient.
> But in the .log I get an exception:
> "Error Apr 19, 2005 14:25:15.866 Invalid name specified:
> java.lang.String[]"
>
--
Thanks,
Rich Kulp
|
|
|
Re: PTArrayCreation [message #607178 is a reply to message #87649] |
Tue, 19 April 2005 10:06  |
Eclipse User |
|
|
|
Hello,
unfortunately there is only a message "An exception stack trace could not
be found."
And in the "error log" - view I can see that the exception comes from
the plug-in "org.eclipse.jdt.core". Not more.
Thanks
Elena
|
|
|
Re: PTArrayCreation [message #607179 is a reply to message #87662] |
Tue, 19 April 2005 10:37  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Look in the actual .log file itself. In your workspace's .metadata
directory. That is usually a more complete view for us. IF nothing else
is there either, then what can you do? :-)
Are there any other messages in the .log file?
--
Thanks,
Rich Kulp
|
|
|
Re: PTArrayCreation [message #607180 is a reply to message #87675] |
Tue, 19 April 2005 11:11  |
Eclipse User |
|
|
|
I swear that there are only two lines in the .log-File:
!ENTRY org.eclipse.jdt.core 4 983 Apr 19, 2005 17:05:13.306
!MESSAGE Invalid name specified: java.lang.String[]
Thanks :-)
Elena
|
|
|
Re: PTArrayCreation [message #607181 is a reply to message #87689] |
Tue, 19 April 2005 12:07  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Well, are things working? I don't know who is producing it. JDT isn't
being nice. It isn't saying what method is doing this. If things are
working, I guess we can just leave it go for now. It's not the VE code
so I can't isolate it.
Elena wrote:
>
> I swear that there are only two lines in the .log-File:
>
>
>
> !ENTRY org.eclipse.jdt.core 4 983 Apr 19, 2005 17:05:13.306
> !MESSAGE Invalid name specified: java.lang.String[]
>
>
>
>
> Thanks :-)
> Elena
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
|
Re: PTArrayCreation [message #607193 is a reply to message #87732] |
Wed, 20 April 2005 10:11  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I actually just tried it with 3.1M6 of Eclipse and I don't get the msg.
Maybe something has changed.
Elena wrote:
> OK.
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.17973 seconds