Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Help w/ Accessing Java Browsing Elements(Plug-in development)
Help w/ Accessing Java Browsing Elements [message #675563] Tue, 31 May 2011 16:55 Go to next message
NecArn  is currently offline NecArn
Messages: 4
Registered: May 2011
Junior Member
Hello,

For a plug-in, I need to access the views "package, types and members" of the java browsing editor. However, using the import statements such as: "import org.eclipse.jdt.internal.ui.browsing.MembersView;" cause a "discouraged access" warning. I do not know if the functionality is subsequently limited. I have searched all over the internet for a way to access these views correctly but I was not able to locate the right way of doing this. Is anybody aware of this information?

Thank you for your help.

P.S.: Additionally could anyone help me locate the code for the functionality of: Java Browsing Editor > Members View > [Down Arrow] > Visible Categories?

What I would like to do is similar to this functionality and I am not able to locate the plugin that performs this action.

[Updated on: Tue, 31 May 2011 16:59]

Report message to a moderator

Re: Help w/ Accessing Java Browsing Elements [message #675679 is a reply to message #675563] Wed, 01 June 2011 03:41 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 31.05.2011 22:55, NecArn wrote:
> Hello,
>
> For a plug-in, I need to access the views "package, types and members"
> of the java browsing editor.
What do you mean by "access"? What exactly do you want to do with them?

Dani
> However, using the import statements such as: "import
> org.eclipse.jdt.internal.ui.browsing.MembersView;" cause a
> "discouraged access" warning. I do not know if the functionality is
> subsequently limited. I have searched all over the internet for a way
> to access these views correctly but I was not able to locate the right
> way of doing this. Is anybody aware of this information?
>
> Thank you for your help.
Re: Help w/ Accessing Java Browsing Elements [message #675786 is a reply to message #675679] Wed, 01 June 2011 09:52 Go to previous messageGo to next message
NecArn  is currently offline NecArn
Messages: 4
Registered: May 2011
Junior Member
Thanks for your reply. I need to filter the elements shown in them according to a selection performed on my particular view. That is why I need the information stored in those views and be able to sort according to selections.

Additionally, is it possible to obtain the information regarding the code of the "visible categories" functionality I described above? If I can take a look at the code for this functionality I might be able to infer which direction I should take.

Thanks again..
Re: Help w/ Accessing Java Browsing Elements [message #675826 is a reply to message #675786] Wed, 01 June 2011 10:37 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 01.06.2011 15:52, NecArn wrote:
> Thanks for your reply. I need to filter the elements shown in them
> according to a selection performed on my particular view. That is why
> I need the information stored in those views and be able to sort
> according to selections.
Do you only need to filter or rather set the input? If you only want to
filter you could provide a filter via extension point. The JDT views
don't offer much API beyond the general view API. What's special with
the browsing views is that they use the current selection to set the input.

Dani
>
> Additionally, is it possible to obtain the information regarding the
> code of the "visible categories" functionality I described above? If I
> can take a look at the code for this functionality I might be able to
> infer which direction I should take.
>
> Thanks again..
Re: Help w/ Accessing Java Browsing Elements [message #675897 is a reply to message #675826] Wed, 01 June 2011 16:40 Go to previous messageGo to next message
NecArn  is currently offline NecArn
Messages: 4
Registered: May 2011
Junior Member
I would like to display certain elements in the views according to the selections performed on my own view. For example in the members view I would like to display only 1 method out of a total of 3. Yet, I am not able to figure out what API I should use.. The problem is that the members view input is reset to null when I perform a selection on my own view. How am I supposed to obtain the information of the members within a class for example? I was thinking of using filters to determine which elements should be displayed but that is not working.
Re: Help w/ Accessing Java Browsing Elements [message #675959 is a reply to message #675897] Thu, 02 June 2011 02:54 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 01.06.2011 22:40, NecArn wrote:
> I would like to display certain elements in the views according to the
> selections performed on my own view. For example in the members view I
> would like to display only 1 method out of a total of 3. Yet, I am not
> able to figure out what API I should use.. The problem is that the
> members view input is reset to null when I perform a selection on my
> own view. How am I supposed to obtain the information of the members
> within a class for example?
There is no way to set the input. The view decides what to set as input
depending on the selection. For example, if your view provides an
ICompilationUnit or IType as selection, then the Members view will
itself based on that.

Dani
> I was thinking of using filters to determine which elements should be
> displayed but that is not working.
Re: Help w/ Accessing Java Browsing Elements [message #676258 is a reply to message #675959] Fri, 03 June 2011 08:44 Go to previous message
NecArn  is currently offline NecArn
Messages: 4
Registered: May 2011
Junior Member
Thanks a lot for your help, Dani.
Previous Topic:How do you access Eclipse Documentation outside the c:\eclipse\plugins directory
Next Topic:Creating an executable icon
Goto Forum:
  


Current Time: Fri Aug 29 16:32:42 EDT 2014

Powered by FUDForum. Page generated in 0.02987 seconds