Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » help with editorConfiguration
help with editorConfiguration [message #232707] Thu, 18 June 2009 12:25 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all,
I recently moved to eclipse 3.4.2.

In my previous RCP application I was extending StructuredTextViewer to edit
files located in a database.

I do definitely need to extend this class to access the operation of
doSave/dispose (so I can check out/in files in the db during editing
operation).

The point is since I moved in version 3.4 the format doesn't work anymore
and I have found articles saying to extend the
org.eclipse.wst.sse.ui.editorConfiguration.

What I was doing before was:

page.openEditor(new EomStorageXMLObj(obj, viewer), "EomUtils.EomXmlEditor");

where eomstoragexmlobj is my input storage and EomUtils.EomXmlEditor is the
ID of my editor which extends StructuredTextEditor.


The example speaks about creating an editor configuration (suppose the file
is of type HTML)
<extension
point="org.eclipse.wst.sse.ui.editorConfiguration">
<sourceViewerConfiguration
class=" org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L "
target="EomUtils.EomHtmlEditor"> ***************** IS CORRECT
??? ***************************
</sourceViewerConfiguration>
<contentOutlineConfiguration
class=" org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOu tlineConfiguration "
target="org.eclipse.core.runtime.xml">
</contentOutlineConfiguration>
<propertySheetConfiguration
class=" org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConf iguration "
target="org.eclipse.wst.sse.contenttype.xml,
org.eclipse.wst.html.core.htmlsource, org.eclipse.jst.jsp.core.jspsource">
</propertySheetConfiguration>
</extension>

What shall I do to use this in my project? do I need to link it to my
editor?

Is there anything I can read to understand the use of this extension a bit
better?
Many thanks in advance.
Kar
Re: help with editorConfiguration [message #232727 is a reply to message #232707] Thu, 18 June 2009 19:19 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2342
Registered: July 2009
Senior Member
Kar wrote:
> I recently moved to eclipse 3.4.2.
>
> In my previous RCP application I was extending StructuredTextViewer to
> edit files located in a database.
>
> I do definitely need to extend this class to access the operation of
> doSave/dispose (so I can check out/in files in the db during editing
> operation).
>
> The point is since I moved in version 3.4 the format doesn't work
> anymore and I have found articles saying to extend the
> org.eclipse.wst.sse.ui.editorConfiguration.
>
> What I was doing before was:
>
> page.openEditor(new EomStorageXMLObj(obj, viewer),
> "EomUtils.EomXmlEditor");
>
> where eomstoragexmlobj is my input storage and EomUtils.EomXmlEditor is
> the ID of my editor which extends StructuredTextEditor.
>
>
> The example speaks about creating an editor configuration (suppose the
> file is of type HTML)
> <extension
> point="org.eclipse.wst.sse.ui.editorConfiguration">
> <sourceViewerConfiguration
>
> class=" org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L "
> target="EomUtils.EomHtmlEditor"> ***************** IS
> CORRECT ??? ***************************
> </sourceViewerConfiguration>
> <contentOutlineConfiguration
>
> class=" org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOu tlineConfiguration "
>
> target="org.eclipse.core.runtime.xml">
> </contentOutlineConfiguration>
> <propertySheetConfiguration
>
> class=" org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConf iguration "
>
> target="org.eclipse.wst.sse.contenttype.xml,
> org.eclipse.wst.html.core.htmlsource, org.eclipse.jst.jsp.core.jspsource">
> </propertySheetConfiguration>
> </extension>
>
> What shall I do to use this in my project? do I need to link it to my
> editor?
>
> Is there anything I can read to understand the use of this extension a
> bit better?
> Many thanks in advance.
> Kar

The editor loads the configurations according to a policy documented
at
http://eclipse.org/webtools/wst/components/sse/designs/Edito rConfiguration.html
and implemented in
org.eclipse.wst.sse.ui.internal.provisional.extensions.Confi gurationPointCalculator
.. One thing is to avoid is declaring a contribution for a target
that already has one since the result is indeterminate. We've
already set up the content types we define ourselves plus XML. Your
example does this for both the outline and properties views.

If the name returned from your EomStorageXMLObj is associated to a
content type that is a subtype of XML (org.eclipse.core.runtime.xml)
or XML itself, you shouldn't have to do any of this since the
contributions for the XML content type will be picked up
automatically. This is when the target resolution policy comes in,
where if it didn't find a contribution for your own content type, it
will try the content type's base type. Only if you want to do
something different, in this case with your own editor, should you
need your own editor and content type. But even then, the
StructuredTextEditor will still load the configurations for XML if
you don't override them with another contribution for your own
content type.

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


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: help with editorConfiguration [message #232824 is a reply to message #232727] Tue, 23 June 2009 15:14 Go to previous messageGo to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi Nitin,

Probably I’m going to sound really stupid but I did get lost in what u said.

Just to recap a bit … my rcp application is based on the old version of
eclipse 3.3.2

What it does is to display in a tree files present in a db and it gives the
user the possibility to edit those files (objects) in different editors
(mainly extended from wtp) using the action …

(if file is of type jsp – extension)
--> page.openEditor(new EomStorage(obj, viewer),
"EomUtils.EomJspEditor");

I have not used any content type association … neither a document provider
.... till now ...
just an input storage and an editor which extends the structuredtexteditor.
----------------
public class EomStorage implements IStorageEditorInput, IEncodedStorage
----------------


now …

under eclipse 3.3.2 everything works fine … but everything has changed for
3.4.2 (wtp 3.0.5).

I can still open xml files but operation like format do not work any more.

Files with extension jsp are not opened any more for a missing model …(see
later stack trace)

Probably I have done something wrong in the first place even using the old
eclipse version … but I could not find any better documentation explaining
what to do …
Could u please point me in the right direction … I know I’m asking a lot.

Thanks a lot
Kar




java.lang.IllegalArgumentException: no corresponding model info found
at
org.eclipse.wst.sse.ui.internal.StorageModelProvider.createD ocument(StorageModelProvider.java:337)
at
org.eclipse.ui.editors.text.StorageDocumentProvider.createEl ementInfo(StorageDocumentProvider.java:260)
at
org.eclipse.wst.sse.ui.internal.StorageModelProvider.createE lementInfo(StorageModelProvider.java:441)
at
org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(A bstractDocumentProvider.java:398)
at
org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(Abst ractTextEditor.java:3991)
at
org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(Status TextEditor.java:190)
at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetI nput(AbstractDecoratedTextEditor.java:1325)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor .java:165)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(Struc turedTextEditor.java:1745)
at
org.eclipse.ui.texteditor.AbstractTextEditor$19.run(Abstract TextEditor.java:3026)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2487)
at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(Ab stractTextEditor.java:3044)
at
org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTe xtEditor.java:3071)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredT extEditor.java:2337)
at
com.eomutils.editors.EomStructuredTextEditor.init(EomStructu redTextEditor.java:22)



"Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
news:h1e40i$f40$1@build.eclipse.org...
> Kar wrote:
>> I recently moved to eclipse 3.4.2.
>>
>> In my previous RCP application I was extending StructuredTextViewer to
>> edit files located in a database.
>>
>> I do definitely need to extend this class to access the operation of
>> doSave/dispose (so I can check out/in files in the db during editing
>> operation).
>>
>> The point is since I moved in version 3.4 the format doesn't work anymore
>> and I have found articles saying to extend the
>> org.eclipse.wst.sse.ui.editorConfiguration.
>>
>> What I was doing before was:
>>
>> page.openEditor(new EomStorageXMLObj(obj, viewer),
>> "EomUtils.EomXmlEditor");
>>
>> where eomstoragexmlobj is my input storage and EomUtils.EomXmlEditor is
>> the ID of my editor which extends StructuredTextEditor.
>>
>>
>> The example speaks about creating an editor configuration (suppose the
>> file is of type HTML)
>> <extension
>> point="org.eclipse.wst.sse.ui.editorConfiguration">
>> <sourceViewerConfiguration
>>
>> class=" org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L "
>> target="EomUtils.EomHtmlEditor"> ***************** IS
>> CORRECT ??? ***************************
>> </sourceViewerConfiguration>
>> <contentOutlineConfiguration
>>
>> class=" org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOu tlineConfiguration "
>> target="org.eclipse.core.runtime.xml">
>> </contentOutlineConfiguration>
>> <propertySheetConfiguration
>>
>> class=" org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConf iguration "
>> target="org.eclipse.wst.sse.contenttype.xml,
>> org.eclipse.wst.html.core.htmlsource,
>> org.eclipse.jst.jsp.core.jspsource">
>> </propertySheetConfiguration>
>> </extension>
>>
>> What shall I do to use this in my project? do I need to link it to my
>> editor?
>>
>> Is there anything I can read to understand the use of this extension a
>> bit better?
>> Many thanks in advance.
>> Kar
>
> The editor loads the configurations according to a policy documented at
> http://eclipse.org/webtools/wst/components/sse/designs/Edito rConfiguration.html
> and implemented in
> org.eclipse.wst.sse.ui.internal.provisional.extensions.Confi gurationPointCalculator
> . One thing is to avoid is declaring a contribution for a target that
> already has one since the result is indeterminate. We've already set up
> the content types we define ourselves plus XML. Your example does this
> for both the outline and properties views.
>
> If the name returned from your EomStorageXMLObj is associated to a content
> type that is a subtype of XML (org.eclipse.core.runtime.xml) or XML
> itself, you shouldn't have to do any of this since the contributions for
> the XML content type will be picked up automatically. This is when the
> target resolution policy comes in, where if it didn't find a contribution
> for your own content type, it will try the content type's base type. Only
> if you want to do something different, in this case with your own editor,
> should you need your own editor and content type. But even then, the
> StructuredTextEditor will still load the configurations for XML if you
> don't override them with another contribution for your own content type.
>
> --
> ---
> Nitin Dahyabhai
> Eclipse WTP Source Editing
> IBM Rational
Re: help with editorConfiguration [message #232832 is a reply to message #232824] Tue, 23 June 2009 17:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

This tutorial should help:

http://www.eclipsecon.org/2009/sessions?id=371

Dave

Kar wrote:
> Hi Nitin,
>
> Probably I’m going to sound really stupid but I did get lost in what u
> said.
>
> Just to recap a bit … my rcp application is based on the old version of
> eclipse 3.3.2
>
> What it does is to display in a tree files present in a db and it gives
> the user the possibility to edit those files (objects) in different
> editors (mainly extended from wtp) using the action …
>
> (if file is of type jsp – extension)
> --> page.openEditor(new EomStorage(obj, viewer),
> "EomUtils.EomJspEditor");
>
> I have not used any content type association … neither a document
> provider ... till now ...
> just an input storage and an editor which extends the structuredtexteditor.
> ----------------
> public class EomStorage implements IStorageEditorInput, IEncodedStorage
> ----------------
>
>
> now …
>
> under eclipse 3.3.2 everything works fine … but everything has changed
> for 3.4.2 (wtp 3.0.5).
>
> I can still open xml files but operation like format do not work any more.
>
> Files with extension jsp are not opened any more for a missing model
> …(see later stack trace)
>
> Probably I have done something wrong in the first place even using the
> old eclipse version … but I could not find any better documentation
> explaining what to do …
> Could u please point me in the right direction … I know I’m asking a lot.
>
> Thanks a lot
> Kar
>
>
>
>
> java.lang.IllegalArgumentException: no corresponding model info found
> at
> org.eclipse.wst.sse.ui.internal.StorageModelProvider.createD ocument(StorageModelProvider.java:337)
>
> at
> org.eclipse.ui.editors.text.StorageDocumentProvider.createEl ementInfo(StorageDocumentProvider.java:260)
>
> at
> org.eclipse.wst.sse.ui.internal.StorageModelProvider.createE lementInfo(StorageModelProvider.java:441)
>
> at
> org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(A bstractDocumentProvider.java:398)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(Abst ractTextEditor.java:3991)
>
> at
> org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(Status TextEditor.java:190)
>
> at
> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetI nput(AbstractDecoratedTextEditor.java:1325)
>
> at
> org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor .java:165)
> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(Struc turedTextEditor.java:1745)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor$19.run(Abstract TextEditor.java:3026)
>
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
>
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
> at
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
> at
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2487)
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(Ab stractTextEditor.java:3044)
>
> at
> org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTe xtEditor.java:3071)
>
> at
> org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredT extEditor.java:2337)
>
> at
> com.eomutils.editors.EomStructuredTextEditor.init(EomStructu redTextEditor.java:22)
>
>
>
>
> "Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
> news:h1e40i$f40$1@build.eclipse.org...
>> Kar wrote:
>>> I recently moved to eclipse 3.4.2.
>>>
>>> In my previous RCP application I was extending StructuredTextViewer
>>> to edit files located in a database.
>>>
>>> I do definitely need to extend this class to access the operation of
>>> doSave/dispose (so I can check out/in files in the db during editing
>>> operation).
>>>
>>> The point is since I moved in version 3.4 the format doesn't work
>>> anymore and I have found articles saying to extend the
>>> org.eclipse.wst.sse.ui.editorConfiguration.
>>>
>>> What I was doing before was:
>>>
>>> page.openEditor(new EomStorageXMLObj(obj, viewer),
>>> "EomUtils.EomXmlEditor");
>>>
>>> where eomstoragexmlobj is my input storage and EomUtils.EomXmlEditor
>>> is the ID of my editor which extends StructuredTextEditor.
>>>
>>>
>>> The example speaks about creating an editor configuration (suppose
>>> the file is of type HTML)
>>> <extension
>>> point="org.eclipse.wst.sse.ui.editorConfiguration">
>>> <sourceViewerConfiguration
>>>
>>> class=" org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L "
>>> target="EomUtils.EomHtmlEditor"> ***************** IS
>>> CORRECT ??? ***************************
>>> </sourceViewerConfiguration>
>>> <contentOutlineConfiguration
>>>
>>> class=" org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOu tlineConfiguration "
>>> target="org.eclipse.core.runtime.xml">
>>> </contentOutlineConfiguration>
>>> <propertySheetConfiguration
>>>
>>> class=" org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConf iguration "
>>> target="org.eclipse.wst.sse.contenttype.xml,
>>> org.eclipse.wst.html.core.htmlsource,
>>> org.eclipse.jst.jsp.core.jspsource">
>>> </propertySheetConfiguration>
>>> </extension>
>>>
>>> What shall I do to use this in my project? do I need to link it to my
>>> editor?
>>>
>>> Is there anything I can read to understand the use of this extension
>>> a bit better?
>>> Many thanks in advance.
>>> Kar
>>
>> The editor loads the configurations according to a policy documented
>> at
>> http://eclipse.org/webtools/wst/components/sse/designs/Edito rConfiguration.html
>> and implemented in
>> org.eclipse.wst.sse.ui.internal.provisional.extensions.Confi gurationPointCalculator
>> . One thing is to avoid is declaring a contribution for a target that
>> already has one since the result is indeterminate. We've already set
>> up the content types we define ourselves plus XML. Your example does
>> this for both the outline and properties views.
>>
>> If the name returned from your EomStorageXMLObj is associated to a
>> content type that is a subtype of XML (org.eclipse.core.runtime.xml)
>> or XML itself, you shouldn't have to do any of this since the
>> contributions for the XML content type will be picked up
>> automatically. This is when the target resolution policy comes in,
>> where if it didn't find a contribution for your own content type, it
>> will try the content type's base type. Only if you want to do
>> something different, in this case with your own editor, should you
>> need your own editor and content type. But even then, the
>> StructuredTextEditor will still load the configurations for XML if you
>> don't override them with another contribution for your own content type.
>>
>> --
>> ---
>> Nitin Dahyabhai
>> Eclipse WTP Source Editing
>> IBM Rational
>
Re: help with editorConfiguration [message #232866 is a reply to message #232832] Wed, 24 June 2009 12:40 Go to previous messageGo to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
really thanks for ur help
ciaooo


"David Carver" <dcarver@starstandard.org> wrote in message
news:4A411248.2000504@starstandard.org...
> This tutorial should help:
>
> http://www.eclipsecon.org/2009/sessions?id=371
>
> Dave
>
> Kar wrote:
>> Hi Nitin,
>>
>> Probably I’m going to sound really stupid but I did get lost in what u
>> said.
>>
>> Just to recap a bit … my rcp application is based on the old version of
>> eclipse 3.3.2
>>
>> What it does is to display in a tree files present in a db and it gives
>> the user the possibility to edit those files (objects) in different
>> editors (mainly extended from wtp) using the action …
>>
>> (if file is of type jsp – extension)
>> --> page.openEditor(new EomStorage(obj, viewer),
>> "EomUtils.EomJspEditor");
>>
>> I have not used any content type association … neither a document
>> provider ... till now ...
>> just an input storage and an editor which extends the
>> structuredtexteditor.
>> ----------------
>> public class EomStorage implements IStorageEditorInput, IEncodedStorage
>> ----------------
>>
>>
>> now …
>>
>> under eclipse 3.3.2 everything works fine … but everything has changed
>> for 3.4.2 (wtp 3.0.5).
>>
>> I can still open xml files but operation like format do not work any
>> more.
>>
>> Files with extension jsp are not opened any more for a missing
>> model …(see later stack trace)
>>
>> Probably I have done something wrong in the first place even using the
>> old eclipse version … but I could not find any better documentation
>> explaining what to do …
>> Could u please point me in the right direction … I know I’m asking a lot.
>>
>> Thanks a lot
>> Kar
>>
>>
>>
>>
>> java.lang.IllegalArgumentException: no corresponding model info found
>> at
>> org.eclipse.wst.sse.ui.internal.StorageModelProvider.createD ocument(StorageModelProvider.java:337)
>> at
>> org.eclipse.ui.editors.text.StorageDocumentProvider.createEl ementInfo(StorageDocumentProvider.java:260)
>> at
>> org.eclipse.wst.sse.ui.internal.StorageModelProvider.createE lementInfo(StorageModelProvider.java:441)
>> at
>> org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(A bstractDocumentProvider.java:398)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(Abst ractTextEditor.java:3991)
>> at
>> org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(Status TextEditor.java:190)
>> at
>> org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetI nput(AbstractDecoratedTextEditor.java:1325)
>> at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor .java:165)
>> at
>> org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(Struc turedTextEditor.java:1745)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor$19.run(Abstract TextEditor.java:3026)
>> at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
>> at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
>> at
>> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
>> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
>> at
>> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2487)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(Ab stractTextEditor.java:3044)
>> at
>> org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTe xtEditor.java:3071)
>> at
>> org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredT extEditor.java:2337)
>> at
>> com.eomutils.editors.EomStructuredTextEditor.init(EomStructu redTextEditor.java:22)
>> "Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
>> news:h1e40i$f40$1@build.eclipse.org...
>>> Kar wrote:
>>>> I recently moved to eclipse 3.4.2.
>>>>
>>>> In my previous RCP application I was extending StructuredTextViewer to
>>>> edit files located in a database.
>>>>
>>>> I do definitely need to extend this class to access the operation of
>>>> doSave/dispose (so I can check out/in files in the db during editing
>>>> operation).
>>>>
>>>> The point is since I moved in version 3.4 the format doesn't work
>>>> anymore and I have found articles saying to extend the
>>>> org.eclipse.wst.sse.ui.editorConfiguration.
>>>>
>>>> What I was doing before was:
>>>>
>>>> page.openEditor(new EomStorageXMLObj(obj, viewer),
>>>> "EomUtils.EomXmlEditor");
>>>>
>>>> where eomstoragexmlobj is my input storage and EomUtils.EomXmlEditor is
>>>> the ID of my editor which extends StructuredTextEditor.
>>>>
>>>>
>>>> The example speaks about creating an editor configuration (suppose the
>>>> file is of type HTML)
>>>> <extension
>>>> point="org.eclipse.wst.sse.ui.editorConfiguration">
>>>> <sourceViewerConfiguration
>>>>
>>>> class=" org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTM L "
>>>> target="EomUtils.EomHtmlEditor"> ***************** IS
>>>> CORRECT ??? ***************************
>>>> </sourceViewerConfiguration>
>>>> <contentOutlineConfiguration
>>>>
>>>> class=" org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOu tlineConfiguration "
>>>> target="org.eclipse.core.runtime.xml">
>>>> </contentOutlineConfiguration>
>>>> <propertySheetConfiguration
>>>>
>>>> class="org.eclipse.wst.
Re: help with editorConfiguration AND MODEL ... [message #233129 is a reply to message #232832] Tue, 30 June 2009 12:28 Go to previous messageGo to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi guys,
One more question …
I did the add the content type to my editors and looks now that things are
working better …
I have got one more problem …

I do open my extended structured text editor and pass it the editor input
from where I get the content file …

The problem is that in my collection of files one of them has got a wrong
encoding …
Opening the editor I get the exception: NO CORRESPONDING MODEL INFO FOUND …
(I’m sure I have done again something wrong in the way I have extended my
editor …).

Questions are :
What is the right way to solve this problem ?

But MORE important …

If a run my rcp application under eclipse 3.3.1 (web standard tools – v
1.0.2) I get the same error but still the rcp application works fine when I
try to open a new editor.

If I do run this under the new Galileo eclipse release I do get the same
exception (see stack trace below) but this time if I try to open a different
file the new whole ide freeze (I have got the feeling that this time some
resource stays locked … probably from the previous wrong operation). I did
paste the stack trace of the locked thread.

Does anyone can tell me what I have done wrong with the model? And what to
do from locking the entire rcp?
Thanks again
Kar

-------


java.lang.IllegalArgumentException: no corresponding model info found
at
org.eclipse.wst.sse.ui.internal.StorageModelProvider.createD ocument(StorageModelProvider.java:343)
at
org.eclipse.ui.editors.text.StorageDocumentProvider.createEl ementInfo(StorageDocumentProvider.java:261)
at
org.eclipse.wst.sse.ui.internal.StorageModelProvider.createE lementInfo(StorageModelProvider.java:447)
at
org.eclipse.ui.texteditor.AbstractDocumentProvider.connect(A bstractDocumentProvider.java:398)
at
org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(Abst ractTextEditor.java:4134)
at
org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(Status TextEditor.java:203)
at
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetI nput(AbstractDecoratedTextEditor.java:1413)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor .java:166)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(Struc turedTextEditor.java:1712)
at
org.eclipse.ui.texteditor.AbstractTextEditor$19.run(Abstract TextEditor.java:3115)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:372)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2578)
at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(Ab stractTextEditor.java:3133)
at
org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTe xtEditor.java:3160)
at
org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredT extEditor.java:2321)
at
com.eidosmedia.eomutils.editors.EomStructuredTextEditor.init (EomStructuredTextEditor.java:27)






