Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » programmatic creation of dynamic filters in Remote System view
programmatic creation of dynamic filters in Remote System view [message #22184] Wed, 23 April 2008 04:31 Go to next message
vrush Mising nameFriend
Messages: 51
Registered: July 2009
Location: Pune
Member
Hi,

I am developing a plugin by extending RSE eclipse plugin. I am trying to
set filters in Remote System's View dynamically.
I have a directory/file path to which i will be setting a filter.
The path is fetched dynamically.
I am trying to achieve


1 - Set the selection in Remote System's View as per path.
Problems

- If I try to expand the tree programmatically, only those nodes
gets expanded which has at least expanded once manually(even if
they are in collapsed state, they can be expanded programmatically).

- It is not quite possible that every time user will traverse till
the location (Not even expected).

- Even if user is traversing till the location, I am getting the
final tree node but can not set the focus on it for some strange reason
like even if though I have got the final node by traversing the tree top
to bottom, it shows parent node of final node as null.

- So thought of another option of implementing dynamic filter
programmatically.

2 - Set the filter like My Home as per the path

- Here I am fetching the path for filter dynamically.

- But stuck at the moment since I am not aware of which extension to
use, etc.


Please direct with some help document, links, etc.
Also suggest if there exist any other approach or solution to my problem.
Thanks in advance.




-Vrushali.
Re: programmatic creation of dynamic filters in Remote System view [message #22304 is a reply to message #22184] Wed, 23 April 2008 09:27 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
Hello Vrushali,

1. For expanding nodes in the remote systems view and setting
a selection: We have an open bug for this,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=176461
which requests API to perform exactly that by means of
an event.

While this has not yet been implemented, you can look at
how existing code does it, in
SystemSelectRemoteFileOrFolderForm#setPreSelection()
or as part of the "Link with Editor" action that was
introduced with the fix for bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=187711
LinkWithSystemViewAction.run()

2. Dynamic Filter Creation
I do not understand your question. Perhaps it helps to look
at all the implementations of
SubSystemConfiguration#createDefaultFilterPool()
that's the hook method where custom subsystems are expected
to create their default filters.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
> Hi,
>
> I am developing a plugin by extending RSE eclipse plugin. I am trying to
> set filters in Remote System's View dynamically.
> I have a directory/file path to which i will be setting a filter.
> The path is fetched dynamically.
> I am trying to achieve
>
> 1 - Set the selection in Remote System's View as per path.
> Problems
>
> - If I try to expand the tree programmatically, only those nodes
> gets expanded which has at least expanded once manually(even if
> they are in collapsed state, they can be expanded programmatically).
> - It is not quite possible that every time user will traverse
> till the location (Not even expected).
>
> - Even if user is traversing till the location, I am getting the
> final tree node but can not set the focus on it for some strange reason
> like even if though I have got the final node by traversing the tree top
> to bottom, it shows parent node of final node as null.
> - So thought of another option of implementing dynamic filter
> programmatically.
>
> 2 - Set the filter like My Home as per the path
> - Here I am fetching the path for filter dynamically.
> - But stuck at the moment since I am not aware of which
> extension to use, etc.
>
>
> Please direct with some help document, links, etc.
> Also suggest if there exist any other approach or solution to my problem.
> Thanks in advance.
>
>
>
>
> -Vrushali.
>
>
Re: programmatic creation of dynamic filters in Remote System view [message #22333 is a reply to message #22304] Wed, 23 April 2008 11:15 Go to previous messageGo to next message
vrush Mising nameFriend
Messages: 51
Registered: July 2009
Location: Pune
Member
Hi Martin,

Thanks for immidiate reply. I was really stuck on few problems
and needed some direction. I will check on those suggestions and try
implementing and see how things will work out.

Between i want to implement filters in RSE's Remote System View like the
way you have My Home and Root as default in Remote System View.
I am looking for a programmatic way to implement some other filters like
My Workspace where i shall fetch the absolute path for filter dynamically
and implement the filter.

Please provide with some directions. I am stuck big time. Thanks in
advance.


Thanks,
Vrushali.
Re: programmatic creation of dynamic filters in Remote System view [message #22432 is a reply to message #22333] Wed, 23 April 2008 19:10 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
For such dynamic filters, you'll probably need to do two things:

1.) Override SubSystemConfiguration#createDefaultFilterPool()
to have your filter created. The filter will be defined
as some filter String that's "special" and different than
the normal file filters, e.g. ". ; /dynamic:Workspace"

2.) Extend FileServiceSubSystem, overriding the
internalResoveFilterString() method in a way that honors
your new dynamic filter string and resolves it dynamically.

3.) Your custom subclass of FileServiceSubSystemConfiguration
needs to instantiate your custom subclass of
FileSerivceSubSystem.

Dave's do you agree with this approach? Should we probably put
it into our Programming Guide somewhere? It could be a "Plugging
in Filters" chapter below the "Plugging into the RSE" section.

Tobias: you've been doing something similar before, do you agree?

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
>
> Hi Martin,
>
> Thanks for immidiate reply. I was really stuck on few problems
> and needed some direction. I will check on those suggestions and try
> implementing and see how things will work out.
>
> Between i want to implement filters in RSE's Remote System View like the
> way you have My Home and Root as default in Remote System View.
> I am looking for a programmatic way to implement some other filters like
> My Workspace where i shall fetch the absolute path for filter
> dynamically and implement the filter.
>
> Please provide with some directions. I am stuck big time. Thanks in
> advance.
>
>
> Thanks,
> Vrushali.
>
Re: programmatic creation of dynamic filters in Remote System view [message #22564 is a reply to message #22432] Thu, 24 April 2008 11:34 Go to previous messageGo to next message
vrush Mising nameFriend
Messages: 51
Registered: July 2009
Location: Pune
Member
Hi Martin,

You have suggested the two things to implement the dynamic filter.

1 - overriding createDefaultFilterPool method by extending
SubSystemConfiguration.

- I am through with this step and implemented the method.
- Created a SystemFilterPool.
- Also specified the filter string.

Problems

- Though the filter is getting created, it is not shown in the view.
- It is only going through the Local(default) connection and not
through any other connection.


2 - Overriding internalResolveFilterString method by extending SubSystem.

- This is where i have coded for my dynamic filter.BUT
I have few doubts about this step.

- when and how the Subclass which extends SubSystem is going to get
instantiated and by which class?
- Since this is not an extension point, how am i suppose to
instantiate this class?



Thanks,
Vrushali.
Re: programmatic creation of dynamic filters in Remote System view [message #22736 is a reply to message #22564] Mon, 05 May 2008 16:32 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
Hello,

> - Though the filter is getting created, it is not shown in the view.
> - It is only going through the Local(default) connection and not
> through any other connection.

I don't understand the question. Of course your default filter will
only be valid in YOUR SubSystemConfiguration. And you need to create
a new connection with your subsystemconfiguration in order to have
the default filter created.

> - when and how the Subclass which extends SubSystem is going to get
> instantiated and by which class?

SubSystemConfiguration#createSubSystemInternal(IHost)


Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
>
> Hi Martin,
>
> You have suggested the two things to implement the dynamic filter.
>
> 1 - overriding createDefaultFilterPool method by extending
> SubSystemConfiguration.
>
> - I am through with this step and implemented the method.
> - Created a SystemFilterPool.
> - Also specified the filter string.
>
> Problems
> - Though the filter is getting created, it is not shown in the view.
> - It is only going through the Local(default) connection and not
> through any other connection.
>
>
> 2 - Overriding internalResolveFilterString method by extending SubSystem.
>
> - This is where i have coded for my dynamic filter.BUT
> I have few doubts about this step.
>
> - when and how the Subclass which extends SubSystem is going to get
> instantiated and by which class?
> - Since this is not an extension point, how am i suppose to
> instantiate this class?
>
>
>
> Thanks,
> Vrushali.
>
Re: programmatic creation of dynamic filters in Remote System view [message #574303 is a reply to message #22184] Wed, 23 April 2008 09:27 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
Hello Vrushali,

1. For expanding nodes in the remote systems view and setting
a selection: We have an open bug for this,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=176461
which requests API to perform exactly that by means of
an event.

While this has not yet been implemented, you can look at
how existing code does it, in
SystemSelectRemoteFileOrFolderForm#setPreSelection()
or as part of the "Link with Editor" action that was
introduced with the fix for bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=187711
LinkWithSystemViewAction.run()

2. Dynamic Filter Creation
I do not understand your question. Perhaps it helps to look
at all the implementations of
SubSystemConfiguration#createDefaultFilterPool()
that's the hook method where custom subsystems are expected
to create their default filters.

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
> Hi,
>
> I am developing a plugin by extending RSE eclipse plugin. I am trying to
> set filters in Remote System's View dynamically.
> I have a directory/file path to which i will be setting a filter.
> The path is fetched dynamically.
> I am trying to achieve
>
> 1 - Set the selection in Remote System's View as per path.
> Problems
>
> - If I try to expand the tree programmatically, only those nodes
> gets expanded which has at least expanded once manually(even if
> they are in collapsed state, they can be expanded programmatically).
> - It is not quite possible that every time user will traverse
> till the location (Not even expected).
>
> - Even if user is traversing till the location, I am getting the
> final tree node but can not set the focus on it for some strange reason
> like even if though I have got the final node by traversing the tree top
> to bottom, it shows parent node of final node as null.
> - So thought of another option of implementing dynamic filter
> programmatically.
>
> 2 - Set the filter like My Home as per the path
> - Here I am fetching the path for filter dynamically.
> - But stuck at the moment since I am not aware of which
> extension to use, etc.
>
>
> Please direct with some help document, links, etc.
> Also suggest if there exist any other approach or solution to my problem.
> Thanks in advance.
>
>
>
>
> -Vrushali.
>
>
Re: programmatic creation of dynamic filters in Remote System view [message #574323 is a reply to message #22304] Wed, 23 April 2008 11:15 Go to previous message
vrush Mising nameFriend
Messages: 51
Registered: July 2009
Location: Pune
Member
Hi Martin,

Thanks for immidiate reply. I was really stuck on few problems
and needed some direction. I will check on those suggestions and try
implementing and see how things will work out.

Between i want to implement filters in RSE's Remote System View like the
way you have My Home and Root as default in Remote System View.
I am looking for a programmatic way to implement some other filters like
My Workspace where i shall fetch the absolute path for filter dynamically
and implement the filter.

Please provide with some directions. I am stuck big time. Thanks in
advance.


Thanks,
Vrushali.
Re: programmatic creation of dynamic filters in Remote System view [message #574354 is a reply to message #22333] Wed, 23 April 2008 19:10 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
For such dynamic filters, you'll probably need to do two things:

1.) Override SubSystemConfiguration#createDefaultFilterPool()
to have your filter created. The filter will be defined
as some filter String that's "special" and different than
the normal file filters, e.g. ". ; /dynamic:Workspace"

2.) Extend FileServiceSubSystem, overriding the
internalResoveFilterString() method in a way that honors
your new dynamic filter string and resolves it dynamically.

3.) Your custom subclass of FileServiceSubSystemConfiguration
needs to instantiate your custom subclass of
FileSerivceSubSystem.

Dave's do you agree with this approach? Should we probably put
it into our Programming Guide somewhere? It could be a "Plugging
in Filters" chapter below the "Plugging into the RSE" section.

Tobias: you've been doing something similar before, do you agree?

Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
>
> Hi Martin,
>
> Thanks for immidiate reply. I was really stuck on few problems
> and needed some direction. I will check on those suggestions and try
> implementing and see how things will work out.
>
> Between i want to implement filters in RSE's Remote System View like the
> way you have My Home and Root as default in Remote System View.
> I am looking for a programmatic way to implement some other filters like
> My Workspace where i shall fetch the absolute path for filter
> dynamically and implement the filter.
>
> Please provide with some directions. I am stuck big time. Thanks in
> advance.
>
>
> Thanks,
> Vrushali.
>
Re: programmatic creation of dynamic filters in Remote System view [message #574428 is a reply to message #22432] Thu, 24 April 2008 11:34 Go to previous message
vrush Mising nameFriend
Messages: 51
Registered: July 2009
Location: Pune
Member
Hi Martin,

You have suggested the two things to implement the dynamic filter.

1 - overriding createDefaultFilterPool method by extending
SubSystemConfiguration.

- I am through with this step and implemented the method.
- Created a SystemFilterPool.
- Also specified the filter string.

Problems

- Though the filter is getting created, it is not shown in the view.
- It is only going through the Local(default) connection and not
through any other connection.


2 - Overriding internalResolveFilterString method by extending SubSystem.

- This is where i have coded for my dynamic filter.BUT
I have few doubts about this step.

- when and how the Subclass which extends SubSystem is going to get
instantiated and by which class?
- Since this is not an extension point, how am i suppose to
instantiate this class?



Thanks,
Vrushali.
Re: programmatic creation of dynamic filters in Remote System view [message #574570 is a reply to message #22564] Mon, 05 May 2008 16:32 Go to previous message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 1007
Registered: July 2009
Senior Member
Hello,

> - Though the filter is getting created, it is not shown in the view.
> - It is only going through the Local(default) connection and not
> through any other connection.

I don't understand the question. Of course your default filter will
only be valid in YOUR SubSystemConfiguration. And you need to create
a new connection with your subsystemconfiguration in order to have
the default filter created.

> - when and how the Subclass which extends SubSystem is going to get
> instantiated and by which class?

SubSystemConfiguration#createSubSystemInternal(IHost)


Cheers,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Vrush wrote:
>
> Hi Martin,
>
> You have suggested the two things to implement the dynamic filter.
>
> 1 - overriding createDefaultFilterPool method by extending
> SubSystemConfiguration.
>
> - I am through with this step and implemented the method.
> - Created a SystemFilterPool.
> - Also specified the filter string.
>
> Problems
> - Though the filter is getting created, it is not shown in the view.
> - It is only going through the Local(default) connection and not
> through any other connection.
>
>
> 2 - Overriding internalResolveFilterString method by extending SubSystem.
>
> - This is where i have coded for my dynamic filter.BUT
> I have few doubts about this step.
>
> - when and how the Subclass which extends SubSystem is going to get
> instantiated and by which class?
> - Since this is not an extension point, how am i suppose to
> instantiate this class?
>
>
>
> Thanks,
> Vrushali.
>
Previous Topic:Re: rse; dstore connector service; using port 0 error
Next Topic:Re: rse; dstore connector service; using port 0 error
Goto Forum:
  


Current Time: Thu Mar 28 14:34:49 GMT 2024

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

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

Back to the top