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 213135 Details for
Bug 375229
[epub] Ant task contains duplicate code due to flawed rename
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to fix the issue
clipboard.txt (text/plain), 38.91 KB, created by
Torkild Resheim
on 2012-03-24 04:03:41 EDT
(
hide
)
Description:
Patch to fix the issue
Filename:
MIME Type:
Creator:
Torkild Resheim
Created:
2012-03-24 04:03:41 EDT
Size:
38.91 KB
patch
obsolete
>diff --git a/org.eclipse.mylyn.docs.epub.ant.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.docs.epub.ant.core/META-INF/MANIFEST.MF >index 090493c..b9f7f07 100644 >--- a/org.eclipse.mylyn.docs.epub.ant.core/META-INF/MANIFEST.MF >+++ b/org.eclipse.mylyn.docs.epub.ant.core/META-INF/MANIFEST.MF >@@ -5,8 +5,7 @@ > Bundle-Version: 0.8.0.qualifier > Bundle-Vendor: Torkild U. Resheim > Bundle-RequiredExecutionEnvironment: J2SE-1.5 >-Export-Package: org.eclipse.mylyn.docs.epub.ant;x-internal:=true, >- org.eclipse.mylyn.docs.epub.ant.core;x-internal:=true;uses:="org.eclipse.mylyn.docs.epub,org.apache.tools.ant.types,org.apache.tools.ant" >+Export-Package: org.eclipse.mylyn.docs.epub.ant.core;x-internal:=true;uses:="org.eclipse.mylyn.docs.epub,org.apache.tools.ant.types,org.apache.tools.ant" > Require-Bundle: org.apache.ant;bundle-version="1.8.2", > org.eclipse.ant.core;bundle-version="3.2.300", > org.eclipse.mylyn.docs.epub.core;bundle-version="0.8.0" >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ContributorType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ContributorType.java >deleted file mode 100644 >index 7ef66c4..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ContributorType.java >+++ /dev/null >@@ -1,66 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * >- * @author Torkild U. Resheim >- * @ant.type name="contributor" category="epub" >- */ >-public class ContributorType { >- >- String fileAs; >- >- String id; >- >- Locale lang; >- >- String name; >- >- String role; >- >- /** >- * @ant.not-required >- */ >- public void setFileAs(String fileAs) { >- this.fileAs = fileAs; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required the language code >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >- /** >- * @ant.required name of the contributor >- */ >- public void setName(String name) { >- this.name = name; >- } >- >- /** >- * @ant.not-required >- */ >- public void setRole(String role) { >- this.role = role; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverType.java >deleted file mode 100644 >index c11d390..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverType.java >+++ /dev/null >@@ -1,38 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * >- * @author Torkild U. Resheim >- * @ant.type name="cover" category="epub" >- */ >-public class CoverType { >- >- String image; >- >- String value; >- >- /** >- * @ant.required >- */ >- public void addText(String value) { >- this.value = value; >- } >- >- /** >- * @ant.required >- */ >- public void setImage(String image) { >- this.image = image; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverageType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverageType.java >deleted file mode 100644 >index 6f7a60d..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CoverageType.java >+++ /dev/null >@@ -1,48 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * >- * @author Torkild U. Resheim >- * @ant.type name="coverage" category="epub" >- */ >-public class CoverageType { >- >- String id; >- >- String text; >- >- Locale lang; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CreatorType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CreatorType.java >deleted file mode 100644 >index 836b189..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/CreatorType.java >+++ /dev/null >@@ -1,66 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * >- * @author Torkild U. Resheim >- * @ant.type name="creator" category="epub" >- */ >-public class CreatorType { >- >- String fileAs; >- >- String id; >- >- Locale lang; >- >- String name; >- >- String role; >- >- /** >- * @ant.not-required >- */ >- public void setFileAs(String fileAs) { >- this.fileAs = fileAs; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >- /** >- * @ant.required >- */ >- public void setName(String name) { >- this.name = name; >- } >- >- /** >- * @ant.not-required >- */ >- public void setRole(String role) { >- this.role = role; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/DateType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/DateType.java >deleted file mode 100644 >index 82aa034..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/DateType.java >+++ /dev/null >@@ -1,47 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * >- * @author Torkild U. Resheim >- * @ant.type name="date" category="epub" >- */ >-public class DateType { >- >- String date; >- >- String event; >- >- String id; >- >- /** >- * @ant.required >- */ >- public void setDate(String date) { >- this.date = date; >- } >- >- /** >- * @ant.not-required >- */ >- public void setEvent(String event) { >- this.event = event; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/EpubTask.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/EpubTask.java >deleted file mode 100644 >index edfecaa..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/EpubTask.java >+++ /dev/null >@@ -1,243 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.io.File; >-import java.util.ArrayList; >- >-import org.apache.tools.ant.BuildException; >-import org.apache.tools.ant.DirectoryScanner; >-import org.apache.tools.ant.Project; >-import org.apache.tools.ant.Task; >-import org.eclipse.mylyn.docs.epub.core.EPUB; >-import org.eclipse.mylyn.docs.epub.core.OPSPublication; >-import org.eclipse.mylyn.docs.epub.opf.Role; >-import org.eclipse.mylyn.docs.epub.opf.Type; >- >-/** >- * Assemble a new EPUB. >- * >- * >- * @author Torkild U. Resheim >- * @ant.task name="epub" category="epub" >- */ >-public class EpubTask extends Task { >- >- private final OPSPublication ops = OPSPublication.getVersion2Instance(); >- >- private final ArrayList<FileSetType> filesets; >- >- private TocType toc = null; >- >- private File workingFolder; >- >- private File epubFile; >- >- public EpubTask() { >- super(); >- filesets = new ArrayList<FileSetType>(); >- } >- >- public void addConfiguredContributor(ContributorType item) { >- if (item.role == null) { >- ops.addContributor(item.id, item.lang, item.name, null, item.fileAs); >- } else { >- ops.addContributor(item.id, item.lang, item.name, Role.get(item.role), item.fileAs); >- } >- } >- >- public void addConfiguredCover(CoverType item) { >- ops.setCover(new File(item.image), item.value); >- } >- >- public void addConfiguredCoverage(CoverageType coverage) { >- ops.addCoverage(coverage.id, coverage.lang, coverage.text); >- } >- >- public void addConfiguredCreator(CreatorType item) { >- if (item.role == null) { >- ops.addCreator(item.id, item.lang, item.name, null, item.fileAs); >- } else { >- ops.addCreator(item.id, item.lang, item.name, Role.get(item.role), item.fileAs); >- } >- } >- >- public void addConfiguredDate(DateType item) { >- ops.addDate(item.id, item.date, item.event); >- } >- >- /** >- * The FileSet sub-element is used to add EPUB artifacts that are not a part >- * of the main text. This can be graphical items and styling (CSS). >- * >- * @param fs >- * the fileset to add >- */ >- public void addConfiguredFileSet(FileSetType fs) { >- filesets.add(fs); >- } >- >- public void addConfiguredFormat(FormatType format) { >- ops.addFormat(format.id, format.text); >- } >- >- /** >- * @ant.required >- */ >- public void addConfiguredIdentifier(IdentifierType identifier) { >- ops.addIdentifier(identifier.id, identifier.scheme, identifier.value); >- } >- >- /** >- * @ant.required >- */ >- public void addConfiguredItem(ItemType item) { >- ops.addItem(item.id, item.lang, item.file, item.dest, item.type, item.spine, item.linear, item.noToc); >- } >- >- /** >- * @ant.required >- */ >- public void addConfiguredLanguage(LanguageType language) { >- ops.addLanguage(language.id, language.code); >- } >- >- public void addConfiguredMeta(MetaType item) { >- ops.addMeta(item.name, item.content); >- } >- >- public void addConfiguredPublisher(PublisherType publisher) { >- ops.addPublisher(publisher.id, publisher.lang, publisher.text); >- } >- >- public void addConfiguredReference(ReferenceType reference) { >- Type type = Type.get(reference.type); >- if (type == null) { >- throw new BuildException("Unknown reference type " + reference.type); >- } >- ops.addReference(reference.href, reference.title, type); >- } >- >- public void addConfiguredRelation(RelationType relation) { >- ops.addRelation(relation.id, relation.lang, relation.text); >- } >- >- public void addConfiguredRights(RightsType rights) { >- ops.addRights(rights.id, rights.lang, rights.text); >- } >- >- public void addConfiguredSource(SourceType source) { >- ops.addSource(source.id, source.lang, source.text); >- } >- >- public void addConfiguredSubject(SubjectType subject) { >- ops.addSubject(subject.id, subject.lang, subject.text); >- } >- >- /** >- * @ant.required >- */ >- public void addConfiguredTitle(TitleType title) { >- ops.addTitle(title.id, title.lang, title.text); >- } >- >- public void addConfiguredToc(TocType toc) { >- if (this.toc != null) { >- throw new BuildException("Only one table of contents (toc) declaration is allowed."); >- } >- this.toc = toc; >- } >- >- public void addConfiguredType(org.eclipse.mylyn.docs.epub.ant.TypeType type) { >- ops.addType(type.id, type.text); >- } >- >- private void addFilesets() { >- for (FileSetType fs : filesets) { >- if (fs.getProject() == null) { >- log("Deleting fileset with no project specified;" + " assuming executing project", Project.MSG_VERBOSE); >- fs = (FileSetType) fs.clone(); >- fs.setProject(getProject()); >- } >- final File fsDir = fs.getDir(); >- if (fsDir == null) { >- throw new BuildException("File or Resource without directory or file specified"); >- } else if (!fsDir.isDirectory()) { >- throw new BuildException("Directory does not exist:" + fsDir); >- } >- DirectoryScanner ds = fs.getDirectoryScanner(); >- String[] includedFiles = ds.getIncludedFiles(); >- for (int i = 0; i < includedFiles.length; i++) { >- String filename = includedFiles[i].replace('\\', '/'); >- filename = filename.substring(filename.lastIndexOf("/") + 1); >- File base = ds.getBasedir(); >- File found = new File(base, includedFiles[i]); >- ops.addItem(null, fs.lang, found, fs.dest, null, false, true, false); >- } >- >- } >- >- } >- >- @Override >- public void execute() throws BuildException { >- validate(); >- addFilesets(); >- if (toc != null) { >- if (toc.generate) { >- ops.setGenerateToc(true); >- } else if (toc.file != null) { >- ops.setTableOfContents(toc.file); >- } >- } >- try { >- EPUB epub = new EPUB(); >- epub.add(ops); >- if (workingFolder == null) { >- epub.pack(epubFile); >- } else { >- epub.pack(epubFile, workingFolder); >- } >- >- } catch (Exception e) { >- throw new BuildException(e); >- } >- } >- >- /** >- * @ant.not-required Automatically add referenced resources. >- */ >- public void setIncludeReferenced(boolean automatic) { >- ops.setIncludeReferencedResources(automatic); >- } >- >- /** >- * >- * >- * @param file >- * path to the generated EPUB file. >- */ >- public void setFile(File file) { >- this.epubFile = file; >- } >- >- public void setIdentifierId(String identifierId) { >- ops.setIdentifierId(identifierId); >- } >- >- public void setWorkingFolder(File workingFolder) { >- this.workingFolder = workingFolder; >- } >- >- private void validate() { >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FileSetType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FileSetType.java >deleted file mode 100644 >index 08c3d74..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FileSetType.java >+++ /dev/null >@@ -1,36 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="epubfileset" category="epub" >- */ >-public class FileSetType extends org.apache.tools.ant.types.FileSet { >- >- String dest; >- >- Locale lang; >- >- public FileSetType() { >- >- } >- >- public void setLocale(Locale lang) { >- this.lang = lang; >- } >- >- public void setDest(String dest) { >- this.dest = dest; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FormatType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FormatType.java >deleted file mode 100644 >index 04b5c6b..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/FormatType.java >+++ /dev/null >@@ -1,37 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="format" category="epub" >- */ >-public class FormatType { >- >- String id; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/IdentifierType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/IdentifierType.java >deleted file mode 100644 >index a5ab87e..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/IdentifierType.java >+++ /dev/null >@@ -1,46 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >- >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="identifier" category="epub" >- */ >-public class IdentifierType { >- >- String id; >- >- String scheme; >- >- String value; >- >- /** >- * @ant.required >- */ >- public void addText(String value) { >- this.value = value; >- } >- >- /** >- * @ant.required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.required >- */ >- public void setScheme(String scheme) { >- this.scheme = scheme; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ItemType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ItemType.java >deleted file mode 100644 >index 4b67c9c..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ItemType.java >+++ /dev/null >@@ -1,103 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.io.File; >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="item" category="epub" >- */ >-public class ItemType { >- >- String dest; >- >- File file; >- >- String id; >- >- Locale lang; >- >- /** Default is that items are in reading order */ >- public boolean linear = true; >- >- boolean noToc = false; >- >- String page; >- >- /** Default is to add the item to the spine */ >- boolean spine = true; >- >- String type; >- >- /** >- * @ant.not-required >- */ >- public void setDest(String dest) { >- this.dest = dest; >- } >- >- /** >- * A file on the local file system. >- * >- * @param file >- * @ant.required >- */ >- public void setFile(File file) { >- this.file = file; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >- public void setLinear(boolean linear) { >- this.linear = linear; >- } >- >- /** >- * @ant.not-required >- */ >- public void setNoToc(boolean toc) { >- this.noToc = toc; >- } >- >- /** >- * A page on the wiki. >- * >- * @param page >- */ >- public void setPage(String page) { >- this.page = page; >- } >- >- /** >- * @ant.not-required >- */ >- public void setSpine(boolean spine) { >- this.spine = spine; >- } >- >- /** >- * @ant.not-required >- */ >- public void setType(String type) { >- this.type = type; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/LanguageType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/LanguageType.java >deleted file mode 100644 >index dabd9d7..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/LanguageType.java >+++ /dev/null >@@ -1,32 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="language" category="epub" >- */ >-public class LanguageType { >- String code; >- >- String id; >- >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.required >- */ >- public void setCode(String code) { >- this.code = code; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/MetaType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/MetaType.java >deleted file mode 100644 >index 8d535a0..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/MetaType.java >+++ /dev/null >@@ -1,37 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="meta" category="epub" >- */ >-public class MetaType { >- >- String name; >- >- String content; >- >- /** >- * @ant.required >- */ >- public void setName(String name) { >- this.name = name; >- } >- >- /** >- * @ant.required >- */ >- public void setContent(String content) { >- this.content = content; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/PublisherType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/PublisherType.java >deleted file mode 100644 >index b8cf09e..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/PublisherType.java >+++ /dev/null >@@ -1,48 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="publisher" category="epub" >- */ >-public class PublisherType { >- >- String id; >- >- Locale lang; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ReferenceType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ReferenceType.java >deleted file mode 100644 >index bf06077..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/ReferenceType.java >+++ /dev/null >@@ -1,46 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="reference" category="epub" >- */ >-public class ReferenceType { >- >- String href; >- >- String title; >- >- String type; >- >- /** >- * @ant.required >- */ >- public void setHref(String href) { >- this.href = href; >- } >- >- /** >- * @ant.required >- */ >- public void setTitle(String title) { >- this.title = title; >- } >- >- /** >- * @ant.required >- */ >- public void setType(String type) { >- this.type = type; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RelationType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RelationType.java >deleted file mode 100644 >index 5a8ea12..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RelationType.java >+++ /dev/null >@@ -1,47 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="relation" category="epub" >- */ >-public class RelationType { >- >- String id; >- >- Locale lang; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RightsType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RightsType.java >deleted file mode 100644 >index 8ba9f7c..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/RightsType.java >+++ /dev/null >@@ -1,48 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="rights" category="epub" >- */ >-public class RightsType { >- >- String id; >- >- Locale lang; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SourceType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SourceType.java >deleted file mode 100644 >index 12df3fc..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SourceType.java >+++ /dev/null >@@ -1,48 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="source" category="epub" >- */ >-public class SourceType { >- >- String id; >- >- Locale lang; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SubjectType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SubjectType.java >deleted file mode 100644 >index 04ffc71..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/SubjectType.java >+++ /dev/null >@@ -1,48 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="subject" category="epub" >- */ >-public class SubjectType { >- >- String id; >- >- Locale lang; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TitleType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TitleType.java >deleted file mode 100644 >index 158f96e..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TitleType.java >+++ /dev/null >@@ -1,45 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.util.Locale; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="title" category="epub" >- */ >-public class TitleType { >- >- String text; >- >- Locale lang; >- >- String id; >- >- public void setId(String id) { >- this.id = id; >- } >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setLang(Locale lang) { >- this.lang = lang; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TocType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TocType.java >deleted file mode 100644 >index 18a84e3..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TocType.java >+++ /dev/null >@@ -1,41 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-import java.io.File; >- >-/** >- * Represents a table of contents element in the {@link EpubTask}. One should >- * specify either a path to a NCX file or whether or not to generate the NCX. >- * >- * @author Torkild U. Resheim >- * @ant.type name="toc" category="epub" >- */ >-public class TocType { >- >- File file; >- >- boolean generate; >- >- /** >- * @ant.not-required >- */ >- public void setFile(File file) { >- this.file = file; >- } >- >- /** >- * @ant.not-required >- */ >- public void setGenerate(boolean generate) { >- this.generate = generate; >- } >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TypeType.java b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TypeType.java >deleted file mode 100644 >index 58dd9c7..0000000 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/TypeType.java >+++ /dev/null >@@ -1,37 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2011 Torkild U. Resheim. >- * >- * All rights reserved. This program and the accompanying materials are made >- * available under the terms of the Eclipse Public License v1.0 which >- * accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: Torkild U. Resheim - initial API and implementation >- *******************************************************************************/ >-package org.eclipse.mylyn.docs.epub.ant; >- >-/** >- * @author Torkild U. Resheim >- * @ant.type name="type" category="epub" >- */ >-public class TypeType { >- >- String id; >- >- String text; >- >- /** >- * @ant.required >- */ >- public void addText(String text) { >- this.text = text; >- } >- >- /** >- * @ant.not-required >- */ >- public void setId(String id) { >- this.id = id; >- } >- >-} >diff --git a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/tasks.properties b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/tasks.properties >index 93321d5..6dd02f4 100644 >--- a/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/tasks.properties >+++ b/org.eclipse.mylyn.docs.epub.ant.core/src/org/eclipse/mylyn/docs/epub/ant/tasks.properties >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2011 Torkild U. Resheim >+# Copyright (c) 2011,2012 Torkild U. Resheim > # All rights reserved. This program and the accompanying materials > # are made available under the terms of the Eclipse Public License v1.0 > # which accompanies this distribution, and is available at >@@ -8,4 +8,4 @@ > # Contributors: > # Torkild U. Resheim - initial API and implementation > ############################################################################### >-epub=org.eclipse.mylyn.docs.epub.ant.EpubTask >+epub=org.eclipse.mylyn.docs.epub.ant.core.EpubTask >diff --git a/org.eclipse.mylyn.docs.epub.tests/src/org/eclipse/mylyn/docs/epub/tests/ant/TestAntTask.java b/org.eclipse.mylyn.docs.epub.tests/src/org/eclipse/mylyn/docs/epub/tests/ant/TestAntTask.java >index 6e26cf8..b83269e 100644 >--- a/org.eclipse.mylyn.docs.epub.tests/src/org/eclipse/mylyn/docs/epub/tests/ant/TestAntTask.java >+++ b/org.eclipse.mylyn.docs.epub.tests/src/org/eclipse/mylyn/docs/epub/tests/ant/TestAntTask.java >@@ -30,9 +30,7 @@ > static ClassLoader classLoader; > > private static final String SIMPLE_FILE_PATH = "test/ant/simple.epub"; >- >- private static final String DOC_FILE_PATH = "../org.eclipse.mylyn.docs.epub.help/Building_EPUBs.epub"; >- >+ > public TestAntTask(String s) { > super(s); > classLoader = getClass().getClassLoader(); >@@ -68,19 +66,4 @@ > assertEpub(SIMPLE_FILE_PATH); > } > >- /** >- * Tests the "Building EPUBs" book (generated using the Ant task) using the >- * epub validator. This book is assembled by building the >- * "org.eclipse.mylyn.docs.epub.ui" bundle. The book contents is converted >- * from Textile markup to HTML using WikiText. >- */ >- public void testDocumentationBook() { >- File file = getFile(DOC_FILE_PATH); >- assertTrue("Missing publication " + file, file.exists()); >- StringWriter sw = new StringWriter(); >- PrintWriter pw = new PrintWriter(sw); >- EpubCheck checker = new EpubCheck(file, pw); >- checker.validate(); >- Assert.assertTrue(sw.getBuffer().toString().trim(), checker.errorCount == 0); >- } > }
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 375229
:
213134
| 213135