New feed subscription titles
13 answers
zuk wrote:
Just call FeedManager.getDefault().getChannel(String url) to get the
feed for the given URL. It provides methods to access news items inside.
--
Benjamin Pasero
Work Item & UI Commons Team
hi,
how can i get all titles relative to added (by user) feed
subscription?
i have the need to fetch these and show in a view, added previously to
RTC 2.0 ui...
any hints?
Just call FeedManager.getDefault().getChannel(String url) to get the
feed for the given URL. It provides methods to access news items inside.
--
Benjamin Pasero
Work Item & UI Commons Team
Just call FeedManager.getDefault().getChannel(String url) to get the
feed for the given URL. It provides methods to access news items inside.
excuse me, i'm afraid there may be a misunderstanding...
i'm interesting to get all titles of the feed subscriptions added by users (the subscripions that are visible in Feed folder), not all the newsItem info...
zuk wrote:
com.ibm.team.feed.core.FeedManager.getChannels()
--
Benjamin Pasero
Work Item & UI Commons Team
Just call FeedManager.getDefault().getChannel(String url) to get
the
feed for the given URL. It provides methods to access news items
inside.
excuse me, i'm afraid there may be a misunderstanding...
i'm interesting to get all titles of the feed subscriptions added by
users (the subscripions that are visible in Feed folder), not all the
newsItem info...
com.ibm.team.feed.core.FeedManager.getChannels()
--
Benjamin Pasero
Work Item & UI Commons Team
Benjamin Pasero wrote:
And to find out if they are added by the user you could check for the
category (channel.getCategory) matching
"com.ibm.team.feed.core.SystemFeed" which is our special ID for system
feeds (the one pointing to the repository). Note that some of these
could still be added manually by the user.
--
Benjamin Pasero
Work Item & UI Commons Team
zuk wrote:
Just call FeedManager.getDefault().getChannel(String url) to get
the
feed for the given URL. It provides methods to access news items
inside.
excuse me, i'm afraid there may be a misunderstanding...
i'm interesting to get all titles of the feed subscriptions added by
users (the subscripions that are visible in Feed folder), not all the
newsItem info...
com.ibm.team.feed.core.FeedManager.getChannels()
And to find out if they are added by the user you could check for the
category (channel.getCategory) matching
"com.ibm.team.feed.core.SystemFeed" which is our special ID for system
feeds (the one pointing to the repository). Note that some of these
could still be added manually by the user.
--
Benjamin Pasero
Work Item & UI Commons Team
And to find out if they are added by the user you could check for the
category (channel.getCategory) matching
"com.ibm.team.feed.core.SystemFeed" which is our special ID for system
feeds (the one pointing to the repository). Note that some of these
could still be added manually by the user.
this is ok...
but now i have the need to get only the specific feed channel who is opened in that moment, to be more precise for which view is opened.
for example, if i have two subscriptions added by user, my application should react in different way depending on who channel (subscription) is opened;
so i would get the channel name when it is used in rtc.
how can i do this?
regards
enzo
zuk wrote:
You mean opened in the Timeline Editor? Hm, you can use the PlatformUI
facade to get the currently opened editors and then iterate over all
instances of com.ibm.team.feed.ui.internal.itemview.FeedItemView. When
you ask this class for its editor input, you will be able to find out
the feed or feeds that are displayed.
Hope that helps.
--
Benjamin Pasero
Work Item & UI Commons Team
And to find out if they are added by the user you could check for
the
category (channel.getCategory) matching
"com.ibm.team.feed.core.SystemFeed" which is our special
ID for system
feeds (the one pointing to the repository). Note that some of these
could still be added manually by the user.
this is ok...
but now i have the need to get only the specific feed channel who is
opened in that moment, to be more precise for which view is opened.
for example, if i have two subscriptions added by user, my application
should react in different way depending on who channel (subscription)
is opened;
so i would get the channel name when it is used in rtc.
how can i do this?
regards
enzo
You mean opened in the Timeline Editor? Hm, you can use the PlatformUI
facade to get the currently opened editors and then iterate over all
instances of com.ibm.team.feed.ui.internal.itemview.FeedItemView. When
you ask this class for its editor input, you will be able to find out
the feed or feeds that are displayed.
Hope that helps.
--
Benjamin Pasero
Work Item & UI Commons Team
zuk wrote:
Try something like
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.
--
Benjamin Pasero
Work Item & UI Commons Team
this is what i need!
where can i find an example for manage PlatformUI facade?
i don't know how use and initialize it...
thanks
enzo
Try something like
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.
--
Benjamin Pasero
Work Item & UI Commons Team
Try something like
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.
i have tried with
IEditorReference[] e=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
for (int i=0;i<e.length;i++){
System.out.println(e[i].getTitle());
}
but this return only one item, that is "news reader and events".
i'm not able to iterate over all instances of com.ibm.team.feed.ui.internal.itemview.FeedItemView...
i should try something like
Class c=PlatformUI.getWorkbench().getActiveWorkbenchWindow(). getActivePage().getClass().forName("com.ibm.team.feed.ui.internal.itemview.FeedItemView");
?
zuk wrote:
No you should not. If more than 1 Feedview is opened, then you will get
each of them using the API I mentioned earlier.
--
Benjamin Pasero
Work Item & UI Commons Team
Try something like
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences().
But take a look at the API for possible NULL values being returned.
i have tried with
IEditorReference[]
e=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
for (int i=0;i<e.length;i++){
System.out.println(e.getTitle());
}
but this return only one item, that is "news reader and
events".
i'm not able to iterate over all instances of
com.ibm.team.feed.ui.internal.itemview.FeedItemView...
i should try something like
Class
c=PlatformUI.getWorkbench().getActiveWorkbenchWindow(). getActivePage().getClass().forName("com.ibm.team.feed.ui.internal.itemview.FeedItemView");
?
No you should not. If more than 1 Feedview is opened, then you will get
each of them using the API I mentioned earlier.
--
Benjamin Pasero
Work Item & UI Commons Team
page 1of 1 pagesof 2 pages