Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Filter help scope of information center
Filter help scope of information center [message #645800] Mon, 20 December 2010 15:59 Go to next message
Patrick is currently offline PatrickFriend
Messages: 55
Registered: July 2009
Member
Hello,

I'm trying to filter the help data displayed in an infocenter, as
described here:
http://help.eclipse.org/helios/topic/org.eclipse.platform.do c.isv/guide/ua_help_abstract_scope.htm
http://help.eclipse.org/helios/topic/org.eclipse.platform.do c.isv/reference/extension-points/org_eclipse_help_base_scope .html

But I can't find the extension point, whatever its name (the 2 docs give
different names...)

Any idea please?

--
Patrick
Re: Filter help scope of information center [message #645917 is a reply to message #645800] Tue, 21 December 2010 08:00 Go to previous messageGo to next message
Patrick is currently offline PatrickFriend
Messages: 55
Registered: July 2009
Member
Le 20/12/2010 16:59, Patrick a écrit :
>
> I'm trying to filter the help data displayed in an infocenter, as
> described here:
> http://help.eclipse.org/helios/topic/org.eclipse.platform.do c.isv/guide/ua_help_abstract_scope.htm
>
> http://help.eclipse.org/helios/topic/org.eclipse.platform.do c.isv/reference/extension-points/org_eclipse_help_base_scope .html
>
> But I can't find the extension point, whatever its name (the 2 docs give
> different names...)

After some search, I found that I missed a dependency to
org.eclipse.help.base (I had only org.eclipse.help). But the plugin.xml
must be edited by hand, because there is "No schema found for the
'org.eclipse.help.base.scope' extension point", I don't know why.

--
Patrick
Re: Filter help scope of information center [message #646259 is a reply to message #645917] Wed, 22 December 2010 22:41 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
The extension pojnt name is org.eclipse.help.base.scope. I'm not sure why the schema is not being found - I just tried this in Eclipse 3.6 and was able to create the extension in the plug-in manifest editor and the editor was aware of the schema.
Re: Filter help scope of information center [message #666282 is a reply to message #646259] Tue, 19 April 2011 17:56 Go to previous messageGo to next message
Joe Sarnelle is currently offline Joe SarnelleFriend
Messages: 2
Registered: April 2011
Junior Member
Crying or Very Sad Doc on this seems vague to me. Class missing from AbstractHelpScope description.

I'm trying to hide material in an InfoCenter using index.jsp?scope=ID.

Could someone post samples for a non-programmer?

In the plugin.xml I've tried:

<extension
point="org.eclipse.ua.tests.help.scope">
<scope
class="org.eclipse.help.base.scope.AbstractHelpScope">
</scope>
</extension>

and

<extension
point="org.eclipse..help.base.scope">
<scope
class="org.eclipse.help.base.scope.AbstractHelpScope">
</scope>
</extension>

In toc.xml I've tried:

<scope id="DM" class="AbstractHelpScope"/>

Would appreciate any help. No much useful (to me) info online.
Re: Filter help scope of information center [message #666833 is a reply to message #666282] Fri, 22 April 2011 21:42 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
This is an example of a scope that is in org.eclipse.ua.tests

<extension
point="org.eclipse.help.base.scope">
<scope
class="org.eclipse.ua.tests.help.scope.TScope"
id="tscope">
</scope>
</extension>

You can see this scope in action as follows:
1. Download the Eclipse SDK
2. Download the eclipse-Automated-Tests zip file from the same page that had a link to downlaod the SDK.
3. Unzip the automated tests
4.Inside the automated tests there is another zip file containing the eclipse-junit-tests, unzip it.
5. Copy org.eclipse.ua.tests*.jar fromthe plugins directory to the dropins directory of Eclipse.
6. Launch an infocenter in the usual way.

Open this URL ( replace with your own port number )
http://localhost:8081/help/index.jsp?scope=tscope

Note that only books and topics which contain a letter 't' are displayed.
Re: Filter help scope of information center [message #816243 is a reply to message #666833] Thu, 08 March 2012 15:44 Go to previous messageGo to next message
Joe Sarnelle is currently offline Joe SarnelleFriend
Messages: 2
Registered: April 2011
Junior Member
We were able to create a plugin (extending AbstractHelpScope) to filter the TOC and index tabs for an infocenter with multiple doc plugins. However, the search still goes across the entire system.

Any ideas on how to set a search scope programmatically? Once a search scope is set, it seems like it could be called like this:

index.jsp?scope=my_scope&workingSet=my_workingset

This is the code for our scope plugin:

package ibi.help.scope;

import java.util.Locale;

import org.eclipse.help.IIndexEntry;
import org.eclipse.help.IIndexSee;
import org.eclipse.help.IToc;
import org.eclipse.help.ITopic;
import org.eclipse.help.base.AbstractHelpScope;

public class MockScope extends AbstractHelpScope {

// Used for testing of scope based classes and utilities
// Elements are in scope if they contain the letter specified
// in the constructor

private String WFScopeIndex;
private boolean isHierarchical;

public MockScope(String WFScopeIndex, boolean isHierarchical) {
this.WFScopeIndex = WFScopeIndex;
this.isHierarchical = isHierarchical;
}

public boolean inScope(IToc toc) {
return testForInScope(toc.getLabel());
}

public boolean inScope(ITopic topic) {
//return testForInScope(topic.getLabel());
return true;
}

public boolean inScope(IIndexEntry entry) {
return testForInScope(entry.getKeyword());
}

public boolean inScope(IIndexSee see) {
return true;
}

public String getName(Locale locale) {
return null;
}

private boolean testForInScope(String label) {
return label.indexOf(WFScopeIndex) >= 0;
}

public boolean isHierarchicalScope() {
return isHierarchical;
}

}

Thanks.

Joe
Re: Filter help scope of information center [message #825420 is a reply to message #816243] Tue, 20 March 2012 20:36 Go to previous messageGo to next message
William P. Bischoff is currently offline William P. BischoffFriend
Messages: 1
Registered: July 2009
Junior Member
Does anyone have example code they can share to demonstrate this? I need to implement something similar, and am struggling with getting it working.
Re: Filter help scope of information center [message #987004 is a reply to message #825420] Thu, 22 November 2012 19:14 Go to previous message
Tim Raff is currently offline Tim RaffFriend
Messages: 9
Registered: November 2012
Junior Member
Yes I have an example of using AbstractHelpScope.

The TestScope.zip file contains a complete eclipse plugin project that implements a scope filter that just includes the "Basic tutorial" topic tree from the "Getting Started" top-level topic of the "Workbench User Guide" help plugin.

If you unzip TestScope.zip, and In eclipse choose File->Import...->Existing projects into workspace and choose the TestScope folder, you will see the new TestScope project in your workspace.

Open the plugin.xml file and click the green arrow to "Launch an eclipse application", then just select Help->Help Contents in the resulting test system, you will get all the standard eclipse help. If you append the scope parameter like this:
http: //127.0.0.1: <some-port>/help/index.jsp?scope=testscope


... then you will see just the "Basic tutorial" topic tree displayed.

The actual work is done in TestScope.java, and it logs to the console to show you what's going on.

Hope this helps

[Updated on: Thu, 22 November 2012 21:39]

Report message to a moderator

Previous Topic:contentProvider and JQuery in welcome page
Next Topic:creating a nested table of contents structure
Goto Forum:
  


Current Time: Mon Nov 11 19:57:05 GMT 2024

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

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

Back to the top