| Extend XML Editor [message #673976] |
Wed, 25 May 2011 07:15  |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Hi all,
this is my first post here.
I would like to add some features to XML default editor.
I am new to plugin development and plugin extensions.
How can I start?
Thanks
Bye
Marco
|
|
|
|
|
|
|
|
|
| Re: Extend XML Editor [message #674210 is a reply to message #674101] |
Thu, 26 May 2011 03:08   |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Ok, now I have errors in:
XMLValidatorPreferencePage.java (method clearCatalogCache() is undefined)
XMLCatalogEntriesView.java (INDICATE_NO_DOCUMENT_ELEMENT and USE_PROJECT_SETTINGS cannot be resolved)
Where can I find these sources?
Now in my workspace I have:
org.eclipse.wst.see.ui
org.eclipse.wst.xml.ui
But still I have errors listed above.
Which others plugins do I need?
EDIT: I solved checking-out org.eclipse.wst.xml.core, but this is strange because:
XMLCorePreferenceNames.INDICATE_NO_GRAMMAR was fine, but XMLCorePreferenceNames.INDICATE_NO_DOCUMENT_ELEMENT wasn't, why?
And, org.eclipse.wst.xml.core.jar was already in my plugins folder.
BTW, now I have no errors.
Thanks
Marco
[Updated on: Thu, 26 May 2011 05:35] Report message to a moderator
|
|
|
| Re: Extend XML Editor [message #674270 is a reply to message #674210] |
Thu, 26 May 2011 07:16   |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Ok, I followed the tutorial and it works fine but on the console I got some warnings, for example:
ENTRY org.eclipse.osgi 2 0 2011-05-26 13:06:37.321
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-05-26 13:06:37.321
!MESSAGE Bundle reference:file:/Z:/eclipse_new/eclipse/plugins/org.eclipse.wst.xsd.ui_1.2.304.v201101251958.jar was not resolved.
!SUBENTRY 2 org.eclipse.wst.xsd.ui 2 0 2011-05-26 13:06:37.321
!MESSAGE Missing required bundle org.eclipse.wst.sse.ui_[1.2.0,1.3.0).
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-05-26 13:06:37.321
And a some more.
At the moment I have checked-out from CVS the following plugins:
1) org.eclipse.wst.sse.ui
2) org.eclipse.wst.xml.core
3) org.eclipse.wst.xml.ui
Do warning mean I need also some other plugins?
Furthermore, for this warning:
MESSAGE Bundle reference:file:/Z:/eclipse_new/eclipse/plugins/org.eclipse.jst.jsf.ui_1.3.1.v20100906.jar was not resolved.
I checked and that JAR file exists in that path (with the exact same name)...
If I check-out the required bundle from eclipse CVS relative warning disappears...but I do not understand why I get this warning as the plugin is in eclipse_home/plugins...
Thanks
Marco
[Updated on: Thu, 26 May 2011 07:40] Report message to a moderator
|
|
|
|
|
| Re: Extend XML Editor [message #676682 is a reply to message #675987] |
Mon, 06 June 2011 02:33   |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Ok, at the moment I am using Indigo release and I do not have those warnings anymore.
I explain better my goal.
I have an XML file which represents a series of step to be taken.
What can be done inside each step is defined in a second XML file.
So, the content assist is for the values of attributes and not for the attributes themselves, or for tags as the "classic content assist"
Is it possible to query this XML file using XPath and using as argument of my XPath function what has be written by user?
I tried to query an XML file using XPath and it works. But, now, I would like to query according to what user wrote.
I make an example:
<employee level=" At this point the content assist should display the available level. So, I have to write an XPath expression to query an external XML file and ask for the all available levels, then, present them in the a "content-assist-like"
No problem about XPath, I know it; my problem is to get the attribute and then represent the values...
How do I get the last inserted attribute?
Thanks
Marco
[Updated on: Mon, 06 June 2011 07:50] Report message to a moderator
|
|
|
| Re: Extend XML Editor [message #676966 is a reply to message #676682] |
Tue, 07 June 2011 02:28   |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Ok, some news.
I saw that plugin org.eclipse.wst.sse.ui provides the extension point completionProposal.
Attached to this there are also some examples.
These example propose what I need, that is, suggestion for attribute values.
I think values comes from DTD file.
But, I have to improve this taking values from an XML file.
The attributes values are the tags in my external XML file.
[Updated on: Tue, 07 June 2011 04:15] Report message to a moderator
|
|
|
|
| Re: Extend XML Editor [message #721557 is a reply to message #720855] |
Fri, 02 September 2011 02:02  |
MarcoGT Messages: 77 Registered: May 2011 |
Member |
|
|
Hi,
Eclipse Indigo (I think previous releases too) contains a project called XMLExample; just create a new project and then choose "Example".
It contains some XML files with DTD/Schema too.
|
|
|
Powered by
FUDForum. Page generated in 0.02137 seconds