| Basic question: view or editor [message #451282] |
Tue, 20 June 2006 08:06  |
Eclipse User |
|
|
|
Originally posted by: e.dominguez.ticino.com
Hi all,
I have a question. I'm trying to develop an application. Left side I
have my navigator. Right side my 'forms' or pages.
I.ex. in one of this pages i have 3 fields, some buttons, a file choser,
and a table.
What should i use as 'container' for this purpose? a View (i don't
think)? an editorPart? (but needs a File as parameter... why?) what else?
Thank you very much for a response...
kind regards
e. dominguez
|
|
|
| Re: Basic question: view or editor [message #451343 is a reply to message #451282] |
Tue, 20 June 2006 08:53   |
Eclipse User |
|
|
|
We have made use of ViewPart's for this... It depends.
As far as I've understood, the EditorPart does not require the the input
to be an actual file, it just requires that it should implement
IEditorInput. What exactly do you provide as an editor input, is really
up to your editor implementation.
The most obvious downside to having editor is that you can not stack
views and editors in the same tab folder. If you use views OTOH, you run
the risk of having your navigator all over the application window, when
user closes the last details window. You could avoid this probably by
disallowing closing of the "details view" or modifying the presentation
of the workbench.
E. Dominguez kirjutas mulle midagi seesugust:
> Hi all,
>
> I have a question. I'm trying to develop an application. Left side I
> have my navigator. Right side my 'forms' or pages.
> I.ex. in one of this pages i have 3 fields, some buttons, a file choser,
> and a table.
>
> What should i use as 'container' for this purpose? a View (i don't
> think)? an editorPart? (but needs a File as parameter... why?) what else?
>
> Thank you very much for a response...
>
> kind regards
>
> e. dominguez
--
Roland Tepp
|
|
|
| Re: Basic question: view or editor [message #451345 is a reply to message #451343] |
Tue, 20 June 2006 09:00   |
Eclipse User |
|
|
|
Originally posted by: e.dominguez.ticino.com
but what's the purpose of editors then?
i had this problem (navigator all over app win)... how to avoid it?
Has someone an example that shows usage of editors (how to open, and so on)?
Roland Tepp wrote:
> We have made use of ViewPart's for this... It depends.
> As far as I've understood, the EditorPart does not require the the input
> to be an actual file, it just requires that it should implement
> IEditorInput. What exactly do you provide as an editor input, is really
> up to your editor implementation.
>
> The most obvious downside to having editor is that you can not stack
> views and editors in the same tab folder. If you use views OTOH, you run
> the risk of having your navigator all over the application window, when
> user closes the last details window. You could avoid this probably by
> disallowing closing of the "details view" or modifying the presentation
> of the workbench.
>
> E. Dominguez kirjutas mulle midagi seesugust:
>> Hi all,
>>
>> I have a question. I'm trying to develop an application. Left side I
>> have my navigator. Right side my 'forms' or pages.
>> I.ex. in one of this pages i have 3 fields, some buttons, a file
>> choser, and a table.
>>
>> What should i use as 'container' for this purpose? a View (i don't
>> think)? an editorPart? (but needs a File as parameter... why?) what else?
>>
>> Thank you very much for a response...
>>
>> kind regards
>>
>> e. dominguez
>
|
|
|
| Re: Basic question: view or editor [message #451351 is a reply to message #451345] |
Tue, 20 June 2006 10:08   |
Eclipse User |
|
|
|
Think of editors as specialized views that have a lifecycle (saving,
etc...) to them and are displayed in a special area of the perspective.
This implies that editors cannot be stacked etc...
Regards
Stefan
E. Dominguez wrote:
> but what's the purpose of editors then?
> i had this problem (navigator all over app win)... how to avoid it?
>
> Has someone an example that shows usage of editors (how to open, and so
> on)?
>
> Roland Tepp wrote:
>> We have made use of ViewPart's for this... It depends.
>> As far as I've understood, the EditorPart does not require the the
>> input to be an actual file, it just requires that it should implement
>> IEditorInput. What exactly do you provide as an editor input, is
>> really up to your editor implementation.
>>
>> The most obvious downside to having editor is that you can not stack
>> views and editors in the same tab folder. If you use views OTOH, you
>> run the risk of having your navigator all over the application window,
>> when user closes the last details window. You could avoid this
>> probably by disallowing closing of the "details view" or modifying the
>> presentation of the workbench.
>>
>> E. Dominguez kirjutas mulle midagi seesugust:
>>> Hi all,
>>>
>>> I have a question. I'm trying to develop an application. Left side I
>>> have my navigator. Right side my 'forms' or pages.
>>> I.ex. in one of this pages i have 3 fields, some buttons, a file
>>> choser, and a table.
>>>
>>> What should i use as 'container' for this purpose? a View (i don't
>>> think)? an editorPart? (but needs a File as parameter... why?) what
>>> else?
>>>
>>> Thank you very much for a response...
>>>
>>> kind regards
>>>
>>> e. dominguez
>>
|
|
|
|
| Re: Basic question: view or editor [message #451359 is a reply to message #451358] |
Tue, 20 June 2006 11:45  |
Eclipse User |
|
|
|
If you have a resource (doesn't have to be a file) that is edited and
needs saving, cancel abilites I would suggest an editor. For all other
cases I would suggest a viewpart. Keep in mind that the viewpart can be
dragged around the workbench and be made into a quickview if desired.
See IEditorInput in the help to see what you have to implement. In the
extension point for your editor don't specify a file extension if you
are not using a file.
E. Dominguez wrote:
> so what do you suggest to use in my place?
|
|
|
Powered by
FUDForum. Page generated in 0.03956 seconds