Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Resource Marker to open custom editor with custom EditorInput
Resource Marker to open custom editor with custom EditorInput [message #331061] Fri, 22 August 2008 11:24 Go to next message
Eclipse UserFriend
Originally posted by: prashanto.chatterjee.gmail.com

Hi,
I have this scenario wherein I have created my own custom navigator using
CNF. The navigator hides the workspace resources and shows certain elements
that come from a set of files. Our compiler parses these files and creates
these elements. So what I show in the navigator is a tree that shows these
elements classified under categories.
I have created a custom EditorInput that takes my internal model for an
element and opens a custom editor.

Now, what I want is to create resource-markers on validation. Double-click
on the marker should open the corresponding editor and not try to open the
resource that is associated with the marker (Please note that a single file
can create many elements and each element opens in its own editor).

I have tried to search in every forum and one alternative seems to use the
eclipse EFS. However, my elements do not map to individual resources.
Instead they are fragments of one whole file.

Appreciate any help in this regard,
Prashanto Chatterjee
Re: Resource Marker to open custom editor with custom EditorInput [message #331062 is a reply to message #331061] Fri, 22 August 2008 12:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: prashanto.chatterjee.gmail.com

Another way of putting my problem - I need more control on the way markers
are dealt on double-click.

Regards,
Prashanto

"Prashanto Chatterjee" wrote in message
news:g8m7lb$66g$1@build.eclipse.org...
> Hi,
> I have this scenario wherein I have created my own custom navigator using
> CNF. The navigator hides the workspace resources and shows certain
> elements that come from a set of files. Our compiler parses these files
> and creates these elements. So what I show in the navigator is a tree that
> shows these elements classified under categories.
> I have created a custom EditorInput that takes my internal model for an
> element and opens a custom editor.
>
> Now, what I want is to create resource-markers on validation. Double-click
> on the marker should open the corresponding editor and not try to open the
> resource that is associated with the marker (Please note that a single
> file can create many elements and each element opens in its own editor).
>
> I have tried to search in every forum and one alternative seems to use the
> eclipse EFS. However, my elements do not map to individual resources.
> Instead they are fragments of one whole file.
>
> Appreciate any help in this regard,
> Prashanto Chatterjee
>
Re: Resource Marker to open custom editor with custom EditorInput [message #331089 is a reply to message #331062] Mon, 25 August 2008 05:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: prashanto.chatterjee.gmail.com

I have been thinking about this problem and it seems best to have my own
validation view. I base my judgement on following points:

1. I plan to provide editing capability at two levels. Firstly, individual
editors would allow editing individual components in form-based editor and
secondly, the entire file should be allowed to be edited in the text editor.
2. Therefore, it would be wise to have a resource marker on the offending
file. This would be visible in the Problems view and would open the complete
file in text-editor
3. My custom validation view would have a corresponding list but instead of
marker information, I can have the validation error info that would allow
editing the component in its corresponding form-based editor.

Kindly let me know if you think this is the best solution.

Regards,
Prashanto

"Prashanto Chatterjee" <prashanto.chatterjee@gmail.com> wrote in message
news:g8m9qf$sr7$1@build.eclipse.org...
> Another way of putting my problem - I need more control on the way markers
> are dealt on double-click.
>
> Regards,
> Prashanto
>
> "Prashanto Chatterjee" wrote in message
> news:g8m7lb$66g$1@build.eclipse.org...
>> Hi,
>> I have this scenario wherein I have created my own custom navigator using
>> CNF. The navigator hides the workspace resources and shows certain
>> elements that come from a set of files. Our compiler parses these files
>> and creates these elements. So what I show in the navigator is a tree
>> that shows these elements classified under categories.
>> I have created a custom EditorInput that takes my internal model for an
>> element and opens a custom editor.
>>
>> Now, what I want is to create resource-markers on validation.
>> Double-click on the marker should open the corresponding editor and not
>> try to open the resource that is associated with the marker (Please note
>> that a single file can create many elements and each element opens in its
>> own editor).
>>
>> I have tried to search in every forum and one alternative seems to use
>> the eclipse EFS. However, my elements do not map to individual resources.
>> Instead they are fragments of one whole file.
>>
>> Appreciate any help in this regard,
>> Prashanto Chatterjee
>>
>
>
Re: Resource Marker to open custom editor with custom EditorInput [message #331164 is a reply to message #331089] Wed, 27 August 2008 11:04 Go to previous message
Eclipse UserFriend
Originally posted by: kumar4.avaya.com

Hi,

Marker can return offset/line number values and using Editor functions you
can probably parse the line for your element type. Based on that you may
open it in it's own editor.

Also, to disable opening of the "resource" editor you may have to extend the
existing class and override few functions.

Let me know if this is of some help.

Regards,
Prasoon Kumar
Technical Architect | Event Processor, Avaya | Tower 11, 5 Floor ,
Cybercity, Pune 4110028 -India |
Voice: +91 20 4101 8119 | email: kumar4@avaya.com | mobile: +91 9922963102

"Prashanto Chatterjee" <prashanto.chatterjee@gmail.com> wrote in message
news:g8teof$6is$1@build.eclipse.org...
>I have been thinking about this problem and it seems best to have my own
>validation view. I base my judgement on following points:
>
> 1. I plan to provide editing capability at two levels. Firstly, individual
> editors would allow editing individual components in form-based editor and
> secondly, the entire file should be allowed to be edited in the text
> editor.
> 2. Therefore, it would be wise to have a resource marker on the offending
> file. This would be visible in the Problems view and would open the
> complete file in text-editor
> 3. My custom validation view would have a corresponding list but instead
> of marker information, I can have the validation error info that would
> allow editing the component in its corresponding form-based editor.
>
> Kindly let me know if you think this is the best solution.
>
> Regards,
> Prashanto
>
> "Prashanto Chatterjee" <prashanto.chatterjee@gmail.com> wrote in message
> news:g8m9qf$sr7$1@build.eclipse.org...
>> Another way of putting my problem - I need more control on the way
>> markers are dealt on double-click.
>>
>> Regards,
>> Prashanto
>>
>> "Prashanto Chatterjee" wrote in message
>> news:g8m7lb$66g$1@build.eclipse.org...
>>> Hi,
>>> I have this scenario wherein I have created my own custom navigator
>>> using CNF. The navigator hides the workspace resources and shows certain
>>> elements that come from a set of files. Our compiler parses these files
>>> and creates these elements. So what I show in the navigator is a tree
>>> that shows these elements classified under categories.
>>> I have created a custom EditorInput that takes my internal model for an
>>> element and opens a custom editor.
>>>
>>> Now, what I want is to create resource-markers on validation.
>>> Double-click on the marker should open the corresponding editor and not
>>> try to open the resource that is associated with the marker (Please note
>>> that a single file can create many elements and each element opens in
>>> its own editor).
>>>
>>> I have tried to search in every forum and one alternative seems to use
>>> the eclipse EFS. However, my elements do not map to individual
>>> resources. Instead they are fragments of one whole file.
>>>
>>> Appreciate any help in this regard,
>>> Prashanto Chatterjee
>>>
>>
>>
>
>
Previous Topic:Using Saxon 6.5 in Eclipse 3.4
Next Topic:Question on EFS (Eclipse File System) - EFS support on workspace projects
Goto Forum:
  


Current Time: Sat Dec 21 15:38:57 GMT 2024

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

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

Back to the top