Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [problemsView]why not to try to adapt EditorInput in ITaskListResourceAdapter
[problemsView]why not to try to adapt EditorInput in ITaskListResourceAdapter [message #336132] Mon, 25 May 2009 10:46 Go to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,

I configure the problems view with a scope on "on selected element".
I have an editor based on GMF.
This editor works on 2 Files, one which contains the graphical
information and an other which contains the semantic information.

The problem is that when I select my editor the problem view is empty.
Why ? because, my EditorInput (org.eclipse.emf.common.ui.URIEditorInput)
is adaptable in a File. unfortunately my markers are on the semantic
file, and the "adaptation" return the graphic file.


So it could be nice, if the problem view try to adapt the EditorInput in
ITaskListResourceAdapter, so in a case like this one, It could be
possible to fix the problem by the addition of an adapter on the
platform (AdapterManager)

What do you think about that ?


------------------------------------------------------------ ----------
@see in org.eclipse.ui.internal.views.markers.ExtendedMarkersView, line
976:
if (part instanceof IEditorPart) {
IEditorPart editor = (IEditorPart) part;
IFile file = ResourceUtil.getFile(editor.getEditorInput());
if (file == null) {
IEditorInput editorInput = editor.getEditorInput();
if (editorInput != null) {
Object mapping = editorInput
.getAdapter(ResourceMapping.class);
if (mapping != null) {
selectedElements.add(mapping);
}
}
------------------------------------------------------------ ----------
Re: [problemsView]why not to try to adapt EditorInput in ITaskListResourceAdapter [message #336196 is a reply to message #336132] Thu, 28 May 2009 16:16 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
I open a bug :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278247

I will propose a patch for this bug which will fix this bug too :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=277646

Simon Bernard a écrit :
> Hi,
>
> I configure the problems view with a scope on "on selected element".
> I have an editor based on GMF.
> This editor works on 2 Files, one which contains the graphical
> information and an other which contains the semantic information.
>
> The problem is that when I select my editor the problem view is empty.
> Why ? because, my EditorInput (org.eclipse.emf.common.ui.URIEditorInput)
> is adaptable in a File. unfortunately my markers are on the semantic
> file, and the "adaptation" return the graphic file.
>
>
> So it could be nice, if the problem view try to adapt the EditorInput in
> ITaskListResourceAdapter, so in a case like this one, It could be
> possible to fix the problem by the addition of an adapter on the
> platform (AdapterManager)
>
> What do you think about that ?
>
>
> ------------------------------------------------------------ ----------
> @see in org.eclipse.ui.internal.views.markers.ExtendedMarkersView, line
> 976:
> if (part instanceof IEditorPart) {
> IEditorPart editor = (IEditorPart) part;
> IFile file = ResourceUtil.getFile(editor.getEditorInput());
> if (file == null) {
> IEditorInput editorInput = editor.getEditorInput();
> if (editorInput != null) {
> Object mapping = editorInput
> .getAdapter(ResourceMapping.class);
> if (mapping != null) {
> selectedElements.add(mapping);
> }
> }
> ------------------------------------------------------------ ----------
Previous Topic:command line and UI in same application
Next Topic:How to clear entries in New Project Wizards?
Goto Forum:
  


Current Time: Thu Apr 25 09:07:40 GMT 2024

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

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

Back to the top