View | Details | Raw Unified | Return to bug 165183 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java (+1 lines)
Lines 178-183 Link Here
178
	public static String HelpTemplate_tasks;
178
	public static String HelpTemplate_tasks;
179
	public static String HelpTemplate_reference;
179
	public static String HelpTemplate_reference;
180
	public static String HelpTemplate_samples;
180
	public static String HelpTemplate_samples;
181
	public static String HelpTemplate_index;
181
182
182
	public static String BuilderNewWizard_wtitle;
183
	public static String BuilderNewWizard_wtitle;
183
	public static String BuilderTemplate_title;
184
	public static String BuilderTemplate_title;
(-)src/org/eclipse/pde/internal/ui/templates/pderesources.properties (+1 lines)
Lines 153-158 Link Here
153
HelpTemplate_reference = Generate a '&Reference' category
153
HelpTemplate_reference = Generate a '&Reference' category
154
HelpTemplate_samples = Generate a '&Samples' category
154
HelpTemplate_samples = Generate a '&Samples' category
155
HelpTemplate_sampleText=Sample Table of Contents
155
HelpTemplate_sampleText=Sample Table of Contents
156
HelpTemplate_index = Generate an '&Index'
156
157
157
BuilderNewWizard_wtitle = New plug-in project with a sample project builder and nature
158
BuilderNewWizard_wtitle = New plug-in project with a sample project builder and nature
158
BuilderTemplate_title = Sample Project Builder and Nature
159
BuilderTemplate_title = Sample Project Builder and Nature
(-)src/org/eclipse/pde/internal/ui/templates/ide/HelpTemplate.java (+28 lines)
Lines 37-42 Link Here
37
	public static final String KEY_TASKS       = "tasks"; //$NON-NLS-1$
37
	public static final String KEY_TASKS       = "tasks"; //$NON-NLS-1$
38
	public static final String KEY_REFERENCE   = "reference"; //$NON-NLS-1$
38
	public static final String KEY_REFERENCE   = "reference"; //$NON-NLS-1$
39
	public static final String KEY_SAMPLES     = "samples"; //$NON-NLS-1$
39
	public static final String KEY_SAMPLES     = "samples"; //$NON-NLS-1$
40
	public static final String KEY_INDEX       = "index"; //$NON-NLS-1$
40
	
41
	
41
	private TemplateOption tocLabelOption;
42
	private TemplateOption tocLabelOption;
42
	private BooleanOption primaryOption;
43
	private BooleanOption primaryOption;
Lines 46-51 Link Here
46
	private BooleanOption tasksOption;
47
	private BooleanOption tasksOption;
47
	private BooleanOption referenceOption;
48
	private BooleanOption referenceOption;
48
	private BooleanOption samplesOption;
49
	private BooleanOption samplesOption;
50
	private BooleanOption indexOption;
49
	
51
	
50
	public HelpTemplate() {
52
	public HelpTemplate() {
51
		setPageCount(1);
53
		setPageCount(1);
Lines 68-73 Link Here
68
		tasksOption.setEnabled(primaryOption.isSelected());
70
		tasksOption.setEnabled(primaryOption.isSelected());
69
		referenceOption.setEnabled(primaryOption.isSelected());
71
		referenceOption.setEnabled(primaryOption.isSelected());
70
		samplesOption.setEnabled(primaryOption.isSelected());
72
		samplesOption.setEnabled(primaryOption.isSelected());
73
		indexOption.setEnabled(primaryOption.isSelected());
71
	}	
74
	}	
72
75
73
	private void createOptions() {
76
	private void createOptions() {
Lines 119-124 Link Here
119
			true,
122
			true,
120
			0);
123
			0);
121
124
125
		indexOption = (BooleanOption)addOption(
126
				KEY_INDEX,
127
				PDETemplateMessages.HelpTemplate_index,
128
				true,
129
				0);
130
122
	}
131
	}
123
	/**
132
	/**
124
	 * @see OptionTemplateSection#getSectionId()
133
	 * @see OptionTemplateSection#getSectionId()
Lines 172-177 Link Here
172
						&& !tasksOption.isSelected()
181
						&& !tasksOption.isSelected()
173
						&& !referenceOption.isSelected()
182
						&& !referenceOption.isSelected()
174
						&& !samplesOption.isSelected());
183
						&& !samplesOption.isSelected());
184
		} else if ( fileName.equals("index.xml")) { //$NON-NLS-1$
185
			isOk = indexOption.isEnabled() && indexOption.isSelected();
175
		}
186
		}
176
		return isOk;	
187
		return isOk;	
177
	}
188
	}
Lines 219-226 Link Here
219
		
230
		
220
		if (!extension.isInTheModel())
231
		if (!extension.isInTheModel())
221
			plugin.add(extension);
232
			plugin.add(extension);
233
		
234
		// Add the index?
235
		if( indexOption.isEnabled() && indexOption.isSelected() ) {
236
			
237
			final String indexExtPoint = "org.eclipse.help.index";
238
			extension = createExtension(indexExtPoint, true);
239
			
240
			IPluginElement indexElement = factory.createElement(extension);
241
			indexElement.setName("index"); //$NON-NLS-1$
242
			indexElement.setAttribute("file", "index.xml");
243
			extension.add(indexElement);
244
			
245
			if( !extension.isInTheModel() ) 
246
				plugin.add(extension);
247
			
248
		}
222
	}
249
	}
223
	
250
	
251
224
	private void addNonPrimaryTopic(BooleanOption option, String file, IPluginExtension extension) throws CoreException {
252
	private void addNonPrimaryTopic(BooleanOption option, String file, IPluginExtension extension) throws CoreException {
225
		if (option.isEnabled() && option.isSelected()) {
253
		if (option.isEnabled() && option.isSelected()) {
226
			IPluginElement tocElement = extension.getPluginModel().getPluginFactory().createElement(extension);
254
			IPluginElement tocElement = extension.getPluginModel().getPluginFactory().createElement(extension);
(-)templates_3.0/help/bin/index.xml (+19 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<index>
3
   <entry keyword="Main Topics">
4
	   <entry keyword="Concepts">
5
	      <topic href="html/concepts/maintopic.html"/>
6
	   </entry>
7
	   <entry keyword="Getting Started">
8
	      <topic href="html/gettingStarted/maintopic.html"/>
9
	   </entry>
10
   </entry>
11
   <entry keyword="Subtopics">
12
       <entry keyword="Subtopic 1">
13
          <topic href="html/tasks/subtopic.html"/>
14
       </entry>
15
       <entry keyword="Subtopic 2">
16
          <topic href="html/tasks/subtopic2.html"/>
17
       </entry>
18
   </entry>
19
</index>

Return to bug 165183