Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 86275 Details for
Bug 165183
Add index content to Plug-in with sample help content
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch to add ability to create a help index
bug165183-patch.txt (text/plain), 5.46 KB, created by
Les Jones
on 2008-01-06 12:37:02 EST
(
hide
)
Description:
patch to add ability to create a help index
Filename:
MIME Type:
Creator:
Les Jones
Created:
2008-01-06 12:37:02 EST
Size:
5.46 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui.templates >Index: src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java,v >retrieving revision 1.5 >diff -u -r1.5 PDETemplateMessages.java >--- src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java 21 Jun 2007 14:38:43 -0000 1.5 >+++ src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java 6 Jan 2008 17:34:03 -0000 >@@ -178,6 +178,7 @@ > public static String HelpTemplate_tasks; > public static String HelpTemplate_reference; > public static String HelpTemplate_samples; >+ public static String HelpTemplate_index; > > public static String BuilderNewWizard_wtitle; > public static String BuilderTemplate_title; >Index: src/org/eclipse/pde/internal/ui/templates/pderesources.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/pderesources.properties,v >retrieving revision 1.6 >diff -u -r1.6 pderesources.properties >--- src/org/eclipse/pde/internal/ui/templates/pderesources.properties 21 Jun 2007 14:38:43 -0000 1.6 >+++ src/org/eclipse/pde/internal/ui/templates/pderesources.properties 6 Jan 2008 17:34:04 -0000 >@@ -153,6 +153,7 @@ > HelpTemplate_reference = Generate a '&Reference' category > HelpTemplate_samples = Generate a '&Samples' category > HelpTemplate_sampleText=Sample Table of Contents >+HelpTemplate_index = Generate an '&Index' > > BuilderNewWizard_wtitle = New plug-in project with a sample project builder and nature > BuilderTemplate_title = Sample Project Builder and Nature >Index: src/org/eclipse/pde/internal/ui/templates/ide/HelpTemplate.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/ide/HelpTemplate.java,v >retrieving revision 1.1 >diff -u -r1.1 HelpTemplate.java >--- src/org/eclipse/pde/internal/ui/templates/ide/HelpTemplate.java 12 Nov 2006 09:00:46 -0000 1.1 >+++ src/org/eclipse/pde/internal/ui/templates/ide/HelpTemplate.java 6 Jan 2008 17:34:04 -0000 >@@ -37,6 +37,7 @@ > public static final String KEY_TASKS = "tasks"; //$NON-NLS-1$ > public static final String KEY_REFERENCE = "reference"; //$NON-NLS-1$ > public static final String KEY_SAMPLES = "samples"; //$NON-NLS-1$ >+ public static final String KEY_INDEX = "index"; //$NON-NLS-1$ > > private TemplateOption tocLabelOption; > private BooleanOption primaryOption; >@@ -46,6 +47,7 @@ > private BooleanOption tasksOption; > private BooleanOption referenceOption; > private BooleanOption samplesOption; >+ private BooleanOption indexOption; > > public HelpTemplate() { > setPageCount(1); >@@ -68,6 +70,7 @@ > tasksOption.setEnabled(primaryOption.isSelected()); > referenceOption.setEnabled(primaryOption.isSelected()); > samplesOption.setEnabled(primaryOption.isSelected()); >+ indexOption.setEnabled(primaryOption.isSelected()); > } > > private void createOptions() { >@@ -119,6 +122,12 @@ > true, > 0); > >+ indexOption = (BooleanOption)addOption( >+ KEY_INDEX, >+ PDETemplateMessages.HelpTemplate_index, >+ true, >+ 0); >+ > } > /** > * @see OptionTemplateSection#getSectionId() >@@ -172,6 +181,8 @@ > && !tasksOption.isSelected() > && !referenceOption.isSelected() > && !samplesOption.isSelected()); >+ } else if ( fileName.equals("index.xml")) { //$NON-NLS-1$ >+ isOk = indexOption.isEnabled() && indexOption.isSelected(); > } > return isOk; > } >@@ -219,8 +230,25 @@ > > if (!extension.isInTheModel()) > plugin.add(extension); >+ >+ // Add the index? >+ if( indexOption.isEnabled() && indexOption.isSelected() ) { >+ >+ final String indexExtPoint = "org.eclipse.help.index"; >+ extension = createExtension(indexExtPoint, true); >+ >+ IPluginElement indexElement = factory.createElement(extension); >+ indexElement.setName("index"); //$NON-NLS-1$ >+ indexElement.setAttribute("file", "index.xml"); >+ extension.add(indexElement); >+ >+ if( !extension.isInTheModel() ) >+ plugin.add(extension); >+ >+ } > } > >+ > private void addNonPrimaryTopic(BooleanOption option, String file, IPluginExtension extension) throws CoreException { > if (option.isEnabled() && option.isSelected()) { > IPluginElement tocElement = extension.getPluginModel().getPluginFactory().createElement(extension); >Index: templates_3.0/help/bin/index.xml >=================================================================== >RCS file: templates_3.0/help/bin/index.xml >diff -N templates_3.0/help/bin/index.xml >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ templates_3.0/help/bin/index.xml 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,19 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<index> >+ <entry keyword="Main Topics"> >+ <entry keyword="Concepts"> >+ <topic href="html/concepts/maintopic.html"/> >+ </entry> >+ <entry keyword="Getting Started"> >+ <topic href="html/gettingStarted/maintopic.html"/> >+ </entry> >+ </entry> >+ <entry keyword="Subtopics"> >+ <entry keyword="Subtopic 1"> >+ <topic href="html/tasks/subtopic.html"/> >+ </entry> >+ <entry keyword="Subtopic 2"> >+ <topic href="html/tasks/subtopic2.html"/> >+ </entry> >+ </entry> >+</index>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165183
:
86275
|
86298
|
86299
|
86300
|
86322