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 (-1 / +33 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-75 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() {
74
		tocLabelOption = addOption(
77
		tocLabelOption = addOption(
75
			KEY_TOC_LABEL,
78
			KEY_TOC_LABEL,
Lines 119-124 Link Here
119
			true,
122
			true,
120
			0);
123
			0);
121
124
125
		// Although we'd like to only create the index option if the eclipse
126
		// target version is high enough, unfortunately, at this point the model
127
		// has not been set and so it's just not possible
128
		
129
		indexOption = (BooleanOption)addOption(
130
				KEY_INDEX,
131
				PDETemplateMessages.HelpTemplate_index,
132
				true,
133
				0);
122
	}
134
	}
123
	/**
135
	/**
124
	 * @see OptionTemplateSection#getSectionId()
136
	 * @see OptionTemplateSection#getSectionId()
Lines 172-177 Link Here
172
						&& !tasksOption.isSelected()
184
						&& !tasksOption.isSelected()
173
						&& !referenceOption.isSelected()
185
						&& !referenceOption.isSelected()
174
						&& !samplesOption.isSelected());
186
						&& !samplesOption.isSelected());
187
		} else if ( fileName.equals("index.xml")) { //$NON-NLS-1$
188
			isOk = (indexOption.isEnabled() && indexOption.isSelected());
175
		}
189
		}
176
		return isOk;	
190
		return isOk;	
177
	}
191
	}
Lines 219-226 Link Here
219
		
233
		
220
		if (!extension.isInTheModel())
234
		if (!extension.isInTheModel())
221
			plugin.add(extension);
235
			plugin.add(extension);
236
		
237
		// Add the index?
238
		if (indexOption != null && indexOption.isEnabled()
239
				&& indexOption.isSelected()) {
240
			
241
			final String indexExtPoint = "org.eclipse.help.index";
242
			extension = createExtension(indexExtPoint, true);
243
			
244
			IPluginElement indexElement = factory.createElement(extension);
245
			indexElement.setName("index"); //$NON-NLS-1$
246
			indexElement.setAttribute("file", "index.xml");
247
			extension.add(indexElement);
248
			
249
			if( !extension.isInTheModel() ) 
250
				plugin.add(extension);
251
			
252
		}
222
	}
253
	}
223
	
254
	
255
224
	private void addNonPrimaryTopic(BooleanOption option, String file, IPluginExtension extension) throws CoreException {
256
	private void addNonPrimaryTopic(BooleanOption option, String file, IPluginExtension extension) throws CoreException {
225
		if (option.isEnabled() && option.isSelected()) {
257
		if (option.isEnabled() && option.isSelected()) {
226
			IPluginElement tocElement = extension.getPluginModel().getPluginFactory().createElement(extension);
258
			IPluginElement tocElement = extension.getPluginModel().getPluginFactory().createElement(extension);
(-)templates_3.2/help/bin/html/concepts/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/tasks/subtopic2.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic 2</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic 2</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/toc.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Table of Contents</title>
7
</head>
8
9
<body>
10
<h1>Table of Contents</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/testToc.xml (+6 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Test TOC" topic="html/toc.html">
5
	<link toc="toc.xml" />
6
</toc>
(-)templates_3.2/help/bin/html/reference/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/index.xml (+72 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<index>
3
   <!-- Index entries for the main topics -->
4
   <entry keyword="Main Topics">
5
%if gettingStarted   
6
	   <entry keyword="Getting Started">
7
	      <topic href="html/gettingStarted/maintopic.html"/>
8
	   </entry>
9
%endif
10
%if concepts   
11
	   <entry keyword="Concepts">
12
	      <topic href="html/concepts/maintopic.html"/>
13
	   </entry>
14
%endif
15
%if tasks   
16
	   <entry keyword="Tasks">
17
	      <topic href="html/tasks/maintopic.html"/>
18
	   </entry>
19
%endif
20
%if reference   
21
	   <entry keyword="Reference">
22
	      <topic href="html/reference/maintopic.html"/>
23
	   </entry>
24
%endif
25
%if samples   
26
	   <entry keyword="Samples">
27
	      <topic href="html/samples/maintopic.html"/>
28
	   </entry>
29
%endif
30
%if gettingStarted || concepts || tasks || reference || samples 
31
%else
32
	   <entry keyword="Only Entry">
33
	      <topic href="html/maintopic.html"/>
34
	   </entry>
35
%endif
36
   </entry>
37
   
38
   <!-- Index entries for the subtopics -->
39
   <entry keyword="Subtopics">
40
%if gettingStarted   
41
	   <entry keyword="Getting Started">
42
	      <topic href="html/gettingStarted/subtopic.html"/>
43
	   </entry>
44
%endif
45
%if concepts   
46
	   <entry keyword="Concepts">
47
	      <topic href="html/concepts/subtopic.html"/>
48
	   </entry>
49
%endif
50
%if tasks   
51
	   <entry keyword="Tasks">
52
	      <topic href="html/tasks/subtopic.html"/>
53
	   </entry>
54
%endif
55
%if reference   
56
	   <entry keyword="Reference">
57
	      <topic href="html/reference/subtopic.html"/>
58
	   </entry>
59
%endif
60
%if samples   
61
	   <entry keyword="Samples">
62
	      <topic href="html/samples/subtopic.html"/>
63
	   </entry>
64
%endif
65
%if gettingStarted || concepts || tasks || reference || samples 
66
%else
67
	   <entry keyword="Only Entry">
68
	      <topic href="html/subtopic.html"/>
69
	   </entry>
70
%endif
71
   </entry>
72
</index>
(-)templates_3.2/help/bin/html/reference/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/tocgettingstarted.xml (+11 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Getting Started" link_to="toc.xml#gettingstarted"> 
5
	<topic label="Main Topic"  href="html/gettingstarted/maintopic.html"> 
6
		<topic label="Sub Topic" href="html/gettingstarted/subtopic.html" /> 
7
	</topic>
8
	<topic label="Main Topic 2">
9
		<topic label="Sub Topic 2" href="html/gettingstarted/subtopic2.html" />
10
	</topic> 
11
</toc>
(-)templates_3.2/help/bin/html/gettingstarted/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/tocconcepts.xml (+11 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Concepts" link_to="toc.xml#concepts"> 
5
	<topic label="Main Topic"  href="html/concepts/maintopic.html"> 
6
		<topic label="Sub Topic" href="html/concepts/subtopic.html" /> 
7
	</topic>
8
	<topic label="Main Topic 2">
9
		<topic label="Sub Topic 2" href="html/concepts/subtopic2.html" /> 
10
	</topic> 
11
</toc>
(-)templates_3.2/help/bin/html/tasks/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/tasks/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/toc.xml (+41 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
%if isPrimary
5
<toc label="$tocLabel$" topic="html/toc.html">
6
%else
7
<toc label="$tocLabel$">
8
%endif
9
%if isPrimary && gettingStarted
10
   <topic label="Getting Started">
11
      <anchor id="gettingstarted"/>
12
   </topic>
13
%endif
14
%if isPrimary && concepts
15
   <topic label="Concepts">
16
      <anchor id="concepts"/>
17
   </topic>
18
%endif
19
%if isPrimary && tasks
20
   <topic label="Tasks">
21
      <anchor id="tasks"/>
22
   </topic>
23
%endif
24
%if isPrimary && reference
25
   <topic label="Reference">
26
      <anchor id="reference"/>
27
   </topic>
28
%endif
29
%if isPrimary && samples
30
   <topic label="Samples">
31
      <anchor id="samples"/>
32
   </topic>
33
%endif
34
%if isPrimary && (gettingStarted || concepts || tasks || reference || samples) 
35
%else
36
	<topic label="Main Topic"  href="html/maintopic.html"> 
37
		<topic label="Sub Topic" href="html/subtopic.html"/> 
38
	</topic>
39
	<topic label="Main Topic 2"/>
40
%endif
41
</toc>
(-)templates_3.2/help/bin/html/gettingstarted/subtopic2.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic 2</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic 2</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/tocsamples.xml (+11 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Samples" link_to="toc.xml#samples"> 
5
	<topic label="Main Topic"  href="html/samples/maintopic.html"> 
6
		<topic label="Sub Topic" href="html/samples/subtopic.html" /> 
7
	</topic>
8
	<topic label="Main Topic 2">
9
		<topic label="Sub Topic 2" href="html/samples/subtopic2.html" /> 
10
	</topic> 
11
</toc>
(-)templates_3.2/help/bin/toctasks.xml (+11 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Tasks" link_to="toc.xml#tasks"> 
5
	<topic label="Main Topic"  href="html/tasks/maintopic.html"> 
6
		<topic label="Sub Topic" href="html/tasks/subtopic.html" /> 
7
	</topic>
8
	<topic label="Main Topic 2">
9
		<topic label="Sub Topic 2" href="html/tasks/subtopic2.html" /> 
10
	</topic> 
11
</toc>
(-)templates_3.2/help/bin/html/concepts/subtopic2.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic 2</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic 2</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/concepts/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/samples/subtopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/samples/subtopic2.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic 2</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic 2</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/reference/subtopic2.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Sub Topic 2</title>
7
</head>
8
9
<body>
10
<h1>Sub Topic 2</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/html/gettingstarted/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>
(-)templates_3.2/help/bin/tocreference.xml (+11 lines)
Added Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?NLS TYPE="org.eclipse.help.toc"?>
3
4
<toc label="Reference" link_to="toc.xml#reference"> 
5
	<topic label="Main Topic"  href="html/reference/maintopic.html"> 
6
		<topic label="Sub Topic" href="html/reference/subtopic.html" /> 
7
	</topic>
8
	<topic label="Main Topic 2">
9
		<topic label="Sub Topic 2" href="html/reference/subtopic2.html" /> 
10
	</topic> 
11
</toc>
(-)templates_3.2/help/bin/html/samples/maintopic.html (+13 lines)
Added Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3
<html>
4
<head>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
	<title>Main Topic</title>
7
</head>
8
9
<body>
10
<h1>Main Topic</h1>
11
Please enter your text here.
12
</body>
13
</html>

Return to bug 165183