Thread [main] (Suspended) Object.wait(long)
line: not available [native method] ModelManagerImpl$SharedObject(Object).wait()
line: 485 ModelManagerImpl$SharedObject.waitForLoadAttempt()
line: 129 ModelManagerImpl.getExistingModel(Object)
line: 1085 ModelManagerImpl.getExistingModelForRead(IDocument)
line: 1200 StructuredRegionProcessor.getContentType(IDocument)
line: 178 StructuredRegionProcessor(DocumentRegionProcessor).getValida torStrategy()
line: 137 StructuredRegionProcessor(DocumentRegionProcessor).setDocume nt(IDocument)
line: 206 StructuredRegionProcessor.setDocument(IDocument)
line: 246 StructuredTextViewer.configure(SourceViewerConfiguration)
line: 204 EomStructuredTextEditor(AbstractTextEditor).createPartContro l(Composite)
line: 3322 EomStructuredTextEditor(StatusTextEditor).createPartControl( Composite)
line: 53 EomStructuredTextEditor(AbstractDecoratedTextEditor).createP artControl(Composite)
line: 427 EomStructuredTextEditor(StructuredTextEditor).createPartCont rol(Composite)
line: 1334 EditorReference.createPartHelper()
line: 662 EditorReference.createPart()
line: 462 EditorReference(WorkbenchPartReference).getPart(boolean)
line: 595 EditorPane(PartPane).setVisible(boolean)
line: 313 PresentablePart.setVisible(boolean)
line: 180 PresentablePartFolder.select(IPresentablePart)
line: 270 LeftToRightTabOrder.select(IPresentablePart)
line: 65 TabbedStackPresentation.selectPart(IPresentablePart)
line: 473 EditorStack(PartStack).refreshPresentationSelection()
line: 1256 EditorStack(PartStack).setSelection(LayoutPart)
line: 1209 EditorStack(PartStack).showPart(LayoutPart,
Object) line: 1608 EditorStack(PartStack).add(LayoutPart,
Object) line: 499 EditorStack.add(LayoutPart,
Object) line: 103 EditorStack(PartStack).add(LayoutPart)
line: 485 EditorStack.add(LayoutPart)
line: 112 EditorSashContainer.addEditor(EditorPane,
EditorStack) line: 63 EditorAreaHelper.addToLayout(EditorPane,
EditorStack) line: 225 EditorAreaHelper.addEditor(EditorReference,
String, boolean) line: 213 EditorManager.createEditorTab(EditorReference,
String) line: 778 EditorManager.openEditorFromDescriptor(EditorDescriptor,
IEditorInput, IMemento) line: 677 EditorManager.openEditor(String,
IEditorInput, boolean, IMemento) line: 638 WorkbenchPage.busyOpenEditorBatched(IEditorInput,
String, boolean, int, IMemento) line: 2854 WorkbenchPage.busyOpenEditor(IEditorInput,
String, boolean, int, IMemento) line: 2762 WorkbenchPage.access$11(WorkbenchPage,
IEditorInput, String, boolean, int, IMemento) line: 2754 WorkbenchPage$10.run()
line: 2705 BusyIndicator.showWhile(Display,
Runnable) line: 70 WorkbenchPage.openEditor(IEditorInput,
String, boolean, int, IMemento) line: 2701 WorkbenchPage.openEditor(IEditorInput,
String, boolean, int) line: 2685 WorkbenchPage.openEditor(IEditorInput,
String) line: 2668 EomDBView$13.run()
line: 1196 EomDBView$15.doubleClick(DoubleClickEvent)
line: 1395 StructuredViewer$1.run()
line: 821 SafeRunner.run(ISafeRunnable)
line: 42 Platform.run(ISafeRunnable)
line: 888 JFaceUtil$1.run(ISafeRunnable)
line: 48 SafeRunnable.run(ISafeRunnable)
line: 175 TreeViewer(StructuredViewer).fireDoubleClick(DoubleClickEven t)
line: 819 TreeViewer(AbstractTreeViewer).handleDoubleSelect(SelectionE vent)
line: 1419 StructuredViewer$4.widgetDefaultSelected(SelectionEvent)
line: 1195 OpenStrategy.fireDefaultSelectionEvent(SelectionEvent)
line: 238 OpenStrategy.access$0(OpenStrategy,
SelectionEvent) line: 235 OpenStrategy$1.handleEvent(Event)
line: 296 EventTable.sendEvent(Event)
line: 84 Tree(Widget).sendEvent(Event)
line: 1003 Display.runDeferredEvents()
line: 3880 Display.readAndDispatch()
line: 3473 Workbench.runEventLoop(Window$IExceptionHandler,
Display) line: 2405 Workbench.runUI()
line: 2369 Workbench.access$4(Workbench)
line: 2221 Workbench$5.run()
line: 500 Realm.runWithDefault(Realm,
Runnable) line: 332 Workbench.createAndRunWorkbench(Display,
WorkbenchAdvisor) line: 493 PlatformUI.createAndRunWorkbench(Display,
WorkbenchAdvisor) line: 149 Application.start(IApplicationContext)
line: 86 EclipseAppHandle.run(Object)
line: 194 EclipseAppLauncher.runApplication(Object)
line: 110 EclipseAppLauncher.start(Object)
line: 79 EclipseStarter.run(Object)
line: 368 EclipseStarter.run(String[],
Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method,
Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object,
Object[]) line: not available DelegatingMethodAccessorImpl.invoke(Object,
Object[]) line: not available Method.invoke(Object,
Object...) line: not available Main.invokeFramework(String[],
URL[]) line: 559 Main.basicRun(String[])
line: 514 Main.run(String[])
line: 1311 Main.main(String[])
line: 1287
Re: help with editorConfiguration AND MODEL ... [message #233185 is a reply to message #233129] Wed, 01 July 2009 21:35 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2342
Registered: July 2009
Senior Member
Kar wrote:
> Hi guys,
> One more question …
> I did the add the content type to my editors and looks now that things
> are working better …
> I have got one more problem …
>
> I do open my extended structured text editor and pass it the editor
> input from where I get the content file …
>
> The problem is that in my collection of files one of them has got a
> wrong encoding …
> Opening the editor I get the exception: NO CORRESPONDING MODEL INFO
> FOUND … (I’m sure I have done again something wrong in the way I have
> extended my editor …).
>
> Questions are :
> What is the right way to solve this problem ?

Fixing the encoding? Seriously, the handling of that scenario in
the StorageModelProvider could be improved. An RFE to look into it
would be appreciated.

> But MORE important …
>
> If a run my rcp application under eclipse 3.3.1 (web standard tools – v
> 1.0.2) I get the same error but still the rcp application works fine
> when I try to open a new editor.
>
> If I do run this under the new Galileo eclipse release I do get the same
> exception (see stack trace below) but this time if I try to open a
> different file the new whole ide freeze (I have got the feeling that
> this time some resource stays locked … probably from the previous wrong
> operation). I did paste the stack trace of the locked thread.
>
> Does anyone can tell me what I have done wrong with the model? And what
> to do from locking the entire rcp?

Unfortunately that's a bug that still has to be sorted out. The
more granular locking done in the model manager within recent
releases has a few spots where the loaded state is only set on the
successful exit of a critical section. A fault in the critical
section prevents the wait indicator from clearing, and any attempts
to get the model afterward lead to a lock like this. I don't have a
workaround for you right now, apart from fixing that encoding, but
your case is just more severe than usual because it's not a file
being opened--that route has a few chances to fail before getting to
the point of working with the wait indicator.

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


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: help with editorConfiguration AND MODEL ... [message #233201 is a reply to message #233185] Thu, 02 July 2009 08:57 Go to previous message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Thanks guy for your help
Kar


"Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
news:h2gkr4$pkm$1@build.eclipse.org...
> Kar wrote:
>> Hi guys,
>> One more question …
>> I did the add the content type to my editors and looks now that things
>> are working better …
>> I have got one more problem …
>>
>> I do open my extended structured text editor and pass it the editor input
>> from where I get the content file …
>>
>> The problem is that in my collection of files one of them has got a wrong
>> encoding …
>> Opening the editor I get the exception: NO CORRESPONDING MODEL INFO
>> FOUND … (I’m sure I have done again something wrong in the way I have
>> extended my editor …).
>>
>> Questions are :
>> What is the right way to solve this problem ?
>
> Fixing the encoding? Seriously, the handling of that scenario in the
> StorageModelProvider could be improved. An RFE to look into it would be
> appreciated.
>
>> But MORE important …
>>
>> If a run my rcp application under eclipse 3.3.1 (web standard tools – v
>> 1.0.2) I get the same error but still the rcp application works fine when
>> I try to open a new editor.
>>
>> If I do run this under the new Galileo eclipse release I do get the same
>> exception (see stack trace below) but this time if I try to open a
>> different file the new whole ide freeze (I have got the feeling that this
>> time some resource stays locked … probably from the previous wrong
>> operation). I did paste the stack trace of the locked thread.
>>
>> Does anyone can tell me what I have done wrong with the model? And what
>> to do from locking the entire rcp?
>
> Unfortunately that's a bug that still has to be sorted out. The more
> granular locking done in the model manager within recent releases has a
> few spots where the loaded state is only set on the successful exit of a
> critical section. A fault in the critical section prevents the wait
> indicator from clearing, and any attempts to get the model afterward lead
> to a lock like this. I don't have a workaround for you right now, apart
> from fixing that encoding, but your case is just more severe than usual
> because it's not a file being opened--that route has a few chances to fail
> before getting to the point of working with the wait indicator.
>
> --
> ---
> Nitin Dahyabhai
> Eclipse WTP Source Editing
> IBM Rational
Previous Topic:Java projects automatically converted to WTP projects
Next Topic:can't install from update site
Goto Forum:
  


Current Time: Sat Dec 20 16:36:36 GMT 2014

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

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