Skip to main content



      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 06:46 Go to next message
Eclipse UserFriend
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 12:16 Go to previous message
Eclipse UserFriend
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: Wed Mar 12 01:39:00 EDT 2025

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

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

Back to the top