Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Extend XML Editor(How to do it?)
Extend XML Editor [message #673976] Wed, 25 May 2011 11:15 Go to next message
MarcoGT  is currently offline MarcoGT Friend
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 #673989 is a reply to message #673976] Wed, 25 May 2011 12:37 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

http://eclipse.org/webtools/community/tutorials/DevelopingWTP/DevelopingWTP.html would be one place to start, but you may want to create the example Plug-in Project beforehand to get your feet wet with plug-in development in general.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extend XML Editor [message #674020 is a reply to message #673976] Wed, 25 May 2011 14:20 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 25-May-11 05:15, MarcoGT wrote:
> 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

To get your feet wet in plug-in development, may I suggest Lars Vogel's
site: http://www.vogella.de. He has a tutorial or two on RCP, etc.
Re: Extend XML Editor [message #674044 is a reply to message #673989] Wed, 25 May 2011 16:21 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
Nitin Dahyabhai wrote on Wed, 25 May 2011 08:37
would be one place to start, but you may want to create the example Plug-in Project beforehand to get your feet wet with plug-in development in general.


Ok, I did the check-out but now I have some like 10 thousand error, for example:

"AbstractAdapterFactory cannot be resolved into a type" in file JFaceNodeAdapterFactory.java and so on...

In every source file I have error.

Thanks
Marco
Re: Extend XML Editor [message #674093 is a reply to message #674044] Wed, 25 May 2011 20:01 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Sounds like you don't have the dependencies. The XML Editor isn't entirely provided by a single plug-in, you either have to have them all as part of the Target Platform or also checked out into your workspace. The simplest way to get them into your Target Platform is to have WTP installed.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extend XML Editor [message #674095 is a reply to message #674093] Wed, 25 May 2011 20:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Sounds like you don't have the dependencies. The XML Editor isn't entirely provided by a single plug-in, you either have to have them all as part of the Target Platform or also checked out into your workspace. The simplest way to get them into your Target Platform is to have WTP installed.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extend XML Editor [message #674101 is a reply to message #674095] Wed, 25 May 2011 20:35 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
Nitin Dahyabhai wrote on Wed, 25 May 2011 16:02
Sounds like you don't have the dependencies. The XML Editor isn't entirely provided by a single plug-in, you either have to have them all as part of the Target Platform or also checked out into your workspace. The simplest way to get them into your Target Platform is to have WTP installed.


How do I check if it is installed?
I edit every day XML files.

By the way the plugins org.eclipse.wst.xml.* are installed in eclipse/plugin folder
Re: Extend XML Editor [message #674210 is a reply to message #674101] Thu, 26 May 2011 07:08 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
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 09:35]

Report message to a moderator

Re: Extend XML Editor [message #674270 is a reply to message #674210] Thu, 26 May 2011 11:16 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
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... Sad

Thanks
Marco

[Updated on: Thu, 26 May 2011 11:40]

Report message to a moderator

Re: Extend XML Editor [message #675637 is a reply to message #674270] Wed, 01 June 2011 04:26 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

On 5/26/2011 7:16 AM, MarcoGT wrote:
> 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?

It looks like you may have checked out the versions from HEAD, but not
using an Indigo build. "Missing required bundle
org.eclipse.wst.sse.ui_[1.2.0,1.3.0)" points to this being just that
kind of version mismatch.

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extend XML Editor [message #675987 is a reply to message #675637] Thu, 02 June 2011 09:34 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
Messages: 77
Registered: May 2011
Member
What is an Indigo build?
Re: Extend XML Editor [message #676682 is a reply to message #675987] Mon, 06 June 2011 06:33 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
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 11:50]

Report message to a moderator

Re: Extend XML Editor [message #676966 is a reply to message #676682] Tue, 07 June 2011 06:28 Go to previous messageGo to next message
MarcoGT  is currently offline MarcoGT Friend
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 08:15]

Report message to a moderator

Re: Extend XML Editor [message #720855 is a reply to message #676966] Wed, 31 August 2011 11:27 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Hi Marco,
Where exactly are these examples you speak of?
Thanks! Smile
Re: Extend XML Editor [message #721557 is a reply to message #720855] Fri, 02 September 2011 06:02 Go to previous message
MarcoGT  is currently offline MarcoGT Friend
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.
Previous Topic:Documentation for editing org.eclipse.wst.common.component?
Next Topic:Align fields in columns broken?
Goto Forum:
  


Current Time: Fri Apr 19 14:12:06 GMT 2024

Powered by FUDForum. Page generated in 0.02504 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top